Skip to content

Port Brighter's spec workflow updates: review gear, one tasks.md, ADR metadata, release notes - #381

Merged
iancooper merged 12 commits into
masterfrom
chore/spec-review-gear
Oct 8, 2026
Merged

iancooper merged 12 commits into
masterfrom
chore/spec-review-gear

Conversation

@iancooper

@iancooper iancooper commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Summary

Brings Darker's /spec commands up to date with Brighter's.

One task list and a shiftable review gear

  • /spec:ralph-tasks is removed. /spec:ralph-implement now runs the approved tasks.md, the same file /spec:implement uses, and requires .tasks-approved. It picks how to handle each task from its leading label, and marks a task it can't classify [!] instead of guessing.
  • New /spec:gear shows or shifts the TDD review gear, stored in the gitignored, per-spec specs/{spec}/.current-gear:
    • review-before (approval stop armed) is the default. A missing or unparseable file, or a task outside the gear's scope, falls back to it.
    • /spec:implement resolves the gear before every task and accepts --review-before / --review-after.
    • /spec:ralph-implement sets review-after and stops cleanly when the gear is shifted back down.
  • review-after removes only the approval pause. RED-first, the full test suite, the two-commit shape (the change, then a docs: tick) and the test conventions all still apply.
  • New CHARACTERISE task shape: when a test already passes, RED is shown by a named, temporary change to production code, which is then reverted.
  • A standalone /test-first and /bugfix:test always stop for approval. CLAUDE.md and testing.md are updated to match.
  • Brighter's rationale: ADR 0071.

ADR metadata

  • All 22 ADRs gain YAML frontmatter. The schema, status vocabulary and a Darker tag list are in .agent_instructions/adr_frontmatter.md. ADR bodies are unchanged.
  • docs/adr/index.md is generated from the frontmatter and should not be edited by hand.
  • New read_adr_metadata / write_adr_metadata skills, wired into /adr, /spec:design (prior-art lookup, stamping frontmatter, regenerating the index) and /spec:approve design (status change, supersession).

Shared ADR contract

  • .agent_instructions/documentation.md gains the ADR contract that /adr, /spec:design and /spec:review all follow:
    • one skeleton, with headings used verbatim
    • Terms
    • readability rules: behaviour before structure, the orienting table or diagram first, citations kept together, sentence rules
    • correcting an ADR
    • diagram rules, including the mermaid traps and decision-ladder tables
    • checks before committing: a mermaid render, an escaped-markdown grep, and readability counts
    • writing tone for design documents
  • /spec:design hands drafting to a Plan sub-agent on opus. The sub-agent checks its references against the codebase and returns the ADR plus a proposed summary and tags. The main agent validates the draft against the skeleton, runs the checks, stamps the frontmatter, regenerates the index, and adds the new ADR to each sibling ADR's "Where this ADR sits" table.
  • /adr uses the same skeleton and checks.
  • /spec:review design grades structure and readability, renders the diagrams, and checks writing tone, the sibling tables and the shared one-sentence rule.
  • Brighter's full-shape example ADRs are linked on GitHub. Darker's existing ADRs predate the skeleton and are not restructured here.

Release notes

  • New /spec:write_release_notes writes or replaces a spec's marked section in a new root release_notes.md.
  • /spec:design recommends it when an ADR records a breaking change, and /spec:review design flags a breaking change with no section.

Other

  • /spec:tasks hands drafting to a Plan sub-agent on opus, which returns the task list plus a coverage cross-reference.
  • /spec:review tasks checks that labels come first, that the approval-gate line is present, and that each CHARACTERISE task names its mutation.
  • /spec:review gains a "Working the findings — fix issues, not lines" step. Each finding is worked as a concept: every statement of that concept is edited together, the old wording is searched for again, and a narrow contradiction check runs before re-review.
  • testing.md gains the "narrow and deep" guidance on when widening a module's public surface is legitimate, and why InternalsVisibleTo is rejected.

Code review phase

  • /spec:review code [--base=ref] reviews the branch diff against the approved requirements, ADRs and tasks, and against Darker's code-style and testing conventions. It checks that the sync, async and streaming pipelines change together.
  • Findings go to review-code.md with a verdict. When all three spec phases are approved, /spec:review with no arguments runs the code review.

