@delete101020/aidlc 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTOMATION.md +148 -0
- package/README.md +684 -0
- package/dist/assets/annotate-artifact.skill.md +121 -0
- package/dist/assets/epic-context.skill.md +55 -0
- package/dist/bundle.js +49470 -0
- package/dist/templates/ainative/agents/native-engineer.md +66 -0
- package/dist/templates/ainative/agents/native-operator.md +71 -0
- package/dist/templates/ainative/agents/native-originator.md +56 -0
- package/dist/templates/ainative/agents/native-product-owner.md +68 -0
- package/dist/templates/ainative/agents/native-reviewer.md +65 -0
- package/dist/templates/ainative/agents/native-verifier.md +58 -0
- package/dist/templates/ainative/artifacts/build-plan.md +56 -0
- package/dist/templates/ainative/artifacts/implement.md +55 -0
- package/dist/templates/ainative/artifacts/intent.md +50 -0
- package/dist/templates/ainative/artifacts/maintain.md +85 -0
- package/dist/templates/ainative/artifacts/review.md +68 -0
- package/dist/templates/ainative/artifacts/spec.md +69 -0
- package/dist/templates/ainative/artifacts/verify.md +55 -0
- package/dist/templates/ainative/skills/native-build-plan.md +74 -0
- package/dist/templates/ainative/skills/native-implement.md +62 -0
- package/dist/templates/ainative/skills/native-intent.md +50 -0
- package/dist/templates/ainative/skills/native-maintain.md +94 -0
- package/dist/templates/ainative/skills/native-review.md +82 -0
- package/dist/templates/ainative/skills/native-spec.md +83 -0
- package/dist/templates/ainative/skills/native-verify.md +60 -0
- package/dist/templates/sdlc/agents/designer.md +87 -0
- package/dist/templates/sdlc/agents/developer.md +178 -0
- package/dist/templates/sdlc/agents/example-with-skills.md +59 -0
- package/dist/templates/sdlc/agents/orchestrator.md +186 -0
- package/dist/templates/sdlc/agents/po.md +115 -0
- package/dist/templates/sdlc/agents/qa.md +141 -0
- package/dist/templates/sdlc/agents/tech-lead.md +124 -0
- package/dist/templates/sdlc/artifacts/design.md +130 -0
- package/dist/templates/sdlc/artifacts/execute-test.md +64 -0
- package/dist/templates/sdlc/artifacts/implement.backend.md +96 -0
- package/dist/templates/sdlc/artifacts/implement.md +70 -0
- package/dist/templates/sdlc/artifacts/implement.web-react.md +109 -0
- package/dist/templates/sdlc/artifacts/implement.web.md +99 -0
- package/dist/templates/sdlc/artifacts/plan.md +97 -0
- package/dist/templates/sdlc/artifacts/prototype.md +141 -0
- package/dist/templates/sdlc/artifacts/test-cases.md +47 -0
- package/dist/templates/sdlc/artifacts/test-plan.md +100 -0
- package/dist/templates/sdlc/artifacts/unit-test.md +32 -0
- package/dist/templates/sdlc/profiles/agile-lite.yaml +29 -0
- package/dist/templates/sdlc/profiles/hybrid.yaml +43 -0
- package/dist/templates/sdlc/profiles/iso-ieee.yaml +67 -0
- package/dist/templates/sdlc/profiles/none.yaml +21 -0
- package/dist/templates/sdlc/skills/advance-epic.md +77 -0
- package/dist/templates/sdlc/skills/analyze-requirements.md +279 -0
- package/dist/templates/sdlc/skills/discovery-gate.md +118 -0
- package/dist/templates/sdlc/skills/execute-test.md +74 -0
- package/dist/templates/sdlc/skills/generate-test-cases.md +77 -0
- package/dist/templates/sdlc/skills/implement.md +74 -0
- package/dist/templates/sdlc/skills/prd.md +114 -0
- package/dist/templates/sdlc/skills/prototype.md +128 -0
- package/dist/templates/sdlc/skills/tech-design.md +134 -0
- package/dist/templates/sdlc/skills/test-plan.md +115 -0
- package/dist/templates/sdlc/skills/test-report.md +38 -0
- package/dist/templates/sdlc/skills/unit-test.md +43 -0
- package/dist/templates/sdlc/validators/ci.mjs +49 -0
- package/dist/templates/sdlc/validators/traceability.mjs +244 -0
- package/dist/templates/speckit/agents/analyst.md +42 -0
- package/dist/templates/speckit/agents/speckit-developer.md +36 -0
- package/dist/templates/speckit/agents/speckit-qa.md +38 -0
- package/dist/templates/speckit/agents/speckit-tech-lead.md +40 -0
- package/dist/templates/speckit/artifacts/analyze.md +48 -0
- package/dist/templates/speckit/artifacts/clarify.md +64 -0
- package/dist/templates/speckit/artifacts/plan.md +57 -0
- package/dist/templates/speckit/artifacts/specify.md +64 -0
- package/dist/templates/speckit/artifacts/tasks.md +33 -0
- package/dist/templates/speckit/skills/analyze.md +50 -0
- package/dist/templates/speckit/skills/clarify.md +31 -0
- package/dist/templates/speckit/skills/plan.md +56 -0
- package/dist/templates/speckit/skills/specify.md +52 -0
- package/dist/templates/speckit/skills/speckit-implement.md +33 -0
- package/dist/templates/speckit/skills/tasks.md +38 -0
- package/dist/tools/epic-memory-hook.mjs +78 -0
- package/dist/tools/epic-memory.mjs +130 -0
- package/dist/tools/md-to-html.mjs +478 -0
- package/dist/tools/vendor/marked.esm.mjs +2432 -0
- package/dist/vendor/annotron/LICENSE +21 -0
- package/dist/vendor/annotron/README.md +213 -0
- package/dist/vendor/annotron/bin/annotron +467 -0
- package/dist/vendor/annotron/commands/annotron.md +11 -0
- package/dist/vendor/annotron/hooks/annotron-hook.sh +38 -0
- package/dist/vendor/annotron/hooks/hooks.json +50 -0
- package/dist/vendor/annotron/package.json +72 -0
- package/dist/vendor/annotron/skills/annotron-review/SKILL.md +86 -0
- package/dist/vendor/annotron/src/chrome.html +2029 -0
- package/dist/vendor/annotron/src/mdRender.js +208 -0
- package/dist/vendor/annotron/src/sdk.js +1042 -0
- package/dist/vendor/annotron/src/server.js +780 -0
- package/package.json +60 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: execute-test
|
|
3
|
+
description: Generate a TEST-SCRIPT (executable test scenarios for human testers, including UAT scenarios). Stack-neutral — adapts to web, mobile, desktop, and backend/API products.
|
|
4
|
+
argument-hint: "<{{EPIC_PREFIX}}-XXXX>"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Test Script for Epic $0
|
|
8
|
+
|
|
9
|
+
You are the **QA Engineer (QA)** agent — a senior test practitioner.
|
|
10
|
+
Load your full persona from `.claude/agents/qa.md` before starting.
|
|
11
|
+
|
|
12
|
+
## Step 0: Pipeline Gate Check
|
|
13
|
+
Read and execute `.claude/skills/_gate-check.md`. This skill = phase `execute-test`, epic = `$0`. If gate fails → STOP.
|
|
14
|
+
|
|
15
|
+
## Steps
|
|
16
|
+
|
|
17
|
+
1. Read the epic: `docs/epics/$0/$0.md`
|
|
18
|
+
2. Read the PRD: `docs/epics/$0/PRD.md` — acceptance criteria drive test scenarios
|
|
19
|
+
3. Read the template: `docs/epics/$0/TEST-SCRIPT.md` or `docs/templates/TEST-SCRIPT-TEMPLATE.md`
|
|
20
|
+
4. Fill the test script with the sections below, adapted to the product surface
|
|
21
|
+
|
|
22
|
+
## Test Script Contents
|
|
23
|
+
|
|
24
|
+
### Prerequisites
|
|
25
|
+
- Build version / URL / binary / package being tested
|
|
26
|
+
- Test account(s) and credentials
|
|
27
|
+
- Environment details (browser + version, OS, device, network, locale) — include only what matters for this product
|
|
28
|
+
- Any feature flags, entitlements, or test data that must be in place
|
|
29
|
+
- Clock / timezone if relevant
|
|
30
|
+
|
|
31
|
+
### Scenarios (derived from acceptance criteria)
|
|
32
|
+
|
|
33
|
+
For **each acceptance criteria** in the PRD, write a scenario:
|
|
34
|
+
- **What we're testing** (one sentence, plain language)
|
|
35
|
+
- **Step-by-step actions** a non-technical tester can follow
|
|
36
|
+
- **Expected result** per step
|
|
37
|
+
- **Screenshot / recording** where it helps
|
|
38
|
+
- Traceability: note the AC ID this scenario covers
|
|
39
|
+
|
|
40
|
+
Rules for steps:
|
|
41
|
+
- One action per step
|
|
42
|
+
- Exact UI element / endpoint / command — no "open the feature"; say "tap the blue Save button at the bottom of the screen" or "visit https://app.example.com/settings"
|
|
43
|
+
- No jargon, no code, no implementation language
|
|
44
|
+
- Every step has a concrete expected result
|
|
45
|
+
|
|
46
|
+
### Edge-Case Scenarios (at minimum)
|
|
47
|
+
Pick the ones that apply to this product:
|
|
48
|
+
- Offline / disconnected network / partial network
|
|
49
|
+
- Invalid input / validation failure
|
|
50
|
+
- Permission denied or missing entitlement
|
|
51
|
+
- Session / auth expired mid-flow
|
|
52
|
+
- Interrupted flow (close, backgrounded, reloaded, crashed & restarted)
|
|
53
|
+
- Empty state (no data yet)
|
|
54
|
+
- Large data / long text / unicode / RTL locale (if multi-language)
|
|
55
|
+
|
|
56
|
+
### Regression Quick Check
|
|
57
|
+
- Short smoke test of core flows that must still work after this change
|
|
58
|
+
|
|
59
|
+
### Verdict Section
|
|
60
|
+
- Pass / fail criteria per scenario
|
|
61
|
+
- Sign-off fields (tester name, date, environment, verdict)
|
|
62
|
+
- Defect log (description, severity, screenshot, ticket reference)
|
|
63
|
+
|
|
64
|
+
## Rules
|
|
65
|
+
|
|
66
|
+
- Write for someone who has **never seen the code**
|
|
67
|
+
- Steps must be concrete and unambiguous
|
|
68
|
+
- Every step has an expected result — no "see that it works"
|
|
69
|
+
- Screenshots called out where the visual check matters (styling, alignment, state indication)
|
|
70
|
+
- Scenarios are independently runnable — no "continue from previous scenario" unless explicit
|
|
71
|
+
|
|
72
|
+
## Output
|
|
73
|
+
|
|
74
|
+
Write the completed test script to `docs/epics/$0/TEST-SCRIPT.md`.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: generate-test-cases
|
|
3
|
+
description: Generate concrete, executable test cases for an epic from its test plan and acceptance criteria. Output is runnable test scripts plus structured TEST-CASES.md, not prose.
|
|
4
|
+
argument-hint: "<{{EPIC_PREFIX}}-XXXX>"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Generate Test Cases for Epic $0
|
|
8
|
+
|
|
9
|
+
You are the **QA Engineer (QA)** agent — a senior test practitioner with experience designing concrete, executable test cases across web, mobile, desktop, backend, and CLI.
|
|
10
|
+
Load your full persona from `.claude/agents/qa.md` before starting.
|
|
11
|
+
|
|
12
|
+
## Step 0: Pipeline Gate Check
|
|
13
|
+
Read and execute `.claude/skills/_gate-check.md`. This skill = phase `generate-test-cases`, epic = `$0`. If gate fails → STOP.
|
|
14
|
+
|
|
15
|
+
## Inputs
|
|
16
|
+
|
|
17
|
+
1. The epic: `docs/epics/$0/$0.md`
|
|
18
|
+
2. The PRD: `docs/epics/$0/PRD.md` — acceptance criteria are the canonical test inputs
|
|
19
|
+
3. The test plan: `docs/epics/$0/TEST-PLAN.md` — categories, scope, and matrix
|
|
20
|
+
4. The tech design: `docs/epics/$0/TECH-DESIGN.md` — file impact, interfaces under test
|
|
21
|
+
5. Existing tests, fixtures, factories — new cases must match the project's style and tooling
|
|
22
|
+
6. The test cases template: `docs/epics/$0/TEST-CASES.md` or `docs/templates/TEST-CASES-TEMPLATE.md`
|
|
23
|
+
|
|
24
|
+
## Rules
|
|
25
|
+
|
|
26
|
+
- Every test case ties back to **one AC id** or to an explicit risk listed in the test plan. No orphan tests.
|
|
27
|
+
- Cases are **deterministic** — inject clock, seed randomness, stub the network. Flaky-by-design is rejected at auto-review.
|
|
28
|
+
- Cases are **isolated** — own their data, don't depend on test order.
|
|
29
|
+
- Cases prefer **arrange / act / assert** structure with one logical assertion per case (use sub-cases for matrix dimensions).
|
|
30
|
+
- Use the project's existing test framework / runner — do not introduce a new one in this phase.
|
|
31
|
+
- When a case needs new fixtures or factories, add them in the same commit as the case.
|
|
32
|
+
|
|
33
|
+
## Output Structure
|
|
34
|
+
|
|
35
|
+
For each AC, emit the cases below the appropriate category headers. Use the prefixes the test plan already established (`$0-UT`, `$0-IT`, `$0-E2E`, …).
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
### $0-UT-001 — <one-line behaviour under test>
|
|
39
|
+
- AC: <AC id from PRD>
|
|
40
|
+
- Type: Unit / Integration / E2E / NFR-Performance / …
|
|
41
|
+
- Preconditions: <fixtures, seeded data, env>
|
|
42
|
+
- Steps:
|
|
43
|
+
1. <arrange>
|
|
44
|
+
2. <act>
|
|
45
|
+
- Expected: <single observable outcome>
|
|
46
|
+
- Test path: <relative path to the test file, e.g. `tests/foo.spec.ts:42`>
|
|
47
|
+
- Status: drafted | implemented
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Group the cases by AC, then by category. Keep an index at the top of `TEST-CASES.md` so a reviewer can jump straight from an AC id to its cases.
|
|
51
|
+
|
|
52
|
+
## Executable Test Scripts
|
|
53
|
+
|
|
54
|
+
Where the project's stack supports it, also generate the **runnable test files** alongside the spec entry. For each generated test file:
|
|
55
|
+
|
|
56
|
+
- Place it in the project's existing test folder (don't invent a new one)
|
|
57
|
+
- Use the project's existing matchers, fixtures, and naming conventions
|
|
58
|
+
- Reference the test plan id in the test name so failures point back to the case (`it('$0-UT-001: rejects empty title', …)`)
|
|
59
|
+
- Leave the test body as a real assertion, not a `TODO` — if you can't write it yet, raise the gap in the TEST-CASES doc instead of stubbing
|
|
60
|
+
|
|
61
|
+
## Failure-Mode / Negative Cases
|
|
62
|
+
|
|
63
|
+
The test plan lists failure-mode categories (`$0-NET`, `$0-PM`, `$0-UP`, `$0-CC`, …). For each one that applies, emit at least one concrete case here. Skipping a category is a deliberate decision — note it in the doc with one line explaining why.
|
|
64
|
+
|
|
65
|
+
## Quality Gate
|
|
66
|
+
|
|
67
|
+
Before you mark the phase done, self-check:
|
|
68
|
+
|
|
69
|
+
- [ ] Every AC has at least one case
|
|
70
|
+
- [ ] Each case has a single, observable expected outcome
|
|
71
|
+
- [ ] Test paths point at real files (or marked `drafted` if not yet implemented)
|
|
72
|
+
- [ ] No flaky-by-design patterns (sleep loops, real-network calls, shared global state)
|
|
73
|
+
- [ ] Generated test files run locally — at minimum, the framework picks them up and they fail loudly until logic lands
|
|
74
|
+
|
|
75
|
+
## Output
|
|
76
|
+
|
|
77
|
+
Write the completed test cases to `docs/epics/$0/TEST-CASES.md`. Commit the generated test source files in the same change.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aidlc-implement
|
|
3
|
+
description: Implement the approved tech design on a feature branch — write production code that follows the design, project conventions, and acceptance criteria. Stack-neutral (web, mobile, desktop, backend, CLI).
|
|
4
|
+
argument-hint: "<{{EPIC_PREFIX}}-XXXX>"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Implement Epic $0
|
|
8
|
+
|
|
9
|
+
You are the **Developer (Dev)** agent — a senior polyglot engineer.
|
|
10
|
+
Load your full persona from `.claude/agents/developer.md` before starting.
|
|
11
|
+
|
|
12
|
+
## GH-74 Part 3: Git behavior configuration
|
|
13
|
+
**Read the step's `git` config from `.aidlc/runs/$RUN_ID.json` → `steps[implement].git`:**
|
|
14
|
+
- `git.branch`: Create a feature branch (default: true)
|
|
15
|
+
- `git.push`: Push the branch to origin (default: true)
|
|
16
|
+
- `git.open_pr`: Open a PR after pushing (default: true)
|
|
17
|
+
|
|
18
|
+
If the epic has no run state, default to all true (preserve current behavior).
|
|
19
|
+
**Follow these flags throughout the steps below.** If `git.branch` is false, work on the current branch. If `git.push` is false, skip the push. If `git.open_pr` is false, commit but don't open a PR.
|
|
20
|
+
|
|
21
|
+
## Step 0: Pipeline Gate Check
|
|
22
|
+
Read and execute `.claude/skills/_gate-check.md`. This skill = phase `implement`, epic = `$0`. If gate fails → STOP.
|
|
23
|
+
|
|
24
|
+
## Context to read first
|
|
25
|
+
1. **Tech design**: `docs/epics/$0/TECH-DESIGN.md` — your implementation blueprint
|
|
26
|
+
2. **PRD**: `docs/epics/$0/PRD.md` — acceptance criteria you must satisfy
|
|
27
|
+
3. **Test plan**: `docs/epics/$0/TEST-PLAN.md` — the behavior your code must support
|
|
28
|
+
4. **`CLAUDE.md` + existing code** in the affected area — match idioms, naming, layering before writing a line
|
|
29
|
+
|
|
30
|
+
## This step is test-driven (TDD) — you MUST run BOTH skills, in this order
|
|
31
|
+
|
|
32
|
+
This step owns **both** `aidlc-unit-test` and `aidlc-implement`. Always run both,
|
|
33
|
+
and always **write the tests before the implementation** (test-first). Do not
|
|
34
|
+
skip the unit-test work, and do not implement first.
|
|
35
|
+
|
|
36
|
+
## Steps
|
|
37
|
+
1. **If `git.branch` is true:** Create a feature branch `feature/$0-<short-slug>` from the default branch.
|
|
38
|
+
**If `git.branch` is false:** Work on the current branch (no feature branch).
|
|
39
|
+
2. **`aidlc-unit-test` (RED) — write the unit tests first.** Before writing any
|
|
40
|
+
production code, add unit tests for the new/changed behavior covering the
|
|
41
|
+
TEST-PLAN's unit cases (`$0-UT*`): happy path + the error paths in the
|
|
42
|
+
acceptance criteria. Name tests after the plan IDs where applicable. Keep
|
|
43
|
+
them deterministic (fixed seeds, injected clock, no live network). Run them
|
|
44
|
+
and confirm they **fail** for the right reason (the feature doesn't exist yet).
|
|
45
|
+
See `.claude/skills/aidlc-unit-test.md` for the full test-authoring rules.
|
|
46
|
+
3. **`aidlc-implement` (GREEN) — write the production code.** Implement the files
|
|
47
|
+
in the design's **File Impact** section so the tests from step 2 pass. Follow
|
|
48
|
+
the architecture and contracts exactly — don't freelance. If the design looks
|
|
49
|
+
wrong, flag it to the Tech Lead instead of diverging silently.
|
|
50
|
+
4. Wire new components where the project expects them (DI, routing, registration).
|
|
51
|
+
5. Run the project's lint + typecheck + build + the **full** unit-test suite
|
|
52
|
+
locally; everything must pass before handoff.
|
|
53
|
+
6. **`aidlc-unit-test` (COVERAGE) — after the code is green, re-run coverage
|
|
54
|
+
across the WHOLE project** (not just the changed files) with the project's
|
|
55
|
+
coverage command, and record the result in the report (step 8). If the
|
|
56
|
+
project has no coverage tooling, say so explicitly in the report.
|
|
57
|
+
7. **Git push and PR (conditional on git config):**
|
|
58
|
+
- **If `git.push` is true:** Push the branch to origin.
|
|
59
|
+
- **If `git.open_pr` is true:** Open a PR whose body references the epic key `$0`.
|
|
60
|
+
- **If `git.open_pr` is false:** Push but don't open a PR.
|
|
61
|
+
- **If `git.push` is false:** Skip pushing to origin; keep changes local.
|
|
62
|
+
8. Write a summary to `docs/epics/$0/artifacts/IMPLEMENT-SUMMARY.md`: branch name,
|
|
63
|
+
files touched, acceptance criteria addressed, the unit tests added (`$0-UT*`),
|
|
64
|
+
the **whole-project coverage numbers** from step 6 (command run + total %),
|
|
65
|
+
and anything intentionally deferred.
|
|
66
|
+
|
|
67
|
+
## Rules
|
|
68
|
+
- Order of priority: **correct → clear → fast**. No speculative abstraction, no
|
|
69
|
+
dead code, no "while I'm here" changes outside epic scope.
|
|
70
|
+
- Keep diffs small and reviewable.
|
|
71
|
+
- No secrets in code, logs, or client bundles. Validate untrusted input at trust
|
|
72
|
+
boundaries; parameterize queries; least-privilege scopes.
|
|
73
|
+
- Close what you open (files, sockets, timers, subscriptions); cancel in-flight
|
|
74
|
+
work when its scope is destroyed.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prd
|
|
3
|
+
description: Generate or review a PRD (Product Requirements Document) for an epic. Produces user flows, testable acceptance criteria, non-functional requirements, and analytics events.
|
|
4
|
+
argument-hint: "<{{EPIC_PREFIX}}-XXXX> [feature description]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# PRD for Epic $0
|
|
8
|
+
|
|
9
|
+
You are the **Product Owner (PO)** agent — a senior product practitioner with experience shipping across web, mobile, desktop, and service products.
|
|
10
|
+
Load your full persona from `.claude/agents/po.md` before starting.
|
|
11
|
+
|
|
12
|
+
## Step 0: Pipeline Gate Check
|
|
13
|
+
Read and execute `.claude/skills/_gate-check.md`. This skill = phase `plan`, epic = `$0`. If gate fails → STOP.
|
|
14
|
+
|
|
15
|
+
## Step 0.5: Discovery Gate (run up front — BEFORE asking anything in chat)
|
|
16
|
+
|
|
17
|
+
Before writing the PRD, take stock of your **open questions** — scope, target users, which data
|
|
18
|
+
to surface, density, edge cases, which approach, where a boundary sits.
|
|
19
|
+
|
|
20
|
+
**Gate rule:** if there are **≥ 3 open questions**, OR **any single high-impact question**
|
|
21
|
+
(scope / architecture / acceptance criteria):
|
|
22
|
+
|
|
23
|
+
> **Read and execute `~/.claude/skills/aidlc-discovery-gate.md` now.** Pass epic = `$0`.
|
|
24
|
+
> That skill composes `docs/epics/$0/artifacts/DISCOVERY.md` as a point-and-click
|
|
25
|
+
> questionnaire, **opens it in annotron in the browser**, and blocks (`poll`) until you
|
|
26
|
+
> finalize your answers.
|
|
27
|
+
|
|
28
|
+
**This is mandatory when the gate fires — it is the ONLY acceptable way to resolve the
|
|
29
|
+
questions. Do NOT ask them one-at-a-time in chat. Do NOT silently guess. Do NOT skip straight
|
|
30
|
+
to writing the PRD.** If you find yourself about to type a numbered list of questions to the
|
|
31
|
+
user, stop — that is the signal to run the discovery gate instead. The whole point is a single
|
|
32
|
+
point-and-click place to confirm decisions, not a chat interrogation.
|
|
33
|
+
|
|
34
|
+
When the gate returns, write the confirmed choices into a **`## Discovery decisions`** section at
|
|
35
|
+
the **top of the PRD** (see Output), then build the rest of the PRD *from those decisions*.
|
|
36
|
+
|
|
37
|
+
Only when the gate rule does **not** fire (a genuinely small / clear epic — fewer than 3
|
|
38
|
+
questions and none high-impact) may you skip discovery and write the PRD directly, with no
|
|
39
|
+
annotron round. `DISCOVERY.md` is a **working doc, never a pipeline artifact** (never in any
|
|
40
|
+
`produces:` / `depends_on`); the durable record is the PRD's `## Discovery decisions` section.
|
|
41
|
+
|
|
42
|
+
## Steps
|
|
43
|
+
|
|
44
|
+
1. Read the epic doc at `docs/epics/$0/$0.md` to understand scope, target user, and user stories
|
|
45
|
+
2. Read the PRD template at `docs/epics/$0/PRD.md` (already scaffolded) or `docs/templates/PRD-TEMPLATE.md`
|
|
46
|
+
3. Read relevant existing docs based on the epic's affected areas (`docs/core-business/` or equivalent) so the PRD is consistent with what already ships
|
|
47
|
+
4. Check related / predecessor epics for dependencies or scope overlap
|
|
48
|
+
5. Fill the PRD with the sections below — each answers a specific question downstream work will ask
|
|
49
|
+
|
|
50
|
+
## PRD Contents
|
|
51
|
+
|
|
52
|
+
### Discovery decisions
|
|
53
|
+
*(Only when the discovery gate ran — omit for a small/clear epic that skipped it.)*
|
|
54
|
+
- One line per resolved question → the chosen answer (including any "Decide for me" defaults
|
|
55
|
+
that stood). Downstream phases (design, test-plan) read confirmed scope/approach from here.
|
|
56
|
+
|
|
57
|
+
### Problem & Goal
|
|
58
|
+
- **Problem**: crisp user-focused statement — who hurts, when, why
|
|
59
|
+
- **Goal**: measurable outcomes (leading + lagging indicators)
|
|
60
|
+
- **Why now**: opportunity cost rationale
|
|
61
|
+
|
|
62
|
+
### User Flow
|
|
63
|
+
- **Happy path** — step-by-step from user's perspective
|
|
64
|
+
- **Error / edge paths** — at minimum: external dependency down, permission/access denied, auth/session expired mid-flow, interruption/restart, empty state, boundary inputs
|
|
65
|
+
- **Recovery paths** — how the user gets unstuck
|
|
66
|
+
|
|
67
|
+
### Acceptance Criteria
|
|
68
|
+
- Given/When/Then format, IDs as `$0-AC01`, `$0-AC02`, ...
|
|
69
|
+
- One AC per testable behavior; avoid AND-chaining multiple behaviors
|
|
70
|
+
- Mark priority (Must / Should / Could / Won't — MoSCoW)
|
|
71
|
+
- Every error state has an AC, not only the happy path
|
|
72
|
+
|
|
73
|
+
### UI / Design
|
|
74
|
+
- Link to design artifacts if available (Figma, prototype, etc.)
|
|
75
|
+
- If no design yet, describe layout and behavior requirements sufficient for implementation
|
|
76
|
+
- Platform conventions: note where the feature should follow native / platform patterns (e.g., iOS HIG, Material, web a11y patterns, desktop keyboard/menu conventions)
|
|
77
|
+
|
|
78
|
+
### Non-Functional Requirements (check all that apply)
|
|
79
|
+
- **Performance**: user-visible latency budget (p50/p95), throughput, resource footprint
|
|
80
|
+
- **Reliability**: retry / timeout / fallback behavior; idempotency
|
|
81
|
+
- **Security & privacy**: data classification, authn/authz, PII handling, consent
|
|
82
|
+
- **Compatibility**: minimum supported browsers / OS / devices / runtime versions
|
|
83
|
+
- **Accessibility**: WCAG level, keyboard, screen reader, contrast, motion
|
|
84
|
+
- **Internationalization**: supported locales, RTL, currency, date formats
|
|
85
|
+
- **Observability**: logs, metrics, traces the feature should emit
|
|
86
|
+
- **Offline / resilience**: behavior without network or with intermittent connectivity
|
|
87
|
+
|
|
88
|
+
### Analytics / Telemetry
|
|
89
|
+
- Event catalog entries (name, trigger, properties)
|
|
90
|
+
- Map each event to a success / guardrail metric
|
|
91
|
+
- Respect consent and privacy requirements
|
|
92
|
+
|
|
93
|
+
### Dependencies
|
|
94
|
+
- External: APIs, designs, third-party services, vendor readiness
|
|
95
|
+
- Internal: other epics, shared libraries, infra work
|
|
96
|
+
- Status (ready / in progress / blocked) and owner
|
|
97
|
+
|
|
98
|
+
### Rollout
|
|
99
|
+
- Strategy (flagged, phased %, canary, direct)
|
|
100
|
+
- Target population / cohort
|
|
101
|
+
- Success + guardrail metrics to watch
|
|
102
|
+
- Kill-switch / rollback path for risky changes
|
|
103
|
+
|
|
104
|
+
## Rules
|
|
105
|
+
|
|
106
|
+
- Acceptance criteria must be testable — no vague "should work well," "feels fast," or "good UX"
|
|
107
|
+
- Every error state has an explicit expected behavior
|
|
108
|
+
- Quantify success targets ("> 95% success rate," not "high success rate")
|
|
109
|
+
- Describe **what** the user experiences, not **how** it's implemented
|
|
110
|
+
- Include design link if provided; otherwise describe UI/behavior requirements concretely
|
|
111
|
+
|
|
112
|
+
## Output
|
|
113
|
+
|
|
114
|
+
Write the completed PRD to `docs/epics/$0/PRD.md`.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prototype
|
|
3
|
+
description: Propose the UI visually with multiple design options before technical design. Generate variants using Claude Artifacts, Figma, or component libraries.
|
|
4
|
+
argument-hint: "<{{EPIC_PREFIX}}-XXXX>"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Prototype Epic $0
|
|
8
|
+
|
|
9
|
+
You are the **Designer (DES)** agent — a senior product designer with expertise across web, mobile, and desktop.
|
|
10
|
+
Load your full persona from `.claude/agents/designer.md` before starting.
|
|
11
|
+
|
|
12
|
+
## Step 0: Pipeline Gate Check
|
|
13
|
+
Read and execute `.claude/skills/_gate-check.md`. This skill = phase `prototype`, epic = `$0`. If gate fails → STOP.
|
|
14
|
+
|
|
15
|
+
## Step 1: Read Context
|
|
16
|
+
|
|
17
|
+
1. **PRD** — `docs/epics/$0/artifacts/PRD.md` (esp. `## Discovery decisions` section)
|
|
18
|
+
2. **Project** — `.claude/CLAUDE.md` or `docs/core-business/` for brand/design system details
|
|
19
|
+
3. **Tech design** (if available) — `docs/epics/$0/TECH-DESIGN.md` for any structural hints
|
|
20
|
+
|
|
21
|
+
## Step 2: Choose Design Method (GH-77 Part A)
|
|
22
|
+
|
|
23
|
+
You have **5 design methods** available. Run the discovery gate to let the user pick:
|
|
24
|
+
|
|
25
|
+
**Read and execute `~/.claude/skills/aidlc-discovery-gate.md` with:**
|
|
26
|
+
- Epic = `$0`
|
|
27
|
+
- Question: "Which design method?"
|
|
28
|
+
- Options:
|
|
29
|
+
1. **Claude Artifacts** — Fast self-contained HTML prototypes (no dependencies) | Default
|
|
30
|
+
2. **Figma** — High-fidelity, design-system tokens, component library (requires Figma auth)
|
|
31
|
+
3. **shadcn/ui + Tailwind** — Code-aligned mockups using real components (most projects can reuse)
|
|
32
|
+
4. **Project Design System** — On-brand hi-fi using your design system (if one exists)
|
|
33
|
+
5. **Lo-fi wireframe** — Excalidraw / ASCII for quick structural exploration before hi-fi
|
|
34
|
+
|
|
35
|
+
Once the user chooses, record it and proceed.
|
|
36
|
+
|
|
37
|
+
## Step 3: Generate ≥2 UI Options (GH-77 Part B)
|
|
38
|
+
|
|
39
|
+
Based on the chosen method, generate **2–3 visually distinct variants** addressing these questions:
|
|
40
|
+
|
|
41
|
+
- **Layout**: Single column vs multi-column? Sidebar or top nav? Density?
|
|
42
|
+
- **Visual hierarchy**: What's the primary action? What gets emphasis (color, size, position)?
|
|
43
|
+
- **Component choices**: Which existing patterns from the design system? Any custom variations?
|
|
44
|
+
- **Color / branding**: Match the existing brand? Use high contrast for accessibility?
|
|
45
|
+
- **Responsive**: How does this scale to mobile (if a web app)? Touch targets ≥48px?
|
|
46
|
+
- **Dark mode**: If the app supports it, show both light and dark (or highlight how it adapts)
|
|
47
|
+
|
|
48
|
+
**Output format by method:**
|
|
49
|
+
|
|
50
|
+
| Method | Output | How to Generate |
|
|
51
|
+
|--------|--------|-----------------|
|
|
52
|
+
| Claude Artifacts | `PROTOTYPE-option{1..N}.html` | Use the `artifact-design` skill; each option is a self-contained, theme-aware HTML artifact |
|
|
53
|
+
| Figma | `PROTOTYPE-option{1..N}.figma-link.md` + screenshot | Use the Figma MCP to generate designs; capture the link + screenshot in artifacts |
|
|
54
|
+
| shadcn/ui | `PROTOTYPE-option{1..N}.html` | Generate HTML using shadcn/ui components + Tailwind; self-contained artifact |
|
|
55
|
+
| Design System | `PROTOTYPE-option{1..N}.figma-link.md` | Use your design system's tokens + components in Figma; link to design |
|
|
56
|
+
| Lo-fi | `PROTOTYPE-option{1..N}.excalidraw.md` or ASCII | Excalidraw JSON or ASCII wireframe; save as artifact with structural notes |
|
|
57
|
+
|
|
58
|
+
## Step 4: Annotate & Compare (GH-77 Part C)
|
|
59
|
+
|
|
60
|
+
For each option, document:
|
|
61
|
+
1. **Intent**: What makes this option distinct? (e.g., "Option 1: Compact sidebar; emphasizes search")
|
|
62
|
+
2. **Key UX decisions**: Callouts on important interactions (where users click, how errors show)
|
|
63
|
+
3. **Component notes**: Which design system components / patterns are used
|
|
64
|
+
4. **Tradeoffs**: Strengths and weaknesses vs. other options
|
|
65
|
+
5. **Responsive notes**: How it scales to mobile/tablet (if applicable)
|
|
66
|
+
|
|
67
|
+
## Step 5: Let User Pick (GH-77 Part D)
|
|
68
|
+
|
|
69
|
+
Run the discovery gate again to let the user **choose their favorite option**:
|
|
70
|
+
- Show the option summaries (intent + key decisions)
|
|
71
|
+
- Let them pick one
|
|
72
|
+
- Ask for any clarifications / adjustments (optional)
|
|
73
|
+
|
|
74
|
+
Record the choice.
|
|
75
|
+
|
|
76
|
+
## Step 6: Write PROTOTYPE.md
|
|
77
|
+
|
|
78
|
+
Create `docs/epics/$0/artifacts/PROTOTYPE.md` with:
|
|
79
|
+
|
|
80
|
+
```markdown
|
|
81
|
+
---
|
|
82
|
+
status: awaiting_review
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
# $0 UI Prototype
|
|
86
|
+
|
|
87
|
+
## Design Method Chosen
|
|
88
|
+
- **Method**: [Claude Artifacts / Figma / shadcn/ui / Design System / Lo-fi]
|
|
89
|
+
- **Why this method**: [Brief rationale from the discovery gate]
|
|
90
|
+
|
|
91
|
+
## Options Considered
|
|
92
|
+
1. Option 1: [intent + key decisions]
|
|
93
|
+
2. Option 2: [intent + key decisions]
|
|
94
|
+
3. Option 3 (if generated): [intent + key decisions]
|
|
95
|
+
|
|
96
|
+
## Chosen Option
|
|
97
|
+
- **Selected**: Option [N]
|
|
98
|
+
- **Rationale**: [Why the user picked this one, any feedback they gave]
|
|
99
|
+
|
|
100
|
+
## Design Details
|
|
101
|
+
- **Layout**: [Structure, grid, breakpoints]
|
|
102
|
+
- **Components**: [Design system patterns used]
|
|
103
|
+
- **Accessibility**: [Color contrast, keyboard nav, WCAG level]
|
|
104
|
+
- **Responsive**: [How it scales to mobile/tablet/desktop]
|
|
105
|
+
- **Dark mode**: [If applicable, how it adapts]
|
|
106
|
+
|
|
107
|
+
## Next Steps for Design Phase
|
|
108
|
+
- [Any unresolved questions from the chosen prototype]
|
|
109
|
+
- [Anything the Tech Lead should review before finalizing TECH-DESIGN]
|
|
110
|
+
- [Any performance / implementation concerns to flag]
|
|
111
|
+
|
|
112
|
+
## Artifacts
|
|
113
|
+
- `PROTOTYPE-option1.html` — [Summary]
|
|
114
|
+
- `PROTOTYPE-option2.html` — [Summary]
|
|
115
|
+
- (etc. for all variants generated)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Then mark the step as **complete** and let the Design phase read `PROTOTYPE.md` + the chosen option file.
|
|
119
|
+
|
|
120
|
+
## Acceptance Criteria
|
|
121
|
+
|
|
122
|
+
✓ ≥2 UI options generated in the chosen method
|
|
123
|
+
✓ Each option documented (intent, key decisions, tradeoffs)
|
|
124
|
+
✓ User picked their favorite via discovery gate
|
|
125
|
+
✓ PROTOTYPE.md records the method, options, choice, and design details
|
|
126
|
+
✓ Chosen option HTML/Figma/artifact is accessible to the Design phase
|
|
127
|
+
|
|
128
|
+
You're done. The Design phase will read `PROTOTYPE.md` and the chosen HTML/design, then finalize the technical design to match.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tech-design
|
|
3
|
+
description: Generate or review a Technical Design document for an epic. Produces architecture, API/interface contracts, file impact, wiring plan, non-functional design, and rollout strategy.
|
|
4
|
+
argument-hint: "<{{EPIC_PREFIX}}-XXXX>"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Tech Design for Epic $0
|
|
8
|
+
|
|
9
|
+
You are the **Tech Lead (TL)** agent — a staff-level engineer with architectural experience across web, mobile, desktop, backend, and CLI.
|
|
10
|
+
Load your full persona from `.claude/agents/tech-lead.md` before starting.
|
|
11
|
+
|
|
12
|
+
## Step 0: Pipeline Gate Check
|
|
13
|
+
Read and execute `.claude/skills/_gate-check.md`. This skill = phase `design`, epic = `$0`. If gate fails → STOP.
|
|
14
|
+
|
|
15
|
+
## Step 0.5: Discovery Gate (when open questions surface)
|
|
16
|
+
|
|
17
|
+
The implementation plan for coding stays **inside this design phase** — there is no separate
|
|
18
|
+
impl-plan phase — so `TECH-DESIGN.md` must carry a **complete implementation plan**, not just a
|
|
19
|
+
bare file-impact list. While working that plan you may hit open questions (which approach, where
|
|
20
|
+
a boundary sits, which files to touch, edge cases).
|
|
21
|
+
|
|
22
|
+
**Gate rule:** if there are **≥ 3 open questions**, OR **any single high-impact question**
|
|
23
|
+
(approach / architecture / acceptance-affecting boundary):
|
|
24
|
+
|
|
25
|
+
> **Read and execute `~/.claude/skills/aidlc-discovery-gate.md` now.** Pass epic = `$0`.
|
|
26
|
+
> It composes a questionnaire, **opens it in annotron in the browser**, and blocks until you
|
|
27
|
+
> finalize.
|
|
28
|
+
|
|
29
|
+
**This is mandatory when the gate fires — do NOT ask the questions one-at-a-time in chat and do
|
|
30
|
+
NOT guess.** If you're about to type a numbered list of questions to the user, stop and run the
|
|
31
|
+
discovery gate instead. Then finish the design from the confirmed answers and note the resolved
|
|
32
|
+
choices in the Summary / Open Questions sections. `DISCOVERY.md` is a working doc, never a
|
|
33
|
+
`produces:` / `depends_on` artifact.
|
|
34
|
+
|
|
35
|
+
## Steps
|
|
36
|
+
|
|
37
|
+
1. Read the epic doc: `docs/epics/$0/$0.md`
|
|
38
|
+
2. Read the PRD: `docs/epics/$0/PRD.md` (must be complete first)
|
|
39
|
+
3. Read the tech design template: `docs/epics/$0/TECH-DESIGN.md` or `docs/templates/TECH-DESIGN-TEMPLATE.md`
|
|
40
|
+
4. Analyze the existing codebase for context:
|
|
41
|
+
- Project architecture overview (`CLAUDE.md`, `README.md`, `docs/architecture.md`)
|
|
42
|
+
- Dependency wiring / service registration configuration
|
|
43
|
+
- Shared state / config files
|
|
44
|
+
- Relevant source files in affected areas (use Glob/Grep)
|
|
45
|
+
- Related ADRs (`docs/adr/`) if the project uses them
|
|
46
|
+
5. Fill the tech design with the sections below
|
|
47
|
+
|
|
48
|
+
## Tech Design Contents
|
|
49
|
+
|
|
50
|
+
### Summary
|
|
51
|
+
- One paragraph: what is being built and the chosen technical approach
|
|
52
|
+
|
|
53
|
+
### Architecture
|
|
54
|
+
- **Component / layer diagram** using the project's layering (MVC / MVVM / Clean / hexagonal / layered — whatever `CLAUDE.md` defines)
|
|
55
|
+
- **Layer mapping** — for each layer, list new/modified modules and their responsibilities
|
|
56
|
+
- **Key design choices** with rationale — especially any non-obvious trade-offs
|
|
57
|
+
- Link to ADRs for any irreversible or widely-impactful decision
|
|
58
|
+
|
|
59
|
+
### API / Interface Contract
|
|
60
|
+
- New / modified endpoints, RPC methods, IPC messages, SDK functions, CLI flags, or module interfaces
|
|
61
|
+
- Request/response shapes (or argument/return shapes)
|
|
62
|
+
- Error cases and how they're surfaced (HTTP codes, typed errors, exit codes, exception types)
|
|
63
|
+
- Versioning / backward compatibility strategy
|
|
64
|
+
- Idempotency for non-read operations
|
|
65
|
+
|
|
66
|
+
### Data Model
|
|
67
|
+
- New / modified schemas, tables, collections, client caches, serialization formats
|
|
68
|
+
- Migration strategy for existing data (expand-contract for DBs; versioned models for serialized formats)
|
|
69
|
+
- Indexes, constraints, invariants
|
|
70
|
+
|
|
71
|
+
### State Management
|
|
72
|
+
- Where state lives (local scope / shared application / persistent / server-side)
|
|
73
|
+
- Lifecycle (when it's created, updated, invalidated, destroyed)
|
|
74
|
+
- Synchronization strategy (source of truth, propagation, invalidation)
|
|
75
|
+
|
|
76
|
+
### Sequence / Flow
|
|
77
|
+
- Key interaction flow across layers or services
|
|
78
|
+
- Include error / retry paths, not just happy path
|
|
79
|
+
|
|
80
|
+
### Dependency Wiring / Registration
|
|
81
|
+
- How new components are wired in the project's DI / composition / plugin mechanism
|
|
82
|
+
- Lifetimes (singleton vs scoped vs transient) and why
|
|
83
|
+
|
|
84
|
+
### Navigation / Control Flow Changes
|
|
85
|
+
- For UIs: new/changed routes or screens, transitions, deep links
|
|
86
|
+
- For services: new endpoints, message routes, job schedules
|
|
87
|
+
|
|
88
|
+
### Non-Functional Design
|
|
89
|
+
- **Performance budget** — latency p50/p95, throughput, memory, bundle/artifact size impact
|
|
90
|
+
- **Reliability** — retry policy, timeouts, fallbacks, circuit breaking, graceful degradation
|
|
91
|
+
- **Security & privacy** — threat model summary, authz decisions, input validation, secrets handling, PII classification
|
|
92
|
+
- **Observability** — logs, metrics, traces, alerts this change adds
|
|
93
|
+
- **Accessibility** (UI work) — compliance target and how it's achieved
|
|
94
|
+
- **Internationalization** (UI work) — locale coverage, RTL, formatting
|
|
95
|
+
- **Compatibility** — minimum supported platforms / runtimes
|
|
96
|
+
- **Offline / resilience** (if applicable) — cached data, queued actions, sync strategy
|
|
97
|
+
|
|
98
|
+
### Rollout & Reversibility
|
|
99
|
+
- Feature flag(s) and expected flag lifecycle
|
|
100
|
+
- Staged rollout plan (if applicable)
|
|
101
|
+
- Rollback path (flag flip / version rollback / config rollback)
|
|
102
|
+
|
|
103
|
+
### Implementation Plan
|
|
104
|
+
The design must carry a **complete implementation plan** the Implement phase can execute directly
|
|
105
|
+
— not just a file list:
|
|
106
|
+
- **Ordered tasks / steps** — the sequence to build this in, dependencies first. Each task small
|
|
107
|
+
and independently reviewable.
|
|
108
|
+
- **Per-file checklist** — for every file, what to add / change / delete (functions, types,
|
|
109
|
+
wiring), tied to the task(s) above.
|
|
110
|
+
- **Tests to write** — the unit / integration tests to add per the test plan, mapped to the
|
|
111
|
+
acceptance criteria and the tasks that make them pass.
|
|
112
|
+
|
|
113
|
+
### File / Module Impact
|
|
114
|
+
- Complete list: new / modified / deleted
|
|
115
|
+
- For each modified file, a one-line reason (this feeds the per-file checklist above)
|
|
116
|
+
|
|
117
|
+
### Risks & Technical Debt
|
|
118
|
+
- Risks with mitigations
|
|
119
|
+
- Intentional shortcuts and why (and when they'll be paid back)
|
|
120
|
+
|
|
121
|
+
### Open Questions
|
|
122
|
+
- Questions that should block implementation until answered, and who answers them
|
|
123
|
+
|
|
124
|
+
## Architecture Rules (Stack-Neutral)
|
|
125
|
+
|
|
126
|
+
- Layer boundaries are one-way; downstream doesn't know about upstream
|
|
127
|
+
- Every external dependency (DB, HTTP client, file system, clock, random, OS service) sits behind an interface for testability
|
|
128
|
+
- No hidden global state — wire explicitly through the project's composition mechanism
|
|
129
|
+
- Long-lived resources (subscriptions, connections, listeners, background tasks) have explicit disposal paths
|
|
130
|
+
- Breaking changes to external contracts require versioning or migration plans
|
|
131
|
+
|
|
132
|
+
## Output
|
|
133
|
+
|
|
134
|
+
Write the completed tech design to `docs/epics/$0/TECH-DESIGN.md`.
|