Skip to main content

DEC-AIC-0068: Extend create-issue with a two-stage brownfield New Feature shaping and schema-driven PRD workflow

Accepted

Status: accepted · 2026-12-05

Context​

DEC-AIC-0067 established the unified create-issue skill with complete Bug Report and Enhancement flows and left a dedicated routing hook for New Features (observed: .agents/skills/create-issue/SKILL.md @ 2026-12-05). While bugs and enhancements are tactical and bounded, new features in a brownfield Nx monorepo touch existing domain rules, MCP contracts, vault formats, and UI surfaces. Without structured upfront discovery, feature issues routinely omit regression guardrails, blur new vs. preserved behavior, leak premature implementation choices, or silently invent answers to open product questions.

Decision​

  1. Implement a two-stage brownfield New Feature workflow inside create-issue. Add .agents/skills/create-issue/new-feature.md and .agents/skills/create-issue/references/feature-prd-schema.md, and wire Route C in .agents/skills/create-issue/SKILL.md directly to them so Bug, Enhancement, and New Feature share one entry point.
  2. Stage 1 — Eight-phase facilitated brownfield discovery. Ground discovery in the workspace (ARCHITECTURE.md, affected Nx packages, reasonry/ ADRs) and walk through eight concise phases without inventing domain content: (1) current system & motivation, (2) persona & surface boundaries, (3) smallest valuable slice & Primary/Secondary/Guardrail success criteria, (4) FR-NNN requirements tagged Change: new | modified | preserved plus Given/When/Then US-NN stories, (5) Socratic challenge round (one targeted counter-argument per FR), (6) one-sentence business logic delta (or explicit infra-only note), backward-compatibility constraints, and outside-observable NFRs, (7) explicit non-goals, and (8) soft-gate quality cross-check. Support optional resumable checkpoint notes in /tmp/issue-shaping/<slug>.md for multi-session features.
  3. Stage 2 — Schema-driven output with quality guardrails. Before publishing, validate against references/feature-prd-schema.md, run the thin-input heuristic check (allowing explicit override only via # TODO / ## Open Questions), lint against premature implementation leaks, and route every unresolved gap verbatim into ## Open Questions rather than fabricating answers.
  4. Store both Tier 1 and Tier 2 feature PRDs under reasonry/output/documents/prd/<slug>.md and integrate with Reasonry. Both Standard New Features (Tier 1 compact PRD + matching GitHub issue via gh issue create --label feature) and Large / Multi-Package Features (Tier 2 full 10-section brownfield PRD + linked GitHub issue) store their PRD deliverable in reasonry/output/documents/prd/<slug>.md. PRDs follow reasonry/AGENTS.md citation rules (_Source: <ID> §<Section>_), major unresolved architectural questions may be promoted to Q-AIC-* in reasonry/source/initiatives/ai-coach/questions/, and lasting architectural decisions ship as accepted DEC-AIC-* records in reasonry/source/initiatives/ai-coach/decisions/ upon implementation.

Consequences​

  • New feature issues lock problem framing, brownfield preserved behavior, FR-NNN deltas, Given/When/Then acceptance criteria, and non-goals before code is written.
  • Socratic challenges per FR catch scope creep and hidden coupling during shaping rather than during PR review.
  • Unresolved product or architectural questions surface explicitly in ## Open Questions instead of turning into silent agent assumptions.
  • All five agent harnesses (Claude Code, Codex, Cursor, Gemini CLI, OpenCode) inherit the New Feature workflow automatically through the existing create-issue symlinks.

Alternatives Considered​

  • Create a separate shape-feature / write-prd skill pair outside create-issue. Rejected: splits the issue-first entry point and forces contributors to decide between two skills before knowing whether an idea is an enhancement or a new feature.
  • Keep the lightweight New Feature template fill-in from DEC-AIC-0067 without facilitated discovery. Rejected: form filling alone does not surface brownfield regression guardrails, challenge bloated FRs, or prevent premature implementation leaks.