Request To Spec Issues
Purpose
Convert a completed grill-change agreement record into an intent-first spec candidate and vertical TDD-ready issue briefs. Preserve product intent and decision rules so implementation choices follow the agreed direction.
Preconditions
- The grill is complete and its agreement record is approved.
- That grill approval authorizes this synthesis and one bounded local persistence step; do not ask for a second product-level approval.
- Relevant local specs, ADRs, docs, fixtures, and code context have been checked.
- If there is no completed grill agreement, stop and run
grill-change first.
Synthesis Rules
- Do not re-interview the user except on a derivation exception - a contradiction, a missing material decision, or scope expansion (see Derivation Exceptions).
- Keep product intent, non-goals, durable terms, and hard-to-reverse decisions above implementation mechanics.
- Preserve existing spec contracts and safety rules unless the user explicitly approved changing them.
- Split work into vertical behavior slices, not file layers.
- Make every issue small enough for a focused RED, GREEN, refactor loop.
- Mark dependencies and parallel-safe work explicitly.
- Propose architecture rescue candidates before feature slices when a change would deepen an already fragmented codebase.
Architecture Rescue Candidates
When architecture rescue is needed, propose candidates before feature issues. Each candidate must include:
- Files or modules involved
- Current friction
- Proposed deeper module or clearer interface
- Expected locality and leverage improvement
- Expected test improvement
- ADR or spec conflicts
- Recommended dependency state: prerequisite, parallel, or later cleanup
Spec Candidate
Include these sections:
- Status
- Problem
- Goal
- Intent
- Decision Rules
- Non-Goals
- User Flow
- Inputs
- Outputs
- Contracts
- Security Rules
- Acceptance Criteria
- Tests
- TDD Strategy
- Issue Plan
- Documentation Updates
- Final Review Checklist
TDD Strategy complements Tests; it must not replace the required Tests
section from docs/specs/SPEC_TEMPLATE.md.
Seam & Interface Design
Decide the test seam and mock boundary now, under this human gate, so the TDD loop runs without new architecture decisions.
Classify each slice:
- computation: pure input to output; the seam is the function's return value.
- orchestration: coordinates other units; the seam is the observable effect at the boundary it drives.
- deterministic generator: input profile to emitted artifacts; the seam is the generated output compared as a fixture.
Seam rules:
- Pick the highest boundary that keeps tests fast and deterministic; prefer fewer, higher seams over many low ones.
- Prefer an existing seam over inventing a new one.
- Declare the allowed mock boundary as unmanaged dependencies only, such as network, clock, or filesystem you do not own; never mock the code under test.
- Sizing rule: one slice = one seam = one observable outcome = one RED.
Human-gate checklist to confirm before writing briefs:
- Is the seam at the highest fast, deterministic boundary?
- Is the unit under test treated as a black box?
- Do inputs and outputs cross an explicit interface?
- Are the names drawn from the glossary?
- Does an abstraction exist only for the test?
Issue Brief Format
Each issue brief must include:
- Title
- Parent spec or request
- Intent summary
- Behavior slice
- Non-goals
- Acceptance criteria
- Expected RED proof
- Expected GREEN proof
- Seam under test
- Allowed mock boundary
- Test command guidance
- Likely file ownership
- Dependencies
- Parallelism notes
- Contract impact
- Security impact
- Documentation impact
- Implementation context
- Review expectations
Dependency States
Use these states:
ready
blocked
parallel-safe
sequenced
human-gate
Derivation Exceptions
Grill approval covers a faithful synthesis only. Stop before any write, report the issue, and ask the human when derivation reveals a contradiction, a missing material decision, or scope expansion beyond what the grill approved. Persist nothing until the human resolves the exception. These are the only reasons to re-interview after an approved grill.
Persisted Artifacts
The approved grill already authorized this persistence, so persist workflow state in one write step without a second approval. First report what will be persisted, then, after the write, report what was persisted. All writes still go through the client's write-approval flow, and this step never implements any synthesized issue.
TASKS.md: an index-only ledger. Each row links to a brief and carries one state from the closed set ready | blocked | sequenced | parallel-safe | human-gate | in-progress | done. Keep task content in the briefs, not the ledger.
docs/specs/<spec-dir>/issues/NNN-slug.md: one brief per slice, using the Issue Brief Format above.
CONTEXT.md: a glossary only, created lazily when the first durable term appears. Each definition is at most two sentences; add an Avoid: line for terms that must not be used. No implementation details or decisions.
- ADRs: record a decision that meets all three criteria - hard to reverse, surprising without context, real trade-offs. Write to the existing project ADR directory if present, otherwise
docs/adr/.
Output
Return:
- Spec candidate or spec patch
- Vertical issue briefs
- Dependency map
- Parallelism map
- Human gates
- Recommended next step
Safety
- Do not upload source code.
- Do not read or print secrets.
- Do not include credentials, environment values, production data, or private endpoints.
- Do not create GitHub issues, labels, projects, or milestones.
- Do not persist before the grill agreement is approved, and stop before writes on a contradiction, a missing material decision, or scope expansion.
- Do not implement any synthesized issue; approval authorizes persistence, not implementation.
- Do not propose
bypassPermissions, tool pre-approval, dependency auto-installation, hosted execution, or remote MCP behavior.
1---2name: request-to-spec-issues3description: Use after a grill-change session is complete to turn the agreement record into an intent-first spec candidate and vertical TDD-ready issue briefs.4---56<!-- Generated by Agent Profile Compiler. Do not edit by hand. -->78# Request To Spec Issues910## Purpose1112Convert a completed `grill-change` agreement record into an intent-first spec candidate and vertical TDD-ready issue briefs. Preserve product intent and decision rules so implementation choices follow the agreed direction.1314## Preconditions1516- The grill is complete and its agreement record is approved.17- That grill approval authorizes this synthesis and one bounded local persistence step; do not ask for a second product-level approval.18- Relevant local specs, ADRs, docs, fixtures, and code context have been checked.19- If there is no completed grill agreement, stop and run `grill-change` first.2021## Synthesis Rules22231. Do not re-interview the user except on a derivation exception - a contradiction, a missing material decision, or scope expansion (see Derivation Exceptions).242. Keep product intent, non-goals, durable terms, and hard-to-reverse decisions above implementation mechanics.253. Preserve existing spec contracts and safety rules unless the user explicitly approved changing them.264. Split work into vertical behavior slices, not file layers.275. Make every issue small enough for a focused RED, GREEN, refactor loop.286. Mark dependencies and parallel-safe work explicitly.297. Propose architecture rescue candidates before feature slices when a change would deepen an already fragmented codebase.3031## Architecture Rescue Candidates3233When architecture rescue is needed, propose candidates before feature issues. Each candidate must include:3435- Files or modules involved36- Current friction37- Proposed deeper module or clearer interface38- Expected locality and leverage improvement39- Expected test improvement40- ADR or spec conflicts41- Recommended dependency state: prerequisite, parallel, or later cleanup4243## Spec Candidate4445Include these sections:4647- Status48- Problem49- Goal50- Intent51- Decision Rules52- Non-Goals53- User Flow54- Inputs55- Outputs56- Contracts57- Security Rules58- Acceptance Criteria59- Tests60- TDD Strategy61- Issue Plan62- Documentation Updates63- Final Review Checklist6465`TDD Strategy` complements `Tests`; it must not replace the required `Tests`66section from `docs/specs/SPEC_TEMPLATE.md`.6768## Seam & Interface Design6970Decide the test seam and mock boundary now, under this human gate, so the TDD loop runs without new architecture decisions.7172Classify each slice:7374- computation: pure input to output; the seam is the function's return value.75- orchestration: coordinates other units; the seam is the observable effect at the boundary it drives.76- deterministic generator: input profile to emitted artifacts; the seam is the generated output compared as a fixture.7778Seam rules:7980- Pick the highest boundary that keeps tests fast and deterministic; prefer fewer, higher seams over many low ones.81- Prefer an existing seam over inventing a new one.82- Declare the allowed mock boundary as unmanaged dependencies only, such as network, clock, or filesystem you do not own; never mock the code under test.83- Sizing rule: one slice = one seam = one observable outcome = one RED.8485Human-gate checklist to confirm before writing briefs:86871. Is the seam at the highest fast, deterministic boundary?882. Is the unit under test treated as a black box?893. Do inputs and outputs cross an explicit interface?904. Are the names drawn from the glossary?915. Does an abstraction exist only for the test?9293## Issue Brief Format9495Each issue brief must include:9697- Title98- Parent spec or request99- Intent summary100- Behavior slice101- Non-goals102- Acceptance criteria103- Expected RED proof104- Expected GREEN proof105- Seam under test106- Allowed mock boundary107- Test command guidance108- Likely file ownership109- Dependencies110- Parallelism notes111- Contract impact112- Security impact113- Documentation impact114- Implementation context115- Review expectations116117## Dependency States118119Use these states:120121- `ready`122- `blocked`123- `parallel-safe`124- `sequenced`125- `human-gate`126127## Derivation Exceptions128129Grill approval covers a faithful synthesis only. Stop before any write, report the issue, and ask the human when derivation reveals a contradiction, a missing material decision, or scope expansion beyond what the grill approved. Persist nothing until the human resolves the exception. These are the only reasons to re-interview after an approved grill.130131## Persisted Artifacts132133The approved grill already authorized this persistence, so persist workflow state in one write step without a second approval. First report what will be persisted, then, after the write, report what was persisted. All writes still go through the client's write-approval flow, and this step never implements any synthesized issue.134135- `TASKS.md`: an index-only ledger. Each row links to a brief and carries one state from the closed set `ready | blocked | sequenced | parallel-safe | human-gate | in-progress | done`. Keep task content in the briefs, not the ledger.136- `docs/specs/<spec-dir>/issues/NNN-slug.md`: one brief per slice, using the Issue Brief Format above.137- `CONTEXT.md`: a glossary only, created lazily when the first durable term appears. Each definition is at most two sentences; add an `Avoid:` line for terms that must not be used. No implementation details or decisions.138- ADRs: record a decision that meets all three criteria - hard to reverse, surprising without context, real trade-offs. Write to the existing project ADR directory if present, otherwise `docs/adr/`.139140## Output141142Return:143144- Spec candidate or spec patch145- Vertical issue briefs146- Dependency map147- Parallelism map148- Human gates149- Recommended next step150151## Safety152153- Do not upload source code.154- Do not read or print secrets.155- Do not include credentials, environment values, production data, or private endpoints.156- Do not create GitHub issues, labels, projects, or milestones.157- Do not persist before the grill agreement is approved, and stop before writes on a contradiction, a missing material decision, or scope expansion.158- Do not implement any synthesized issue; approval authorizes persistence, not implementation.159- Do not propose `bypassPermissions`, tool pre-approval, dependency auto-installation, hosted execution, or remote MCP behavior.