@odarino/haren 1.1.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/content/agents/architect.md +69 -0
- package/content/agents/developer.md +62 -0
- package/content/agents/feedback.md +42 -0
- package/content/agents/ideator.md +68 -0
- package/content/agents/planner.md +81 -0
- package/content/agents/qa-engineer.md +337 -0
- package/content/agents/researcher.md +57 -0
- package/content/agents/reviewer.md +74 -0
- package/content/skills/audit-workspace/SKILL.md +183 -0
- package/content/skills/create-artifact/SKILL.md +41 -0
- package/content/skills/decompose/SKILL.md +74 -0
- package/content/skills/discover/SKILL.md +54 -0
- package/content/skills/discover/blueprint.md +27 -0
- package/content/skills/discover/explore.md +33 -0
- package/content/skills/discover/inherit.md +34 -0
- package/content/skills/evaluate/SKILL.md +99 -0
- package/content/skills/extract-stories/SKILL.md +287 -0
- package/content/skills/generate-mockup/SKILL.md +140 -0
- package/content/skills/ideate/SKILL.md +150 -0
- package/content/skills/implement/SKILL.md +68 -0
- package/content/skills/plan/SKILL.md +138 -0
- package/content/skills/read-context/SKILL.md +84 -0
- package/content/skills/research/SKILL.md +44 -0
- package/content/skills/resolve-next-id/SKILL.md +27 -0
- package/content/skills/search-artifact/SKILL.md +30 -0
- package/content/skills/update-links/SKILL.md +35 -0
- package/content/skills/update-tracking/SKILL.md +68 -0
- package/content/skills/validate-artifact/SKILL.md +78 -0
- package/content/templates/architecture.md +51 -0
- package/content/templates/concept-brief.md +45 -0
- package/content/templates/context-brief.md +34 -0
- package/content/templates/design.md +25 -0
- package/content/templates/iteration.md +49 -0
- package/content/templates/module-map.md +25 -0
- package/content/templates/module.md +34 -0
- package/content/templates/research.md +33 -0
- package/content/templates/review.md +29 -0
- package/content/templates/session-log.md +21 -0
- package/content/templates/spec.md +50 -0
- package/content/templates/tasks.md +24 -0
- package/content/templates/team-workflow.md +203 -0
- package/dist/index.js +1458 -0
- package/package.json +49 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan
|
|
3
|
+
description: Create spec, design, and task breakdown for a module
|
|
4
|
+
type: sequential
|
|
5
|
+
agent: planner
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Plan
|
|
9
|
+
|
|
10
|
+
Create a complete, actionable plan for implementing a single module.
|
|
11
|
+
|
|
12
|
+
## Process
|
|
13
|
+
|
|
14
|
+
1. Read module definition: `artifacts/03-modules/{module}/module.md`
|
|
15
|
+
2. Read module spec (BA-owned): `artifacts/03-modules/{module}/spec.md` — this has requirements, user stories (STORY-IDs), and acceptance criteria. Check the Changelog table for recent changes.
|
|
16
|
+
3. Read architecture overview: `artifacts/03-modules/architecture.md` — this has system-level decisions (deployment, DB, comms patterns) that constrain your design
|
|
17
|
+
4. Read context brief: `artifacts/02-discovery/context-brief.md`
|
|
18
|
+
5. Read any relevant research: `artifacts/01-research/`
|
|
19
|
+
6. Check dependencies: are dependent modules' interfaces defined?
|
|
20
|
+
|
|
21
|
+
### Step 5: Gather decisions BEFORE writing artifacts
|
|
22
|
+
|
|
23
|
+
<HARD-GATE>
|
|
24
|
+
Before writing any artifact, identify all decision points in the module and
|
|
25
|
+
resolve them with the user. Do NOT write spec.md or design.md with assumptions.
|
|
26
|
+
</HARD-GATE>
|
|
27
|
+
|
|
28
|
+
**Decision gathering process:**
|
|
29
|
+
1. List all technical decisions this module requires (database, framework, auth, APIs, etc.)
|
|
30
|
+
2. For each decision, check if it's already resolved:
|
|
31
|
+
- Specified in context-brief.md → use it, no need to ask
|
|
32
|
+
- Specified in module definition → use it, no need to ask
|
|
33
|
+
- Decided in a research artifact → use it, no need to ask
|
|
34
|
+
- Not specified anywhere → **must ask the user**
|
|
35
|
+
3. For each unresolved decision, present 2-3 options:
|
|
36
|
+
- Option name
|
|
37
|
+
- One-line trade-off
|
|
38
|
+
- Your recommendation and why
|
|
39
|
+
4. **One question at a time** — don't dump all decisions in one message
|
|
40
|
+
5. Document each decision in the design artifact with rationale
|
|
41
|
+
|
|
42
|
+
**Example flow:**
|
|
43
|
+
```
|
|
44
|
+
You: "For the auth module, I need to decide on a few things.
|
|
45
|
+
First: what database should we use?
|
|
46
|
+
A) PostgreSQL — battle-tested, great for relational data
|
|
47
|
+
B) SQLite — simple, no server needed, good for small-medium scale
|
|
48
|
+
C) MongoDB — flexible schema, good for rapid iteration
|
|
49
|
+
I'd recommend A for this use case because [reason]. What do you think?"
|
|
50
|
+
|
|
51
|
+
User: "go with A"
|
|
52
|
+
|
|
53
|
+
You: "Got it, PostgreSQL. Next: for authentication strategy..."
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Step 6: Write artifacts (after all decisions are resolved)
|
|
57
|
+
|
|
58
|
+
Write three artifacts (use create-artifact skill for each):
|
|
59
|
+
|
|
60
|
+
#### Spec (what to build) — BA-owned
|
|
61
|
+
Location: `artifacts/03-modules/{module}/spec.md`
|
|
62
|
+
|
|
63
|
+
The spec is owned by the BA and should already exist before planning begins. If it doesn't exist yet:
|
|
64
|
+
- Create it using `templates/spec.md` in `artifacts/03-modules/{module}/spec.md`
|
|
65
|
+
- Include requirements, user stories (with STORY-IDs), acceptance criteria, interface contracts
|
|
66
|
+
|
|
67
|
+
If it already exists, **do not overwrite** — read it and base your design and tasks on it. If you find gaps or ambiguities in the spec, flag them to the user rather than filling in assumptions.
|
|
68
|
+
|
|
69
|
+
#### Design (how to build it)
|
|
70
|
+
Write to: `artifacts/04-plans/{module}/design.md` (master — always written here)
|
|
71
|
+
|
|
72
|
+
Using `templates/design.md`:
|
|
73
|
+
- Architecture overview
|
|
74
|
+
- Data model
|
|
75
|
+
- **Key technical decisions with rationale** (from step 5 — include what was chosen and why)
|
|
76
|
+
- File structure plan
|
|
77
|
+
- External dependencies
|
|
78
|
+
|
|
79
|
+
#### Tasks (implementation order)
|
|
80
|
+
Write to: the active plan path (see skill.md Plan Paths). When iterations enabled, this is only written as part of iteration slicing in Step 9, not at the root level.
|
|
81
|
+
|
|
82
|
+
Using `templates/tasks.md`:
|
|
83
|
+
- Ordered list of implementation tasks
|
|
84
|
+
- Each task: title, **Story ID (STORY-XXX)**, description, files to create/modify, dependencies on other tasks
|
|
85
|
+
- Every task MUST reference at least one STORY-ID from the spec
|
|
86
|
+
- Tasks should be small enough for one implementation session
|
|
87
|
+
- Include test tasks alongside implementation tasks
|
|
88
|
+
|
|
89
|
+
### Step 7: Review with user
|
|
90
|
+
|
|
91
|
+
Present each artifact section by section. Ask "does this look right?" after each.
|
|
92
|
+
Only proceed to the next artifact after the current one is approved.
|
|
93
|
+
|
|
94
|
+
### Step 8: Finalize
|
|
95
|
+
|
|
96
|
+
1. Validate all three artifacts with validate-artifact skill
|
|
97
|
+
2. Update progress.json — module status to "planned"
|
|
98
|
+
|
|
99
|
+
### Step 9: Iteration slicing (only if iterations enabled)
|
|
100
|
+
|
|
101
|
+
<HARD-GATE>
|
|
102
|
+
Only perform this step if manifest.yaml has `iterations.enabled: true`.
|
|
103
|
+
If iterations are not enabled, skip entirely.
|
|
104
|
+
</HARD-GATE>
|
|
105
|
+
|
|
106
|
+
After creating the master spec and design, and after all tasks are defined:
|
|
107
|
+
|
|
108
|
+
1. **Propose iteration grouping**: Review all tasks and propose which belong to iteration 1, iteration 2, etc. Consider:
|
|
109
|
+
- Task dependencies (dependent tasks should be in the same or later iteration)
|
|
110
|
+
- Task size (balance work across iterations)
|
|
111
|
+
- Present the grouping to the user for approval
|
|
112
|
+
|
|
113
|
+
2. **User approves or adjusts**: Wait for confirmation before proceeding.
|
|
114
|
+
|
|
115
|
+
3. **Write iteration-scoped artifacts**: For each iteration N:
|
|
116
|
+
- Create `artifacts/04-plans/{module}/iteration-{N}/design.md` — filtered subset of master design containing only decisions relevant to this iteration's tasks
|
|
117
|
+
- Create `artifacts/04-plans/{module}/iteration-{N}/tasks.md` — only the tasks assigned to this iteration, each referencing STORY-IDs
|
|
118
|
+
- Each scoped design must include: `Master: artifacts/04-plans/{module}/design.md` as a cross-reference
|
|
119
|
+
- Each scoped tasks file must include: `Spec: artifacts/03-modules/{module}/spec.md` as a cross-reference
|
|
120
|
+
- Note: iteration-scoped specs are NOT created — the spec in `03-modules/` is the single source of truth (BA-owned)
|
|
121
|
+
|
|
122
|
+
4. **Create iteration file**: Write `artifacts/07-iterations/iteration-{N}.md` using the `templates/iteration.md` template with:
|
|
123
|
+
- Goal: derived from the iteration's scoped spec
|
|
124
|
+
- Planned deliverables: the tasks for this iteration
|
|
125
|
+
- Demo script: outline of what can be demonstrated
|
|
126
|
+
|
|
127
|
+
5. **Update progress.json**: Ensure `currentIteration` is set to 1 (should already be set by init)
|
|
128
|
+
|
|
129
|
+
## Rules
|
|
130
|
+
|
|
131
|
+
- **Never silently pick a technology** — present options, let the user choose
|
|
132
|
+
- **One question at a time** — don't overwhelm with multiple decisions
|
|
133
|
+
- The spec is the contract the evaluator checks against — be precise and testable
|
|
134
|
+
- Tasks should reference exact file paths in the target repo
|
|
135
|
+
- If a dependency module's interfaces aren't defined yet, flag as a blocker
|
|
136
|
+
- Include edge cases and error scenarios in the spec
|
|
137
|
+
- The design must document every decision with "chosen: X, alternatives: Y/Z, rationale: ..."
|
|
138
|
+
- If unsure about anything, ask — don't guess
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: read-context
|
|
3
|
+
description: Session orientation — read manifest, progress, artifacts, and git state
|
|
4
|
+
type: utility
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Read Context
|
|
8
|
+
|
|
9
|
+
Orient yourself at the start of every session or before taking any action.
|
|
10
|
+
|
|
11
|
+
## Process
|
|
12
|
+
|
|
13
|
+
1. **Read manifest.yaml**
|
|
14
|
+
- Project name, mode, repos, sources
|
|
15
|
+
- Validate repo paths exist (warn if not)
|
|
16
|
+
|
|
17
|
+
2. **Read progress.json**
|
|
18
|
+
- List all modules and their current status
|
|
19
|
+
- List all features and their status within active modules
|
|
20
|
+
|
|
21
|
+
3. **Read artifact-index.md**
|
|
22
|
+
- Understand what artifacts exist
|
|
23
|
+
- Note any gaps (e.g., module has no plan yet)
|
|
24
|
+
|
|
25
|
+
4. **Scan `artifacts/00-baseline/`**
|
|
26
|
+
- List any files found (PDFs, docs, markdown, etc.)
|
|
27
|
+
- If files exist and mode is `undecided`:
|
|
28
|
+
→ Suggest switching to `blueprint` mode ("You have baseline docs — blueprint mode is recommended")
|
|
29
|
+
- If files exist and mode is `explore`:
|
|
30
|
+
→ Suggest switching to `blueprint` mode ("Found docs in baseline — did you mean to use blueprint mode?")
|
|
31
|
+
- If files exist and discovery hasn't started yet:
|
|
32
|
+
→ Suggest starting the discover phase to process them
|
|
33
|
+
- If files were added since last session (compare against artifact-index.md):
|
|
34
|
+
→ Flag new documents and ask if the user wants to re-run or update discovery
|
|
35
|
+
|
|
36
|
+
5. **Git check** (for each repo in manifest)
|
|
37
|
+
- Check for uncommitted changes
|
|
38
|
+
- Compare last known commit in progress.json against actual HEAD
|
|
39
|
+
- If drift detected: warn user, update progress.json to match git
|
|
40
|
+
|
|
41
|
+
6. **Produce orientation summary**
|
|
42
|
+
|
|
43
|
+
## Output Format
|
|
44
|
+
|
|
45
|
+
Present to the user:
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
## Session Context
|
|
49
|
+
Project: {name} ({mode} mode)
|
|
50
|
+
Iteration: {N} of {total} ({status}) ← only if iterations enabled
|
|
51
|
+
Repos: {list with status}
|
|
52
|
+
|
|
53
|
+
## Baseline Documents
|
|
54
|
+
{list of files in 00-baseline/, or "None"}
|
|
55
|
+
{if new docs found: "⚠ New documents detected since last session"}
|
|
56
|
+
|
|
57
|
+
## Module Status
|
|
58
|
+
- {module}: {STATUS} ({detail — e.g., "3/7 tasks done"})
|
|
59
|
+
- If status is "planned" or "planning":
|
|
60
|
+
- If iterations disabled: check which files exist in 04-plans/{module}/
|
|
61
|
+
- ✓ spec.md | ✗ spec.md
|
|
62
|
+
- ✓ design.md | ✗ design.md
|
|
63
|
+
- ✓ tasks.md | ✗ tasks.md
|
|
64
|
+
- If iterations enabled: check master and active iteration plan
|
|
65
|
+
- Master: ✓ spec.md | ✗ spec.md, ✓ design.md | ✗ design.md
|
|
66
|
+
- Iteration {N}: ✓ spec.md | ✗ spec.md, ✓ design.md | ✗ design.md, ✓ tasks.md | ✗ tasks.md
|
|
67
|
+
- ...
|
|
68
|
+
|
|
69
|
+
## Suggested Next Action
|
|
70
|
+
{what to do next based on current state}
|
|
71
|
+
|
|
72
|
+
## Active Blockers
|
|
73
|
+
{any blocked features or modules}
|
|
74
|
+
|
|
75
|
+
## Recent Events
|
|
76
|
+
{last 5 entries from events/events.jsonl}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Rules
|
|
80
|
+
|
|
81
|
+
- Always run this before any other action
|
|
82
|
+
- If progress.json doesn't exist, suggest running discover phase
|
|
83
|
+
- If manifest.yaml is missing repos, warn but don't block
|
|
84
|
+
- Surface drift between progress.json and git state to the user
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: research
|
|
3
|
+
description: Conduct research spikes, deep-dives, and tech evaluations on demand
|
|
4
|
+
type: on-demand
|
|
5
|
+
agent: researcher
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Research
|
|
9
|
+
|
|
10
|
+
Conduct a research spike and document findings as a structured artifact.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
Any time during the project lifecycle when a question needs investigation before proceeding. Examples:
|
|
15
|
+
- "Should we use PostgreSQL or MongoDB for this?"
|
|
16
|
+
- "How does the existing auth system work?"
|
|
17
|
+
- "What are the options for real-time notifications?"
|
|
18
|
+
|
|
19
|
+
## Process
|
|
20
|
+
|
|
21
|
+
1. **Clarify scope**: Ask the user what question needs answering and what constraints matter
|
|
22
|
+
2. **Resolve ID**: Use resolve-next-id skill to get next RESEARCH ID
|
|
23
|
+
3. **Conduct research**: Investigate using available tools (web search, code reading, docs)
|
|
24
|
+
4. **Document findings**: Write structured research artifact
|
|
25
|
+
5. **Update registry**: Use create-artifact skill to write file and update artifact-index.md
|
|
26
|
+
|
|
27
|
+
## Output Format
|
|
28
|
+
|
|
29
|
+
Write to: `artifacts/01-research/RESEARCH-{NNN}-{slug}.md`
|
|
30
|
+
|
|
31
|
+
Use the research template from `templates/research.md`:
|
|
32
|
+
- Title and research question
|
|
33
|
+
- Context and motivation
|
|
34
|
+
- Findings (structured by sub-topic)
|
|
35
|
+
- Recommendations
|
|
36
|
+
- Open questions
|
|
37
|
+
- Links to related artifacts
|
|
38
|
+
|
|
39
|
+
## Rules
|
|
40
|
+
|
|
41
|
+
- Stay focused on the research question — don't expand scope
|
|
42
|
+
- Present findings objectively — separate facts from recommendations
|
|
43
|
+
- If research reveals the need for more research, create a follow-up entry
|
|
44
|
+
- Link to related IDEAs, SPECs, or other RESEARCH artifacts via update-links skill
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: resolve-next-id
|
|
3
|
+
description: Find next available sequential ID for any artifact type
|
|
4
|
+
type: utility
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Resolve Next ID
|
|
8
|
+
|
|
9
|
+
Determine the next available ID for a given artifact type to prevent conflicts.
|
|
10
|
+
|
|
11
|
+
## Process
|
|
12
|
+
|
|
13
|
+
1. Scan the target directory for existing artifacts
|
|
14
|
+
2. Extract numeric IDs from filenames (e.g., RESEARCH-001 → 1)
|
|
15
|
+
3. Return next sequential ID, zero-padded to 3 digits
|
|
16
|
+
|
|
17
|
+
## ID Formats
|
|
18
|
+
|
|
19
|
+
| Type | Format | Example |
|
|
20
|
+
|------|--------|---------|
|
|
21
|
+
| RESEARCH | RESEARCH-{NNN}-{slug} | RESEARCH-001-auth-approach |
|
|
22
|
+
|
|
23
|
+
## Rules
|
|
24
|
+
|
|
25
|
+
- Always zero-pad to 3 digits (001, 002, etc.)
|
|
26
|
+
- Scan actual files, not just the registry (registry might be stale)
|
|
27
|
+
- Return both the ID and suggested filename
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: search-artifact
|
|
3
|
+
description: Query artifacts by module, status, type, or keyword
|
|
4
|
+
type: utility
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Search Artifact
|
|
8
|
+
|
|
9
|
+
Find and query artifacts in the workspace.
|
|
10
|
+
|
|
11
|
+
## Query Types
|
|
12
|
+
|
|
13
|
+
1. **By type**: "find all SPECs" → scan `artifacts/04-plans/*/spec.md` and `artifacts/04-plans/*/iteration-*/spec.md` (if iterations enabled)
|
|
14
|
+
2. **By module**: "what artifacts exist for auth?" → scan all artifact folders for auth
|
|
15
|
+
3. **By status**: "what's blocked?" → read progress.json, filter by status
|
|
16
|
+
4. **By keyword**: "find mentions of authentication" → grep across artifacts/
|
|
17
|
+
5. **By registry**: "list all artifacts" → read `artifacts/_registry/artifact-index.md`
|
|
18
|
+
|
|
19
|
+
## Output
|
|
20
|
+
|
|
21
|
+
Present results as a table:
|
|
22
|
+
|
|
23
|
+
| ID | Type | Module | Status | Path |
|
|
24
|
+
|----|------|--------|--------|------|
|
|
25
|
+
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
- Always check artifact-index.md first for fast lookups
|
|
29
|
+
- Fall back to file scanning if the index seems stale
|
|
30
|
+
- Return paths relative to the haren root
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update-links
|
|
3
|
+
description: Maintain bidirectional cross-references between artifacts
|
|
4
|
+
type: utility
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Update Links
|
|
8
|
+
|
|
9
|
+
Keep cross-references between artifacts consistent when new artifacts are created.
|
|
10
|
+
|
|
11
|
+
## Link Rules
|
|
12
|
+
|
|
13
|
+
When creating: | Update:
|
|
14
|
+
---|---
|
|
15
|
+
RESEARCH | If spawned from another artifact, add backlink
|
|
16
|
+
Module definition | Link to context-brief
|
|
17
|
+
Spec (in 03-modules) | Link to module definition, link to any referenced RESEARCH
|
|
18
|
+
Design | Link to spec (`Spec: 03-modules/{module}/spec.md`)
|
|
19
|
+
Review | Link to spec (`Spec: 03-modules/{module}/spec.md`)
|
|
20
|
+
Iteration-scoped Design | Link to master design (`Master: 04-plans/{module}/design.md`)
|
|
21
|
+
Iteration file (07-iterations) | Link to iteration-scoped designs in 04-plans
|
|
22
|
+
|
|
23
|
+
## Process
|
|
24
|
+
|
|
25
|
+
1. Identify the artifact just created and its references
|
|
26
|
+
2. For each referenced artifact:
|
|
27
|
+
- Open it
|
|
28
|
+
- Add a link back to the new artifact in its "Related Artifacts" section
|
|
29
|
+
3. Update artifact-index.md if link relationships changed
|
|
30
|
+
|
|
31
|
+
## Rules
|
|
32
|
+
|
|
33
|
+
- Links are bidirectional — if A references B, B should reference A
|
|
34
|
+
- Use relative paths from haren root
|
|
35
|
+
- Don't create circular link chains — just direct references
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update-tracking
|
|
3
|
+
description: Update progress.json and propagate status changes
|
|
4
|
+
type: utility
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Update Tracking
|
|
8
|
+
|
|
9
|
+
Update module and feature status in progress.json with validated transitions.
|
|
10
|
+
|
|
11
|
+
## Operations
|
|
12
|
+
|
|
13
|
+
### Update Feature Status
|
|
14
|
+
1. Validate the transition is allowed (see state machine in spec section 10)
|
|
15
|
+
2. Update the feature's status in progress.json
|
|
16
|
+
3. If all features in a module are "passing", suggest module completion review
|
|
17
|
+
4. Append event to events/events.jsonl
|
|
18
|
+
|
|
19
|
+
### Update Module Status
|
|
20
|
+
1. Validate the transition is allowed
|
|
21
|
+
2. Update the module's status and currentPhase
|
|
22
|
+
3. Append event to events/events.jsonl
|
|
23
|
+
|
|
24
|
+
### Add Feature to Module
|
|
25
|
+
1. Add feature with "pending" status to the module's features map
|
|
26
|
+
2. Update progress.json
|
|
27
|
+
|
|
28
|
+
### Reconcile with Git
|
|
29
|
+
1. For each repo, compare progress.json lastCommit against git HEAD
|
|
30
|
+
2. If drift detected, warn user and update lastCommit
|
|
31
|
+
3. Flag any ambiguous state changes for human review
|
|
32
|
+
|
|
33
|
+
### Transition Iteration (only if iterations enabled)
|
|
34
|
+
1. Check if all tasks in the current iteration have status "passing"
|
|
35
|
+
2. If yes:
|
|
36
|
+
- Increment `currentIteration` in progress.json
|
|
37
|
+
- Update the iteration file (`07-iterations/iteration-{N}.md`) status to `complete`
|
|
38
|
+
- If next iteration exists (already planned), set its status to `in-progress`
|
|
39
|
+
- If no next iteration exists, suggest running the plan skill to slice the next iteration from the master plan
|
|
40
|
+
- Append event to events/events.jsonl
|
|
41
|
+
3. Iteration transitions cannot be skipped — iteration N must complete before N+1 starts
|
|
42
|
+
|
|
43
|
+
## Valid Module Transitions
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
discovered → decomposed → planned → implementing → evaluating → completed
|
|
47
|
+
↑ |
|
|
48
|
+
└── fix ───────┘
|
|
49
|
+
|
|
|
50
|
+
(3 failures)
|
|
51
|
+
↓
|
|
52
|
+
blocked
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Valid Feature Transitions
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
pending → in-progress → evaluating → passing
|
|
59
|
+
→ fixing → evaluating (loop)
|
|
60
|
+
→ blocked (after 3 failures)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Rules
|
|
64
|
+
|
|
65
|
+
- Always validate transitions — reject invalid ones with clear error messages
|
|
66
|
+
- Always update lastUpdated timestamp
|
|
67
|
+
- Always append an event after any status change
|
|
68
|
+
- Never silently change status — log everything
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: validate-artifact
|
|
3
|
+
description: Check artifact completeness before phase transitions
|
|
4
|
+
type: utility
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Validate Artifact
|
|
8
|
+
|
|
9
|
+
Verify that an artifact has all required fields and content before allowing a phase transition.
|
|
10
|
+
|
|
11
|
+
## Validation Rules by Type
|
|
12
|
+
|
|
13
|
+
### Context Brief (01-discovery)
|
|
14
|
+
Required sections:
|
|
15
|
+
- [ ] Project overview and goals
|
|
16
|
+
- [ ] Key requirements (at least 3)
|
|
17
|
+
- [ ] Constraints and assumptions
|
|
18
|
+
- [ ] Identified risks
|
|
19
|
+
|
|
20
|
+
### Module Definition (02-modules)
|
|
21
|
+
Required fields:
|
|
22
|
+
- [ ] Name and description
|
|
23
|
+
- [ ] Responsibilities (at least 1)
|
|
24
|
+
- [ ] Interfaces section (can be "none" for leaf modules)
|
|
25
|
+
- [ ] Dependencies section
|
|
26
|
+
- [ ] Target repo(s)
|
|
27
|
+
|
|
28
|
+
### Module Map (02-modules/module-map.md)
|
|
29
|
+
Required:
|
|
30
|
+
- [ ] All modules listed
|
|
31
|
+
- [ ] Dependency graph (no cycles — validate by attempting topological sort)
|
|
32
|
+
- [ ] Implementation order
|
|
33
|
+
|
|
34
|
+
### Spec (04-plans)
|
|
35
|
+
Required sections:
|
|
36
|
+
- [ ] Requirements (functional)
|
|
37
|
+
- [ ] User stories with acceptance criteria
|
|
38
|
+
- [ ] Interface contracts
|
|
39
|
+
- [ ] Definition of done checklist
|
|
40
|
+
|
|
41
|
+
### Design (04-plans)
|
|
42
|
+
Required sections:
|
|
43
|
+
- [ ] Architecture overview
|
|
44
|
+
- [ ] Data model (or "N/A" with justification)
|
|
45
|
+
- [ ] Key technical decisions
|
|
46
|
+
|
|
47
|
+
### Tasks (04-plans)
|
|
48
|
+
Required:
|
|
49
|
+
- [ ] At least 1 task
|
|
50
|
+
- [ ] Each task has: title, description, files
|
|
51
|
+
- [ ] Tasks are ordered
|
|
52
|
+
|
|
53
|
+
### Iteration-Scoped Design (04-plans, iterations only)
|
|
54
|
+
Iteration-scoped designs are filtered subsets of the master design. Relaxed checks:
|
|
55
|
+
- [ ] Architecture overview (can reference master for full detail)
|
|
56
|
+
- [ ] Key technical decisions relevant to this iteration's tasks
|
|
57
|
+
- [ ] Cross-reference to spec: `Spec: artifacts/03-modules/{module}/spec.md`
|
|
58
|
+
- [ ] Cross-reference to master design: `Master: artifacts/04-plans/{module}/design.md`
|
|
59
|
+
|
|
60
|
+
## Output
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
PASS — all required fields present
|
|
64
|
+
```
|
|
65
|
+
or
|
|
66
|
+
```
|
|
67
|
+
FAIL — missing:
|
|
68
|
+
- {field 1}
|
|
69
|
+
- {field 2}
|
|
70
|
+
Warnings:
|
|
71
|
+
- {non-blocking issue}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Rules
|
|
75
|
+
|
|
76
|
+
- FAIL blocks the phase transition — fix before proceeding
|
|
77
|
+
- Warnings are informational — note but don't block
|
|
78
|
+
- If a section says "TBD" or "TODO", that's a FAIL
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
project: {project name}
|
|
3
|
+
date: {date}
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Architecture Overview
|
|
7
|
+
|
|
8
|
+
System-level decisions that apply across all modules.
|
|
9
|
+
|
|
10
|
+
## Deployment Model
|
|
11
|
+
|
|
12
|
+
**Chosen:** {monolith / modular monolith / microservices / serverless}
|
|
13
|
+
**Rationale:** {why this was chosen}
|
|
14
|
+
|
|
15
|
+
## Communication Patterns
|
|
16
|
+
|
|
17
|
+
**Between modules:** {REST / gRPC / event bus / in-process / message queue}
|
|
18
|
+
**Rationale:** {why}
|
|
19
|
+
|
|
20
|
+
## Shared Infrastructure
|
|
21
|
+
|
|
22
|
+
| Resource | Shared or Per-Module | Detail |
|
|
23
|
+
|----------|---------------------|--------|
|
|
24
|
+
| Database | {shared / per-module} | {e.g., PostgreSQL shared instance} |
|
|
25
|
+
| Auth/Identity | {shared / per-module} | {e.g., shared JWT issuer} |
|
|
26
|
+
| Cache | {shared / per-module} | {e.g., shared Redis} |
|
|
27
|
+
| Logging | {shared} | {e.g., structured JSON to stdout} |
|
|
28
|
+
|
|
29
|
+
## Repo Structure
|
|
30
|
+
|
|
31
|
+
**Chosen:** {monorepo / multi-repo}
|
|
32
|
+
**Repos:** {list repos and what lives in each}
|
|
33
|
+
|
|
34
|
+
## Deployment Topology
|
|
35
|
+
|
|
36
|
+
**Target:** {containers / serverless / PaaS / bare metal}
|
|
37
|
+
**Provider:** {AWS / GCP / Azure / self-hosted / TBD}
|
|
38
|
+
**Orchestration:** {Kubernetes / Docker Compose / none / TBD}
|
|
39
|
+
|
|
40
|
+
## Cross-Cutting Concerns
|
|
41
|
+
|
|
42
|
+
| Concern | Decision | Detail |
|
|
43
|
+
|---------|----------|--------|
|
|
44
|
+
| Error handling | {pattern} | {e.g., structured error codes} |
|
|
45
|
+
| Configuration | {pattern} | {e.g., env vars + config file} |
|
|
46
|
+
| Testing strategy | {pattern} | {e.g., unit + integration per module} |
|
|
47
|
+
| CI/CD | {pattern} | {e.g., GitHub Actions} |
|
|
48
|
+
|
|
49
|
+
## Key Constraints
|
|
50
|
+
|
|
51
|
+
- {constraint that affects all modules}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
idea: {original idea statement}
|
|
3
|
+
maturity: {nascent | emerging | formed}
|
|
4
|
+
date: {date}
|
|
5
|
+
research_refs: [{RESEARCH-NNN-slug}, ...]
|
|
6
|
+
status: {draft | validated | pivoted}
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Concept Brief: {concept name}
|
|
10
|
+
|
|
11
|
+
## Idea Origin
|
|
12
|
+
{The raw idea as stated by the user, verbatim}
|
|
13
|
+
|
|
14
|
+
## Maturity Assessment
|
|
15
|
+
{nascent/emerging/formed — why, what was provided vs. what needed discovery}
|
|
16
|
+
|
|
17
|
+
## Research Summary
|
|
18
|
+
|
|
19
|
+
### Market Landscape
|
|
20
|
+
{Key findings — market size, existing solutions, competitors, gaps}
|
|
21
|
+
|
|
22
|
+
### Technical Feasibility
|
|
23
|
+
{Tech options, known pitfalls, feasibility verdict}
|
|
24
|
+
|
|
25
|
+
### Internal Prior Art
|
|
26
|
+
{Relevant past projects, lessons, reusable assets from memory/repos}
|
|
27
|
+
|
|
28
|
+
## User Context
|
|
29
|
+
{Domain expertise captured from user interview — problem, audience, constraints}
|
|
30
|
+
|
|
31
|
+
## Goals
|
|
32
|
+
| # | Goal | Success Criteria | Priority |
|
|
33
|
+
|---|------|-----------------|----------|
|
|
34
|
+
| G-1 | {goal} | {measurable outcome} | must / should / could |
|
|
35
|
+
|
|
36
|
+
## Risks & Mitigations
|
|
37
|
+
| Risk | Severity | Mitigation |
|
|
38
|
+
|------|----------|------------|
|
|
39
|
+
| {risk from research} | high/med/low | {proposed mitigation or pivot} |
|
|
40
|
+
|
|
41
|
+
## Pivots Considered
|
|
42
|
+
{If pivot check triggered: what problems were found, what alternatives were proposed, what was chosen and why. If no pivot needed: "Research validated the original direction."}
|
|
43
|
+
|
|
44
|
+
## Recommended Next Steps
|
|
45
|
+
{What Discover should focus on — which goals need deeper requirements, suggested module boundaries, open questions to resolve}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
project: {project name}
|
|
3
|
+
mode: {blueprint|explore|inherit}
|
|
4
|
+
date: {date}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Context Brief: {project name}
|
|
8
|
+
|
|
9
|
+
## Project Overview
|
|
10
|
+
{What is this project and why does it exist?}
|
|
11
|
+
|
|
12
|
+
## Goals
|
|
13
|
+
{What does success look like?}
|
|
14
|
+
|
|
15
|
+
## Key Requirements
|
|
16
|
+
|
|
17
|
+
### Functional
|
|
18
|
+
1. {requirement}
|
|
19
|
+
|
|
20
|
+
### Non-Functional
|
|
21
|
+
1. {requirement}
|
|
22
|
+
|
|
23
|
+
## Constraints & Assumptions
|
|
24
|
+
- {constraint or assumption}
|
|
25
|
+
|
|
26
|
+
## Risks
|
|
27
|
+
| Risk | Impact | Likelihood | Mitigation |
|
|
28
|
+
|------|--------|------------|------------|
|
|
29
|
+
|
|
30
|
+
## Suggested Module Boundaries
|
|
31
|
+
{High-level module suggestions — refined in Decompose phase}
|
|
32
|
+
|
|
33
|
+
## Sources
|
|
34
|
+
{Documents and resources analyzed}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
module: {module name}
|
|
3
|
+
date: {date}
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Design: {module name}
|
|
7
|
+
|
|
8
|
+
## Architecture Overview
|
|
9
|
+
{How the module is structured internally}
|
|
10
|
+
|
|
11
|
+
## Data Model
|
|
12
|
+
{Database schemas, key data structures}
|
|
13
|
+
|
|
14
|
+
## Key Decisions
|
|
15
|
+
|
|
16
|
+
| Decision | Choice | Alternatives Considered | Rationale |
|
|
17
|
+
|----------|--------|------------------------|-----------|
|
|
18
|
+
|
|
19
|
+
## File Structure
|
|
20
|
+
```
|
|
21
|
+
{planned file layout in target repo}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## External Dependencies
|
|
25
|
+
- {library/service}: {why needed}
|