Contributor guide

  • New root AGENTIC_CODING.md, adapted from Brighter's. It explains how to contribute with a coding agent: choosing a workflow, the spec workflow and review gears, the bugfix workflow, PROMPT.md across sessions, and reviewing agent-authored PRs.
  • New CONTRIBUTING.md with human-facing guidelines, adapted from Brighter's and from Darker's .agent_instructions. Its project-structure section matches the current src/ and test/ layout.
  • Linked from README.md and CLAUDE.md. PROMPT-*.md and RALPH_STOP are now gitignored.

Not included

  • /spec:show-me is still under review in Brighter.
  • The GENERATE task shape: Darker has no test generator.
  • The existing ralph-tasks.md files in specs 011, 013 and 014 are left as history.

For reviewers

  • The ADR summaries and tags were backfilled by an agent; please check 0010, 0013 and 0015 most carefully.
  • release_notes.md is a new root file. Darker previously kept release notes only in GitHub releases and per-spec drafts.

🤖 Generated with Claude Code

iancooper and others added 4 commits October 8, 2026 09:18
Port Brighter's review gear (Brighter ADR 0071) to Darker's spec commands.

- One task list: /spec:ralph-tasks is removed; /spec:ralph-implement now
  runs the approved tasks.md (requires .tasks-approved), skips ticked tasks,
  and dispatches on the task's leading label, marking unrecognised shapes
  [!] rather than improvising.
- The approval gate is a gear: new /spec:gear reports or shifts it via the
  gitignored, per-spec specs/{spec}/.current-gear, optionally scoped to a
  section of tasks.md. review-before (gated) is the default; absent,
  unparseable, or out-of-scope all resolve to review-before.
- /spec:implement resolves the gear per task and accepts --review-before /
  --review-after; /spec:ralph-implement writes review-after and stops
  cleanly (DOWNSHIFTED) on a downshift.
- review-after removes only the pause: RED-first, the full suite, the
  two-commit shape (change, then docs: tick) and test conventions hold in
  both gears.
- CHARACTERISE task shape: RED observed via a named, reverted production
  mutation; never ALREADY_COMPLETE.
- /spec:tasks requires tag-first task labels and keeps the gate line;
  /spec:approve drops the attended/unattended fork; /spec:status reports
  the gear.
- Standalone /test-first and /bugfix:test are always gated; CLAUDE.md,
  testing.md and the skill indexes updated to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Backfill id/title/status/author/created/summary/tags onto all 22 ADRs,
per the new .agent_instructions/adr_frontmatter.md (schema, status
vocabulary, Darker tag taxonomy, slug-as-identity). docs/adr/index.md is
generated from the frontmatter by generate_adr_index.awk and must not be
hand-edited. Bodies are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…asks sub-agent

Port from Brighter:
- read_adr_metadata / write_adr_metadata skills. /adr and /spec:design
  surface prior art from frontmatter, stamp new ADRs' frontmatter and
  regenerate docs/adr/index.md; /spec:approve design flips status via
  write_adr_metadata, handles supersession, and regenerates the index.
- /spec:write_release_notes writes or replaces a spec's marked section
  under the first ## heading of a new root release_notes.md. /spec:design
  recommends it when an ADR records a breaking change; /spec:review design
  flags a breaking change with no marked section.
- /spec:tasks delegates drafting to a Plan sub-agent on opus, which returns
  the list plus an FR/ADR coverage cross-reference; the main agent
  validates and writes tasks.md.
- /spec:review tasks checks tag-first labels, the gate line, and named
  RED mutations on CHARACTERISE tasks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rejected

Clarify that "do not export to test" forbids reaching inside a module,
not every widening: widen honestly (public, recorded) when no existing
export reaches the behaviour, and treat the need as a design signal.
Explain that InternalsVisibleTo makes `internal` a lie.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iancooper and others added 8 commits October 8, 2026 10:17
…agent

