lwy-requirement-workflow

v2026.09.25

Use when the user wants to build, implement, or develop a feature. Orchestrates evidence-driven Spec-Driven Development. Default lifecycle is `lite` (INIT → IMPLEMENTING → TESTING → DONE); auto-promote to `standard` or `full` when scope, risk, or AC traceability demands it. Triggers: 'develop feature', 'implement this', 'build feature', 'add module', 'fix bug', '开发功能', '实现这个'.

GitHub
Install command
npx skhub add learnwy/lwy-requirement-workflow
Markdown
SKILL.md

Requirement Workflow (v5)

A minimal orchestrator for spec-driven development. The CLI keeps state, runs gates, and writes a curated brief for the next phase — read the brief instead of re-discovering the codebase.

Core idea

ConceptWherePurpose
Lifecyclelite / standard / fullPhase ladder — start small, escalate on evidence
Briefbriefs/<PHASE>.mdCurated context the next agent reads
GateTS validator per phaseBlocks advance until artifacts meet criteria
Traceabilitytraceability.mdAuto-rebuilt AC ↔ task ↔ files matrix

Lifecycles

lite      INIT → IMPLEMENTING → TESTING → DONE
standard  INIT → PLANNING → IMPLEMENTING → TESTING → DONE
full      INIT → DEFINING → PLANNING → DESIGNING → IMPLEMENTING → TESTING → DELIVERING → DONE

Use lite by default. Promote with:

node scripts/cli.cjs escalate -r . --to standard --reason "scope grew past 5 files"
node scripts/cli.cjs escalate -r . --to full     --reason "auth code touched"

Common escalation triggers:

  • A task touches >5 files → bump to standard (need PLANNING)
  • Auth, payment, crypto, or PII keyword → bump to full (need DEFINING + DESIGNING)
  • AC failures repeat in TESTING → bump to full to formalise spec

The three commands you need

node scripts/cli.cjs init    -r . -n "<name>" [-l lite|standard|full]
node scripts/cli.cjs advance -r .                # gate-checked transition
node scripts/cli.cjs status  -r .                # phase, brief, last gate, AC/task counts

Plus three useful auxiliaries:

node scripts/cli.cjs brief -r . --print          # show current-phase brief
node scripts/cli.cjs brief -r . --regen          # rebuild brief from current artifacts
node scripts/cli.cjs trace -r .                  # rebuild traceability.md

Workflow loop

1. cli.cjs init -r . -n "..."                     ← scaffolds .agents/workflow/<id>/
2. cli.cjs advance -r .                           ← runs gate, writes next brief
3. AI reads briefs/<NEW PHASE>.md                 ← single context source
4. AI edits the artifact named in the brief       (spec.md / tasks.md / design.md / code / checklist.md)
5. Repeat 2-4 until DONE

If the gate fails, advance exits 2 and prints which criterion failed. Fix the artifact and retry, or pass --force to bypass.

Per-phase reference (load on demand)

PhaseWhenReference
INITAlwaysn/a
DEFININGfull onlyreferences/phases/DEFINING.md
PLANNINGstandard, fullreferences/phases/PLANNING.md
DESIGNINGfull onlyreferences/phases/DESIGNING.md
IMPLEMENTINGAlwaysreferences/phases/IMPLEMENTING.md
TESTINGAlwaysreferences/phases/TESTING.md
DELIVERINGfull onlyreferences/phases/DELIVERING.md

Default agents

Each phase has one default agent (run first) and a list of optional agents (opt-in when needed). See agents/AGENTS.md for the full registry.

PhaseDefaultOptional
DEFININGproblem-defineriron-audit-pm, risk-auditor, spec-by-example
PLANNINGstory-mappermvp-freeze-architect
DESIGNINGarchitecture-advisordomain-modeler, responsibility-modeler
IMPLEMENTINGtdd-coachrefactoring-guide, legacy-surgeon
TESTINGtest-strategisttest-strategy-advisor, code-reviewer, error-analyzer
DELIVERINGtech-design-reviewercode-reviewer

IDE hooks (optional)

node scripts/cli.cjs hooks generate -r .         # print hooks.json
node scripts/cli.cjs hooks install  -r .         # write hooks.json to .trae/ and .claude/ (IDE-owned config). Workflow state itself lives in `.agents/`.

Installs a SessionStart hook that surfaces the active workflow + brief path, and a Stop quality gate that blocks premature stopping in IMPLEMENTING/TESTING.

See also

Discovery
Tags

No tags published for this skill.

Version
Latest version metadata

Version

v2026.09.25

Published

Sep 25, 2026

Category

Uncategorized

License

MIT

Source path

skills/lwy-requirement-workflow

Default branch

main

Latest commit

d727b38

Tree SHA

8dd1452