@davidorex/pi-workflows 0.14.6 → 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/README.md +12 -9
- package/agents/handoff-writer.agent.yaml +1 -1
- package/agents/requirements-gatherer.agent.yaml +1 -1
- package/dist/agent-spec.d.ts.map +1 -1
- package/dist/agent-spec.js +4 -3
- package/dist/agent-spec.js.map +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 +2 -0
- package/dist/bundled-dirs.d.ts.map +1 -0
- package/dist/bundled-dirs.js +26 -0
- package/dist/bundled-dirs.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +146 -14
- package/dist/index.js.map +1 -1
- package/dist/render-by-id.d.ts +62 -0
- package/dist/render-by-id.d.ts.map +1 -0
- package/dist/render-by-id.js +105 -0
- package/dist/render-by-id.js.map +1 -0
- package/dist/step-agent.js +1 -1
- package/dist/step-block.d.ts +5 -1
- package/dist/step-block.d.ts.map +1 -1
- package/dist/step-block.js +88 -40
- package/dist/step-block.js.map +1 -1
- package/dist/step-monitor.d.ts +1 -1
- package/dist/step-monitor.d.ts.map +1 -1
- package/dist/step-monitor.js +1 -1
- package/dist/step-monitor.js.map +1 -1
- package/dist/step-shared.d.ts +1 -1
- package/dist/step-shared.d.ts.map +1 -1
- package/dist/step-shared.js +16 -10
- package/dist/step-shared.js.map +1 -1
- package/dist/template-validation.d.ts.map +1 -1
- package/dist/template-validation.js +6 -6
- package/dist/template-validation.js.map +1 -1
- package/dist/template.d.ts.map +1 -1
- package/dist/template.js +2 -1
- package/dist/template.js.map +1 -1
- package/dist/test-helpers.d.ts +91 -0
- package/dist/test-helpers.d.ts.map +1 -1
- package/dist/test-helpers.js +185 -1
- package/dist/test-helpers.js.map +1 -1
- package/dist/tui.d.ts +3 -3
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +1 -1
- package/dist/types.d.ts +36 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/workflow-discovery.d.ts.map +1 -1
- package/dist/workflow-discovery.js +2 -1
- package/dist/workflow-discovery.js.map +1 -1
- package/dist/workflow-executor.d.ts.map +1 -1
- package/dist/workflow-executor.js +23 -9
- package/dist/workflow-executor.js.map +1 -1
- package/dist/workflow-sdk.d.ts.map +1 -1
- package/dist/workflow-sdk.js +18 -11
- package/dist/workflow-sdk.js.map +1 -1
- package/dist/workflow-spec.js +99 -2
- package/dist/workflow-spec.js.map +1 -1
- package/package.json +17 -7
- package/skill-narrative.md +5 -3
- package/skills/pi-workflows/SKILL.md +46 -9
- package/skills/pi-workflows/references/bundled-resources.md +0 -36
- package/workflows/analyze-existing-project.workflow.yaml +1 -1
- package/workflows/init-new-project.workflow.yaml +1 -1
- package/workflows/plan-from-requirements.workflow.yaml +2 -2
- 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/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 -152
- 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
|
@@ -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,152 +0,0 @@
|
|
|
1
|
-
{#- Block rendering macros — one per schema with agent prompt use cases.
|
|
2
|
-
Import via: {% from "shared/macros.md" import render_project, render_architecture %}
|
|
3
|
-
Each macro: null guard, markdown heading, field rendering. Missing data renders nothing. -#}
|
|
4
|
-
|
|
5
|
-
{% macro render_project(data) %}
|
|
6
|
-
{% if data %}
|
|
7
|
-
## Project
|
|
8
|
-
**{{ data.name }}** — {{ data.description }}
|
|
9
|
-
{% if data.core_value %}Core value: {{ data.core_value }}{% endif %}
|
|
10
|
-
{% if data.vision %}
|
|
11
|
-
Vision: {{ data.vision }}{% endif %}
|
|
12
|
-
{% if data.status %}Status: {{ data.status }}{% endif %}
|
|
13
|
-
{% if data.target_users %}
|
|
14
|
-
Target users: {{ data.target_users | join(", ") }}{% endif %}
|
|
15
|
-
{% if data.constraints %}
|
|
16
|
-
### Constraints
|
|
17
|
-
{% for c in data.constraints %}- [{{ c.type }}] {{ c.description }}
|
|
18
|
-
{% endfor %}{% endif %}
|
|
19
|
-
{% if data.scope_boundaries %}
|
|
20
|
-
### Scope
|
|
21
|
-
**In:** {% for s in data.scope_boundaries.in %}{{ s }}{% if not loop.last %}, {% endif %}{% endfor %}
|
|
22
|
-
|
|
23
|
-
**Out:** {% for s in data.scope_boundaries.out %}{{ s }}{% if not loop.last %}, {% endif %}{% endfor %}
|
|
24
|
-
{% endif %}
|
|
25
|
-
{% if data.goals %}
|
|
26
|
-
### Goals
|
|
27
|
-
{% for g in data.goals %}- **{{ g.id }}**: {{ g.description }}{% if g.success_criteria %} — criteria: {{ g.success_criteria | join("; ") }}{% endif %}
|
|
28
|
-
{% endfor %}{% endif %}
|
|
29
|
-
{% endif %}
|
|
30
|
-
{% endmacro %}
|
|
31
|
-
|
|
32
|
-
{% macro render_architecture(data) %}
|
|
33
|
-
{% if data %}
|
|
34
|
-
## Architecture
|
|
35
|
-
{% if data.overview %}{{ data.overview }}
|
|
36
|
-
{% endif %}
|
|
37
|
-
{% if data.modules %}
|
|
38
|
-
### Modules
|
|
39
|
-
{% for m in data.modules %}- **{{ m.name }}** (`{{ m.file }}`{% if m.lines %}, {{ m.lines }} lines{% endif %}): {{ m.responsibility }}{% if m.dependencies %} — deps: {{ m.dependencies | join(", ") }}{% endif %}
|
|
40
|
-
{% endfor %}{% endif %}
|
|
41
|
-
{% if data.patterns %}
|
|
42
|
-
### Patterns
|
|
43
|
-
{% for p in data.patterns %}- **{{ p.name }}**: {{ p.description }}{% if p.used_in %} — used in: {{ p.used_in | join(", ") }}{% endif %}
|
|
44
|
-
{% endfor %}{% endif %}
|
|
45
|
-
{% if data.boundaries %}
|
|
46
|
-
### Boundaries
|
|
47
|
-
{% for b in data.boundaries %}- {{ b }}
|
|
48
|
-
{% endfor %}{% endif %}
|
|
49
|
-
{% endif %}
|
|
50
|
-
{% endmacro %}
|
|
51
|
-
|
|
52
|
-
{% macro render_requirements(data) %}
|
|
53
|
-
{% if data and data.requirements and data.requirements | length > 0 %}
|
|
54
|
-
## Requirements
|
|
55
|
-
{% for r in data.requirements %}- **{{ r.id }}** [{{ r.priority }}] ({{ r.type }}, {{ r.status }}): {{ r.description }}{% if r.acceptance_criteria %}
|
|
56
|
-
Criteria: {{ r.acceptance_criteria | join("; ") }}{% endif %}
|
|
57
|
-
{% endfor %}
|
|
58
|
-
{% endif %}
|
|
59
|
-
{% endmacro %}
|
|
60
|
-
|
|
61
|
-
{% macro render_conformance(data) %}
|
|
62
|
-
{% if data and data.principles %}
|
|
63
|
-
## Conformance Reference
|
|
64
|
-
{% if data.name %}**{{ data.name }}**{% endif %}
|
|
65
|
-
{% for p in data.principles %}
|
|
66
|
-
### {{ p.id }}: {{ p.name }}
|
|
67
|
-
{% if p.description %}{{ p.description }}{% endif %}
|
|
68
|
-
{% for r in p.rules %}- **{{ r.id }}**: {{ r.rule }}{% if r.severity %} [{{ r.severity }}]{% endif %}{% if r.check_method %} — check: {{ r.check_method }}{% endif %}
|
|
69
|
-
{% if r.anti_patterns %} Anti-patterns: {{ r.anti_patterns | join("; ") }}
|
|
70
|
-
{% endif %}{% endfor %}
|
|
71
|
-
{% endfor %}
|
|
72
|
-
{% endif %}
|
|
73
|
-
{% endmacro %}
|
|
74
|
-
|
|
75
|
-
{% macro render_domain(data) %}
|
|
76
|
-
{% if data and data.entries %}
|
|
77
|
-
## Domain Knowledge
|
|
78
|
-
{% for e in data.entries %}- **{{ e.id }}** [{{ e.category }}]: {{ e.title }}
|
|
79
|
-
{{ e.content }}{% if e.tags %} — tags: {{ e.tags | join(", ") }}{% endif %}
|
|
80
|
-
{% endfor %}
|
|
81
|
-
{% endif %}
|
|
82
|
-
{% endmacro %}
|
|
83
|
-
|
|
84
|
-
{% macro render_decisions(data) %}
|
|
85
|
-
{% if data and data.decisions %}
|
|
86
|
-
## Decisions
|
|
87
|
-
{% for d in data.decisions %}- **{{ d.id }}** ({{ d.status }}): {{ d.decision }}
|
|
88
|
-
Rationale: {{ d.rationale }}{% if d.context %} — context: {{ d.context }}{% endif %}
|
|
89
|
-
{% endfor %}
|
|
90
|
-
{% endif %}
|
|
91
|
-
{% endmacro %}
|
|
92
|
-
|
|
93
|
-
{% macro render_tasks(data) %}
|
|
94
|
-
{% if data and data.tasks %}
|
|
95
|
-
## Tasks
|
|
96
|
-
{% for t in data.tasks %}- **{{ t.id }}** [{{ t.status }}]: {{ t.description }}{% if t.phase %} (phase {{ t.phase }}){% endif %}{% if t.files %} — files: {{ t.files | join(", ") }}{% endif %}
|
|
97
|
-
{% endfor %}
|
|
98
|
-
{% endif %}
|
|
99
|
-
{% endmacro %}
|
|
100
|
-
|
|
101
|
-
{% macro render_issues(data) %}
|
|
102
|
-
{% if data and data.issues %}
|
|
103
|
-
## Issues
|
|
104
|
-
{% for i in data.issues %}- **{{ i.id }}** [{{ i.priority }}, {{ i.status }}]: {{ i.title }}
|
|
105
|
-
{{ i.body }}{% if i.location %} — {{ i.location }}{% endif %}{% if i.package %} ({{ i.package }}){% endif %}
|
|
106
|
-
{% endfor %}
|
|
107
|
-
{% endif %}
|
|
108
|
-
{% endmacro %}
|
|
109
|
-
|
|
110
|
-
{% macro render_exploration(exploration) %}
|
|
111
|
-
{% if exploration %}
|
|
112
|
-
{% if exploration.files is defined %}
|
|
113
|
-
## Prior Exploration
|
|
114
|
-
{% for file in exploration.files %}- `{{ file.path }}` ({{ file.lines | default("?") }} lines){% if file.exports %}: {{ file.exports | length }} exports{% endif %}
|
|
115
|
-
{% endfor %}{% endif %}
|
|
116
|
-
{% if exploration.types is defined %}
|
|
117
|
-
### Known Types
|
|
118
|
-
{% for t in exploration.types %}- `{{ t.name }}` ({{ t.kind }}) in `{{ t.file }}`
|
|
119
|
-
{% endfor %}{% endif %}
|
|
120
|
-
{% endif %}
|
|
121
|
-
{% endmacro %}
|
|
122
|
-
|
|
123
|
-
{% macro render_exploration_full(exploration) %}
|
|
124
|
-
{% if exploration %}
|
|
125
|
-
{% if exploration.files is defined %}
|
|
126
|
-
### Files{% if exploration.files | length > 20 %} ({{ exploration.files | length }} total){% endif %}
|
|
127
|
-
{% for file in exploration.files %}- `{{ file.path }}` ({{ file.language | default("unknown") }}, {{ file.lines | default("?") }} lines){% if file.exports %} — {{ file.exports | length }} exports{% endif %}
|
|
128
|
-
{% endfor %}{% endif %}
|
|
129
|
-
{% if exploration.types is defined %}
|
|
130
|
-
### Types
|
|
131
|
-
{% for t in exploration.types %}- `{{ t.name }}` ({{ t.kind }}) in `{{ t.file }}`
|
|
132
|
-
{% endfor %}{% endif %}
|
|
133
|
-
{% if exploration.dependencies is defined %}
|
|
134
|
-
### Dependencies
|
|
135
|
-
{% for d in exploration.dependencies %}- `{{ d.from }}` → `{{ d.to }}` ({{ d.type | default("import") }})
|
|
136
|
-
{% endfor %}{% endif %}
|
|
137
|
-
{% if exploration.entryPoints is defined %}
|
|
138
|
-
### Entry Points
|
|
139
|
-
{% for ep in exploration.entryPoints %}- `{{ ep }}`
|
|
140
|
-
{% endfor %}{% endif %}
|
|
141
|
-
{% endif %}
|
|
142
|
-
{% endmacro %}
|
|
143
|
-
|
|
144
|
-
{% macro render_gap(gap) %}
|
|
145
|
-
{% if gap %}
|
|
146
|
-
**ID:** {{ gap.id }}
|
|
147
|
-
**Description:** {{ gap.description }}
|
|
148
|
-
**Category:** {{ gap.category | default("unspecified") }}
|
|
149
|
-
**Priority:** {{ gap.priority | default("unspecified") }}
|
|
150
|
-
{% if gap.details %}**Details:** {{ gap.details }}{% endif %}
|
|
151
|
-
{% endif %}
|
|
152
|
-
{% endmacro %}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
## Plan: {{ spec.name }}
|
|
2
|
-
|
|
3
|
-
### Intent
|
|
4
|
-
{{ spec.intent | default(spec.description, true) }}
|
|
5
|
-
|
|
6
|
-
{% if spec.tasks %}
|
|
7
|
-
### Tasks
|
|
8
|
-
{% for task in spec.tasks %}
|
|
9
|
-
{{ loop.index }}. {{ task }}
|
|
10
|
-
{% endfor %}
|
|
11
|
-
{% endif %}
|
|
12
|
-
|
|
13
|
-
### Files to Change
|
|
14
|
-
{% for f in spec.files_to_change | default(spec.files, true) %}
|
|
15
|
-
- `{{ f }}`
|
|
16
|
-
{% endfor %}
|
|
17
|
-
|
|
18
|
-
### Acceptance Criteria
|
|
19
|
-
{% for criterion in spec.acceptance_criteria %}
|
|
20
|
-
- {{ criterion }}
|
|
21
|
-
{% endfor %}
|
|
22
|
-
|
|
23
|
-
{% if spec.context_needed %}
|
|
24
|
-
### Context to Read First
|
|
25
|
-
{% for ctx in spec.context_needed %}
|
|
26
|
-
- `{{ ctx }}`
|
|
27
|
-
{% endfor %}
|
|
28
|
-
{% endif %}
|
|
29
|
-
|
|
30
|
-
### Architecture Reference
|
|
31
|
-
{% for module in architecture.modules %}
|
|
32
|
-
- **{{ module.name }}** ({{ module.file }}): {{ module.responsibility }}
|
|
33
|
-
{% endfor %}
|
|
34
|
-
|
|
35
|
-
### Conventions
|
|
36
|
-
{% for rule in conventions.rules %}
|
|
37
|
-
- {{ rule.id }}: {{ rule.description }} ({{ rule.enforcement }})
|
|
38
|
-
{% endfor %}
|
|
39
|
-
|
|
40
|
-
## Instructions
|
|
41
|
-
|
|
42
|
-
Implement this plan. Follow these steps:
|
|
43
|
-
|
|
44
|
-
1. **Read context first**: Read the files listed under "Context to Read First" and any related source files to understand existing patterns
|
|
45
|
-
2. **Implement each task**: Work through the task list in order, writing code that follows the project conventions
|
|
46
|
-
3. **Run tests**: After implementation, run the relevant test suite to verify your changes work
|
|
47
|
-
4. **Validate acceptance criteria**: Confirm each acceptance criterion is met
|
|
48
|
-
|
|
49
|
-
Produce a JSON result conforming to this schema:
|
|
50
|
-
|
|
51
|
-
```json
|
|
52
|
-
{{ output_schema }}
|
|
53
|
-
```
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
You are a report synthesizer. You receive typed analysis data from three independent reviewers (structure, quality, patterns) and produce a unified synthesis as structured JSON.
|
|
2
|
-
|
|
3
|
-
Every finding must trace to specific data from the input analyses. Do not invent findings that aren't grounded in the input data.
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
Synthesize the following analyses into a unified report.
|
|
2
|
-
|
|
3
|
-
## Structure Analysis
|
|
4
|
-
Architecture: {{ structure.architecture.organization }}
|
|
5
|
-
Patterns: {% for p in structure.architecture.patterns %}{{ p }}{% if not loop.last %}, {% endif %}{% endfor %}
|
|
6
|
-
|
|
7
|
-
### Modules
|
|
8
|
-
{% for m in structure.modules %}
|
|
9
|
-
- **{{ m.name }}**: {{ m.responsibility }} ({{ m.files | length }} files)
|
|
10
|
-
{% endfor %}
|
|
11
|
-
|
|
12
|
-
### Dependencies
|
|
13
|
-
{% for d in structure.dependencies %}
|
|
14
|
-
- `{{ d.from }}` → `{{ d.to }}` ({{ d.type }})
|
|
15
|
-
{% endfor %}
|
|
16
|
-
|
|
17
|
-
## Quality Analysis
|
|
18
|
-
{% for c in quality.concerns %}
|
|
19
|
-
- [{{ c.severity }}] {{ c.description }}{% if c.file %} in `{{ c.file }}`{% endif %}
|
|
20
|
-
{% endfor %}
|
|
21
|
-
|
|
22
|
-
### Test Coverage
|
|
23
|
-
- Tested: {% for t in quality.testCoverage.tested %}`{{ t }}`{% if not loop.last %}, {% endif %}{% endfor %}
|
|
24
|
-
- Untested: {% for t in quality.testCoverage.untested %}`{{ t }}`{% if not loop.last %}, {% endif %}{% endfor %}
|
|
25
|
-
|
|
26
|
-
### Maintainability: {{ quality.maintainability.score }}
|
|
27
|
-
|
|
28
|
-
## Pattern Analysis
|
|
29
|
-
{% for p in patterns.patterns %}
|
|
30
|
-
- **{{ p.name }}**: {{ p.usage }}{% if not p.correct %} ⚠️{% endif %}
|
|
31
|
-
{% endfor %}
|
|
32
|
-
|
|
33
|
-
### Recommendations
|
|
34
|
-
{% for r in patterns.recommendations %}
|
|
35
|
-
- [{{ r.priority }}] **{{ r.pattern }}**: {{ r.suggestion }}
|
|
36
|
-
{% endfor %}
|
|
37
|
-
|
|
38
|
-
Write your synthesis as JSON conforming to the output schema.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
Verify whether the following task implementation satisfies its acceptance criteria.
|
|
2
|
-
|
|
3
|
-
## Task: {{ task_id }}
|
|
4
|
-
|
|
5
|
-
## Acceptance Criteria
|
|
6
|
-
|
|
7
|
-
{% for criterion in acceptance_criteria %}
|
|
8
|
-
{{ loop.index }}. {{ criterion }}
|
|
9
|
-
{% endfor %}
|
|
10
|
-
|
|
11
|
-
## Implementation Changes
|
|
12
|
-
|
|
13
|
-
{% if changes is mapping %}
|
|
14
|
-
{% if changes.tasks is defined %}
|
|
15
|
-
### Worker Results
|
|
16
|
-
- Status: {{ changes.status | default("unknown") }}
|
|
17
|
-
{% for t in changes.tasks %}
|
|
18
|
-
- **{{ t.name }}**: {{ t.status }}{% if t.files_modified %} (files: {{ t.files_modified | join(", ") }}){% endif %}
|
|
19
|
-
{% if t.notes %} — {{ t.notes }}{% endif %}
|
|
20
|
-
{% endfor %}
|
|
21
|
-
{% else %}
|
|
22
|
-
```json
|
|
23
|
-
{{ changes | dump(2) }}
|
|
24
|
-
```
|
|
25
|
-
{% endif %}
|
|
26
|
-
{% else %}
|
|
27
|
-
{{ changes }}
|
|
28
|
-
{% endif %}
|
|
29
|
-
|
|
30
|
-
## Instructions
|
|
31
|
-
|
|
32
|
-
For EACH acceptance criterion above:
|
|
33
|
-
|
|
34
|
-
1. Read the relevant source files to understand the current code state
|
|
35
|
-
2. If the criterion is verifiable by command (test, build, lint), run the command
|
|
36
|
-
3. If the criterion requires code inspection, read the files and assess
|
|
37
|
-
4. Record your verdict: `passed`, `failed`, or `skipped`
|
|
38
|
-
5. Provide specific evidence (file:line references, command output, code snippets)
|
|
39
|
-
|
|
40
|
-
Then produce a JSON verification entry:
|
|
41
|
-
|
|
42
|
-
```json
|
|
43
|
-
{{ output_schema }}
|
|
44
|
-
```
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
## Task: {{ task.id }}
|
|
2
|
-
|
|
3
|
-
### Description
|
|
4
|
-
{{ task.description }}
|
|
5
|
-
|
|
6
|
-
{% if task.phase %}
|
|
7
|
-
### Phase
|
|
8
|
-
{{ task.phase }}
|
|
9
|
-
{% endif %}
|
|
10
|
-
|
|
11
|
-
### Files
|
|
12
|
-
{% for f in task.files %}
|
|
13
|
-
- `{{ f }}`
|
|
14
|
-
{% endfor %}
|
|
15
|
-
|
|
16
|
-
### Acceptance Criteria
|
|
17
|
-
{% for criterion in task.acceptance_criteria %}
|
|
18
|
-
- [ ] {{ criterion }}
|
|
19
|
-
{% endfor %}
|
|
20
|
-
|
|
21
|
-
{% if task.depends_on %}
|
|
22
|
-
### Dependencies (completed)
|
|
23
|
-
{% for dep in task.depends_on %}
|
|
24
|
-
- {{ dep }}
|
|
25
|
-
{% endfor %}
|
|
26
|
-
{% endif %}
|
|
27
|
-
|
|
28
|
-
{% if task.notes %}
|
|
29
|
-
### Notes
|
|
30
|
-
{{ task.notes }}
|
|
31
|
-
{% endif %}
|
|
32
|
-
|
|
33
|
-
{% if context %}
|
|
34
|
-
### Context
|
|
35
|
-
{{ context }}
|
|
36
|
-
{% endif %}
|
|
37
|
-
|
|
38
|
-
## Instructions
|
|
39
|
-
|
|
40
|
-
Implement this task. Follow these steps:
|
|
41
|
-
|
|
42
|
-
1. **Read the target files** listed above to understand the current state
|
|
43
|
-
2. **Implement changes** that satisfy each acceptance criterion
|
|
44
|
-
3. **Stay within scope** — only modify the files listed, unless a new file is strictly necessary
|
|
45
|
-
4. **Run tests** after implementation to verify nothing is broken
|
|
46
|
-
5. **Validate each criterion** — confirm every acceptance criterion is addressed
|
|
47
|
-
|
|
48
|
-
Produce a JSON result conforming to this schema:
|
|
49
|
-
|
|
50
|
-
```json
|
|
51
|
-
{{ output_schema }}
|
|
52
|
-
```
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
You are verifying the output of a prior step against declared success criteria.
|
|
2
|
-
|
|
3
|
-
## Success Criteria
|
|
4
|
-
|
|
5
|
-
{% for criterion in criteria %}
|
|
6
|
-
- {{ criterion }}
|
|
7
|
-
{% endfor %}
|
|
8
|
-
|
|
9
|
-
## Step Output to Verify
|
|
10
|
-
|
|
11
|
-
```json
|
|
12
|
-
{{ step_output | dump(2) }}
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
{% if files_to_check %}
|
|
16
|
-
## Files to Check
|
|
17
|
-
|
|
18
|
-
{% for f in files_to_check %}
|
|
19
|
-
- `{{ f }}`
|
|
20
|
-
{% endfor %}
|
|
21
|
-
{% endif %}
|
|
22
|
-
|
|
23
|
-
## Instructions
|
|
24
|
-
|
|
25
|
-
For each criterion, choose the appropriate verification method and execute it:
|
|
26
|
-
|
|
27
|
-
1. **command** — Run a shell command (test suite, build, lint) and report exit code + output as evidence
|
|
28
|
-
2. **grep** — Search for specific patterns in files and report matches as evidence
|
|
29
|
-
3. **inspect** — Read files and assess their content (use your judgment)
|
|
30
|
-
4. **human** — Flag items that require human eyes and explain why automation cannot verify them
|
|
31
|
-
|
|
32
|
-
### Process
|
|
33
|
-
|
|
34
|
-
1. Evaluate each success criterion using the most appropriate verify method
|
|
35
|
-
2. For `command` criteria: actually run the command and capture the output
|
|
36
|
-
3. For `grep` criteria: search the relevant files and report what you find
|
|
37
|
-
4. For `inspect` criteria: read the files and assess whether they meet the criterion
|
|
38
|
-
5. For `human` criteria: describe what needs to be checked and why it needs a person
|
|
39
|
-
6. Build truth claims from your observations, marking each as `verified`, `failed`, or `uncertain`
|
|
40
|
-
7. Check that all referenced artifacts exist and are substantive (not stubs)
|
|
41
|
-
8. Compute an overall score as "N/M" where N = passed criteria, M = total criteria
|
|
42
|
-
9. Set status: `passed` if all criteria pass, `gaps_found` if any fail, `human_needed` if any require human review
|
|
43
|
-
|
|
44
|
-
### Output Format
|
|
45
|
-
|
|
46
|
-
Produce JSON conforming to the verifier-output schema with these fields:
|
|
47
|
-
|
|
48
|
-
- `status`: "passed" | "gaps_found" | "human_needed"
|
|
49
|
-
- `score`: "N/M" format
|
|
50
|
-
- `truths[]`: observable claims with status and evidence
|
|
51
|
-
- `criteria_results[]`: one entry per criterion with verify_method, status, expected/actual outcome, evidence
|
|
52
|
-
- `artifacts[]`: (optional) file paths checked with existence/substance status
|
|
53
|
-
- `requirements_coverage[]`: (optional) requirement satisfaction mapping
|
|
54
|
-
- `human_verification[]`: (optional) items needing human review
|
|
55
|
-
- `gaps[]`: (optional) failed or uncertain truths with reasons
|
|
56
|
-
|
|
57
|
-
Be thorough. Run actual commands. Read actual files. Report what you observe, not what you assume.
|