Skip to content

Tighten comment discipline + require feature branch for tdd skills#8

Open
ai-agent-lead wants to merge 6 commits into
mainfrom
feat/post-1.2.0-docs-discipline
Open

Tighten comment discipline + require feature branch for tdd skills#8
ai-agent-lead wants to merge 6 commits into
mainfrom
feat/post-1.2.0-docs-discipline

Conversation

@ai-agent-lead

Copy link
Copy Markdown
Owner

Summary

  • Tighten comment discipline in STYLE-comments.md and align enforcement points (code-hygiene, simplify, pr-review) so agent-produced code carries fewer comments by default. Docstrings on exported identifiers are no longer required — written only when the contract isn't obvious from the signature. Trade-off / provenance comments are kept only when the alternative would otherwise be reattempted. Adds in-function section headers as a sixth "delete on sight" pattern.
  • Require a feature branch (feat/<name> or fix/<name>) before tdd, tdd-rounds, or feature-doc start. main receives merges, not commits.
  • Seed CHANGELOG.md at repo root (Keep-a-Changelog format) from git history through v1.2.0, and add a prod-ready Section 7 item that requires a [Unreleased] entry for any user-visible change (skip list matches feature-doc).
  • Re-parent two stray docs commits (d620b85, 709cefe) that had been committed directly to main — they now live on this branch and reach main only via merge of this PR.

Commits

  1. 709cefe docs: fix skill file corruption and bootstrap repo docs (docs/CONTEXT.md, docs/adr/0001-distributed-state.md, docs/features/distributed-state.md)
  2. d620b85 docs: create docs/CONVENTIONS.md to satisfy README references
  3. 572e361 docs(skills): tighten comment discipline to bias against agent output
  4. 9481b12 feat(skills): require feature branch for tdd, tdd-rounds, feature-doc
  5. b8cf8c9 docs(release): seed CHANGELOG.md and wire it into prod-ready Section 7

Review checklist

  • STYLE-comments.md reads consistently end-to-end; §5 ("Documented for the next reader") was folded into §1.3 — confirm nothing dangling references it.
  • code-hygiene Principle 6, simplify §2 (Quality), and pr-review §3e all point at STYLE-comments.md with the same bias.
  • feature-doc Done when, tdd Pre-conditions, and tdd-rounds parent + Builder contracts all encode the non-main branch rule.
  • CHANGELOG.md [Unreleased] entries match the actual commits on this branch.

Heads-up for collaborators

main was force-pushed to remove d620b85 and 709cefe. Anyone whose local main had them needs:

```
git fetch && git reset --hard origin/main
```

The two commits are not lost — they're at the base of this branch.

🤖 Generated with Claude Code

ai-agent-lead and others added 6 commits May 28, 2026 12:10
- Fix duplicated headers and corrupted tails in tdd-rounds, code-hygiene, and WORKFLOWS.md
- Create docs/CONTEXT.md defining the AI Agent Skills domain
- Add docs/adr/0001-distributed-state.md recording the TDD rounds state refactor
- Add docs/features/distributed-state.md documenting the feature scope
Sharpen the canonical comment rules so agent-produced code carries
fewer comments by default. Docstrings on exported identifiers are no
longer required — written only when the contract isn't obvious from
the signature. Trade-off and provenance comments are kept only when
the next reader would otherwise reattempt the rejected alternative.
Adds in-function section headers as a sixth "delete on sight" pattern.
Aligns the enforcement points (code-hygiene during writing, simplify
during sweep, pr-review at review) so the bias is consistent end-to-end.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Code lands on feat/<name> or fix/<name>; main receives merges, not
commits. feature-doc's Done-when now requires the branch to be checked
out before the contract doc is committed. tdd adds a Pre-conditions
block that refuses to start if HEAD is main / master. tdd-rounds
requires the parent to dispatch on a feature branch and the Builder
to verify and refuse if on main.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a root-level CHANGELOG.md following Keep-a-Changelog, seeded from
git history through v1.2.0. Adds one bullet to prod-ready Section 7
requiring an [Unreleased] entry for any user-visible change; skip list
matches feature-doc. Replaces ad-hoc commit-log archaeology with a
single readable artifact.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Four reviewers (Skeptic / Pragmatist / Editor / Architect) ran in
parallel; a fifth judge weighed the contested STATE.md drift. This
commit applies the consensus fixes.

Numbering / corruption:
- code-hygiene now declares "Six principles" (was Five) and the summary
  list gains the missing Principle 6 bullet
- pr-review §3e (hygiene) renumbered to §3f to disambiguate from the
  doc-drift audit also labeled §3e above it
- WORKFLOWS.md cross-workflow item renumbered 12 -> 15 (was duplicate)
- skills/README.md "Adding a skill" step 7 orphan fragment removed

Cross-skill consistency:
- prod-ready stops claiming "same skip list as feature-doc" (it was not
  the same); inlines its own canonical list
- pr-review §3e doc-drift audit gains a CHANGELOG check to mirror
  prod-ready Section 7's new item
- feature-doc Done-when reordered so the branch check precedes
  reviewer sign-off
- tdd-rounds Builder gets a dedicated step 0 (pre-flight branch check)
  so refusal can't be lost inside the context-loading step

ADR-0001 (distributed state) — judge picked Option B:
- ADR keeps Status: accepted but adds Alternatives Considered and an
  Implementation status section flagging skill-text drift
- features/distributed-state.md ACs reset to [ ] with a Status header
  pointing to docs/known-issues.md
- docs/known-issues.md bootstrapped to track the follow-up
- CHANGELOG: distributed-state bullet moves from [1.2.0] Changed to
  [Unreleased] with honest "accepted; migration pending" wording
- WORKFLOWS.md artifacts table marks the feature-scoped rows as
  target end-state until the follow-up lands

STYLE-comments polish:
- §1.3 examples relabeled by kind (Invariant / Constraint / Trade-off /
  Provenance) to match the four-noun section title, restoring the
  explicit Provenance label folded out of the old §1.5
- §1.2 third bullet broadened to cover nil-as-meaning (`(nil, nil) =
  "not found"`), not just zero-as-meaning
- "documented for the next reader" parenthetical dropped from the
  Trade-off example since the old §5 it referenced is gone

CHANGELOG categorization (per Keep-a-Changelog):
- branch-rule and sixth "delete on sight" pattern moved from Added to
  Changed (they tighten existing skills, not add capabilities)

docs/CONVENTIONS.md gains Branches, Commits, and Code Style sections so
the conventions now enforced by four skills also live in one canonical
place.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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