Skip to content

docs: add CONTRIBUTING.md as 5-min onboarding for human or AI - #9

Merged
hasansezertasan merged 3 commits into
mainfrom
docs/contributing
Jun 25, 2026
Merged

docs: add CONTRIBUTING.md as 5-min onboarding for human or AI#9
hasansezertasan merged 3 commits into
mainfrom
docs/contributing

Conversation

@hasansezertasan

Copy link
Copy Markdown
Member

Summary

A self-contained orientation that a fresh contributor — or a Claude Code session picking up an issue cold — can read in five minutes and then start opening PRs without re-discovering everything we learned during the bootstrap arc.

Contents

  • Mental model (SaaS-shaped, no hosts).
  • Read order across CLAUDE.md, README, state.md, ci.md, setup.md.
  • PR workflow: branch naming, commit format, PR title format, the 4 required status checks, the fork PR + `safe-to-plan` label dance.
  • "Where things go" table mapping the kind of change to the right leaf file.
  • Local dev quickstart.
  • API tricks: read HCP plan summary and confirm apply via API (no UI required).
  • Three gotchas not in the design decisions: brittle HCP check name, GitHub Pages cert wedge, cf-terraforming-is-for-onboarding-only.
  • "What not to do" rules, including the policy against the `claude.ai/code` Co-Authored-By trailer.

Test plan

  • All cross-references resolve.
  • No design decisions duplicated from CLAUDE.md — the doc points at CLAUDE.md for those rather than re-stating them.
  • HCP rolls up SUCCESS (docs-only PR).
  • Next-session smoke test: assume an agent reads only `CLAUDE.md` + `CONTRIBUTING.md` + `Issue feat(hcp): manage HCP workspaces, project, VCS connection via the tfe provider #8`. Can they start on the HCP-as-code arc without further context? (Answer: should be yes.)

A self-contained orientation that a fresh contributor — or a Claude
Code session picking up an issue cold — can read in five minutes and
then start opening PRs without re-discovering everything we learned
during the bootstrap arc.

- Mental model (SaaS-shaped, no hosts).
- Read order across CLAUDE.md, README, state.md, ci.md, setup.md.
- PR workflow: branch naming, commit format, PR title format, the 4
  required status checks, the fork PR + safe-to-plan label dance.
- "Where things go" table mapping the kind of change to the right
  leaf file.
- Local dev quickstart with terraform login + plan.
- API tricks: read HCP plan summary and confirm apply via API
  (no UI required). Same pattern we used throughout the bootstrap.
- Three gotchas not in the design decisions: brittle HCP check name,
  GitHub Pages cert wedge, cf-terraforming-is-for-onboarding-only.
- What not to do, including the policy against the claude.ai/code
  Co-Authored-By trailer.

Pairs with Issue #8 (HCP-as-code) so the next session can pick that
up without reconstructing context.
Two reusable patterns that appeared during the bootstrap arc but
weren't written down:

- docs/setup.md: replace the in-line "discovery token will need
  Read scopes" hedge with a full "Adding scopes to the Cloudflare
  token later" section. Key point: edit, don't regenerate — the
  value stays the same and HCP keeps working without re-pasting.
- docs/import.md: add a "Discovery token" section before Install.
  Separate, short-lived, Read-only token; loaded onto the laptop
  via the read -s + /tmp/cf_token trick; revoked after the run.
  Same pattern we used for the email-routing arc, generalised.

Both sections are what every future "I need to onboard another
Cloudflare resource type" task will need.
@hasansezertasan
hasansezertasan merged commit 11422a2 into main Jun 25, 2026
4 checks passed
@hasansezertasan
hasansezertasan deleted the docs/contributing branch June 25, 2026 16:04
hasansezertasan added a commit that referenced this pull request Jun 25, 2026
…it (#10)

Expands the docs/ layer from "what this is" to "how to run it" with
seven additions / extensions, plus an index so the surface stays
navigable as it grows.

Added:
- docs/rollback.md          — six ranked options when apply goes
                              wrong: revert, discard, cancel,
                              state surgery, admin override, rebuild.
- docs/recipes.md           — copy-paste recipes for the five
                              tasks future-you will do most: add
                              DNS record, add repo, add label, bump
                              provider, cross-workspace change.
- docs/limits.md            — free-tier ceilings on HCP, Cloudflare,
                              GitHub, Let's Encrypt with current
                              usage and the cliffs to watch.
- docs/hcp-api.md           — REST API toolkit: workspace lookup,
                              plan summary, confirm/discard/cancel,
                              variable listing, manual plan trigger.
                              Every script we used during the
                              bootstrap, generalised and reusable.
- docs/worktree-workflow.md — optional git worktree convention
                              for maintainers juggling branches.
- docs/README.md            — index of every doc with a one-line
                              hook and a reading order for first
                              contact. Stops the docs surface from
                              becoming a flat directory listing.

Extended:
- docs/secrets.md           — Rotation section turned from
                              one-line-per-credential into step-by-
                              step zero-downtime procedures with
                              "no plan, no revoke" verification.
- terraform/README.md       — Conventions section: lock file is
                              committed, label naming, file-per-
                              category split, provider pin policy
                              (~> X.Y), cross-leaf references hedge.

Pairs with #9 (CONTRIBUTING.md) and Issue #8 (HCP-as-code) so the
next session can pick up either thread with full operational
context, not just first-contact orientation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant