pan-wizard 2.9.1 → 3.4.1
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/README.md +8 -8
- package/agents/pan-conductor.md +189 -0
- package/agents/pan-counterfactual.md +112 -0
- package/agents/pan-debugger.md +15 -1
- package/agents/pan-document_code.md +21 -0
- package/agents/pan-executor.md +16 -0
- package/agents/pan-hardener.md +113 -0
- package/agents/pan-integration-checker.md +2 -0
- package/agents/pan-knowledge.md +81 -0
- package/agents/pan-meta-reviewer.md +91 -0
- package/agents/pan-plan-checker.md +2 -0
- package/agents/pan-previewer.md +98 -0
- package/agents/pan-project-researcher.md +4 -4
- package/agents/pan-reviewer.md +2 -0
- package/agents/pan-verifier.md +2 -0
- package/bin/install-lib.cjs +197 -0
- package/bin/install.js +1999 -1959
- package/commands/pan/cost.md +132 -0
- package/commands/pan/exec-phase.md +15 -0
- package/commands/pan/focus-auto.md +18 -0
- package/commands/pan/focus-exec.md +10 -1
- package/commands/pan/knowledge.md +129 -0
- package/commands/pan/map-codebase.md +15 -0
- package/commands/pan/mcp-bridge.md +145 -0
- package/commands/pan/plan-phase.md +11 -0
- package/commands/pan/preview.md +114 -0
- package/commands/pan/profile.md +37 -0
- package/commands/pan/review-deep.md +128 -0
- package/commands/pan/verify-phase.md +11 -0
- package/commands/pan/what-if.md +146 -0
- package/hooks/dist/pan-cost-logger.js +102 -0
- package/hooks/dist/pan-statusline.js +154 -108
- package/package.json +1 -1
- package/pan-wizard-core/bin/lib/bridge.cjs +269 -0
- package/pan-wizard-core/bin/lib/bus.cjs +251 -0
- package/pan-wizard-core/bin/lib/codebase.cjs +118 -0
- package/pan-wizard-core/bin/lib/constants.cjs +39 -0
- package/pan-wizard-core/bin/lib/context-budget.cjs +27 -0
- package/pan-wizard-core/bin/lib/core.cjs +91 -6
- package/pan-wizard-core/bin/lib/cost.cjs +359 -0
- package/pan-wizard-core/bin/lib/focus.cjs +100 -2
- package/pan-wizard-core/bin/lib/init.cjs +5 -5
- package/pan-wizard-core/bin/lib/knowledge.cjs +331 -0
- package/pan-wizard-core/bin/lib/memory.cjs +252 -0
- package/pan-wizard-core/bin/lib/phase.cjs +40 -13
- package/pan-wizard-core/bin/lib/preview.cjs +480 -0
- package/pan-wizard-core/bin/lib/review-deep.cjs +280 -0
- package/pan-wizard-core/bin/lib/roadmap.cjs +4 -4
- package/pan-wizard-core/bin/lib/state.cjs +2 -2
- package/pan-wizard-core/bin/lib/verify.cjs +34 -1
- package/pan-wizard-core/bin/lib/whatif.cjs +289 -0
- package/pan-wizard-core/bin/pan-tools.cjs +239 -4
- package/pan-wizard-core/templates/playbook.md +53 -0
- package/pan-wizard-core/templates/preview-report.md +93 -0
- package/pan-wizard-core/templates/roadmap.md +24 -24
- package/pan-wizard-core/templates/state.md +12 -9
- package/pan-wizard-core/workflows/plan-phase.md +1 -1
- package/scripts/build-hooks.js +2 -1
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
|
|
169
169
|
const fs = require('fs');
|
|
170
170
|
const path = require('path');
|
|
171
|
-
const { error, output } = require('./lib/core.cjs');
|
|
171
|
+
const { error, output, buildCachedContext } = require('./lib/core.cjs');
|
|
172
172
|
const state = require('./lib/state.cjs');
|
|
173
173
|
const phase = require('./lib/phase.cjs');
|
|
174
174
|
const roadmap = require('./lib/roadmap.cjs');
|
|
@@ -182,6 +182,14 @@ const frontmatter = require('./lib/frontmatter.cjs');
|
|
|
182
182
|
const contextBudget = require('./lib/context-budget.cjs');
|
|
183
183
|
const focus = require('./lib/focus.cjs');
|
|
184
184
|
const codebase = require('./lib/codebase.cjs');
|
|
185
|
+
const memory = require('./lib/memory.cjs');
|
|
186
|
+
const bus = require('./lib/bus.cjs');
|
|
187
|
+
const cost = require('./lib/cost.cjs');
|
|
188
|
+
const preview = require('./lib/preview.cjs');
|
|
189
|
+
const reviewDeep = require('./lib/review-deep.cjs');
|
|
190
|
+
const knowledge = require('./lib/knowledge.cjs');
|
|
191
|
+
const whatif = require('./lib/whatif.cjs');
|
|
192
|
+
const bridge = require('./lib/bridge.cjs');
|
|
185
193
|
|
|
186
194
|
/**
|
|
187
195
|
* Get the value following a flag in the args array.
|
|
@@ -684,8 +692,39 @@ async function main() {
|
|
|
684
692
|
// design is a workflow-only command (no core function)
|
|
685
693
|
// The AI reads commands/pan/focus-design.md directly
|
|
686
694
|
output({ command: 'focus-design', type: 'workflow', message: 'Use /pan:focus-design to invoke the 10-phase investigation pipeline' }, raw);
|
|
695
|
+
} else if (subcommand === 'classify-stages') {
|
|
696
|
+
const useStdin = args.includes('--stdin');
|
|
697
|
+
let items;
|
|
698
|
+
if (useStdin) {
|
|
699
|
+
try {
|
|
700
|
+
items = JSON.parse(fs.readFileSync(0, 'utf-8'));
|
|
701
|
+
} catch (e) {
|
|
702
|
+
error(`Failed to parse stdin JSON: ${e.message}`);
|
|
703
|
+
}
|
|
704
|
+
} else {
|
|
705
|
+
const batch = focus.readLatestBatch(cwd);
|
|
706
|
+
if (!batch) {
|
|
707
|
+
output({ error: 'No batch file found. Run focus plan first.' }, raw);
|
|
708
|
+
break;
|
|
709
|
+
}
|
|
710
|
+
items = batch.batch || [];
|
|
711
|
+
}
|
|
712
|
+
output(focus.classifyStageDependencies(items), raw);
|
|
713
|
+
} else if (subcommand === 'reflection') {
|
|
714
|
+
let payload;
|
|
715
|
+
try {
|
|
716
|
+
payload = JSON.parse(fs.readFileSync(0, 'utf-8'));
|
|
717
|
+
} catch (e) {
|
|
718
|
+
error(`Failed to parse stdin JSON for focus reflection: ${e.message}`);
|
|
719
|
+
}
|
|
720
|
+
output(focus.determineContinuation(
|
|
721
|
+
payload.run || {},
|
|
722
|
+
payload.cycle || {},
|
|
723
|
+
payload.batch || [],
|
|
724
|
+
{ tier: payload.tier }
|
|
725
|
+
), raw);
|
|
687
726
|
} else {
|
|
688
|
-
error('Unknown focus subcommand. Available: scan, plan, sync, exec, auto, design');
|
|
727
|
+
error('Unknown focus subcommand. Available: scan, plan, sync, exec, auto, design, classify-stages, reflection');
|
|
689
728
|
}
|
|
690
729
|
break;
|
|
691
730
|
}
|
|
@@ -733,8 +772,202 @@ async function main() {
|
|
|
733
772
|
break;
|
|
734
773
|
}
|
|
735
774
|
|
|
775
|
+
case 'memory': {
|
|
776
|
+
const subcommand = args[1];
|
|
777
|
+
if (subcommand === 'read') {
|
|
778
|
+
memory.cmdMemoryRead(cwd, args[2], raw);
|
|
779
|
+
} else if (subcommand === 'append') {
|
|
780
|
+
memory.cmdMemoryAppend(cwd, args[2], args.slice(3).join(' '), raw);
|
|
781
|
+
} else if (subcommand === 'list') {
|
|
782
|
+
memory.cmdMemoryList(cwd, raw);
|
|
783
|
+
} else if (subcommand === 'compact') {
|
|
784
|
+
memory.cmdMemoryCompact(cwd, args[2], args[3], raw);
|
|
785
|
+
} else {
|
|
786
|
+
error('Unknown memory subcommand. Available: read, append, list, compact');
|
|
787
|
+
}
|
|
788
|
+
break;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
case 'bridge': {
|
|
792
|
+
const subcommand = args[1];
|
|
793
|
+
if (subcommand === 'list') {
|
|
794
|
+
bridge.cmdBridgeList(cwd, raw);
|
|
795
|
+
} else if (subcommand === 'recommend') {
|
|
796
|
+
bridge.cmdBridgeRecommend(cwd, args[2], {
|
|
797
|
+
max_recommendations: Number(getArgValue(args, '--max') || 10),
|
|
798
|
+
min_score: Number(getArgValue(args, '--min-score') || 1),
|
|
799
|
+
}, raw);
|
|
800
|
+
} else if (subcommand === 'cache') {
|
|
801
|
+
bridge.cmdBridgeCache(cwd, getArgValue(args, '--servers'), getArgValue(args, '--runtime'), raw);
|
|
802
|
+
} else {
|
|
803
|
+
error('Unknown bridge subcommand. Available: list, recommend, cache');
|
|
804
|
+
}
|
|
805
|
+
break;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
case 'whatif': {
|
|
809
|
+
const subcommand = args[1];
|
|
810
|
+
if (subcommand === 'prepare') {
|
|
811
|
+
const phaseNum = args[2];
|
|
812
|
+
const scenario = args.slice(3).filter(a => !a.startsWith('--')).join(' ');
|
|
813
|
+
whatif.cmdWhatifPrepare(cwd, phaseNum, scenario, raw);
|
|
814
|
+
} else if (subcommand === 'report') {
|
|
815
|
+
const phaseNum = args[2];
|
|
816
|
+
const scenarioParts = [];
|
|
817
|
+
for (let i = 3; i < args.length; i++) {
|
|
818
|
+
if (args[i] === '--comparison') break;
|
|
819
|
+
scenarioParts.push(args[i]);
|
|
820
|
+
}
|
|
821
|
+
const scenario = scenarioParts.join(' ');
|
|
822
|
+
const comparisonJson = getArgValue(args, '--comparison');
|
|
823
|
+
whatif.cmdWhatifReport(cwd, phaseNum, scenario, comparisonJson, raw);
|
|
824
|
+
} else if (subcommand === 'cleanup') {
|
|
825
|
+
whatif.cmdWhatifCleanup(
|
|
826
|
+
cwd,
|
|
827
|
+
getArgValue(args, '--worktree'),
|
|
828
|
+
getArgValue(args, '--branch'),
|
|
829
|
+
args.includes('--force'),
|
|
830
|
+
raw
|
|
831
|
+
);
|
|
832
|
+
} else {
|
|
833
|
+
error('Unknown whatif subcommand. Available: prepare, report, cleanup');
|
|
834
|
+
}
|
|
835
|
+
break;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
case 'knowledge': {
|
|
839
|
+
const subcommand = args[1];
|
|
840
|
+
if (subcommand === 'ask') {
|
|
841
|
+
const question = args.slice(2).filter(a => !a.startsWith('--')).join(' ');
|
|
842
|
+
const maxSources = getArgValue(args, '--max-sources');
|
|
843
|
+
knowledge.cmdKnowledgeAsk(cwd, question, {
|
|
844
|
+
max_sources: maxSources ? Number(maxSources) : undefined,
|
|
845
|
+
}, raw);
|
|
846
|
+
} else if (subcommand === 'discuss') {
|
|
847
|
+
const phaseNum = args[2];
|
|
848
|
+
knowledge.cmdKnowledgeDiscuss(cwd, phaseNum, {
|
|
849
|
+
subcmd: getArgValue(args, '--subcmd'),
|
|
850
|
+
role: getArgValue(args, '--role'),
|
|
851
|
+
content: getArgValue(args, '--content'),
|
|
852
|
+
cites: getArgValue(args, '--cites'),
|
|
853
|
+
}, raw);
|
|
854
|
+
} else if (subcommand === 'playbook') {
|
|
855
|
+
knowledge.cmdKnowledgePlaybook(cwd, {
|
|
856
|
+
preview: args.includes('--preview'),
|
|
857
|
+
}, raw);
|
|
858
|
+
} else {
|
|
859
|
+
error('Unknown knowledge subcommand. Available: ask, discuss, playbook');
|
|
860
|
+
}
|
|
861
|
+
break;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
case 'review-deep': {
|
|
865
|
+
const subcommand = args[1];
|
|
866
|
+
const phaseNum = args[2];
|
|
867
|
+
const opts = {
|
|
868
|
+
reviewerFile: getArgValue(args, '--reviewer-file'),
|
|
869
|
+
hardenerFile: getArgValue(args, '--hardener-file'),
|
|
870
|
+
metaFile: getArgValue(args, '--meta-file'),
|
|
871
|
+
};
|
|
872
|
+
if (subcommand === 'merge') {
|
|
873
|
+
reviewDeep.cmdReviewDeepMerge(cwd, phaseNum, opts, raw);
|
|
874
|
+
} else if (subcommand === 'analyze') {
|
|
875
|
+
reviewDeep.cmdReviewDeepAnalyze(cwd, phaseNum, opts, raw);
|
|
876
|
+
} else {
|
|
877
|
+
error('Unknown review-deep subcommand. Available: merge, analyze');
|
|
878
|
+
}
|
|
879
|
+
break;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
case 'preview': {
|
|
883
|
+
const subcommand = args[1];
|
|
884
|
+
if (subcommand === 'phase') {
|
|
885
|
+
preview.cmdPreviewPhase(cwd, args[2], raw);
|
|
886
|
+
} else if (subcommand === 'phases') {
|
|
887
|
+
preview.cmdPreviewPhases(cwd, raw);
|
|
888
|
+
} else if (subcommand === 'milestone') {
|
|
889
|
+
preview.cmdPreviewMilestone(cwd, raw);
|
|
890
|
+
} else {
|
|
891
|
+
error('Unknown preview subcommand. Available: phase <N>, phases, milestone');
|
|
892
|
+
}
|
|
893
|
+
break;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
case 'cost': {
|
|
897
|
+
const subcommand = args[1];
|
|
898
|
+
if (subcommand === 'report' || !subcommand) {
|
|
899
|
+
const format = getArgValue(args, '--format', 'json');
|
|
900
|
+
const since = getArgValue(args, '--since');
|
|
901
|
+
const until = getArgValue(args, '--until');
|
|
902
|
+
cost.cmdCostReport(cwd, { format, since, until }, raw);
|
|
903
|
+
} else if (subcommand === 'append') {
|
|
904
|
+
const rec = {
|
|
905
|
+
agent: getArgValue(args, '--agent'),
|
|
906
|
+
command: getArgValue(args, '--command'),
|
|
907
|
+
model: getArgValue(args, '--model'),
|
|
908
|
+
tier: getArgValue(args, '--tier'),
|
|
909
|
+
input_tokens: Number(getArgValue(args, '--input-tokens', 0)),
|
|
910
|
+
output_tokens: Number(getArgValue(args, '--output-tokens', 0)),
|
|
911
|
+
cache_read_tokens: Number(getArgValue(args, '--cache-read-tokens', 0)),
|
|
912
|
+
cache_write_tokens: Number(getArgValue(args, '--cache-write-tokens', 0)),
|
|
913
|
+
phase: getArgValue(args, '--phase'),
|
|
914
|
+
session: getArgValue(args, '--session'),
|
|
915
|
+
};
|
|
916
|
+
cost.cmdCostAppend(cwd, rec, raw);
|
|
917
|
+
} else if (subcommand === 'clear') {
|
|
918
|
+
cost.cmdCostClear(cwd, raw);
|
|
919
|
+
} else {
|
|
920
|
+
error('Unknown cost subcommand. Available: report, append, clear');
|
|
921
|
+
}
|
|
922
|
+
break;
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
case 'bus': {
|
|
926
|
+
const subcommand = args[1];
|
|
927
|
+
if (subcommand === 'publish') {
|
|
928
|
+
bus.cmdBusPublish(cwd, args[2], args[3], { source: getArgValue(args, '--source') }, raw);
|
|
929
|
+
} else if (subcommand === 'drain') {
|
|
930
|
+
const mode = getArgValue(args, '--mode', 'peek');
|
|
931
|
+
const limit = getArgValue(args, '--limit');
|
|
932
|
+
const offset = getArgValue(args, '--offset');
|
|
933
|
+
bus.cmdBusDrain(cwd, args[2], {
|
|
934
|
+
mode,
|
|
935
|
+
limit: limit ? Number(limit) : undefined,
|
|
936
|
+
offset: offset ? Number(offset) : undefined,
|
|
937
|
+
}, raw);
|
|
938
|
+
} else if (subcommand === 'list') {
|
|
939
|
+
bus.cmdBusList(cwd, raw);
|
|
940
|
+
} else {
|
|
941
|
+
error('Unknown bus subcommand. Available: publish, drain, list');
|
|
942
|
+
}
|
|
943
|
+
break;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
case 'cache': {
|
|
947
|
+
const subcommand = args[1];
|
|
948
|
+
if (subcommand === 'prime') {
|
|
949
|
+
const result = buildCachedContext(cwd);
|
|
950
|
+
if (args.includes('--summary')) {
|
|
951
|
+
// Metadata-only form: hide full block content so agents can decide
|
|
952
|
+
// whether to request the full payload.
|
|
953
|
+
const summary = {
|
|
954
|
+
blocks: result.blocks.map(b => ({ path: b.path, bytes: Buffer.byteLength(b.content, 'utf-8'), cache: b.cache })),
|
|
955
|
+
total_bytes: result.total_bytes,
|
|
956
|
+
sha: result.sha,
|
|
957
|
+
};
|
|
958
|
+
output(summary, raw);
|
|
959
|
+
} else {
|
|
960
|
+
output(result, raw);
|
|
961
|
+
}
|
|
962
|
+
} else {
|
|
963
|
+
error('Unknown cache subcommand. Available: prime [--summary]');
|
|
964
|
+
}
|
|
965
|
+
break;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
|
|
736
969
|
case 'retro': {
|
|
737
|
-
verify.cmdRetro(cwd, raw);
|
|
970
|
+
verify.cmdRetro(cwd, raw, args);
|
|
738
971
|
break;
|
|
739
972
|
}
|
|
740
973
|
|
|
@@ -746,8 +979,10 @@ async function main() {
|
|
|
746
979
|
codebase.cmdDetectLanguages(cwd, raw);
|
|
747
980
|
} else if (subcommand === 'best-practices') {
|
|
748
981
|
codebase.cmdBestPractices(cwd, raw);
|
|
982
|
+
} else if (subcommand === 'estimate-size') {
|
|
983
|
+
codebase.cmdEstimateRepoSize(cwd, raw, args);
|
|
749
984
|
} else {
|
|
750
|
-
error('Unknown codebase subcommand. Available: analyze-imports, detect-languages, best-practices');
|
|
985
|
+
error('Unknown codebase subcommand. Available: analyze-imports, detect-languages, best-practices, estimate-size');
|
|
751
986
|
}
|
|
752
987
|
break;
|
|
753
988
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Template for .planning/PLAYBOOK.md generated by `/pan:knowledge playbook`.
|
|
3
|
+
Populated by knowledge.cjs buildPlaybook() + writePlaybook() from the
|
|
4
|
+
accumulated lessons in `.planning/memory/*.md`.
|
|
5
|
+
|
|
6
|
+
Categories (in order):
|
|
7
|
+
- Conventions — preferred patterns / naming / style
|
|
8
|
+
- Gotchas — edge cases and surprises
|
|
9
|
+
- Decisions — architecture choices with rationale
|
|
10
|
+
- Tool choices — library / framework picks
|
|
11
|
+
- Anti-patterns — things to avoid
|
|
12
|
+
- Recurring gaps — patterns that keep appearing in verification
|
|
13
|
+
- General — uncategorized
|
|
14
|
+
-->
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
type: playbook
|
|
18
|
+
generated: {{generated_at}}
|
|
19
|
+
source_agents: {{agent_count}}
|
|
20
|
+
entries: {{entry_count}}
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# PAN Playbook
|
|
24
|
+
|
|
25
|
+
Accumulated lessons across {{agent_count}} agents and {{entry_count}} memory entries. Regenerated from `.planning/memory/*.md`.
|
|
26
|
+
|
|
27
|
+
## Conventions
|
|
28
|
+
|
|
29
|
+
- {{entry}} _— from `{{agent}}`_
|
|
30
|
+
|
|
31
|
+
## Gotchas
|
|
32
|
+
|
|
33
|
+
- {{entry}} _— from `{{agent}}`_
|
|
34
|
+
|
|
35
|
+
## Decisions
|
|
36
|
+
|
|
37
|
+
- {{entry}} _— from `{{agent}}`_
|
|
38
|
+
|
|
39
|
+
## Tool choices
|
|
40
|
+
|
|
41
|
+
- {{entry}} _— from `{{agent}}`_
|
|
42
|
+
|
|
43
|
+
## Anti-patterns
|
|
44
|
+
|
|
45
|
+
- {{entry}} _— from `{{agent}}`_
|
|
46
|
+
|
|
47
|
+
## Recurring gaps
|
|
48
|
+
|
|
49
|
+
- {{entry}} _— from `{{agent}}`_
|
|
50
|
+
|
|
51
|
+
## General
|
|
52
|
+
|
|
53
|
+
- {{entry}} _— from `{{agent}}`_
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Template for pan-previewer output. Agent fills in sections based on mode
|
|
3
|
+
(phase | phases | milestone). Not all sections apply to all modes — see
|
|
4
|
+
commands/pan/preview.md for the per-mode contract.
|
|
5
|
+
|
|
6
|
+
Placeholders:
|
|
7
|
+
{{mode}} — "phase" | "phases" | "milestone"
|
|
8
|
+
{{title}} — e.g. "Phase 7 — API Refactor" or "v3.1"
|
|
9
|
+
{{generated_at}} — ISO timestamp
|
|
10
|
+
{{risk_score}} — 1-10 (phase mode)
|
|
11
|
+
{{confidence}} — 0-100 (milestone mode)
|
|
12
|
+
-->
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
mode: {{mode}}
|
|
16
|
+
generated_at: {{generated_at}}
|
|
17
|
+
source: pan-previewer
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Preview: {{title}}
|
|
21
|
+
|
|
22
|
+
## Summary
|
|
23
|
+
|
|
24
|
+
{{one-paragraph-verdict}}
|
|
25
|
+
|
|
26
|
+
## Files likely touched
|
|
27
|
+
|
|
28
|
+
<!-- phase mode only; grouped by source/tests/docs -->
|
|
29
|
+
- `{{file_path}}` — {{role}}
|
|
30
|
+
|
|
31
|
+
## Tests at risk
|
|
32
|
+
|
|
33
|
+
<!-- phase mode only -->
|
|
34
|
+
- `{{test_path}}` — {{reason}}
|
|
35
|
+
|
|
36
|
+
## Migration steps
|
|
37
|
+
|
|
38
|
+
<!-- phase mode, only when risk_signals.migrate is true -->
|
|
39
|
+
1. {{step}}
|
|
40
|
+
|
|
41
|
+
## External deps
|
|
42
|
+
|
|
43
|
+
<!-- phase mode, only when relevant -->
|
|
44
|
+
- {{package}} — {{version_concern}}
|
|
45
|
+
|
|
46
|
+
## Mermaid
|
|
47
|
+
|
|
48
|
+
<!-- phases mode only; raw source from data layer inside a fenced mermaid block -->
|
|
49
|
+
```mermaid
|
|
50
|
+
{{mermaid_source}}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Parallel batches
|
|
54
|
+
|
|
55
|
+
<!-- phases mode only -->
|
|
56
|
+
### Batch 1
|
|
57
|
+
- Phase {{num}} — {{name}}
|
|
58
|
+
|
|
59
|
+
## Hidden coupling
|
|
60
|
+
|
|
61
|
+
<!-- phases mode only; may be "none found" -->
|
|
62
|
+
- Phase {{from}} → Phase {{to}} — inferred from prose mention; consider promoting to `depends_on:` frontmatter.
|
|
63
|
+
|
|
64
|
+
## Current state
|
|
65
|
+
|
|
66
|
+
<!-- milestone mode only -->
|
|
67
|
+
- Phases completed: {{completed}} / {{total}}
|
|
68
|
+
- Velocity: {{phases_per_week}} phases/week (sample size {{sample_size}})
|
|
69
|
+
|
|
70
|
+
## Projection
|
|
71
|
+
|
|
72
|
+
<!-- milestone mode only -->
|
|
73
|
+
- ETA: **{{eta_date}}**
|
|
74
|
+
- Confidence: {{confidence}}%
|
|
75
|
+
|
|
76
|
+
## Bottleneck
|
|
77
|
+
|
|
78
|
+
<!-- milestone mode only -->
|
|
79
|
+
- Phase {{phase_num}} — {{reason}}
|
|
80
|
+
|
|
81
|
+
## Caveats
|
|
82
|
+
|
|
83
|
+
<!-- milestone mode only -->
|
|
84
|
+
- {{caveat}}
|
|
85
|
+
|
|
86
|
+
## Risk assessment
|
|
87
|
+
|
|
88
|
+
<!-- phase mode only; narrative, cites specific signals -->
|
|
89
|
+
{{narrative}}
|
|
90
|
+
|
|
91
|
+
## Bottom line
|
|
92
|
+
|
|
93
|
+
**{{one-sentence-verdict}}**
|
|
@@ -27,14 +27,14 @@ Decimal phases appear between their surrounding integers in numeric order.
|
|
|
27
27
|
## Phase Details
|
|
28
28
|
|
|
29
29
|
### Phase 1: [Name]
|
|
30
|
-
**Goal
|
|
31
|
-
**Depends on
|
|
32
|
-
**Requirements
|
|
30
|
+
**Goal:** [What this phase delivers]
|
|
31
|
+
**Depends on:** Nothing (first phase)
|
|
32
|
+
**Requirements:** [REQ-01, REQ-02, REQ-03] <!-- brackets optional, parser handles both formats -->
|
|
33
33
|
**Success Criteria** (what must be TRUE):
|
|
34
34
|
1. [Observable behavior from user perspective]
|
|
35
35
|
2. [Observable behavior from user perspective]
|
|
36
36
|
3. [Observable behavior from user perspective]
|
|
37
|
-
**Plans
|
|
37
|
+
**Plans:** [Number of plans, e.g., "3 plans" or "TBD"]
|
|
38
38
|
|
|
39
39
|
Plans:
|
|
40
40
|
- [ ] 01-01: [Brief description of first plan]
|
|
@@ -42,50 +42,50 @@ Plans:
|
|
|
42
42
|
- [ ] 01-03: [Brief description of third plan]
|
|
43
43
|
|
|
44
44
|
### Phase 2: [Name]
|
|
45
|
-
**Goal
|
|
46
|
-
**Depends on
|
|
47
|
-
**Requirements
|
|
45
|
+
**Goal:** [What this phase delivers]
|
|
46
|
+
**Depends on:** Phase 1
|
|
47
|
+
**Requirements:** [REQ-04, REQ-05]
|
|
48
48
|
**Success Criteria** (what must be TRUE):
|
|
49
49
|
1. [Observable behavior from user perspective]
|
|
50
50
|
2. [Observable behavior from user perspective]
|
|
51
|
-
**Plans
|
|
51
|
+
**Plans:** [Number of plans]
|
|
52
52
|
|
|
53
53
|
Plans:
|
|
54
54
|
- [ ] 02-01: [Brief description]
|
|
55
55
|
- [ ] 02-02: [Brief description]
|
|
56
56
|
|
|
57
57
|
### Phase 2.1: Critical Fix (INSERTED)
|
|
58
|
-
**Goal
|
|
59
|
-
**Depends on
|
|
58
|
+
**Goal:** [Urgent work inserted between phases]
|
|
59
|
+
**Depends on:** Phase 2
|
|
60
60
|
**Success Criteria** (what must be TRUE):
|
|
61
61
|
1. [What the fix achieves]
|
|
62
|
-
**Plans
|
|
62
|
+
**Plans:** 1 plan
|
|
63
63
|
|
|
64
64
|
Plans:
|
|
65
65
|
- [ ] 02.1-01: [Description]
|
|
66
66
|
|
|
67
67
|
### Phase 3: [Name]
|
|
68
|
-
**Goal
|
|
69
|
-
**Depends on
|
|
70
|
-
**Requirements
|
|
68
|
+
**Goal:** [What this phase delivers]
|
|
69
|
+
**Depends on:** Phase 2
|
|
70
|
+
**Requirements:** [REQ-06, REQ-07, REQ-08]
|
|
71
71
|
**Success Criteria** (what must be TRUE):
|
|
72
72
|
1. [Observable behavior from user perspective]
|
|
73
73
|
2. [Observable behavior from user perspective]
|
|
74
74
|
3. [Observable behavior from user perspective]
|
|
75
|
-
**Plans
|
|
75
|
+
**Plans:** [Number of plans]
|
|
76
76
|
|
|
77
77
|
Plans:
|
|
78
78
|
- [ ] 03-01: [Brief description]
|
|
79
79
|
- [ ] 03-02: [Brief description]
|
|
80
80
|
|
|
81
81
|
### Phase 4: [Name]
|
|
82
|
-
**Goal
|
|
83
|
-
**Depends on
|
|
84
|
-
**Requirements
|
|
82
|
+
**Goal:** [What this phase delivers]
|
|
83
|
+
**Depends on:** Phase 3
|
|
84
|
+
**Requirements:** [REQ-09, REQ-10]
|
|
85
85
|
**Success Criteria** (what must be TRUE):
|
|
86
86
|
1. [Observable behavior from user perspective]
|
|
87
87
|
2. [Observable behavior from user perspective]
|
|
88
|
-
**Plans
|
|
88
|
+
**Plans:** [Number of plans]
|
|
89
89
|
|
|
90
90
|
Plans:
|
|
91
91
|
- [ ] 04-01: [Brief description]
|
|
@@ -152,8 +152,8 @@ After completing first milestone, reorganize with milestone groupings:
|
|
|
152
152
|
<summary>✅ v1.0 MVP (Phases 1-4) - SHIPPED YYYY-MM-DD</summary>
|
|
153
153
|
|
|
154
154
|
### Phase 1: [Name]
|
|
155
|
-
**Goal
|
|
156
|
-
**Plans
|
|
155
|
+
**Goal:** [What this phase delivers]
|
|
156
|
+
**Plans:** 3 plans
|
|
157
157
|
|
|
158
158
|
Plans:
|
|
159
159
|
- [x] 01-01: [Brief description]
|
|
@@ -169,9 +169,9 @@ Plans:
|
|
|
169
169
|
**Milestone Goal:** [What v1.1 delivers]
|
|
170
170
|
|
|
171
171
|
#### Phase 5: [Name]
|
|
172
|
-
**Goal
|
|
173
|
-
**Depends on
|
|
174
|
-
**Plans
|
|
172
|
+
**Goal:** [What this phase delivers]
|
|
173
|
+
**Depends on:** Phase 4
|
|
174
|
+
**Plans:** 2 plans
|
|
175
175
|
|
|
176
176
|
Plans:
|
|
177
177
|
- [ ] 05-01: [Brief description]
|
|
@@ -18,12 +18,15 @@ See: .planning/project.md (updated [date])
|
|
|
18
18
|
|
|
19
19
|
## Current Position
|
|
20
20
|
|
|
21
|
-
Phase
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
**Current Phase:** [X]
|
|
22
|
+
**Current Phase Name:** [Phase name]
|
|
23
|
+
**Current Plan:** [A]
|
|
24
|
+
**Total Plans in Phase:** [B]
|
|
25
|
+
**Total Phases:** [Y]
|
|
26
|
+
**Status:** [Ready to plan / Planning / Ready to execute / In progress / Phase complete]
|
|
27
|
+
**Last Activity:** [YYYY-MM-DD]
|
|
28
|
+
**Last Activity Description:** [What happened]
|
|
29
|
+
**Progress:** [░░░░░░░░░░] 0%
|
|
27
30
|
|
|
28
31
|
## Performance Metrics
|
|
29
32
|
|
|
@@ -68,9 +71,9 @@ None yet.
|
|
|
68
71
|
|
|
69
72
|
## Session Continuity
|
|
70
73
|
|
|
71
|
-
Last session
|
|
72
|
-
Stopped
|
|
73
|
-
Resume
|
|
74
|
+
**Last session:** [YYYY-MM-DD HH:MM]
|
|
75
|
+
**Stopped At:** [Description of last completed action]
|
|
76
|
+
**Resume File:** [Path to .continue-here*.md if exists, otherwise "None"]
|
|
74
77
|
```
|
|
75
78
|
|
|
76
79
|
<purpose>
|
|
@@ -231,7 +231,7 @@ grep -l "## Validation Architecture" "${PHASE_DIR}"/*-research.md 2>/dev/null
|
|
|
231
231
|
|
|
232
232
|
**If found:**
|
|
233
233
|
1. Read validation template from `~/.claude/pan-wizard-core/templates/validation.md`
|
|
234
|
-
2. Write to `${PHASE_DIR}/${PADDED_PHASE}-
|
|
234
|
+
2. Write to `${PHASE_DIR}/${PADDED_PHASE}-validation.md`
|
|
235
235
|
3. Fill frontmatter: replace `{N}` with phase number, `{phase-slug}` with phase slug, `{date}` with current date
|
|
236
236
|
4. If `commit_docs` is true:
|
|
237
237
|
```bash
|
package/scripts/build-hooks.js
CHANGED