@sienklogic/plan-build-run 2.0.2 → 2.2.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 +30 -0
- package/README.md +25 -6
- package/dashboard/src/routes/pages.routes.js +11 -4
- package/dashboard/src/services/dashboard.service.js +81 -17
- package/dashboard/src/services/phase.service.js +30 -24
- package/dashboard/src/services/roadmap.service.js +3 -3
- package/dashboard/src/views/partials/phase-content.ejs +5 -4
- package/package.json +1 -1
- package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor-pbr/CHANGELOG.md +15 -0
- package/plugins/cursor-pbr/README.md +118 -0
- package/plugins/cursor-pbr/agents/codebase-mapper.md +108 -0
- package/plugins/cursor-pbr/agents/debugger.md +168 -0
- package/plugins/cursor-pbr/agents/executor.md +236 -0
- package/plugins/cursor-pbr/agents/general.md +87 -0
- package/plugins/cursor-pbr/agents/integration-checker.md +87 -0
- package/plugins/cursor-pbr/agents/plan-checker.md +198 -0
- package/plugins/cursor-pbr/agents/planner.md +180 -0
- package/plugins/cursor-pbr/agents/researcher.md +162 -0
- package/plugins/cursor-pbr/agents/synthesizer.md +101 -0
- package/plugins/cursor-pbr/agents/verifier.md +193 -0
- package/plugins/cursor-pbr/assets/logo.svg +21 -0
- package/plugins/cursor-pbr/hooks/hooks.json +189 -7
- package/plugins/cursor-pbr/references/agent-anti-patterns.md +25 -0
- package/plugins/cursor-pbr/references/agent-interactions.md +135 -0
- package/plugins/cursor-pbr/references/agent-teams.md +55 -0
- package/plugins/cursor-pbr/references/checkpoints.md +158 -0
- package/plugins/cursor-pbr/references/common-bug-patterns.md +14 -0
- package/plugins/cursor-pbr/references/config-reference.md +442 -0
- package/plugins/cursor-pbr/references/continuation-format.md +213 -0
- package/plugins/cursor-pbr/references/deviation-rules.md +113 -0
- package/plugins/cursor-pbr/references/git-integration.md +227 -0
- package/plugins/cursor-pbr/references/integration-patterns.md +118 -0
- package/plugins/cursor-pbr/references/model-profiles.md +100 -0
- package/plugins/cursor-pbr/references/model-selection.md +32 -0
- package/plugins/cursor-pbr/references/pbr-rules.md +194 -0
- package/plugins/cursor-pbr/references/plan-authoring.md +182 -0
- package/plugins/cursor-pbr/references/plan-format.md +288 -0
- package/plugins/cursor-pbr/references/planning-config.md +214 -0
- package/plugins/cursor-pbr/references/questioning.md +215 -0
- package/plugins/cursor-pbr/references/reading-verification.md +128 -0
- package/plugins/cursor-pbr/references/stub-patterns.md +161 -0
- package/plugins/cursor-pbr/references/subagent-coordination.md +120 -0
- package/plugins/cursor-pbr/references/ui-formatting.md +462 -0
- package/plugins/cursor-pbr/references/verification-patterns.md +199 -0
- package/plugins/cursor-pbr/references/wave-execution.md +96 -0
- package/plugins/cursor-pbr/rules/pbr-workflow.mdc +48 -0
- package/plugins/cursor-pbr/setup.ps1 +78 -0
- package/plugins/cursor-pbr/setup.sh +83 -0
- package/plugins/cursor-pbr/skills/begin/SKILL.md +566 -0
- package/plugins/cursor-pbr/skills/begin/templates/PROJECT.md.tmpl +34 -0
- package/plugins/cursor-pbr/skills/begin/templates/REQUIREMENTS.md.tmpl +19 -0
- package/plugins/cursor-pbr/skills/begin/templates/STATE.md.tmpl +50 -0
- package/plugins/cursor-pbr/skills/begin/templates/config.json.tmpl +64 -0
- package/plugins/cursor-pbr/skills/begin/templates/researcher-prompt.md.tmpl +20 -0
- package/plugins/cursor-pbr/skills/begin/templates/roadmap-prompt.md.tmpl +31 -0
- package/plugins/cursor-pbr/skills/begin/templates/synthesis-prompt.md.tmpl +17 -0
- package/plugins/cursor-pbr/skills/build/SKILL.md +902 -0
- package/plugins/cursor-pbr/skills/config/SKILL.md +253 -0
- package/plugins/cursor-pbr/skills/continue/SKILL.md +159 -0
- package/plugins/cursor-pbr/skills/debug/SKILL.md +512 -0
- package/plugins/cursor-pbr/skills/debug/templates/continuation-prompt.md.tmpl +17 -0
- package/plugins/cursor-pbr/skills/debug/templates/initial-investigation-prompt.md.tmpl +28 -0
- package/plugins/cursor-pbr/skills/discuss/SKILL.md +344 -0
- package/plugins/cursor-pbr/skills/discuss/templates/CONTEXT.md.tmpl +62 -0
- package/plugins/cursor-pbr/skills/discuss/templates/decision-categories.md +10 -0
- package/plugins/cursor-pbr/skills/explore/SKILL.md +375 -0
- package/plugins/cursor-pbr/skills/health/SKILL.md +218 -0
- package/plugins/cursor-pbr/skills/health/templates/check-pattern.md.tmpl +31 -0
- package/plugins/cursor-pbr/skills/health/templates/output-format.md.tmpl +64 -0
- package/plugins/cursor-pbr/skills/help/SKILL.md +152 -0
- package/plugins/cursor-pbr/skills/import/SKILL.md +499 -0
- package/plugins/cursor-pbr/skills/milestone/SKILL.md +701 -0
- package/plugins/cursor-pbr/skills/milestone/templates/audit-report.md.tmpl +49 -0
- package/plugins/cursor-pbr/skills/milestone/templates/stats-file.md.tmpl +31 -0
- package/plugins/cursor-pbr/skills/note/SKILL.md +228 -0
- package/plugins/cursor-pbr/skills/pause/SKILL.md +246 -0
- package/plugins/cursor-pbr/skills/pause/templates/continue-here.md.tmpl +72 -0
- package/plugins/cursor-pbr/skills/plan/SKILL.md +648 -0
- package/plugins/cursor-pbr/skills/plan/templates/checker-prompt.md.tmpl +22 -0
- package/plugins/cursor-pbr/skills/plan/templates/gap-closure-prompt.md.tmpl +33 -0
- package/plugins/cursor-pbr/skills/plan/templates/planner-prompt.md.tmpl +39 -0
- package/plugins/cursor-pbr/skills/plan/templates/researcher-prompt.md.tmpl +20 -0
- package/plugins/cursor-pbr/skills/plan/templates/revision-prompt.md.tmpl +24 -0
- package/plugins/cursor-pbr/skills/quick/SKILL.md +351 -0
- package/plugins/cursor-pbr/skills/resume/SKILL.md +399 -0
- package/plugins/cursor-pbr/skills/review/SKILL.md +649 -0
- package/plugins/cursor-pbr/skills/review/templates/debugger-prompt.md.tmpl +61 -0
- package/plugins/cursor-pbr/skills/review/templates/gap-planner-prompt.md.tmpl +41 -0
- package/plugins/cursor-pbr/skills/review/templates/verifier-prompt.md.tmpl +116 -0
- package/plugins/cursor-pbr/skills/scan/SKILL.md +301 -0
- package/plugins/cursor-pbr/skills/scan/templates/mapper-prompt.md.tmpl +202 -0
- package/plugins/cursor-pbr/skills/setup/SKILL.md +250 -0
- package/plugins/cursor-pbr/skills/shared/commit-planning-docs.md +36 -0
- package/plugins/cursor-pbr/skills/shared/config-loading.md +103 -0
- package/plugins/cursor-pbr/skills/shared/context-budget.md +41 -0
- package/plugins/cursor-pbr/skills/shared/context-loader-task.md +87 -0
- package/plugins/cursor-pbr/skills/shared/digest-select.md +80 -0
- package/plugins/cursor-pbr/skills/shared/domain-probes.md +126 -0
- package/plugins/cursor-pbr/skills/shared/error-reporting.md +80 -0
- package/plugins/cursor-pbr/skills/shared/gate-prompts.md +389 -0
- package/plugins/cursor-pbr/skills/shared/phase-argument-parsing.md +46 -0
- package/plugins/cursor-pbr/skills/shared/progress-display.md +54 -0
- package/plugins/cursor-pbr/skills/shared/revision-loop.md +82 -0
- package/plugins/cursor-pbr/skills/shared/state-loading.md +63 -0
- package/plugins/cursor-pbr/skills/shared/state-update.md +162 -0
- package/plugins/cursor-pbr/skills/shared/universal-anti-patterns.md +34 -0
- package/plugins/cursor-pbr/skills/status/SKILL.md +362 -0
- package/plugins/cursor-pbr/skills/todo/SKILL.md +195 -0
- package/plugins/cursor-pbr/templates/CONTEXT.md.tmpl +53 -0
- package/plugins/cursor-pbr/templates/INTEGRATION-REPORT.md.tmpl +152 -0
- package/plugins/cursor-pbr/templates/RESEARCH-SUMMARY.md.tmpl +98 -0
- package/plugins/cursor-pbr/templates/ROADMAP.md.tmpl +41 -0
- package/plugins/cursor-pbr/templates/SUMMARY.md.tmpl +82 -0
- package/plugins/cursor-pbr/templates/VERIFICATION-DETAIL.md.tmpl +117 -0
- package/plugins/cursor-pbr/templates/continue-here.md.tmpl +74 -0
- package/plugins/cursor-pbr/templates/prompt-partials/phase-project-context.md.tmpl +38 -0
- package/plugins/pbr/agents/codebase-mapper.md +41 -206
- package/plugins/pbr/agents/debugger.md +65 -171
- package/plugins/pbr/agents/executor.md +90 -275
- package/plugins/pbr/agents/general.md +27 -97
- package/plugins/pbr/agents/integration-checker.md +35 -112
- package/plugins/pbr/agents/plan-checker.md +71 -164
- package/plugins/pbr/agents/planner.md +76 -245
- package/plugins/pbr/agents/researcher.md +63 -255
- package/plugins/pbr/agents/synthesizer.md +49 -174
- package/plugins/pbr/agents/verifier.md +75 -366
- package/plugins/pbr/hooks/hooks.json +14 -10
- package/plugins/pbr/references/ui-formatting.md +1 -1
- package/plugins/pbr/scripts/auto-continue.js +20 -4
- package/plugins/pbr/scripts/check-dangerous-commands.js +1 -1
- package/plugins/pbr/scripts/check-phase-boundary.js +1 -1
- package/plugins/pbr/scripts/check-plan-format.js +3 -3
- package/plugins/pbr/scripts/check-roadmap-sync.js +3 -3
- package/plugins/pbr/scripts/check-skill-workflow.js +1 -1
- package/plugins/pbr/scripts/check-state-sync.js +2 -2
- package/plugins/pbr/scripts/check-subagent-output.js +1 -1
- package/plugins/pbr/scripts/check-summary-gate.js +198 -0
- package/plugins/pbr/scripts/context-budget-check.js +1 -1
- package/plugins/pbr/scripts/event-handler.js +2 -2
- package/plugins/pbr/scripts/event-logger.js +1 -1
- package/plugins/pbr/scripts/log-subagent.js +1 -1
- package/plugins/pbr/scripts/pbr-tools.js +1 -1
- package/plugins/pbr/scripts/post-write-dispatch.js +1 -1
- package/plugins/pbr/scripts/post-write-quality.js +1 -1
- package/plugins/pbr/scripts/pre-bash-dispatch.js +1 -1
- package/plugins/pbr/scripts/pre-write-dispatch.js +16 -3
- package/plugins/pbr/scripts/session-cleanup.js +1 -1
- package/plugins/pbr/scripts/status-line.js +1 -1
- package/plugins/pbr/scripts/suggest-compact.js +1 -1
- package/plugins/pbr/scripts/task-completed.js +1 -1
- package/plugins/pbr/scripts/track-context-budget.js +11 -6
- package/plugins/pbr/scripts/validate-commit.js +1 -1
- package/plugins/pbr/scripts/validate-task.js +1 -1
- package/plugins/pbr/skills/begin/SKILL.md +4 -2
- package/plugins/pbr/skills/begin/templates/roadmap-prompt.md.tmpl +2 -0
- package/plugins/pbr/skills/build/SKILL.md +6 -4
- package/plugins/pbr/skills/continue/SKILL.md +2 -1
- package/plugins/pbr/skills/review/SKILL.md +4 -3
- package/plugins/pbr/skills/status/SKILL.md +5 -2
- package/plugins/pbr/templates/ROADMAP.md.tmpl +6 -1
- package/plugins/cursor-pbr/agents/.gitkeep +0 -0
- package/plugins/cursor-pbr/references/.gitkeep +0 -0
- package/plugins/cursor-pbr/rules/.gitkeep +0 -0
- package/plugins/cursor-pbr/skills/.gitkeep +0 -0
- package/plugins/cursor-pbr/templates/.gitkeep +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<!-- canonical: ../../pbr/templates/VERIFICATION-DETAIL.md.tmpl -->
|
|
2
|
+
<!-- Source: agents/verifier.md | Purpose: Detailed output format for verification reports produced by the verifier agent -->
|
|
3
|
+
|
|
4
|
+
```yaml
|
|
5
|
+
---
|
|
6
|
+
phase: "{phase_id}"
|
|
7
|
+
verified: "{ISO timestamp}"
|
|
8
|
+
status: "passed" # passed | gaps_found | human_needed
|
|
9
|
+
is_re_verification: false # true if re-verifying after gap closure
|
|
10
|
+
score:
|
|
11
|
+
total_must_haves: {n}
|
|
12
|
+
verified: {n}
|
|
13
|
+
failed: {n}
|
|
14
|
+
partial: {n}
|
|
15
|
+
human_needed: {n}
|
|
16
|
+
gaps:
|
|
17
|
+
- must_have: "{description of the failed must-have}"
|
|
18
|
+
level: "{existence | substantive | wired}"
|
|
19
|
+
evidence: "{what you found}"
|
|
20
|
+
recommendation: "{specific action to fix}"
|
|
21
|
+
anti_patterns:
|
|
22
|
+
todos: {count}
|
|
23
|
+
stubs: {count}
|
|
24
|
+
console_logs: {count}
|
|
25
|
+
skipped_tests: {count}
|
|
26
|
+
hardcoded_secrets: {count}
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# Phase Verification: {phase_name}
|
|
30
|
+
|
|
31
|
+
> Verified: {date}
|
|
32
|
+
> Status: **{STATUS}**
|
|
33
|
+
> Score: {verified}/{total} must-haves verified
|
|
34
|
+
> Re-verification: {yes/no}
|
|
35
|
+
|
|
36
|
+
## Observable Truths
|
|
37
|
+
|
|
38
|
+
| # | Truth | Status | Evidence |
|
|
39
|
+
|---|-------|--------|----------|
|
|
40
|
+
| 1 | {truth statement} | VERIFIED | {evidence summary with file paths and line numbers} |
|
|
41
|
+
| 2 | {truth statement} | FAILED | {what's wrong, what was expected, what was found} |
|
|
42
|
+
| 3 | {truth statement} | HUMAN_NEEDED | {why it can't be verified programmatically} |
|
|
43
|
+
|
|
44
|
+
## Artifact Verification
|
|
45
|
+
|
|
46
|
+
| # | Artifact | L1: Exists | L2: Substantive | L3: Wired | Status |
|
|
47
|
+
|---|----------|-----------|-----------------|-----------|--------|
|
|
48
|
+
| 1 | `{file/export}` | YES | YES (142 lines, real logic) | WIRED (imported by 3 files) | PASS |
|
|
49
|
+
| 2 | `{file/export}` | YES | STUB (TODO at L42, empty handler L67) | N/A | FAIL |
|
|
50
|
+
| 3 | `{file/export}` | YES | YES | ORPHANED (not imported anywhere) | FAIL |
|
|
51
|
+
| 4 | `{file/export}` | NO | N/A | N/A | FAIL |
|
|
52
|
+
|
|
53
|
+
## Key Link Verification
|
|
54
|
+
|
|
55
|
+
| # | Link Description | Source | Target | Status | Evidence |
|
|
56
|
+
|---|-----------------|--------|--------|--------|----------|
|
|
57
|
+
| 1 | {what connects to what} | `{source_file}` | `{target_file}` | WIRED | Import at L12, called at L45 |
|
|
58
|
+
| 2 | {what connects to what} | `{source_file}` | `{target_file}` | BROKEN | Imported but never called |
|
|
59
|
+
|
|
60
|
+
## Gaps Found
|
|
61
|
+
|
|
62
|
+
{Only present if status is gaps_found}
|
|
63
|
+
|
|
64
|
+
### Gap 1: {Short description}
|
|
65
|
+
|
|
66
|
+
- **Must-Have**: {which must-have this gap blocks}
|
|
67
|
+
- **Level Failed**: {existence / substantive / wired}
|
|
68
|
+
- **Evidence**: {specific evidence — file paths, line numbers, command output}
|
|
69
|
+
- **Impact**: {what doesn't work because of this gap}
|
|
70
|
+
- **Recommendation**: {specific action to close this gap}
|
|
71
|
+
|
|
72
|
+
### Gap 2: {Short description}
|
|
73
|
+
...
|
|
74
|
+
|
|
75
|
+
## Human Verification Items
|
|
76
|
+
|
|
77
|
+
{Only present if there are items requiring human verification}
|
|
78
|
+
|
|
79
|
+
### Item 1: {What needs checking}
|
|
80
|
+
|
|
81
|
+
- **Must-Have**: {which must-have this relates to}
|
|
82
|
+
- **Why Manual**: {why it can't be verified automatically}
|
|
83
|
+
- **How to Test**: {step-by-step instructions}
|
|
84
|
+
- **Expected Result**: {what success looks like}
|
|
85
|
+
|
|
86
|
+
## Anti-Pattern Scan
|
|
87
|
+
|
|
88
|
+
| Pattern | Count | Severity | Files |
|
|
89
|
+
|---------|-------|----------|-------|
|
|
90
|
+
| TODO/FIXME comments | {n} | {low/medium/high} | {file list} |
|
|
91
|
+
| Stub implementations | {n} | {high} | {file list} |
|
|
92
|
+
| Console.log in production | {n} | {low} | {file list} |
|
|
93
|
+
| Skipped tests | {n} | {medium} | {file list} |
|
|
94
|
+
| Hardcoded secrets | {n} | {critical} | {file list} |
|
|
95
|
+
| Empty catch blocks | {n} | {medium} | {file list} |
|
|
96
|
+
|
|
97
|
+
## Regressions
|
|
98
|
+
|
|
99
|
+
{Only present in re-verification mode}
|
|
100
|
+
|
|
101
|
+
| # | Must-Have | Previous Status | Current Status | Evidence |
|
|
102
|
+
|---|----------|----------------|----------------|----------|
|
|
103
|
+
| 1 | {must-have} | VERIFIED | FAILED | {what changed} |
|
|
104
|
+
|
|
105
|
+
## Summary
|
|
106
|
+
|
|
107
|
+
### Phase Health
|
|
108
|
+
- **Must-haves**: {n}/{total} verified ({percentage}%)
|
|
109
|
+
- **Gaps**: {n} blocking, {n} non-blocking
|
|
110
|
+
- **Anti-patterns**: {n} total ({n} critical)
|
|
111
|
+
- **Human items**: {n} pending
|
|
112
|
+
|
|
113
|
+
### Recommendations
|
|
114
|
+
1. {Most important action to take}
|
|
115
|
+
2. {Second most important}
|
|
116
|
+
3. ...
|
|
117
|
+
```
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<!-- canonical: ../../pbr/templates/continue-here.md.tmpl -->
|
|
2
|
+
<!-- Source: skills/pause/SKILL.md | Purpose: Handoff file for session pause/resume, placed in the active phase directory -->
|
|
3
|
+
|
|
4
|
+
# Template: Continue Here Handoff File
|
|
5
|
+
# Used by: pause/SKILL.md (Step 4)
|
|
6
|
+
# Output path: .planning/phases/{NN}-{phase-name}/.continue-here.md
|
|
7
|
+
# Variables: {datetime}, {hours}, {phase}, {plan}, {status}, {session work}, {remaining}, {decisions}, {blockers}, {context}, {next steps}
|
|
8
|
+
|
|
9
|
+
# Continue Here
|
|
10
|
+
|
|
11
|
+
**Paused:** {ISO datetime}
|
|
12
|
+
**Session duration:** ~{estimated hours} (based on git log timestamps)
|
|
13
|
+
|
|
14
|
+
## Position
|
|
15
|
+
|
|
16
|
+
Phase: {N} -- {name}
|
|
17
|
+
Plan: {M} of {total} (or "between plans" / "phase complete")
|
|
18
|
+
Status: {in-progress / between-plans / reviewing / planning}
|
|
19
|
+
|
|
20
|
+
## Completed This Session
|
|
21
|
+
|
|
22
|
+
{List of work done, with commit references where available}
|
|
23
|
+
|
|
24
|
+
- Plan {A}: {summary} (commit: {short hash})
|
|
25
|
+
- Plan {B}: {summary} (commit: {short hash})
|
|
26
|
+
- Quick task: {description} (commit: {short hash})
|
|
27
|
+
|
|
28
|
+
{If nothing was completed:}
|
|
29
|
+
- No plans completed this session (discussion/planning only)
|
|
30
|
+
|
|
31
|
+
## Remaining
|
|
32
|
+
|
|
33
|
+
{What still needs to be done in this phase}
|
|
34
|
+
|
|
35
|
+
- Plan {C}: {brief description from plan frontmatter}
|
|
36
|
+
- Plan {D}: {brief description from plan frontmatter}
|
|
37
|
+
|
|
38
|
+
{If phase is complete:}
|
|
39
|
+
- Phase {N} is complete. Next: {review or next phase}
|
|
40
|
+
|
|
41
|
+
## Decisions Made
|
|
42
|
+
|
|
43
|
+
{Key decisions from this session that affect future work}
|
|
44
|
+
|
|
45
|
+
- {decision 1}: {brief description}
|
|
46
|
+
- {decision 2}: {brief description}
|
|
47
|
+
|
|
48
|
+
{If no notable decisions:}
|
|
49
|
+
- No major decisions this session
|
|
50
|
+
|
|
51
|
+
## Blockers
|
|
52
|
+
|
|
53
|
+
{Any issues preventing progress}
|
|
54
|
+
|
|
55
|
+
- {blocker description}
|
|
56
|
+
|
|
57
|
+
{If no blockers:}
|
|
58
|
+
- None
|
|
59
|
+
|
|
60
|
+
## Context Notes
|
|
61
|
+
|
|
62
|
+
{Any additional context that would help the next session}
|
|
63
|
+
|
|
64
|
+
- {note about something tricky}
|
|
65
|
+
- {note about something to watch out for}
|
|
66
|
+
- {note about user preferences expressed during this session}
|
|
67
|
+
|
|
68
|
+
## Next Steps
|
|
69
|
+
|
|
70
|
+
{Ordered list of what to do when resuming}
|
|
71
|
+
|
|
72
|
+
1. {Specific first action with command}
|
|
73
|
+
2. {Following action}
|
|
74
|
+
3. {And so on}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<!-- canonical: ../../../pbr/templates/prompt-partials/phase-project-context.md.tmpl -->
|
|
2
|
+
<!-- Source: templates/prompt-partials/ | Purpose: Shared context blocks for agent prompt templates -->
|
|
3
|
+
<!-- Usage: Read this file and fill in placeholders, then include the result in agent prompts. -->
|
|
4
|
+
<!-- Orchestrators should omit sections that don't apply to their agent type. -->
|
|
5
|
+
|
|
6
|
+
<phase_context>
|
|
7
|
+
Phase: {NN} - {phase_name}
|
|
8
|
+
Phase directory: .planning/phases/{NN}-{slug}/
|
|
9
|
+
Phase goal: {goal from roadmap}
|
|
10
|
+
Phase requirements: {REQ-IDs mapped to this phase, or "None"}
|
|
11
|
+
Phase depends on: {dependency phases, or "None"}
|
|
12
|
+
Success criteria from roadmap:
|
|
13
|
+
{success criteria list, or omit if not applicable}
|
|
14
|
+
</phase_context>
|
|
15
|
+
|
|
16
|
+
<project_context>
|
|
17
|
+
{Decision Summary from .planning/CONTEXT.md — compact locked/deferred/discretion list}
|
|
18
|
+
{If no CONTEXT.md exists: "No project-level context."}
|
|
19
|
+
|
|
20
|
+
Phase-specific decisions:
|
|
21
|
+
{Decision Summary from .planning/phases/{NN}-{slug}/CONTEXT.md}
|
|
22
|
+
{If no phase-level CONTEXT.md exists: "No phase-specific discussion captured."}
|
|
23
|
+
|
|
24
|
+
Full context files (Read on-demand if you need scope/quality/integration details):
|
|
25
|
+
- .planning/CONTEXT.md
|
|
26
|
+
- .planning/phases/{NN}-{slug}/CONTEXT.md
|
|
27
|
+
</project_context>
|
|
28
|
+
|
|
29
|
+
<prior_work>
|
|
30
|
+
The following prior phase summaries are available. Read any you need via the Read tool.
|
|
31
|
+
|
|
32
|
+
| Phase | Summary File | Status | Key Exports |
|
|
33
|
+
|-------|-------------|--------|-------------|
|
|
34
|
+
{For each preceding phase SUMMARY.md:}
|
|
35
|
+
| {M} - {name} | {absolute path to SUMMARY.md} | {complete/partial} | {one-line provides list} |
|
|
36
|
+
|
|
37
|
+
{If no prior phases: "No prior phases completed."}
|
|
38
|
+
</prior_work>
|
|
@@ -20,144 +20,52 @@ You are **codebase-mapper**, the codebase analysis agent for the Plan-Build-Run
|
|
|
20
20
|
- **Document quality over brevity.** Be thorough. Other agents depend on your analysis for accurate planning and execution.
|
|
21
21
|
- **Always include file paths.** Every claim must reference the actual code location. Never say "the config file" — say "`tsconfig.json` at project root" or "`src/config/database.ts`".
|
|
22
22
|
- **Write current state only.** No temporal language ("recently added", "will be changed", "was refactored"). Document WHAT IS, not what was or will be.
|
|
23
|
-
- **Be prescriptive, not descriptive.** When documenting conventions: "Use this pattern" not "This pattern exists."
|
|
24
|
-
- **Evidence-based.** Read the actual files. Don't guess from file names or directory structures.
|
|
23
|
+
- **Be prescriptive, not descriptive.** When documenting conventions: "Use this pattern" not "This pattern exists."
|
|
24
|
+
- **Evidence-based.** Read the actual files. Don't guess from file names or directory structures.
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
28
|
### Forbidden Files
|
|
29
29
|
|
|
30
|
-
When exploring
|
|
30
|
+
When exploring, NEVER commit or recommend committing:
|
|
31
31
|
- `.env` files (except `.env.example` or `.env.template`)
|
|
32
32
|
- `*.key`, `*.pem`, `*.pfx`, `*.p12` — private keys and certificates
|
|
33
33
|
- Files containing `credential` or `secret` in their name
|
|
34
34
|
- `*.keystore`, `*.jks` — Java keystores
|
|
35
35
|
- `id_rsa`, `id_ed25519` — SSH keys
|
|
36
36
|
|
|
37
|
-
If
|
|
37
|
+
If encountered, note in CONCERNS.md under "Security Considerations" but do NOT include contents.
|
|
38
38
|
|
|
39
39
|
---
|
|
40
40
|
|
|
41
41
|
## Focus Areas
|
|
42
42
|
|
|
43
|
-
You receive ONE focus area per invocation.
|
|
43
|
+
You receive ONE focus area per invocation. All output is written to `.planning/codebase/` (create if needed). **Do NOT commit** — the orchestrator handles commits.
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
| Focus | Output Files | Templates |
|
|
46
|
+
|-------|-------------|-----------|
|
|
47
|
+
| `tech` | STACK.md, INTEGRATIONS.md | `templates/codebase/STACK.md.tmpl`, `templates/codebase/INTEGRATIONS.md.tmpl` |
|
|
48
|
+
| `arch` | ARCHITECTURE.md, STRUCTURE.md | `templates/codebase/ARCHITECTURE.md.tmpl`, `templates/codebase/STRUCTURE.md.tmpl` |
|
|
49
|
+
| `quality` | CONVENTIONS.md, TESTING.md | `templates/codebase/CONVENTIONS.md.tmpl`, `templates/codebase/TESTING.md.tmpl` |
|
|
50
|
+
| `concerns` | CONCERNS.md | `templates/codebase/CONCERNS.md.tmpl` |
|
|
46
51
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
### Focus: `arch` → ARCHITECTURE.md + STRUCTURE.md
|
|
50
|
-
|
|
51
|
-
Analyze the architectural patterns and project structure.
|
|
52
|
-
|
|
53
|
-
### Focus: `quality` → CONVENTIONS.md + TESTING.md
|
|
54
|
-
|
|
55
|
-
Analyze code style conventions and testing infrastructure.
|
|
56
|
-
|
|
57
|
-
### Focus: `concerns` → CONCERNS.md
|
|
58
|
-
|
|
59
|
-
Identify technical debt, risks, and problem areas.
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## Output Path
|
|
64
|
-
|
|
65
|
-
All documents are written to: `.planning/codebase/`
|
|
66
|
-
|
|
67
|
-
Create the directory if it doesn't exist.
|
|
68
|
-
|
|
69
|
-
**Do NOT commit.** The orchestrator handles commits.
|
|
52
|
+
Read the relevant `.tmpl` file(s) and fill in all placeholder fields with data from your analysis.
|
|
70
53
|
|
|
71
54
|
---
|
|
72
55
|
|
|
73
56
|
## Exploration Process
|
|
74
57
|
|
|
75
|
-
> **Cross-platform
|
|
76
|
-
|
|
77
|
-
For any focus area, follow this general exploration pattern:
|
|
78
|
-
|
|
79
|
-
### Step 1: Orientation
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
# Get directory structure overview — use Glob for each language
|
|
83
|
-
Glob("**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx")
|
|
84
|
-
Glob("**/*.py", "**/*.go", "**/*.rs")
|
|
85
|
-
|
|
86
|
-
# Find key configuration files — use Glob
|
|
87
|
-
Glob("package.json", "tsconfig.json", ".eslintrc*", ".prettierrc*", "jest.config*", "vite.config*", "next.config*", "webpack.config*", "Makefile", "CMakeLists.txt", "requirements.txt", "pyproject.toml", "Cargo.toml", "go.mod")
|
|
88
|
-
|
|
89
|
-
# Check for documentation — use Glob
|
|
90
|
-
Glob("README.md", "CLAUDE.md", ".cursorrules", "docs/**/*")
|
|
91
|
-
|
|
92
|
-
# Check for Docker — use Glob
|
|
93
|
-
Glob("Dockerfile", "docker-compose.yml", ".dockerignore")
|
|
94
|
-
|
|
95
|
-
# Check for CI/CD — use Glob
|
|
96
|
-
Glob(".github/workflows/*", ".gitlab-ci.yml", "Jenkinsfile", ".circleci/*")
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### Step 2: Deep Inspection
|
|
100
|
-
|
|
101
|
-
Read key files based on what you found in Step 1. Minimum 5-10 key files per focus area.
|
|
102
|
-
|
|
103
|
-
### Step 3: Pattern Recognition
|
|
104
|
-
|
|
105
|
-
Look for repeated patterns in the code. How are things consistently done?
|
|
106
|
-
|
|
107
|
-
### Step 4: Write Documentation
|
|
108
|
-
|
|
109
|
-
Write to `.planning/codebase/` using the templates below.
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
## Focus: `tech` — STACK.md + INTEGRATIONS.md
|
|
114
|
-
|
|
115
|
-
### STACK.md Template
|
|
116
|
-
|
|
117
|
-
Read the document template from `templates/codebase/STACK.md.tmpl` and use it as the format for your STACK.md output. Fill in all placeholder fields with data from your codebase analysis.
|
|
118
|
-
|
|
119
|
-
### INTEGRATIONS.md Template
|
|
120
|
-
|
|
121
|
-
Read the document template from `templates/codebase/INTEGRATIONS.md.tmpl` and use it as the format for your INTEGRATIONS.md output. Fill in all placeholder fields with data from your codebase analysis.
|
|
122
|
-
|
|
123
|
-
---
|
|
124
|
-
|
|
125
|
-
## Focus: `arch` — ARCHITECTURE.md + STRUCTURE.md
|
|
126
|
-
|
|
127
|
-
### ARCHITECTURE.md Template
|
|
128
|
-
|
|
129
|
-
Read the document template from `templates/codebase/ARCHITECTURE.md.tmpl` and use it as the format for your ARCHITECTURE.md output. Fill in all placeholder fields with data from your codebase analysis.
|
|
130
|
-
|
|
131
|
-
### STRUCTURE.md Template
|
|
132
|
-
|
|
133
|
-
Read the document template from `templates/codebase/STRUCTURE.md.tmpl` and use it as the format for your STRUCTURE.md output. Fill in all placeholder fields with data from your codebase analysis.
|
|
58
|
+
> **Cross-platform**: Use Glob, Read, and Grep tools — not Bash `ls`, `find`, or `cat`. Bash file commands fail on Windows.
|
|
134
59
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
### CONVENTIONS.md Template
|
|
140
|
-
|
|
141
|
-
Read the document template from `templates/codebase/CONVENTIONS.md.tmpl` and use it as the format for your CONVENTIONS.md output. Fill in all placeholder fields with data from your codebase analysis.
|
|
142
|
-
|
|
143
|
-
### TESTING.md Template
|
|
144
|
-
|
|
145
|
-
Read the document template from `templates/codebase/TESTING.md.tmpl` and use it as the format for your TESTING.md output. Fill in all placeholder fields with data from your codebase analysis.
|
|
146
|
-
|
|
147
|
-
---
|
|
148
|
-
|
|
149
|
-
## Focus: `concerns` — CONCERNS.md
|
|
150
|
-
|
|
151
|
-
### CONCERNS.md Template
|
|
152
|
-
|
|
153
|
-
Read the document template from `templates/codebase/CONCERNS.md.tmpl` and use it as the format for your CONCERNS.md output. Fill in all placeholder fields with data from your codebase analysis.
|
|
60
|
+
1. **Orientation** — Glob for source files, config files, docs, Docker, CI/CD to understand project shape.
|
|
61
|
+
2. **Deep Inspection** — Read 5-10+ key files per focus area (package.json, configs, entry points, core modules).
|
|
62
|
+
3. **Pattern Recognition** — Identify repeated conventions across the codebase.
|
|
63
|
+
4. **Write Documentation** — Write to `.planning/codebase/` using the templates. Write documents as you go to manage context.
|
|
154
64
|
|
|
155
65
|
---
|
|
156
66
|
|
|
157
67
|
## Output Budget
|
|
158
68
|
|
|
159
|
-
Target output sizes for this agent's artifacts. Exceeding these targets wastes planner context.
|
|
160
|
-
|
|
161
69
|
| Artifact | Target | Hard Limit |
|
|
162
70
|
|----------|--------|------------|
|
|
163
71
|
| STACK.md | ≤ 800 tokens | 1,200 tokens |
|
|
@@ -169,111 +77,38 @@ Target output sizes for this agent's artifacts. Exceeding these targets wastes p
|
|
|
169
77
|
| CONCERNS.md | ≤ 600 tokens | 1,000 tokens |
|
|
170
78
|
| Total per focus area (2 docs) | ≤ 1,400 tokens | 2,200 tokens |
|
|
171
79
|
|
|
172
|
-
**Guidance**: Tables over prose. Version numbers and file paths are the high-value data — skip explanations of what well-known tools do.
|
|
173
|
-
|
|
174
|
-
---
|
|
175
|
-
|
|
176
|
-
## Exploration Commands
|
|
177
|
-
|
|
178
|
-
Use Glob, Read, and Grep tools instead of Bash commands for cross-platform compatibility.
|
|
179
|
-
|
|
180
|
-
### Node.js/TypeScript Projects
|
|
181
|
-
|
|
182
|
-
```
|
|
183
|
-
# Package info — use Read
|
|
184
|
-
Read("package.json")
|
|
185
|
-
Read("package-lock.json", limit: 5)
|
|
186
|
-
|
|
187
|
-
# TypeScript config — use Read
|
|
188
|
-
Read("tsconfig.json")
|
|
189
|
-
|
|
190
|
-
# Linting/formatting config — use Glob then Read
|
|
191
|
-
Glob(".eslintrc*", ".prettierrc*")
|
|
192
|
-
|
|
193
|
-
# Entry points — use Grep
|
|
194
|
-
Grep("export default|createServer|listen|app\\.", glob: "*.ts", path: "src/")
|
|
195
|
-
|
|
196
|
-
# Route definitions — use Grep
|
|
197
|
-
Grep("router\\.|app\\.(get|post|put|delete|use)", glob: "*.{ts,js}", path: "src/")
|
|
198
|
-
|
|
199
|
-
# Test config — use Glob then Read
|
|
200
|
-
Glob("jest.config*", "vitest.config*")
|
|
201
|
-
|
|
202
|
-
# Database config — use Read and Grep
|
|
203
|
-
Read("prisma/schema.prisma") # if it exists
|
|
204
|
-
Grep("createConnection|createPool|mongoose\\.connect|PrismaClient", glob: "*.ts", path: "src/")
|
|
205
|
-
|
|
206
|
-
# Environment variables used — use Grep
|
|
207
|
-
Grep("process\\.env\\.|import\\.meta\\.env\\.", glob: "*.{ts,tsx}", path: "src/")
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
### Python Projects
|
|
211
|
-
|
|
212
|
-
```
|
|
213
|
-
# Dependencies — use Glob then Read
|
|
214
|
-
Glob("requirements.txt", "pyproject.toml", "setup.py", "setup.cfg")
|
|
215
|
-
|
|
216
|
-
# Entry points — use Grep
|
|
217
|
-
Grep("if __name__.*__main__|app\\s*=\\s*Flask|app\\s*=\\s*FastAPI", glob: "*.py")
|
|
218
|
-
|
|
219
|
-
# Config — use Glob then Read
|
|
220
|
-
Glob("settings.py", "config.py", ".env.example")
|
|
221
|
-
|
|
222
|
-
# Tests — use Glob
|
|
223
|
-
Glob("**/test_*.py", "**/*_test.py")
|
|
224
|
-
Read("pyproject.toml") # check [tool.pytest] section
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### General
|
|
228
|
-
|
|
229
|
-
```bash
|
|
230
|
-
# Git info (these Bash commands are cross-platform safe)
|
|
231
|
-
git log --oneline -10
|
|
232
|
-
git remote -v
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
```
|
|
236
|
-
# Docker — use Read
|
|
237
|
-
Read("Dockerfile")
|
|
238
|
-
Read("docker-compose.yml")
|
|
239
|
-
|
|
240
|
-
# CI/CD — use Glob then Read
|
|
241
|
-
Glob(".github/workflows/*")
|
|
242
|
-
# Then Read each workflow file found
|
|
243
|
-
```
|
|
80
|
+
**Guidance**: Tables over prose. Version numbers and file paths are the high-value data — skip explanations of what well-known tools do. The planner reads these documents to make decisions; give it decision-relevant facts, not tutorials.
|
|
244
81
|
|
|
245
82
|
---
|
|
246
83
|
|
|
247
84
|
## Quality Standards
|
|
248
85
|
|
|
249
|
-
1. Every claim must reference actual file paths with line numbers when possible
|
|
250
|
-
2.
|
|
251
|
-
3. Read at least 5-10 key files per focus area
|
|
252
|
-
4.
|
|
253
|
-
5.
|
|
254
|
-
6. Include actual code examples from the codebase, not generic examples
|
|
255
|
-
7. If you find something unexpected, investigate it before documenting
|
|
256
|
-
8. Context budget: stop before 50% context usage — write documents as you go
|
|
86
|
+
1. Every claim must reference actual file paths (with line numbers when possible)
|
|
87
|
+
2. Verify versions from package.json/lock files, not from memory
|
|
88
|
+
3. Read at least 5-10 key files per focus area — file names lie, check source
|
|
89
|
+
4. Include actual code examples from the codebase, not generic examples
|
|
90
|
+
5. Stop before 50% context usage — write documents incrementally
|
|
257
91
|
|
|
258
92
|
---
|
|
259
93
|
|
|
260
|
-
## Anti-Patterns
|
|
261
|
-
|
|
262
|
-
|
|
94
|
+
## Universal Anti-Patterns
|
|
95
|
+
|
|
96
|
+
1. DO NOT guess or assume — read actual files for evidence
|
|
97
|
+
2. DO NOT trust SUMMARY.md or other agent claims without verifying codebase
|
|
98
|
+
3. DO NOT use vague language — be specific and evidence-based
|
|
99
|
+
4. DO NOT present training knowledge as verified fact
|
|
100
|
+
5. DO NOT exceed your role — recommend the correct agent if task doesn't fit
|
|
101
|
+
6. DO NOT modify files outside your designated scope
|
|
102
|
+
7. DO NOT add features or scope not requested — log to deferred
|
|
103
|
+
8. DO NOT skip steps in your protocol, even for "obvious" cases
|
|
104
|
+
9. DO NOT contradict locked decisions in CONTEXT.md
|
|
105
|
+
10. DO NOT implement deferred ideas from CONTEXT.md
|
|
106
|
+
11. DO NOT consume more than 50% context before producing output
|
|
107
|
+
12. DO NOT read agent .md files from agents/ — auto-loaded via subagent_type
|
|
263
108
|
|
|
264
109
|
Additionally for this agent:
|
|
265
110
|
|
|
266
|
-
1.
|
|
267
|
-
2.
|
|
268
|
-
3.
|
|
269
|
-
4.
|
|
270
|
-
5. **DO NOT** produce generic documentation — every claim must reference this specific codebase
|
|
271
|
-
6. **DO NOT** commit the output — the orchestrator handles commits
|
|
272
|
-
7. **DO NOT** document deferred or planned features — only current state
|
|
273
|
-
8. **DO NOT** be vague about file locations — always give exact paths
|
|
274
|
-
|
|
275
|
-
---
|
|
276
|
-
|
|
277
|
-
## Interaction with Other Agents
|
|
278
|
-
|
|
279
|
-
Reference: `references/agent-interactions.md` — see the codebase-mapper section for full details on inputs and outputs.
|
|
111
|
+
1. DO NOT guess technology versions — read package.json or equivalent
|
|
112
|
+
2. DO NOT use temporal language ("recently added", "old code")
|
|
113
|
+
3. DO NOT produce generic documentation — every claim must reference this specific codebase
|
|
114
|
+
4. DO NOT commit the output — the orchestrator handles commits
|