Port from Brighter:
- .agent_instructions/documentation.md gains the ADR contract shared by
  /adr, /spec:design and /spec:review: ADR structure (one skeleton,
  headings verbatim), Terms, ADR readability (behaviour before structure,
  orienting artefact first, concentrated citations, sentence rules),
  Correcting an ADR, Diagrams in ADRs (mermaid traps, decision-ladder
  tables), Before an ADR is committed (render check, escaped-markdown
  grep, readability measures), and Writing tone for design documents.
- /spec:design delegates drafting to a Plan sub-agent on opus that
  verifies references and returns the ADR body plus proposed summary and
  tags; the main agent validates against the skeleton, runs the
  mechanical checks, stamps frontmatter, regenerates the index, and
  back-fills sibling "Where this ADR sits" maps.
- /adr adopts the same skeleton, checks and sibling-map back-fill.
- /spec:review design grades Structure and Readability, verifies
  diagrams by rendering them, checks writing tone, sibling-map
  completeness and the unifying sentence, with matching calibration.

Brighter's full-shape exemplar ADRs are linked on GitHub; Darker's
existing ADRs predate the skeleton and are not restructured here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port Brighter's Step 8: when review findings are worked, name the
concept each finding is about, find and edit every statement of it
together, re-sweep the old phrasings, and run a narrow opus
contradiction check before committing and re-reviewing. Fixing only the
quoted sentence leaves the concept stated two ways, which the next pass
finds as a higher-scored contradiction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adapted from Brighter's guide: what we provide for agents, choosing a
workflow, the spec workflow and driving in review gears (step vs loop
drivers, /spec:gear), the bugfix workflow, keeping working state across
sessions in PROMPT.md, and reviewing agent-authored PRs. Omits pieces
Darker does not have (AGENTS.md, Copilot instructions, SlopWatch,
/refactor:smells, /spec:show-me).

Linked from README.md and CLAUDE.md. Gitignore PROMPT-*.md companions
and the RALPH_STOP kill-switch, both of which the guide describes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ved specs

Port Brighter's code phase: `/spec:review code [--base=ref] [threshold]`
diffs the branch against its base (default master) and has an opus
sub-agent review it against requirements.md, the ADRs and tasks.md, and
against code_style.md, testing.md and design_principles.md. Criteria
cover spec conformance, TDD conventions (naming, Real > Simple >
InMemory > Mock, TestDoubles, no InternalsVisibleTo), correctness,
sync/async/streaming pipeline parity, security and hygiene. Findings go
to review-code.md with a verdict; auto-detect reviews code once all
three phases are approved.

Also correct test-double paths in gear/implement/ralph-implement to the
real per-project TestDoubles/ directories (e.g. Paramore.Darker.Core.Tests).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Human-facing contribution guidelines, adapted from Brighter's and from
Darker's .agent_instructions: first-time setup, ADRs (frontmatter and the
generated index), code style, testing and test doubles, documentation
and licensing, dependency management, build and test, commit messages,
release notes, branching, submitting changes, the CLA, agentic coding,
and the current project structure.

README.md gains a Contributing section; AGENTIC_CODING.md links to
CONTRIBUTING.md and recommends /spec:review code before opening a PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Squash or rebase merges drop the branch commits that spec tooling and
review notes refer to by sha; a merge commit keeps them reachable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Name the sha that tooling actually records (review-code.md), and drop
references to test projects that are not in the repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- test/Paramore.Darker.Tests is now test/Paramore.Darker.Core.Tests:
  fix test commands and the test-doubles location (each test project's
  TestDoubles/ directory, namespace {TestProject}.TestDoubles).
- Paramore.Darker.Testing.Ports no longer exists: drop it.
- Paramore.Darker.Policies and Paramore.Darker.QueryLogging were merged
  into core by ADR 0011: describe them as core's Logging/ and Policies/,
  and fix the README's package links and using directives
  (Paramore.Darker.Logging.Attributes / Paramore.Darker.Policies.Attributes,
  matching the sample). The README also pointed at a removed
  Paramore.Darker.Attributes namespace and the old samples/SampleApi.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iancooper
iancooper merged commit baa4608 into master Oct 8, 2026
7 checks passed
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