@davidorex/pi-workflows 0.26.0 → 0.28.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/CHANGELOG.md +199 -0
- package/agents/requirements-gatherer.agent.yaml +1 -1
- package/dist/auth-required.d.ts +10 -0
- package/dist/auth-required.d.ts.map +1 -0
- package/dist/auth-required.js +10 -0
- package/dist/auth-required.js.map +1 -0
- package/dist/bundled-dirs.d.ts +1 -1
- package/dist/bundled-dirs.d.ts.map +1 -1
- package/dist/bundled-dirs.js +8 -3
- package/dist/bundled-dirs.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -8
- package/dist/index.js.map +1 -1
- package/dist/render-by-id.d.ts.map +1 -1
- package/dist/render-by-id.js +7 -4
- package/dist/render-by-id.js.map +1 -1
- package/dist/template-validation.js +3 -3
- package/dist/template-validation.js.map +1 -1
- package/dist/template.d.ts.map +1 -1
- package/dist/template.js +2 -2
- package/dist/template.js.map +1 -1
- package/dist/test-helpers.d.ts.map +1 -1
- package/dist/test-helpers.js +4 -5
- package/dist/test-helpers.js.map +1 -1
- package/dist/workflow-sdk.d.ts.map +1 -1
- package/dist/workflow-sdk.js +6 -5
- package/dist/workflow-sdk.js.map +1 -1
- package/package.json +11 -5
- package/skill-narrative.md +3 -3
- package/skills/pi-workflows/SKILL.md +6 -6
- package/skills/pi-workflows/references/bundled-resources.md +0 -51
- package/templates/analyzers/base-analyzer.md +0 -9
- package/templates/analyzers/patterns-task.md +0 -11
- package/templates/analyzers/patterns.md +0 -15
- package/templates/analyzers/quality-task.md +0 -11
- package/templates/analyzers/quality.md +0 -15
- package/templates/analyzers/structure-task.md +0 -17
- package/templates/analyzers/structure.md +0 -15
- package/templates/architecture-designer/task.md +0 -117
- package/templates/architecture-inferrer/task.md +0 -61
- package/templates/audit-finding-verifier/task.md +0 -59
- package/templates/audit-fixer/task.md +0 -67
- package/templates/audit-results-router/task.md +0 -37
- package/templates/decomposer/task.md +0 -56
- package/templates/explorer/system.md +0 -3
- package/templates/explorer/task.md +0 -9
- package/templates/gap-identifier/task.md +0 -103
- package/templates/gap-resolution-assessor/task.md +0 -48
- package/templates/handoff-writer/task.md +0 -101
- package/templates/investigator/task.md +0 -30
- package/templates/items/architecture.md +0 -33
- package/templates/items/conformance.md +0 -26
- package/templates/items/conventions.md +0 -19
- package/templates/items/decisions.md +0 -47
- package/templates/items/domain.md +0 -21
- package/templates/items/features.md +0 -63
- package/templates/items/framework-gaps.md +0 -43
- package/templates/items/issues.md +0 -21
- package/templates/items/layer-plans.md +0 -50
- package/templates/items/project.md +0 -48
- package/templates/items/requirements.md +0 -20
- package/templates/items/research.md +0 -57
- package/templates/items/spec-reviews.md +0 -51
- package/templates/items/tasks.md +0 -29
- package/templates/phase-author/task.md +0 -82
- package/templates/plan-creator/task.md +0 -143
- package/templates/plan-decomposer/task.md +0 -46
- package/templates/project-definer/task.md +0 -67
- package/templates/project-inferrer/task.md +0 -56
- package/templates/requirements-gatherer/task.md +0 -90
- package/templates/researcher/task.md +0 -26
- package/templates/shared/macros.md +0 -137
- package/templates/shared/render-helpers.md +0 -106
- package/templates/spec-implementer/task.md +0 -53
- package/templates/synthesizer/system.md +0 -3
- package/templates/synthesizer/task.md +0 -38
- package/templates/task-verifier/task.md +0 -44
- package/templates/task-worker/task.md +0 -52
- package/templates/verifier/task.md +0 -57
package/templates/items/tasks.md
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{#-
|
|
2
|
-
Per-item macro for the `tasks` block (Plan 8 / per-item-macros wave 4).
|
|
3
|
-
|
|
4
|
-
Block schema: .project/schemas/tasks.schema.json. Each item is one task
|
|
5
|
-
inside data.tasks[]. Required: id (^TASK-\d{3,}$), description, status.
|
|
6
|
-
Optional: phase (string|integer), files, acceptance_criteria, depends_on
|
|
7
|
-
(other task IDs), assigned_agent, verification (verification ID), notes.
|
|
8
|
-
|
|
9
|
-
When status === "completed", schema additionally requires verification
|
|
10
|
-
(the if/then conditional in the schema).
|
|
11
|
-
|
|
12
|
-
Cross-block reference recursion (depends_on, verification) is delegated to
|
|
13
|
-
shared/render-helpers.md — see that file for the depth contract, ambient
|
|
14
|
-
globals, and empty-array convention. verification is rendered as a single
|
|
15
|
-
inline reference (one ID) rather than a list.
|
|
16
|
-
|
|
17
|
-
Files field:
|
|
18
|
-
files[] is a list of code paths, not project-block IDs. Rendered inline
|
|
19
|
-
as a comma-separated list; never recursed.
|
|
20
|
-
-#}
|
|
21
|
-
{% from "shared/render-helpers.md" import render_id_list_inline, render_id_single_inline %}
|
|
22
|
-
|
|
23
|
-
{% macro render_task(t, depth=0) %}
|
|
24
|
-
{% if t %}- **{{ t.id }}** [{{ t.status }}]: {{ enforceBudget(t.description, "tasks", "tasks.items.description") }}{% if t.phase %} (phase {{ t.phase }}){% endif %}{% if t.files %} — files: {{ t.files | join(", ") }}{% endif %}
|
|
25
|
-
{% if t.acceptance_criteria %} Criteria: {% for ac in t.acceptance_criteria %}{{ enforceBudget(ac, "tasks", "tasks.items.acceptance_criteria.items") }}{% if not loop.last %}; {% endif %}{% endfor %}
|
|
26
|
-
{% endif %}{% if t.assigned_agent %} Assigned agent: {{ t.assigned_agent }}
|
|
27
|
-
{% endif %}{% if t.notes %} Notes: {{ enforceBudget(t.notes, "tasks", "tasks.items.notes") }}
|
|
28
|
-
{% endif %}{{ render_id_list_inline("Depends on", t.depends_on, depth) }}{{ render_id_single_inline("Verification", t.verification, depth) }}{% endif %}
|
|
29
|
-
{% endmacro %}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
## Intent
|
|
2
|
-
|
|
3
|
-
{{ intent }}
|
|
4
|
-
|
|
5
|
-
## Existing Phases
|
|
6
|
-
|
|
7
|
-
{% for phase in phases %}
|
|
8
|
-
- Phase {{ phase.number }}: {{ phase.name }} ({{ phase.status }})
|
|
9
|
-
{% endfor %}
|
|
10
|
-
|
|
11
|
-
{% if architecture and architecture.modules %}
|
|
12
|
-
## Current Architecture
|
|
13
|
-
|
|
14
|
-
{% for module in architecture.modules %}
|
|
15
|
-
- **{{ module.name }}** ({{ module.file }}, {{ module.lines }} lines): {{ module.responsibility }}
|
|
16
|
-
{% endfor %}
|
|
17
|
-
|
|
18
|
-
{% if architecture.compilation_pipeline %}
|
|
19
|
-
### Compilation Pipeline
|
|
20
|
-
{% for stage in architecture.compilation_pipeline %}
|
|
21
|
-
{{ loop.index }}. **{{ stage.stage }}**: {{ stage.description }}
|
|
22
|
-
{% endfor %}
|
|
23
|
-
{% endif %}
|
|
24
|
-
{% endif %}
|
|
25
|
-
|
|
26
|
-
{% if conventions and conventions.rules %}
|
|
27
|
-
## Conventions
|
|
28
|
-
|
|
29
|
-
{% for rule in conventions.rules %}
|
|
30
|
-
- {{ rule.id }}: {{ rule.description }} ({{ rule.enforcement }})
|
|
31
|
-
{% endfor %}
|
|
32
|
-
{% endif %}
|
|
33
|
-
|
|
34
|
-
{% if gaps and gaps.gaps %}
|
|
35
|
-
## Current Gaps
|
|
36
|
-
|
|
37
|
-
{% for gap in gaps.gaps %}
|
|
38
|
-
{% if gap.status == "open" %}
|
|
39
|
-
- [{{ gap.priority }}] {{ gap.id }}: {{ gap.description }}
|
|
40
|
-
{% endif %}
|
|
41
|
-
{% endfor %}
|
|
42
|
-
{% endif %}
|
|
43
|
-
|
|
44
|
-
{% if inventory %}
|
|
45
|
-
## Current Inventory
|
|
46
|
-
|
|
47
|
-
{% if inventory.step_types %}- Step types: {{ inventory.step_types | length }}
|
|
48
|
-
{% endif %}{% if inventory.agent_specs %}- Agent specs: {{ inventory.agent_specs | length }}
|
|
49
|
-
{% endif %}{% if inventory.schemas %}- Schemas: {{ inventory.schemas | length }}
|
|
50
|
-
{% endif %}{% if inventory.test_count is defined %}- Tests: {{ inventory.test_count }}
|
|
51
|
-
{% endif %}{% endif %}
|
|
52
|
-
|
|
53
|
-
## Instructions
|
|
54
|
-
|
|
55
|
-
Convert the intent above into a structured phase spec. Read the codebase to understand what exists and what the intent requires.
|
|
56
|
-
|
|
57
|
-
1. **Determine the phase number** — next after the highest existing phase number
|
|
58
|
-
2. **Write a clear intent statement** — what this phase accomplishes and why
|
|
59
|
-
3. **Define success criteria** — each with a verify_method:
|
|
60
|
-
- `command`: can be verified by running a shell command (test suite, grep, validate)
|
|
61
|
-
- `inspect`: requires reading files and assessing content
|
|
62
|
-
- `human`: requires human judgment
|
|
63
|
-
4. **Decompose into specs** — each spec is a focused unit of work:
|
|
64
|
-
- Sequential numbering continuing from the last spec in the previous phase
|
|
65
|
-
- Clear intent per spec
|
|
66
|
-
- Concrete acceptance criteria (strings, each independently checkable)
|
|
67
|
-
- Specs should be ordered by dependency — earlier specs don't depend on later ones
|
|
68
|
-
5. **Identify dependencies** — which phase numbers this phase depends on
|
|
69
|
-
6. **List artifacts produced** — file paths this phase will create or modify
|
|
70
|
-
|
|
71
|
-
### Sizing guidance
|
|
72
|
-
|
|
73
|
-
- Each spec should be completable by one agent in one context window
|
|
74
|
-
- If a spec needs more than ~5 files changed, split it
|
|
75
|
-
- If a spec has more than ~5 acceptance criteria, it might be doing too much
|
|
76
|
-
- Group related changes (e.g., schema + instance + validation test = one spec)
|
|
77
|
-
|
|
78
|
-
### Cross-reference gaps
|
|
79
|
-
|
|
80
|
-
Check if any existing open gaps are addressed by this phase. If so, note that in the spec intent — the gap can be marked resolved when the spec completes.
|
|
81
|
-
|
|
82
|
-
Produce a JSON object conforming to the phase schema.
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
## Project Identity
|
|
2
|
-
|
|
3
|
-
**Name:** {{ project.name }}
|
|
4
|
-
**Description:** {{ project.description }}
|
|
5
|
-
**Core Value:** {{ project.core_value }}
|
|
6
|
-
**Status:** {{ project.status }}
|
|
7
|
-
{% if project.stack %}
|
|
8
|
-
|
|
9
|
-
### Stack
|
|
10
|
-
{% for item in project.stack %}
|
|
11
|
-
- {{ item }}
|
|
12
|
-
{% endfor %}
|
|
13
|
-
{% endif %}
|
|
14
|
-
|
|
15
|
-
## Requirements Summary
|
|
16
|
-
|
|
17
|
-
{% for req in requirements.requirements %}
|
|
18
|
-
{% if req.priority == "must" %}
|
|
19
|
-
- **{{ req.id }}** [must/{{ req.type }}]: {{ req.description }}
|
|
20
|
-
{% endif %}
|
|
21
|
-
{% endfor %}
|
|
22
|
-
{% for req in requirements.requirements %}
|
|
23
|
-
{% if req.priority == "should" %}
|
|
24
|
-
- **{{ req.id }}** [should/{{ req.type }}]: {{ req.description }}
|
|
25
|
-
{% endif %}
|
|
26
|
-
{% endfor %}
|
|
27
|
-
{% for req in requirements.requirements %}
|
|
28
|
-
{% if req.priority == "could" %}
|
|
29
|
-
- **{{ req.id }}** [could/{{ req.type }}]: {{ req.description }}
|
|
30
|
-
{% endif %}
|
|
31
|
-
{% endfor %}
|
|
32
|
-
|
|
33
|
-
## Architecture
|
|
34
|
-
|
|
35
|
-
**Overview:** {{ architecture.overview }}
|
|
36
|
-
|
|
37
|
-
### Modules
|
|
38
|
-
{% for module in architecture.modules %}
|
|
39
|
-
- **{{ module.name }}** (`{{ module.file }}`): {{ module.responsibility }}{% if module.dependencies %} [depends: {{ module.dependencies | join(", ") }}]{% endif %}
|
|
40
|
-
{% endfor %}
|
|
41
|
-
|
|
42
|
-
### Patterns
|
|
43
|
-
{% for pattern in architecture.patterns %}
|
|
44
|
-
- **{{ pattern.name }}**: {{ pattern.description }} (used in: {{ pattern.used_in | join(", ") }})
|
|
45
|
-
{% endfor %}
|
|
46
|
-
|
|
47
|
-
### Boundaries
|
|
48
|
-
{% for boundary in architecture.boundaries %}
|
|
49
|
-
- {{ boundary }}
|
|
50
|
-
{% endfor %}
|
|
51
|
-
|
|
52
|
-
{% if existing_files %}
|
|
53
|
-
## Existing Project Files
|
|
54
|
-
|
|
55
|
-
The project directory already contains these files:
|
|
56
|
-
{% for file in existing_files %}
|
|
57
|
-
- {{ file }}
|
|
58
|
-
{% endfor %}
|
|
59
|
-
|
|
60
|
-
Account for existing structure — do not plan to recreate files that already exist unless they need modification.
|
|
61
|
-
{% endif %}
|
|
62
|
-
|
|
63
|
-
## Instructions
|
|
64
|
-
|
|
65
|
-
Create implementation phases and tasks that build this project incrementally. The plan should take the project from its current state ({{ project.status }}) to a working system that satisfies all "must" requirements and addresses "should" requirements.
|
|
66
|
-
|
|
67
|
-
### Phase guidelines
|
|
68
|
-
|
|
69
|
-
1. **Phase 1** — Foundation: project structure, core module scaffolding, configuration, initial tests
|
|
70
|
-
2. **Phase 2+** — Layer functionality in priority order: "must" requirements first, then "should"
|
|
71
|
-
3. **Final phase** — Integration, documentation, and verification
|
|
72
|
-
4. Each phase should represent a meaningful milestone — the project is more capable after each phase
|
|
73
|
-
5. A phase with more than 8-10 tasks is likely too large — split it
|
|
74
|
-
|
|
75
|
-
### For each phase, provide:
|
|
76
|
-
|
|
77
|
-
- **number** — sequential starting at 1
|
|
78
|
-
- **name** — short descriptive name
|
|
79
|
-
- **intent** — what this phase accomplishes and why it comes at this point
|
|
80
|
-
- **goal** — what is true after this phase that was not true before
|
|
81
|
-
- **status** — `"planned"`
|
|
82
|
-
- **success_criteria** — array of `{ criterion, verify_method }` (verify_method: "command", "inspect", or "test")
|
|
83
|
-
- **dependencies** — array of phase numbers this depends on (empty for phase 1)
|
|
84
|
-
- **inputs** — what this phase needs from prior phases or external sources
|
|
85
|
-
- **outputs** — what this phase produces for later phases or users
|
|
86
|
-
|
|
87
|
-
### For each task, provide:
|
|
88
|
-
|
|
89
|
-
- **id** — unique, formatted as T-001, T-002, etc.
|
|
90
|
-
- **description** — clear statement of what to do
|
|
91
|
-
- **status** — `"planned"`
|
|
92
|
-
- **phase** — phase number this belongs to
|
|
93
|
-
- **files** — array of file paths this task creates or modifies
|
|
94
|
-
- **acceptance_criteria** — array of specific, verifiable statements
|
|
95
|
-
- **depends_on** — array of task IDs this depends on (empty if none)
|
|
96
|
-
- **notes** — optional: any implementation guidance or caveats
|
|
97
|
-
|
|
98
|
-
### Task sizing
|
|
99
|
-
|
|
100
|
-
- Each task should be completable by one agent in one context window
|
|
101
|
-
- A task touching more than 3-5 files likely needs splitting
|
|
102
|
-
- A task with more than 5 acceptance criteria may be doing too much
|
|
103
|
-
- Group related changes: schema + implementation + test = one task when files are few
|
|
104
|
-
|
|
105
|
-
### Traceability
|
|
106
|
-
|
|
107
|
-
- Every "must" requirement should be addressed by at least one task
|
|
108
|
-
- Every task's files should map to at least one architecture module
|
|
109
|
-
- Note requirement IDs in task descriptions or notes where the mapping is clear
|
|
110
|
-
|
|
111
|
-
### Output format
|
|
112
|
-
|
|
113
|
-
Produce a single JSON object with two arrays:
|
|
114
|
-
|
|
115
|
-
```json
|
|
116
|
-
{
|
|
117
|
-
"phases": [
|
|
118
|
-
{
|
|
119
|
-
"number": 1,
|
|
120
|
-
"name": "string",
|
|
121
|
-
"intent": "string",
|
|
122
|
-
"goal": "string",
|
|
123
|
-
"status": "planned",
|
|
124
|
-
"success_criteria": [{ "criterion": "string", "verify_method": "command" }],
|
|
125
|
-
"dependencies": [],
|
|
126
|
-
"inputs": ["string"],
|
|
127
|
-
"outputs": ["string"]
|
|
128
|
-
}
|
|
129
|
-
],
|
|
130
|
-
"tasks": [
|
|
131
|
-
{
|
|
132
|
-
"id": "T-001",
|
|
133
|
-
"description": "string",
|
|
134
|
-
"status": "planned",
|
|
135
|
-
"phase": 1,
|
|
136
|
-
"files": ["src/file.ts"],
|
|
137
|
-
"acceptance_criteria": ["string"],
|
|
138
|
-
"depends_on": [],
|
|
139
|
-
"notes": "optional string"
|
|
140
|
-
}
|
|
141
|
-
]
|
|
142
|
-
}
|
|
143
|
-
```
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
## Phase: {{ phase.name }}
|
|
2
|
-
|
|
3
|
-
### Intent
|
|
4
|
-
{{ phase.intent }}
|
|
5
|
-
|
|
6
|
-
### Success Criteria
|
|
7
|
-
{% for criterion in phase.success_criteria %}
|
|
8
|
-
- {{ criterion.criterion }} (verify: {{ criterion.verify_method }})
|
|
9
|
-
{% endfor %}
|
|
10
|
-
|
|
11
|
-
### Specs
|
|
12
|
-
{% if phase.specs %}
|
|
13
|
-
{% for spec in phase.specs %}
|
|
14
|
-
- **{{ spec.id }}**: {{ spec.name }}
|
|
15
|
-
{% endfor %}
|
|
16
|
-
{% endif %}
|
|
17
|
-
|
|
18
|
-
### Current Architecture
|
|
19
|
-
{% for module in architecture.modules %}
|
|
20
|
-
- **{{ module.name }}** ({{ module.file }}): {{ module.responsibility }}
|
|
21
|
-
{% endfor %}
|
|
22
|
-
|
|
23
|
-
### Conventions
|
|
24
|
-
{% for rule in conventions.rules %}
|
|
25
|
-
- {{ rule.id }}: {{ rule.description }} ({{ rule.enforcement }})
|
|
26
|
-
{% endfor %}
|
|
27
|
-
|
|
28
|
-
## Instructions
|
|
29
|
-
|
|
30
|
-
Decompose this phase into implementation plans. Each plan should be a focused unit of work that one agent can complete in a single context window.
|
|
31
|
-
|
|
32
|
-
Before creating plans:
|
|
33
|
-
1. Read source files referenced in the architecture to understand existing patterns
|
|
34
|
-
2. Identify logical boundaries — which specs or features are independent
|
|
35
|
-
3. Determine which plans can run in parallel (independent file sets)
|
|
36
|
-
|
|
37
|
-
For each plan, produce:
|
|
38
|
-
- **name**: short identifier for the plan
|
|
39
|
-
- **intent**: what this plan accomplishes and why
|
|
40
|
-
- **tasks**: concrete list of things to do (create files, add tests, wire up)
|
|
41
|
-
- **files_to_change**: paths that will be created or modified
|
|
42
|
-
- **acceptance_criteria**: how to know the plan is done
|
|
43
|
-
- **context_needed**: files or modules the implementing agent should read first
|
|
44
|
-
- **parallel_group**: group name — plans in the same group can run concurrently (independent file sets get the same group; dependent plans get different groups)
|
|
45
|
-
|
|
46
|
-
Output a JSON object with a `plans` array conforming to the plan-breakdown schema.
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
## Vision Statement
|
|
2
|
-
|
|
3
|
-
{{ vision }}
|
|
4
|
-
|
|
5
|
-
{% if context %}
|
|
6
|
-
## Additional Context
|
|
7
|
-
|
|
8
|
-
{{ context }}
|
|
9
|
-
{% endif %}
|
|
10
|
-
|
|
11
|
-
## Instructions
|
|
12
|
-
|
|
13
|
-
Produce a structured project identity from the vision statement above. Extract, infer, or derive each field — do not leave gaps where the vision provides signal.
|
|
14
|
-
|
|
15
|
-
### Fields to produce
|
|
16
|
-
|
|
17
|
-
1. **name** — short, lowercase-hyphenated project identifier
|
|
18
|
-
2. **description** — 1-3 sentences capturing what the project does and why it matters
|
|
19
|
-
3. **core_value** — one sentence a stakeholder outside the project could understand
|
|
20
|
-
4. **target_users** — array of user roles or personas who benefit
|
|
21
|
-
5. **constraints** — array of `{ type, description }` objects reflecting real limitations from the vision
|
|
22
|
-
- type examples: "technical", "organizational", "timeline", "budget", "regulatory", "compatibility"
|
|
23
|
-
6. **scope_boundaries** — `{ in: [...], out: [...] }` capturing what is and is not in scope
|
|
24
|
-
- `out` is especially important: document what a reader might assume is in scope but is not
|
|
25
|
-
7. **goals** — array of `{ id, description, success_criteria: [...] }` objects
|
|
26
|
-
- IDs: G-001, G-002, etc.
|
|
27
|
-
- success_criteria: measurable or verifiable statements (not aspirational)
|
|
28
|
-
8. **status** — set to `"inception"`
|
|
29
|
-
|
|
30
|
-
{% if stack %}
|
|
31
|
-
### Stack
|
|
32
|
-
|
|
33
|
-
The following technology stack has been specified:
|
|
34
|
-
|
|
35
|
-
{% for item in stack %}
|
|
36
|
-
- {{ item }}
|
|
37
|
-
{% endfor %}
|
|
38
|
-
|
|
39
|
-
Include these in the output `stack` array.
|
|
40
|
-
{% endif %}
|
|
41
|
-
|
|
42
|
-
{% if repository %}
|
|
43
|
-
### Repository
|
|
44
|
-
|
|
45
|
-
Repository: {{ repository }}
|
|
46
|
-
|
|
47
|
-
Include this in the output `repository` field.
|
|
48
|
-
{% endif %}
|
|
49
|
-
|
|
50
|
-
### Output format
|
|
51
|
-
|
|
52
|
-
Produce a single JSON object. Every required field must be present. The object should conform to the project block schema:
|
|
53
|
-
|
|
54
|
-
```json
|
|
55
|
-
{
|
|
56
|
-
"name": "string (required)",
|
|
57
|
-
"description": "string (required)",
|
|
58
|
-
"core_value": "string (required)",
|
|
59
|
-
"target_users": ["string"],
|
|
60
|
-
"constraints": [{ "type": "string", "description": "string" }],
|
|
61
|
-
"scope_boundaries": { "in": ["string"], "out": ["string"] },
|
|
62
|
-
"goals": [{ "id": "G-001", "description": "string", "success_criteria": ["string"] }],
|
|
63
|
-
"status": "inception",
|
|
64
|
-
"repository": "string (if provided)",
|
|
65
|
-
"stack": ["string (if provided)"]
|
|
66
|
-
}
|
|
67
|
-
```
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
Infer the project identity for the project at `{{ path }}`.
|
|
2
|
-
|
|
3
|
-
## Codebase Analysis
|
|
4
|
-
|
|
5
|
-
{% if exploration.files is defined %}
|
|
6
|
-
### Files ({{ exploration.files | length }} total)
|
|
7
|
-
{% for file in exploration.files | batch(20) | first %}
|
|
8
|
-
- `{{ file.path }}` ({{ file.language | default("unknown") }})
|
|
9
|
-
{% endfor %}
|
|
10
|
-
{% if exploration.files | length > 20 %}
|
|
11
|
-
... and {{ exploration.files | length - 20 }} more files
|
|
12
|
-
{% endif %}
|
|
13
|
-
{% endif %}
|
|
14
|
-
|
|
15
|
-
{% if exploration.entryPoints is defined %}
|
|
16
|
-
### Entry Points
|
|
17
|
-
{% for ep in exploration.entryPoints %}
|
|
18
|
-
- `{{ ep }}`
|
|
19
|
-
{% endfor %}
|
|
20
|
-
{% endif %}
|
|
21
|
-
|
|
22
|
-
## Instructions
|
|
23
|
-
|
|
24
|
-
Read project metadata and documentation to determine the project's identity. Start with:
|
|
25
|
-
- README.md (or equivalent)
|
|
26
|
-
- Package manifest (package.json, Cargo.toml, pyproject.toml, go.mod, etc.)
|
|
27
|
-
- CLAUDE.md or similar project instructions if present
|
|
28
|
-
- CI/CD configuration if present
|
|
29
|
-
|
|
30
|
-
Produce a project identity block:
|
|
31
|
-
|
|
32
|
-
1. **name** — the project's canonical name (from package manifest, not directory name)
|
|
33
|
-
2. **description** — concise summary of what the project does (2-3 sentences max)
|
|
34
|
-
3. **core_value** — single sentence: why does this project exist? What value does it provide?
|
|
35
|
-
4. **target_users** — who uses this? (e.g., "TypeScript developers", "DevOps engineers", "data scientists")
|
|
36
|
-
5. **constraints** — each with `type` and `description`:
|
|
37
|
-
- Runtime constraints (Node.js version, browser support, etc.)
|
|
38
|
-
- Language constraints (TypeScript strict mode, ESM-only, etc.)
|
|
39
|
-
- Compatibility constraints (API stability, backward compat, etc.)
|
|
40
|
-
6. **scope_boundaries**:
|
|
41
|
-
- `in`: what the project explicitly does
|
|
42
|
-
- `out`: what the project explicitly does not do (deferred or excluded)
|
|
43
|
-
7. **goals** — each with `id`, `description`, and optional `success_criteria` array
|
|
44
|
-
- Only include goals evidenced by the codebase (README roadmap, issues, TODO markers)
|
|
45
|
-
8. **status** — one of: inception, planning, development, maintenance, complete
|
|
46
|
-
- Infer from: version maturity, commit recency, test coverage, presence of CI
|
|
47
|
-
9. **repository** — repository URL if discoverable from package manifest or git remote
|
|
48
|
-
10. **stack** — primary technology choices only (language, framework, key libraries — not every dependency)
|
|
49
|
-
|
|
50
|
-
## Required Output Schema
|
|
51
|
-
|
|
52
|
-
You MUST produce JSON conforming exactly to this schema. Every required field must be present.
|
|
53
|
-
|
|
54
|
-
```json
|
|
55
|
-
{{ output_schema }}
|
|
56
|
-
```
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
## Project Identity
|
|
2
|
-
|
|
3
|
-
**Name:** {{ project.name }}
|
|
4
|
-
**Description:** {{ project.description }}
|
|
5
|
-
**Core Value:** {{ project.core_value }}
|
|
6
|
-
|
|
7
|
-
### Target Users
|
|
8
|
-
{% for user in project.target_users %}
|
|
9
|
-
- {{ user }}
|
|
10
|
-
{% endfor %}
|
|
11
|
-
|
|
12
|
-
### Constraints
|
|
13
|
-
{% for constraint in project.constraints %}
|
|
14
|
-
- [{{ constraint.type }}] {{ constraint.description }}
|
|
15
|
-
{% endfor %}
|
|
16
|
-
|
|
17
|
-
### Scope Boundaries
|
|
18
|
-
|
|
19
|
-
**In scope:**
|
|
20
|
-
{% for item in project.scope_boundaries.in %}
|
|
21
|
-
- {{ item }}
|
|
22
|
-
{% endfor %}
|
|
23
|
-
|
|
24
|
-
**Out of scope:**
|
|
25
|
-
{% for item in project.scope_boundaries.out %}
|
|
26
|
-
- {{ item }}
|
|
27
|
-
{% endfor %}
|
|
28
|
-
|
|
29
|
-
### Goals
|
|
30
|
-
{% for goal in project.goals %}
|
|
31
|
-
- **{{ goal.id }}**: {{ goal.description }}
|
|
32
|
-
{% for criterion in goal.success_criteria %}- {{ criterion }}
|
|
33
|
-
{% endfor %}
|
|
34
|
-
{% endfor %}
|
|
35
|
-
|
|
36
|
-
{% if vision %}
|
|
37
|
-
## Original Vision
|
|
38
|
-
|
|
39
|
-
{{ vision }}
|
|
40
|
-
{% endif %}
|
|
41
|
-
|
|
42
|
-
## Instructions
|
|
43
|
-
|
|
44
|
-
Derive requirements from the project identity above. Produce a comprehensive but proportionate set of requirements covering what the system must do (functional), quality attributes it must exhibit (non-functional), hard limits it must respect (constraint), and external connections it must support (integration).
|
|
45
|
-
|
|
46
|
-
### For each requirement, provide:
|
|
47
|
-
|
|
48
|
-
1. **id** — unique, formatted as REQ-001, REQ-002, etc.
|
|
49
|
-
2. **description** — clear statement of what is required
|
|
50
|
-
3. **type** — one of: `functional`, `non-functional`, `constraint`, `integration`
|
|
51
|
-
4. **status** — set to `"proposed"` for all
|
|
52
|
-
5. **priority** — MoSCoW: `must`, `should`, `could`, `wont`
|
|
53
|
-
6. **acceptance_criteria** — array of specific, verifiable statements
|
|
54
|
-
7. **source** — set to `"agent"` for all
|
|
55
|
-
8. **depends_on** — array of other requirement IDs this depends on (empty array if none)
|
|
56
|
-
|
|
57
|
-
### Priority guidance
|
|
58
|
-
|
|
59
|
-
- **must**: the project fails without this — directly tied to core_value and essential goals
|
|
60
|
-
- **should**: important for target users but the project could ship a minimal version without it
|
|
61
|
-
- **could**: enhances the experience but is clearly secondary
|
|
62
|
-
- **wont**: explicitly excluded — derive these from scope_boundaries.out
|
|
63
|
-
|
|
64
|
-
### Coverage expectations
|
|
65
|
-
|
|
66
|
-
- Every goal should map to at least one "must" requirement
|
|
67
|
-
- Every constraint should appear as a "constraint" type requirement
|
|
68
|
-
- Include at least one non-functional requirement for each quality attribute the project implies (performance, security, usability, reliability, etc. — only those that are relevant)
|
|
69
|
-
- Include "wont" requirements for major items in scope_boundaries.out
|
|
70
|
-
|
|
71
|
-
### Output format
|
|
72
|
-
|
|
73
|
-
Produce a single JSON object with a `requirements` array:
|
|
74
|
-
|
|
75
|
-
```json
|
|
76
|
-
{
|
|
77
|
-
"requirements": [
|
|
78
|
-
{
|
|
79
|
-
"id": "REQ-001",
|
|
80
|
-
"description": "string",
|
|
81
|
-
"type": "functional",
|
|
82
|
-
"status": "proposed",
|
|
83
|
-
"priority": "must",
|
|
84
|
-
"acceptance_criteria": ["string"],
|
|
85
|
-
"source": "agent",
|
|
86
|
-
"depends_on": []
|
|
87
|
-
}
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
```
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
## Research Request
|
|
2
|
-
|
|
3
|
-
**Gap:** {{ gap.id }} — {{ gap.description }}
|
|
4
|
-
|
|
5
|
-
## Questions
|
|
6
|
-
|
|
7
|
-
{% for q in research_questions %}
|
|
8
|
-
{{ loop.index }}. {{ q }}
|
|
9
|
-
{% endfor %}
|
|
10
|
-
|
|
11
|
-
## Instructions
|
|
12
|
-
|
|
13
|
-
For each question:
|
|
14
|
-
1. Answer based on known software engineering patterns, best practices, and established solutions
|
|
15
|
-
2. Rate your confidence: `high` (well-known, widely used), `medium` (established but context-dependent), `low` (best guess)
|
|
16
|
-
3. List sources where possible — documentation, known projects, pattern names
|
|
17
|
-
|
|
18
|
-
Also identify applicable patterns and concrete recommendations.
|
|
19
|
-
|
|
20
|
-
## Required Output Schema
|
|
21
|
-
|
|
22
|
-
You MUST produce JSON conforming exactly to this schema. Every required field must be present.
|
|
23
|
-
|
|
24
|
-
```json
|
|
25
|
-
{{ output_schema }}
|
|
26
|
-
```
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
{#- Block rendering macros — whole-block forms as derived views over per-item macros.
|
|
2
|
-
|
|
3
|
-
Plan 8 (Wave 4) refactor: each whole-block macro that has a per-item sibling
|
|
4
|
-
in templates/items/<kind>.md delegates to that per-item macro by mapping
|
|
5
|
-
over the items array. Per-item macros own field rendering; whole-block macros
|
|
6
|
-
own the surrounding heading and the null/empty guard.
|
|
7
|
-
|
|
8
|
-
v0.24.2 follow-up (Item 3 of 2026-05-02 residual-debt patch): the
|
|
9
|
-
repeated `{% if data and data.<key> [and data.<key> | length > 0] %}` +
|
|
10
|
-
`## <Heading>` + `{% for x in data.<key> %}{{ render_<kind>_item(x) }}
|
|
11
|
-
{% endfor %}` shape that previously lived inline in render_requirements,
|
|
12
|
-
render_domain, render_tasks, and render_issues now routes through the
|
|
13
|
-
`render_whole_block_truthy` / `render_whole_block_nonempty` scaffolds in
|
|
14
|
-
shared/render-helpers.md. The guard / heading / loop chassis lives once
|
|
15
|
-
in render-helpers; each whole-block macro here is the per-kind binding
|
|
16
|
-
(heading text, items slice, per-item macro inside the `{% call %}` body).
|
|
17
|
-
Output stays byte-identical to the prior inline shape — the two
|
|
18
|
-
truthy-vs-nonempty helpers preserve the empty-array surface each
|
|
19
|
-
delegator originally shipped (tasks/issues/domain emit `## <Heading>`
|
|
20
|
-
with empty array; requirements emits nothing — both regimes are kept
|
|
21
|
-
explicitly so existing consumers see no diff).
|
|
22
|
-
|
|
23
|
-
Imports for downstream consumers (unchanged signatures):
|
|
24
|
-
{% from "shared/macros.md" import render_project, render_architecture,
|
|
25
|
-
render_requirements, render_conformance,
|
|
26
|
-
render_domain, render_tasks, render_issues,
|
|
27
|
-
render_conventions,
|
|
28
|
-
render_exploration, render_exploration_full %}
|
|
29
|
-
|
|
30
|
-
Each macro:
|
|
31
|
-
- null/empty guard via the helper or local conditional,
|
|
32
|
-
- markdown heading (via the helper for list kinds; inline for the
|
|
33
|
-
singletons and the heading-bearing block-level shapes),
|
|
34
|
-
- delegation loop calling the per-item macro per item.
|
|
35
|
-
|
|
36
|
-
Retired in Plan 8:
|
|
37
|
-
- render_decisions(data) — legacy whole-block decisions macro deleted.
|
|
38
|
-
The new lifecycle decisions block has its own per-item macro
|
|
39
|
-
(templates/items/decisions.md ships render_decision + alias
|
|
40
|
-
render_decisions). The legacy macro rendered fields (decision,
|
|
41
|
-
rationale) that no longer match the current decisions.schema.json.
|
|
42
|
-
- render_gap(gap) — legacy single-item validation-concept macro deleted.
|
|
43
|
-
The framework-gaps.json block uses Plan 7's render_framework_gap in
|
|
44
|
-
templates/items/framework-gaps.md.
|
|
45
|
-
|
|
46
|
-
Retained as-is:
|
|
47
|
-
- render_exploration(exploration) and render_exploration_full(exploration)
|
|
48
|
-
are workflow-step output formatters (rendering exploration payloads
|
|
49
|
-
emitted by exploration agents), not project-block renderers. They do
|
|
50
|
-
not fit the per-item refactor pattern and stay unchanged. -#}
|
|
51
|
-
|
|
52
|
-
{% from "shared/render-helpers.md" import render_whole_block_truthy, render_whole_block_nonempty %}
|
|
53
|
-
|
|
54
|
-
{% from "items/project.md" import render_project_item %}
|
|
55
|
-
{% macro render_project(data) %}
|
|
56
|
-
{% if data %}{{ render_project_item(data) }}{% endif %}
|
|
57
|
-
{% endmacro %}
|
|
58
|
-
|
|
59
|
-
{% from "items/architecture.md" import render_architecture_item %}
|
|
60
|
-
{% macro render_architecture(data) %}
|
|
61
|
-
{% if data %}{{ render_architecture_item(data) }}{% endif %}
|
|
62
|
-
{% endmacro %}
|
|
63
|
-
|
|
64
|
-
{% from "items/requirements.md" import render_requirement %}
|
|
65
|
-
{% macro render_requirements(data) %}{% call(req) render_whole_block_nonempty("Requirements", data.requirements if data else None) %}{{ render_requirement(req) }}{% endcall %}{% endmacro %}
|
|
66
|
-
|
|
67
|
-
{% from "items/conformance.md" import render_conformance_principle %}
|
|
68
|
-
{% macro render_conformance(data) %}
|
|
69
|
-
{% if data and data.principles %}
|
|
70
|
-
## Conformance Reference
|
|
71
|
-
{% if data.name %}**{{ data.name }}**{% endif %}
|
|
72
|
-
{% for p in data.principles %}{{ render_conformance_principle(p) }}{% endfor %}
|
|
73
|
-
{% endif %}
|
|
74
|
-
{% endmacro %}
|
|
75
|
-
|
|
76
|
-
{% from "items/domain.md" import render_domain_entry %}
|
|
77
|
-
{% macro render_domain(data) %}{% call(e) render_whole_block_truthy("Domain Knowledge", data.entries if data else None) %}{{ render_domain_entry(e) }}{% endcall %}{% endmacro %}
|
|
78
|
-
|
|
79
|
-
{% from "items/tasks.md" import render_task %}
|
|
80
|
-
{% macro render_tasks(data) %}{% call(t) render_whole_block_truthy("Tasks", data.tasks if data else None) %}{{ render_task(t) }}{% endcall %}{% endmacro %}
|
|
81
|
-
|
|
82
|
-
{% from "items/issues.md" import render_issue %}
|
|
83
|
-
{% macro render_issues(data) %}{% call(i) render_whole_block_truthy("Issues", data.issues if data else None) %}{{ render_issue(i) }}{% endcall %}{% endmacro %}
|
|
84
|
-
|
|
85
|
-
{#- Authored fresh in Plan 8: render_conventions did not previously exist in
|
|
86
|
-
macros.md despite README references implying it did. The block-level
|
|
87
|
-
header surfaces test_conventions, lint_command, and lint_scope (all
|
|
88
|
-
optional) before iterating rules through render_convention.
|
|
89
|
-
|
|
90
|
-
Block schema: .project/schemas/conventions.schema.json. Required: rules.
|
|
91
|
-
Optional: test_conventions { runner_command, file_pattern }, lint_command,
|
|
92
|
-
lint_scope. -#}
|
|
93
|
-
{% from "items/conventions.md" import render_convention %}
|
|
94
|
-
{% macro render_conventions(data) %}
|
|
95
|
-
{% if data and data.rules %}
|
|
96
|
-
## Conventions
|
|
97
|
-
{% if data.test_conventions %}
|
|
98
|
-
**Tests:** `{{ data.test_conventions.runner_command }}` (pattern: `{{ data.test_conventions.file_pattern }}`)
|
|
99
|
-
{% endif %}{% if data.lint_command %}**Lint:** `{{ data.lint_command }}`{% if data.lint_scope %} (scope: {{ data.lint_scope }}){% endif %}
|
|
100
|
-
{% endif %}
|
|
101
|
-
{% for rule in data.rules %}{{ render_convention(rule) }}{% endfor %}
|
|
102
|
-
{% endif %}
|
|
103
|
-
{% endmacro %}
|
|
104
|
-
|
|
105
|
-
{% macro render_exploration(exploration) %}
|
|
106
|
-
{% if exploration %}
|
|
107
|
-
{% if exploration.files is defined %}
|
|
108
|
-
## Prior Exploration
|
|
109
|
-
{% for file in exploration.files %}- `{{ file.path }}` ({{ file.lines | default("?") }} lines){% if file.exports %}: {{ file.exports | length }} exports{% endif %}
|
|
110
|
-
{% endfor %}{% endif %}
|
|
111
|
-
{% if exploration.types is defined %}
|
|
112
|
-
### Known Types
|
|
113
|
-
{% for t in exploration.types %}- `{{ t.name }}` ({{ t.kind }}) in `{{ t.file }}`
|
|
114
|
-
{% endfor %}{% endif %}
|
|
115
|
-
{% endif %}
|
|
116
|
-
{% endmacro %}
|
|
117
|
-
|
|
118
|
-
{% macro render_exploration_full(exploration) %}
|
|
119
|
-
{% if exploration %}
|
|
120
|
-
{% if exploration.files is defined %}
|
|
121
|
-
### Files{% if exploration.files | length > 20 %} ({{ exploration.files | length }} total){% endif %}
|
|
122
|
-
{% for file in exploration.files %}- `{{ file.path }}` ({{ file.language | default("unknown") }}, {{ file.lines | default("?") }} lines){% if file.exports %} — {{ file.exports | length }} exports{% endif %}
|
|
123
|
-
{% endfor %}{% endif %}
|
|
124
|
-
{% if exploration.types is defined %}
|
|
125
|
-
### Types
|
|
126
|
-
{% for t in exploration.types %}- `{{ t.name }}` ({{ t.kind }}) in `{{ t.file }}`
|
|
127
|
-
{% endfor %}{% endif %}
|
|
128
|
-
{% if exploration.dependencies is defined %}
|
|
129
|
-
### Dependencies
|
|
130
|
-
{% for d in exploration.dependencies %}- `{{ d.from }}` → `{{ d.to }}` ({{ d.type | default("import") }})
|
|
131
|
-
{% endfor %}{% endif %}
|
|
132
|
-
{% if exploration.entryPoints is defined %}
|
|
133
|
-
### Entry Points
|
|
134
|
-
{% for ep in exploration.entryPoints %}- `{{ ep }}`
|
|
135
|
-
{% endfor %}{% endif %}
|
|
136
|
-
{% endif %}
|
|
137
|
-
{% endmacro %}
|