docs: draft design spec for adversarial-tdd out-of-the-box workflow - #114
Open
DaveGerson wants to merge 19 commits into
Open
docs: draft design spec for adversarial-tdd out-of-the-box workflow#114DaveGerson wants to merge 19 commits into
DaveGerson wants to merge 19 commits into
Conversation
Staged, model-tiered, adversarially verified TDD delivery pipeline as a named workflow preset (baton plan --workflow adversarial-tdd). Draft — under architecture review; will be amended before implementation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
Incorporates two independent architecture reviews: audit-phase carryover (compliance blocker), team-member re-tiering, explicit harvest predicate without the IMPLEMENTATION name fallback, inverted field-preservation rule, manager-mode mutual exclusion in v1, config sibling-key handling, pure-applier gate injection, CLI interaction matrix, and scope cuts (no validator/fable change, no baton workflows command, lossy DB fields documented). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
…aybook New opus reviewer agent that adversarially verifies authored tests against a spec (coverage gaps, vacuous/tautological/over-mocked tests) without reading implementation code — stage 4 of the adversarial-tdd workflow. Bundled-agents mirror re-synced. Playbook added for the PMO gallery. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
…sts) Pins the spec'd behaviors of the workflow preset registry, the WorkflowApplier reshape semantics (harvesting, re-tiering incl. team members, gates/approvals, audit carryover, fan-out, external verifier, idempotency, graph invariants), WorkflowSettings loading, the two new plan-model fields, and the plan CLI --workflow flag contract. All fail by design: implementation follows after adversarial test verification. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
Rulings: last non-carryover phase invariant, member_id preservation, config-default manager mode suppressed under --workflow, effective-tier reporting in WorkflowDecisions, and normative test addenda (harvest normalization, PREPARATION/REMEDIATION coverage, settings/gate CLI wiring, idempotency-guard differentiator, stage scoping pins). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
…tests) Pins harvest name normalization (colon/last-word keying incl. 'Implement: API Layer', 'Backend Implementation'), PREPARATION and REMEDIATION archetypes, baton.yaml->plan settings wiring (acceptance criterion 4), CLI fallback-gate wiring on gateless plans, a real idempotency-guard differentiator, per-reviewer briefing path scoping, stage-1/stage-4 spec-path scoping, build-gate acceptance, harvested-phase auditor negative, cross-phase dep re-keying, and config-default manager-mode suppression under --workflow. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
Named delivery-workflow presets reshaping the assembled MachinePlan post-planning (manager-mode post-processor precedent): - core/workflow/presets.py: WorkflowStage/WorkflowPreset registry with the built-in adversarial-tdd preset (spec->architecture->test authoring->test verification->implementation->implementation verification->final review, tiered fable/fable/opus/opus/sonnet/ opus/fable). - core/workflow/applier.py: pure, idempotent WorkflowApplier — explicit harvest predicate (last-word/colon keying, IMPLEMENTATION/PREPARATION/ REMEDIATION only), inverted field preservation with recursive team re-tiering, gate/approval preservation, audit-phase carryover, final-review fan-out, optional external-vendor automation verifier. - core/config/workflow.py: WorkflowSettings loaded from baton.yaml (stage agent/model overrides, external_command, fan-out knobs); manager config recognizes the sibling key. - models/execution.py: MachinePlan.workflow + PlanStep.workflow_stage, conditionally serialized. - plan_cmd: --workflow flag, mutual exclusions, application before all consumer branches, CLI-computed fallback gate, config-default manager suppression, --explain workflow section; goal_cmd passthrough. 235-test TDD suite green; neighbor suites green (4 pre-existing golden snapshot failures confirmed on baseline). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
cli-reference (--workflow flag + workflow: config section), agent roster (test-adequacy-reviewer, count 30->31), orchestrator-usage recipe 15, package-layout (core/workflow + config/workflow), baton-engine reference plan table, baton.yaml.example workflow section, installed-template CLAUDE.md flag list, root CLAUDE.md/GEMINI.md architecture rows. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
…mplates/CLAUDE.md Rule 2(a) also fires when qualifying phases yield no harvested steps; rule 5.8 partitions by dispatch unit with the reviewer formula exact (never step-clamped); rule 5.1 no-op guard performs zero writes. templates/CLAUDE.md restored — it is a distributable artifact the root conventions mark do-not-modify. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
- Research-support guidance appended to every applier-created stage briefing (spec §3 Notes), pinned by tests. - Final-review fan-out partitions by dispatch unit: the reviewer formula is exact and never clamped by harvested step count; a team step contributes one unit per member (member description + step paths). - Unknown --workflow names now fail before any planning work runs. - WorkflowSettings numerics validated (ge=1); unknown stage ids in the stages override map rejected with an actionable error. - Harvest fallback (a) fires when qualifying phases yield no harvested steps, not only when no phase qualifies. - No-op guard performs zero writes (plan_diagnostics untouched). - Unrecognized non-harvesting stage ids raise instead of silently receiving final-review briefings; workflow_stage rendered in plan.md. Target suite 258 tests green (stable across 20 hash seeds); neighbor sweep 800 green with only the 4 pre-existing golden failures. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
…ings ADR-26 + doc-audit entry; agent count 30->31 across README, roster header, GEMINI, pillars, bundled mirror; real heading for the workflow-presets anchor; baton goal --workflow row; 300s automation-cap caveat; baton.yaml.example overrides commented out; spec v2.3 rulings: carryover dep re-keying, carryover-excluded gate scan and approval OR, inline-auditor exclusion ruling, settings/preset validation notes, status -> Accepted. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
…ate/approval scan; preset invariants Final-review fixes: carryover steps' depends_on are re-keyed intra-phase and dropped otherwise (a verbatim old id silently pointed at a reshaped stage phase, or failed plan-load validation at execute start); the first-test/build-gate scan and the approval OR now skip carryover-eligible phases (no gate aliasing/double-run, no doubled sign-off from a single source); presets validate structural invariants at registration (non-empty stages, exactly one harvesting stage, review stage last) and the bare next() paths carry explicit errors; real StackProfile in the CLI gate wiring. 268 target tests green; each regression test verified to fail against the pre-fix code. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
…fleet checkpoint) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
…ery-workflows section Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
…ware carryover, phase-order preservation, reshape validation - Re-key TeamMember.member_id (and intra-team depends_on) when harvested or carried-over team steps are renumbered, mirroring engine _renumber_phases; fixes DISPATCH Parent-Step/Record-With pointing at the wrong step and the resulting re-dispatch deadlock. - Detect auditor across the flattened team tree so team-consolidated Audit phases carry over; compute carryover eligibility before harvesting so fallback harvest cannot steal steps from auditor-bearing phases. - Record dropped base steps in WorkflowDecisions.dropped_steps with warnings when auditor work would be lost. - Preserve base-phase ordering across the flattened Implementation phase and clear stale parallel_safe flags invalidated by the new edges. - Validate the reshaped plan via MachinePlan round-trip; raise typed WorkflowReshapeError with actionable message. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
… fable tables, automation timeouts) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Staged, model-tiered, adversarially verified TDD delivery pipeline as a
named workflow preset (baton plan --workflow adversarial-tdd). Draft —
under architecture review; will be amended before implementation.
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01FVZ9JqpfgfH4FesTs6uWCo