prizmkit 1.1.191 → 1.1.192
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/bundled/VERSION.json +3 -3
- package/bundled/adapters/antigravity/skill-adapter.js +13 -4
- package/bundled/adapters/codex/skill-adapter.js +28 -8
- package/bundled/adapters/cursor/skill-adapter.js +13 -4
- package/bundled/adapters/pi/skill-adapter.js +28 -7
- package/bundled/dev-pipeline/.env.example +4 -12
- package/bundled/dev-pipeline/README.md +5 -10
- package/bundled/dev-pipeline/assets/skill-subagent-integration.md +3 -6
- package/bundled/dev-pipeline/prizmkit_runtime/atomic_io.py +48 -0
- package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +66 -23
- package/bundled/dev-pipeline/prizmkit_runtime/cli.py +10 -7
- package/bundled/dev-pipeline/prizmkit_runtime/commands.py +2 -21
- package/bundled/dev-pipeline/prizmkit_runtime/config.py +24 -76
- package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +125 -67
- package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +77 -430
- package/bundled/dev-pipeline/prizmkit_runtime/heartbeat.py +93 -49
- package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +1 -3
- package/bundled/dev-pipeline/prizmkit_runtime/paths.py +0 -6
- package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +36 -14
- package/bundled/dev-pipeline/prizmkit_runtime/processes.py +206 -151
- package/bundled/dev-pipeline/prizmkit_runtime/reset.py +2 -23
- package/bundled/dev-pipeline/prizmkit_runtime/reset_preserve.py +15 -134
- package/bundled/dev-pipeline/prizmkit_runtime/results.py +25 -0
- package/bundled/dev-pipeline/prizmkit_runtime/runner_bookkeeping.py +68 -83
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +15 -5
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +1 -29
- package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +0 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runner_status.py +7 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +276 -217
- package/bundled/dev-pipeline/prizmkit_runtime/runtime_commit.py +124 -122
- package/bundled/dev-pipeline/prizmkit_runtime/runtime_helper.py +90 -9
- package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +183 -130
- package/bundled/dev-pipeline/prizmkit_runtime/status.py +1 -3
- package/bundled/dev-pipeline/prizmkit_runtime/stream_progress.py +2780 -0
- package/bundled/dev-pipeline/prizmkit_runtime/task_checkout.py +27 -101
- package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +58 -4
- package/bundled/dev-pipeline/scripts/check-session-status.py +43 -19
- package/bundled/dev-pipeline/scripts/continuation.py +6 -4
- package/bundled/dev-pipeline/scripts/detect-stuck.py +28 -28
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +7 -2
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +7 -2
- package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +10 -7
- package/bundled/dev-pipeline/scripts/init-change-artifact.py +8 -2
- package/bundled/dev-pipeline/scripts/init-pipeline.py +14 -69
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +31 -2616
- package/bundled/dev-pipeline/scripts/patch-completion-notes.py +4 -24
- package/bundled/dev-pipeline/scripts/prompt_framework.py +56 -9
- package/bundled/dev-pipeline/scripts/status_common.py +591 -0
- package/bundled/dev-pipeline/scripts/update-bug-status.py +85 -463
- package/bundled/dev-pipeline/scripts/update-checkpoint.py +227 -65
- package/bundled/dev-pipeline/scripts/update-feature-status.py +76 -509
- package/bundled/dev-pipeline/scripts/utils.py +5 -12
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +4 -4
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +7 -0
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +1 -1
- package/bundled/dev-pipeline/templates/sections/artifact-manifest.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +2 -1
- package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification-auto.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification-opencli.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +2 -1
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -6
- package/bundled/dev-pipeline/templates/session-status-schema.json +2 -5
- package/bundled/dev-pipeline/tests/_helpers.py +418 -0
- package/bundled/dev-pipeline/tests/conftest.py +45 -1
- package/bundled/dev-pipeline/tests/test_auto_skip.py +4 -69
- package/bundled/dev-pipeline/tests/test_checkpoint_state.py +126 -1
- package/bundled/dev-pipeline/tests/test_daemon_and_scripts.py +257 -0
- package/bundled/dev-pipeline/tests/test_e2e_pipeline_run.py +500 -0
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +59 -117
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +12 -10
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +431 -3099
- package/bundled/dev-pipeline/tests/test_recovery_workflow.py +7 -8
- package/bundled/dev-pipeline/tests/test_repository_bootstrap.py +0 -1
- package/bundled/dev-pipeline/tests/test_reset_modes.py +15 -27
- package/bundled/dev-pipeline/tests/test_reset_preserve.py +54 -139
- package/bundled/dev-pipeline/tests/test_runner_bookkeeping.py +766 -0
- package/bundled/dev-pipeline/tests/test_runner_lifecycle.py +1257 -0
- package/bundled/dev-pipeline/tests/test_runtime_helper.py +97 -20
- package/bundled/dev-pipeline/tests/test_session_launch.py +1101 -0
- package/bundled/dev-pipeline/tests/test_stream_progress.py +585 -0
- package/bundled/dev-pipeline/tests/test_unified_cli.py +155 -2034
- package/bundled/dev-pipeline/tests/test_utils.py +3 -3
- package/bundled/skills/_metadata.json +9 -63
- package/bundled/skills/app-planner/SKILL.md +32 -303
- package/bundled/skills/app-planner/references/app-design-guide.md +0 -4
- package/bundled/skills/app-planner/references/generated-plan-review.md +2 -1
- package/bundled/skills/app-planner/references/project-brief-guide.md +14 -0
- package/bundled/skills/app-planner/references/project-conventions-discovery.md +4 -6
- package/bundled/skills/app-planner/references/project-state-detection.md +2 -3
- package/bundled/skills/bug-fix-workflow/SKILL.md +1 -2
- package/bundled/skills/bug-fix-workflow/references/bug-diagnosis.md +4 -7
- package/bundled/skills/bug-planner/SKILL.md +54 -435
- package/bundled/skills/bug-planner/references/generated-plan-review.md +3 -2
- package/bundled/skills/bug-planner/references/input-formats.md +32 -0
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +4 -6
- package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +4 -28
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +4 -6
- package/bundled/skills/feature-pipeline-launcher/references/configuration.md +4 -28
- package/bundled/skills/feature-planner/SKILL.md +60 -439
- package/bundled/skills/feature-planner/assets/planning-guide.md +1 -1
- package/bundled/skills/feature-planner/references/completeness-review.md +34 -0
- package/bundled/skills/feature-planner/references/decomposition-patterns.md +2 -2
- package/bundled/skills/feature-planner/references/error-recovery.md +1 -1
- package/bundled/skills/feature-planner/references/generated-plan-review.md +3 -2
- package/bundled/skills/feature-planner/references/incremental-feature-planning.md +3 -1
- package/bundled/skills/feature-workflow/SKILL.md +1 -2
- package/bundled/skills/prizmkit/SKILL.md +7 -1
- package/bundled/skills/prizmkit-code-review/SKILL.md +14 -6
- package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +7 -4
- package/bundled/skills/prizmkit-code-review/references/review-report-template.md +16 -0
- package/bundled/skills/prizmkit-code-review/scripts/render_review_report.py +58 -20
- package/bundled/skills/prizmkit-implement/SKILL.md +1 -1
- package/bundled/skills/prizmkit-init/SKILL.md +24 -127
- package/bundled/skills/prizmkit-init/assets/project-brief-template.md +3 -3
- package/bundled/skills/prizmkit-plan/SKILL.md +6 -8
- package/bundled/skills/prizmkit-plan/references/clarify-guide.md +1 -1
- package/bundled/skills/prizmkit-plan/references/independent-plan-review.md +5 -2
- package/bundled/skills/prizmkit-plan/references/review-plan-spec-loop.md +6 -5
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +1 -13
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +1 -1
- package/bundled/skills/prizmkit-retrospective/SKILL.md +6 -4
- package/bundled/skills/prizmkit-test/SKILL.md +25 -133
- package/bundled/skills/prizmkit-test/references/independent-test-review.md +5 -2
- package/bundled/skills/prizmkit-test/references/test-coverage-model.md +6 -0
- package/bundled/skills/prizmkit-workflow/SKILL.md +2 -3
- package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +4 -3
- package/bundled/skills/recovery-workflow/SKILL.md +7 -7
- package/bundled/skills/recovery-workflow/evals/evals.json +1 -1
- package/bundled/skills/recovery-workflow/references/detection.md +1 -3
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +0 -6
- package/bundled/templates/project-memory-template.md +1 -2
- package/package.json +1 -1
- package/src/scaffold.js +28 -7
- package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +0 -53
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +0 -649
- package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +0 -463
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +0 -1512
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +0 -240
- package/bundled/dev-pipeline/templates/refactor-list-schema.json +0 -266
- package/bundled/dev-pipeline/templates/sections/refactor-critical-paths.md +0 -15
- package/bundled/dev-pipeline/templates/sections/refactor-mission.md +0 -9
- package/bundled/dev-pipeline/templates/sections/refactor-phase-commit-report.md +0 -24
- package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +0 -16
- package/bundled/dev-pipeline/templates/sections/refactor-phase-init.md +0 -9
- package/bundled/dev-pipeline/templates/sections/refactor-phase-plan.md +0 -22
- package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +0 -19
- package/bundled/dev-pipeline/templates/sections/refactor-phase-test.md +0 -24
- package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +0 -12
- package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +0 -6
- package/bundled/dev-pipeline/templates/sections/refactor-task-contract.md +0 -52
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +0 -478
- package/bundled/skills/feature-planner/assets/evaluation-guide.md +0 -44
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +0 -219
- package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +0 -78
- package/bundled/skills/refactor-planner/SKILL.md +0 -467
- package/bundled/skills/refactor-planner/assets/planning-guide.md +0 -291
- package/bundled/skills/refactor-planner/references/behavior-preservation.md +0 -187
- package/bundled/skills/refactor-planner/references/error-recovery.md +0 -45
- package/bundled/skills/refactor-planner/references/fast-path.md +0 -59
- package/bundled/skills/refactor-planner/references/generated-plan-review.md +0 -107
- package/bundled/skills/refactor-planner/references/planning-phases.md +0 -172
- package/bundled/skills/refactor-planner/references/refactor-scoping-guide.md +0 -230
- package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +0 -1120
- package/bundled/skills/refactor-workflow/SKILL.md +0 -205
|
@@ -151,12 +151,12 @@ class TestStableTopologicalOrder:
|
|
|
151
151
|
|
|
152
152
|
def test_self_dependency_is_blocking_error(self):
|
|
153
153
|
items = [
|
|
154
|
-
{"id": "
|
|
154
|
+
{"id": "F-001", "dependencies": ["F-001"]},
|
|
155
155
|
]
|
|
156
156
|
|
|
157
|
-
_ordered, errors = stable_topological_order(items, item_label="
|
|
157
|
+
_ordered, errors = stable_topological_order(items, item_label="Feature")
|
|
158
158
|
|
|
159
|
-
assert errors == ["
|
|
159
|
+
assert errors == ["Feature 'F-001' cannot depend on itself"]
|
|
160
160
|
|
|
161
161
|
def test_cycle_reports_chain(self):
|
|
162
162
|
items = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.1.
|
|
2
|
+
"version": "1.1.192",
|
|
3
3
|
"skills": {
|
|
4
4
|
"prizmkit": {
|
|
5
5
|
"description": "Framework introduction and navigation for the formal single-requirement lifecycle, project initialization, Prizm docs, and independent deployment.",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"description": "Recommended one-time project initialization. Scans greenfield or brownfield projects, generates Prizm docs and a project brief, and provides soft-prerequisite context for formal requirements.",
|
|
20
20
|
"tier": "foundation",
|
|
21
21
|
"category": "prizmkit-skill",
|
|
22
|
-
"hasAssets":
|
|
22
|
+
"hasAssets": true,
|
|
23
23
|
"hasScripts": false
|
|
24
24
|
},
|
|
25
25
|
"prizmkit-plan": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"hasScripts": true
|
|
45
45
|
},
|
|
46
46
|
"prizmkit-committer": {
|
|
47
|
-
"description": "
|
|
47
|
+
"description": "Validate and automatically create a local commit for the complete Git-visible workspace without a confirmation pause, or explicitly prepare a pathless Runtime commit request; never push automatically.",
|
|
48
48
|
"tier": "1",
|
|
49
49
|
"category": "prizmkit-skill",
|
|
50
50
|
"hasAssets": false,
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"description": "Synchronize durable Prizm docs for exact supplied change paths, or record NO_DOC_CHANGE; return RETRO_COMPLETE or RETRO_BLOCKED.",
|
|
55
55
|
"tier": "1",
|
|
56
56
|
"category": "prizmkit-skill",
|
|
57
|
-
"hasAssets":
|
|
57
|
+
"hasAssets": false,
|
|
58
58
|
"hasScripts": false
|
|
59
59
|
},
|
|
60
60
|
"prizmkit-prizm-docs": {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"tier": "1",
|
|
70
70
|
"category": "prizmkit-skill",
|
|
71
71
|
"hasAssets": false,
|
|
72
|
-
"hasScripts":
|
|
72
|
+
"hasScripts": true
|
|
73
73
|
},
|
|
74
74
|
"prizmkit-test": {
|
|
75
75
|
"description": "AI-led project-native affected-module and Regression Ring testing with contract authority, test-double fidelity, consumer/provider compatibility, browser and Full-stack E2E classification, persistence re-entry, bounded repair, review, and TEST_PASS/TEST_NEEDS_FIXES/TEST_BLOCKED results.",
|
|
@@ -79,15 +79,7 @@
|
|
|
79
79
|
"hasScripts": false
|
|
80
80
|
},
|
|
81
81
|
"feature-workflow": {
|
|
82
|
-
"description": "Thin feature scenario router. Clarifies whether the request needs direct single-requirement guidance, app planning, feature planning, or command construction from an existing feature list.",
|
|
83
|
-
"tier": "companion",
|
|
84
|
-
"category": "orchestration-skill",
|
|
85
|
-
"subcategory": "workflows",
|
|
86
|
-
"hasAssets": false,
|
|
87
|
-
"hasScripts": false
|
|
88
|
-
},
|
|
89
|
-
"refactor-workflow": {
|
|
90
|
-
"description": "Thin behavior-preserving refactor scenario router. Clarifies direct guidance, refactor planning, existing-list command construction, or feature rerouting when behavior must change.",
|
|
82
|
+
"description": "Thin feature and code-refactoring scenario router. Clarifies whether the request needs direct single-requirement guidance, app planning, feature planning, or command construction from an existing feature list.",
|
|
91
83
|
"tier": "companion",
|
|
92
84
|
"category": "orchestration-skill",
|
|
93
85
|
"subcategory": "workflows",
|
|
@@ -108,10 +100,10 @@
|
|
|
108
100
|
"category": "orchestration-skill",
|
|
109
101
|
"subcategory": "pipelines",
|
|
110
102
|
"hasAssets": false,
|
|
111
|
-
"hasScripts":
|
|
103
|
+
"hasScripts": true
|
|
112
104
|
},
|
|
113
105
|
"feature-planner": {
|
|
114
|
-
"description": "Plan, append, reprioritize, split, validate, and summarize features for an existing project; outputs validated feature-list.json.",
|
|
106
|
+
"description": "Plan, append, reprioritize, split, validate, and summarize features and structural code refactors for an existing project; outputs validated feature-list.json.",
|
|
115
107
|
"tier": "companion",
|
|
116
108
|
"category": "orchestration-skill",
|
|
117
109
|
"subcategory": "pipelines",
|
|
@@ -134,22 +126,6 @@
|
|
|
134
126
|
"hasAssets": false,
|
|
135
127
|
"hasScripts": false
|
|
136
128
|
},
|
|
137
|
-
"refactor-planner": {
|
|
138
|
-
"description": "Interactive refactoring planner. Analyzes code structure and produces validated refactor-list.json for dev-pipeline execution.",
|
|
139
|
-
"tier": "companion",
|
|
140
|
-
"category": "orchestration-skill",
|
|
141
|
-
"subcategory": "pipelines",
|
|
142
|
-
"hasAssets": true,
|
|
143
|
-
"hasScripts": true
|
|
144
|
-
},
|
|
145
|
-
"refactor-pipeline-launcher": {
|
|
146
|
-
"description": "Build refactor pipeline prerequisite, start, status, logs, stop, and safe retry commands from a validated refactor-list.json without executing them.",
|
|
147
|
-
"tier": "companion",
|
|
148
|
-
"category": "orchestration-skill",
|
|
149
|
-
"subcategory": "pipelines",
|
|
150
|
-
"hasAssets": false,
|
|
151
|
-
"hasScripts": false
|
|
152
|
-
},
|
|
153
129
|
"bug-fix-workflow": {
|
|
154
130
|
"description": "Thin bug scenario router. Performs lightweight diagnosis only to choose direct guidance, bug planning, or command construction from an existing bug list.",
|
|
155
131
|
"tier": "companion",
|
|
@@ -159,7 +135,7 @@
|
|
|
159
135
|
"hasScripts": false
|
|
160
136
|
},
|
|
161
137
|
"recovery-workflow": {
|
|
162
|
-
"description": "Detect valid active feature
|
|
138
|
+
"description": "Detect valid active feature or bugfix checkout records and return exact operation-first continuation commands without executing or mutating state.",
|
|
163
139
|
"tier": "companion",
|
|
164
140
|
"category": "orchestration-skill",
|
|
165
141
|
"subcategory": "workflows",
|
|
@@ -183,14 +159,11 @@
|
|
|
183
159
|
"prizmkit-deploy",
|
|
184
160
|
"prizmkit-test",
|
|
185
161
|
"feature-workflow",
|
|
186
|
-
"refactor-workflow",
|
|
187
162
|
"app-planner",
|
|
188
163
|
"feature-planner",
|
|
189
164
|
"bug-planner",
|
|
190
165
|
"feature-pipeline-launcher",
|
|
191
166
|
"bugfix-pipeline-launcher",
|
|
192
|
-
"refactor-planner",
|
|
193
|
-
"refactor-pipeline-launcher",
|
|
194
167
|
"bug-fix-workflow",
|
|
195
168
|
"recovery-workflow"
|
|
196
169
|
]
|
|
@@ -209,33 +182,6 @@
|
|
|
209
182
|
"prizmkit-retrospective",
|
|
210
183
|
"prizmkit-committer"
|
|
211
184
|
]
|
|
212
|
-
},
|
|
213
|
-
"recommended": {
|
|
214
|
-
"description": "Recommended single-requirement lifecycle with optional scenario orchestration; base lifecycle is always complete",
|
|
215
|
-
"skills": [
|
|
216
|
-
"prizmkit",
|
|
217
|
-
"prizmkit-workflow",
|
|
218
|
-
"prizmkit-init",
|
|
219
|
-
"prizmkit-prizm-docs",
|
|
220
|
-
"prizmkit-plan",
|
|
221
|
-
"prizmkit-implement",
|
|
222
|
-
"prizmkit-code-review",
|
|
223
|
-
"prizmkit-test",
|
|
224
|
-
"prizmkit-retrospective",
|
|
225
|
-
"prizmkit-committer",
|
|
226
|
-
"feature-workflow",
|
|
227
|
-
"refactor-workflow",
|
|
228
|
-
"bug-fix-workflow",
|
|
229
|
-
"recovery-workflow",
|
|
230
|
-
"app-planner",
|
|
231
|
-
"feature-planner",
|
|
232
|
-
"bug-planner",
|
|
233
|
-
"refactor-planner",
|
|
234
|
-
"feature-pipeline-launcher",
|
|
235
|
-
"bugfix-pipeline-launcher",
|
|
236
|
-
"refactor-pipeline-launcher",
|
|
237
|
-
"prizmkit-deploy"
|
|
238
|
-
]
|
|
239
185
|
}
|
|
240
186
|
},
|
|
241
187
|
"external_skills": {
|
|
@@ -5,16 +5,7 @@ description: "Plan an application through interactive conversation — capture v
|
|
|
5
5
|
|
|
6
6
|
# app planner
|
|
7
7
|
|
|
8
|
-
Plan
|
|
9
|
-
- Vision and problem statement
|
|
10
|
-
- Tech stack selection (or confirmation of existing stack)
|
|
11
|
-
- Constraints and design direction
|
|
12
|
-
- Architecture decision capture
|
|
13
|
-
- Project brief accumulation (`.prizmkit/plans/project-brief.md`)
|
|
14
|
-
|
|
15
|
-
This skill captures **project-level planning context only**: vision, tech stack, conventions, architecture decisions, and project brief. It defines a new application or completes missing app-level context; it does not decompose features, implement source code, or start execution. (See **Scope Boundary** for the authoritative output rules.)
|
|
16
|
-
|
|
17
|
-
For adding features to an **existing** project that already has a project brief, use `feature-planner` directly.
|
|
8
|
+
Plan application-level context through interactive dialogue for **greenfield** and **brownfield** projects: vision, tech stack, conventions, architecture decisions, layer rules, and `.prizmkit/plans/project-brief.md`. This skill captures **project-level planning context only**: conventions, tech assumptions, architecture decisions, and project brief. It defines a new application or completes missing app-level context; it does not decompose features, implement source code, or start execution (`feature-planner` owns `feature-list.json`).
|
|
18
9
|
|
|
19
10
|
## Intent-Aligned Planning Policy
|
|
20
11
|
|
|
@@ -26,28 +17,13 @@ Before proposing or finalizing app context:
|
|
|
26
17
|
5. Produce **minimum-sufficient** app context: every decision maps to a confirmed goal, constraint, existing contract, or evidenced risk, and every goal maps to observable completion evidence for downstream work. Defer unsupported future work.
|
|
27
18
|
|
|
28
19
|
## Invocation Commitment (Hard Rule)
|
|
29
|
-
You must NEVER:
|
|
30
|
-
- Bypass the interactive phases because you judge the task to be "simple"
|
|
31
20
|
|
|
32
|
-
|
|
33
|
-
1. **Explain why** you think a different path is more appropriate
|
|
34
|
-
2. **Ask the user explicitly** whether they want to switch
|
|
35
|
-
3. **Only switch if the user confirms**
|
|
21
|
+
Never bypass interactive phases because the task looks "simple"; if another workflow fits better, explain why, ask explicitly, and switch only upon user confirmation.
|
|
36
22
|
|
|
37
23
|
## Scope Boundary (Hard Rule)
|
|
38
24
|
|
|
39
|
-
**This skill is PLANNING ONLY.**
|
|
40
|
-
-
|
|
41
|
-
- Create project scaffolding, directories, or boilerplate (exception: `.prizmkit/rules/` and `.prizmkit/prizm-docs/` directories may be created for dev rules and root.prizm output)
|
|
42
|
-
- Run build/install/test commands (npm init, pip install, etc.)
|
|
43
|
-
- Execute any implementation action beyond writing planning artifacts
|
|
44
|
-
|
|
45
|
-
**Your ONLY writable outputs are:**
|
|
46
|
-
1. `.prizmkit/plans/project-brief.md` (`.prizmkit/plans/` — accumulated project context brief)
|
|
47
|
-
2. `.prizmkit/plans/project-brief.draft.md` — working source during planning and saved draft when the user exits before completion
|
|
48
|
-
3. The resolved project instruction target for the current AI host (with user consent) — only project conventions, infrastructure configuration (database conventions, deployment config, **cloud services**), frontend design direction, and architecture decisions
|
|
49
|
-
4. `.prizmkit/rules/<layer>-rules.md` — per-layer development rules generated by Rules Configuration
|
|
50
|
-
5. `.prizmkit/prizm-docs/root.prizm` — `LAYER_RULES:` pointer block only (not other root.prizm content; created minimally if absent)
|
|
25
|
+
- **This skill is PLANNING ONLY.** Never create/modify/delete source code, scaffolding (except `.prizmkit/rules/` and `.prizmkit/prizm-docs/` for rules and `root.prizm`), or run build/install/test commands.
|
|
26
|
+
- **Your ONLY writable outputs are:** `.prizmkit/plans/project-brief.md`, `.prizmkit/plans/project-brief.draft.md`, the resolved project instruction target (with consent, for conventions/infrastructure/frontend direction/architecture decisions), `.prizmkit/rules/<layer>-rules.md`, and `.prizmkit/prizm-docs/root.prizm` (`LAYER_RULES:` pointer block only).
|
|
51
27
|
|
|
52
28
|
**Current-host project instruction target resolution**:
|
|
53
29
|
- Identify the current AI host from direct runtime/session evidence and the host's own project conventions. Installed project resources, existing project files, and `.prizmkit/manifest.json` are supporting evidence only; they are not a platform identity or path allowlist and must not override stronger current-session evidence.
|
|
@@ -58,54 +34,17 @@ If you believe the task is better suited for a different workflow, you MUST:
|
|
|
58
34
|
- If no target can be identified confidently or multiple plausible targets remain, use `AskUserQuestion` to confirm the intended project instruction file before writing. Never guess, and never treat semantic detection as permission to write an arbitrary file.
|
|
59
35
|
- Resolve the target once before project-convention discovery and reuse the same resolved target for conventions, infrastructure, frontend design direction, architecture decisions, prerequisites, checkpoints, generated-plan review, and completion reporting. Do not mirror content to every installed host merely because multiple platform resources exist.
|
|
60
36
|
|
|
61
|
-
**After planning
|
|
62
|
-
1. Present the summary of captured project-level context (vision, conventions, architecture decisions, project brief)
|
|
63
|
-
2. List the artifacts produced and suggest possible next steps (e.g., `feature-planner`, `prizmkit-plan`, etc.) — but do NOT auto-invoke any of them
|
|
64
|
-
3. **NEVER auto-execute** a pipeline, launcher, composite workflow, or any implementation step
|
|
65
|
-
4. **NEVER generate `feature-list.json`** — that is exclusively `feature-planner`'s responsibility
|
|
66
|
-
5. Return the completed planning context to the caller. Direct implementation and planned pipeline execution are separate next steps; this planner is not an execution intermediary
|
|
37
|
+
- **After planning:** present the summary and possible next steps (`feature-planner`, `prizmkit-plan`, etc.) and stop. **NEVER auto-execute** pipelines/launchers/implementation or generate `feature-list.json`.
|
|
67
38
|
|
|
68
39
|
## Durable App Context Contract (Hard Rule)
|
|
69
40
|
|
|
70
|
-
Every
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- Every generated natural-language value must be a standalone domain statement. This applies to all AI-visible fields and sections in project briefs and drafts, project instruction files, conventions, infrastructure, architecture decisions, generated layer rules, appendices, comments, brainstorm summaries, quoted evidence, and parentheticals.
|
|
75
|
-
- Machine metadata such as schema markers, stable IDs, statuses, enums, and timestamps is exempt. Natural-language metadata is not exempt.
|
|
76
|
-
- Never emit dialogue-role or chronology labels such as `user said`, `user answered`, `original request`, `this round`, `previous discussion`, `as discussed earlier`, `用户本轮回答`, or `如前面讨论`. Never emit planning question IDs, answer tokens, planning-option recommendation markers, checkpoint provenance, or raw internal answer-map entries as domain content.
|
|
77
|
-
- Internal Q&A may drive derivation, but final writers render complete product or technical meaning. Quotes are allowed only as independently intelligible source evidence, never as planning-turn provenance.
|
|
78
|
-
|
|
79
|
-
### Conversational Context Normalization
|
|
80
|
-
|
|
81
|
-
- Never persist standalone option labels such as `A`, `B`, `C`, `方案A`, or `方案B`.
|
|
82
|
-
- Expand each selected option into complete decision meaning. Preserve substantive user rationale and constraints in durable prose at matching detail.
|
|
83
|
-
- Do not emit transcript annotations such as `(original response: "...")` in final app-planning artifacts. Bare option labels and relative shorthand are not independently intelligible and materially useful exact wording.
|
|
84
|
-
- Resolve `上面`, `这个`, `按推荐走`, `同前`, `继续这样`, `用刚才的方案`, `same as above`, or `go with your recommendation` only when there is one provable antecedent. If multiple antecedents are plausible, ask the user for clarification; never guess.
|
|
85
|
-
- Treat `所有问题都按你的推荐处理`, `全部按照推荐`, `use all recommendations`, and equivalent blanket recommendation approval as conversational authorization. Apply the concrete accepted defaults, then omit the approval; never repeat it once per accepted recommendation.
|
|
86
|
-
- Do not present rejected alternatives as active decisions. Include one only when it defines a necessary non-goal or compatibility boundary.
|
|
87
|
-
- Preserve detailed user requirements at matching detail; normalization must not simplify away substantive product, infrastructure, architecture, or development rules. Retain an exact excerpt only when the wording itself is independently intelligible and materially useful.
|
|
88
|
-
|
|
89
|
-
### Reference Material Handling
|
|
90
|
-
|
|
91
|
-
- Every retained stable code, configuration, machine-consumed interface, or URL reference must be purpose-tagged: say why it matters and what a downstream AI should inspect. This applies to paths and URLs in all app-planning artifacts.
|
|
92
|
-
- Do not retain non-code planning-source paths such as `.agents/brainstorm/<note>.md`, uploaded-document paths, screenshot paths, or ad-hoc log paths in durable app artifacts. Instead, copy or normalize the task-relevant content into the brief, conventions, architecture decisions, or rules; the artifact must not depend on that source file still existing.
|
|
93
|
-
- Good: `src/auth/ — inspect identity-provider and session ownership`; Bad: `.agents/brainstorm/design.md — inspect accepted architecture`. For the latter, write the accepted architecture, rationale, constraints, and risks inline and omit the path.
|
|
94
|
-
- For large materials, record purpose, preserve only task-relevant exact excerpts, and move confirmed product or technical decisions into the durable app-planning artifact. Retain a location only when it is a stable execution-time source of truth.
|
|
95
|
-
- Embed complete large materials only when future sessions cannot access the source and all content is genuinely required.
|
|
96
|
-
|
|
97
|
-
### Good and Bad Normalization Examples
|
|
98
|
-
|
|
99
|
-
- Bad: `[ ] 使用方案B`, `按推荐走`, `use option A`, `same as above`, or `go with your recommendation`.
|
|
100
|
-
- Bad: `[ ] Authentication uses organization-scoped OAuth with server-side sessions (original response: "方案B")`; the decision is complete, but the transcript annotation still requires an unseen option list.
|
|
101
|
-
- Good: `[ ] Authentication uses organization-scoped OAuth with server-side sessions`.
|
|
102
|
-
- Good: `Deployment target: managed container service with PostgreSQL in the same region`.
|
|
103
|
-
- Bad: storing or repeating `全部按照推荐` / `所有问题都按你的推荐处理` as project conventions; they are conversational authorization.
|
|
104
|
-
- Bad: attaching an entire infrastructure proposal while recording only `follow this`. Good: retain a purpose-tagged proposal section and task-relevant exact excerpts, then name the actual network, database, and deployment decisions.
|
|
41
|
+
Every brief item, convention, infrastructure decision, architecture decision, and rule must stand alone cleanly in a fresh AI session (full normalization rules and examples live in `${SKILL_DIR}/references/project-brief-guide.md`):
|
|
42
|
+
- Record complete product/technical meaning as standalone domain statements across all AI-visible artifacts; never emit dialogue/chronology tags, question IDs, standalone option labels (`方案A`/`B`), `(original response: "...")`, blanket recommendation tokens, or transient non-code planning paths.
|
|
43
|
+
- Resolve relative shorthand only with one provable antecedent; purpose-tag every retained code/config/interface/URL reference; preserve detailed requirements at matching detail.
|
|
105
44
|
|
|
106
45
|
## Pre-Generation Headless Context Completeness Gate
|
|
107
46
|
|
|
108
|
-
Before any final app-planning writer runs, review every new or changed brief line, convention, infrastructure decision, architecture decision, and rule as if the reviewer has never seen the planning conversation. Preserve unchanged historical content; do not bulk-rewrite it. First scan all AI-visible fields and sections: every generated natural-language value must be session-independent, with no dialogue-role labels, question IDs, answer tokens, planning-option recommendation markers, checkpoint provenance, raw answer-map content, or transient planning-source dependencies. From the proposed artifact alone, answer:
|
|
47
|
+
Before any final app-planning writer runs, review every new or changed brief line, convention, infrastructure decision, architecture decision, and rule as if the reviewer has never seen the planning conversation. Preserve unchanged historical content; do not bulk-rewrite it. First scan all AI-visible fields and sections: every generated natural-language value must be session-independent, with no dialogue-role labels, question IDs, answer tokens, planning-option recommendation markers, checkpoint provenance, raw answer-map content, or transient planning-source dependencies. Do not emit transcript annotations such as `(original response: "...")`, blanket recommendation approval (`全部按照推荐`), or option shorthand. Do not retain non-code planning-source paths such as `.agents/brainstorm/<note>.md`; normalize confirmed content inline into the draft/source representation so artifacts never depend on source planning files still existing. From the proposed artifact alone, answer:
|
|
109
48
|
|
|
110
49
|
1. What exact product outcome or technical decision does this line record?
|
|
111
50
|
2. What exists today and what desired state or constraint applies?
|
|
@@ -118,193 +57,34 @@ Before any final app-planning writer runs, review every new or changed brief lin
|
|
|
118
57
|
|
|
119
58
|
Return `NEEDS_FIXES` whenever any answer is unavailable or ambiguous. Ask the user for clarification rather than guessing, update the draft/source representation, and rerun the gate before writing final artifacts. This pre-generation gate is separate from the Local Generated-Plan Review, which repeats the same simulation after final writes.
|
|
120
59
|
|
|
121
|
-
##
|
|
122
|
-
|
|
123
|
-
The skill `description` lists the trigger phrases. Beyond those, use this section to disambiguate from `feature-planner` and other workflows.
|
|
124
|
-
|
|
125
|
-
Do NOT use this skill when:
|
|
126
|
-
- The user already has a project brief and wants to add features → use `feature-planner`
|
|
127
|
-
- The user wants to run the pipeline → use `feature-pipeline-launcher`
|
|
128
|
-
- The user is debugging/refactoring or wants to write source code directly
|
|
129
|
-
|
|
130
|
-
## Resource Loading Rules (Mandatory)
|
|
131
|
-
|
|
132
|
-
1. **App design reference** — always load at session start:
|
|
133
|
-
- Read `${SKILL_DIR}/references/app-design-guide.md` for vision templates and tech stack matrix
|
|
134
|
-
|
|
135
|
-
2. **Load on-demand references when triggered**:
|
|
136
|
-
- Architecture decisions emerged → read `${SKILL_DIR}/references/architecture-decisions.md`
|
|
137
|
-
- Frontend/UI project detected → read `${SKILL_DIR}/references/frontend-design-guide.md`
|
|
138
|
-
- User wants to explore ideas before committing → read `${SKILL_DIR}/references/brainstorm-guide.md`
|
|
139
|
-
- During brainstorm Phase C → also read `${SKILL_DIR}/references/red-team-checklist.md`
|
|
140
|
-
|
|
141
|
-
3. **Project conventions discovery** — after Intent Confirmation, before brainstorm or vision work:
|
|
142
|
-
→ Resolve the current host's project instruction target through **Current-host project instruction target resolution**, then read that exact target and check for a `### Project Conventions` section
|
|
143
|
-
→ If section exists and covers the project well → skip silently
|
|
144
|
-
→ If section is missing or incomplete → run the **AI-driven convention discovery** below:
|
|
145
|
-
|
|
146
|
-
**Do NOT follow any fixed checklist.** Every project is different. You must analyze the project first, then reason about what system-level conventions this specific project needs.
|
|
147
|
-
|
|
148
|
-
→ Read `${SKILL_DIR}/references/project-conventions-discovery.md` for the full AI-driven discovery procedure (Analyze → Reason → Present via AskUserQuestion).
|
|
149
|
-
|
|
150
|
-
→ Normalize each proposed convention into a standalone domain rule, run the Pre-Generation Headless Context Completeness Gate, then save only passing convention meanings to the resolved project instruction target under `### Project Conventions` (one bullet per convention; no raw answers or planning provenance)
|
|
151
|
-
→ Output format will naturally vary per project — that is the intended behavior
|
|
152
|
-
|
|
153
|
-
**Infrastructure Convention Discovery (Database + Deployment)**
|
|
154
|
-
|
|
155
|
-
After project conventions are captured, check the resolved project instruction target for `### Infrastructure` section status. Read `${SKILL_DIR}/references/infrastructure-convention-discovery.md` for the full database (6 topics — table naming, field naming, migrations, primary keys, indexes, environment separation), deployment (4 topics — target refinement, existing infrastructure, AI-assisted deploy, env var management), and cloud services (2-round AskUserQuestion) inquiry procedures. Follow the inquiry flow there — use `AskUserQuestion` for each batch. Each question MUST include a "Skip — decide later" option.
|
|
156
|
-
|
|
157
|
-
After inquiry, run the Pre-Generation Headless Context Completeness Gate on every proposed infrastructure decision, then update the `### Infrastructure` section in the resolved project instruction target with passing content (see reference file for full output format). Items still marked "Skip — decide later" remain as `<!-- [topic]: deferred -->` for `prizmkit-deploy` to pick up later.
|
|
158
|
-
|
|
159
|
-
4. **Project brief accumulation** — throughout all interactive phases:
|
|
160
|
-
→ Read `${SKILL_DIR}/references/project-brief-guide.md` for template and rules
|
|
161
|
-
→ After each meaningful response containing business intent, constraints, or design decisions, normalize its substantive meaning into standalone domain prose before updating the in-memory or `.prizmkit/plans/project-brief.draft.md` source; never store the raw turn or answer token; do not write the final `.prizmkit/plans/project-brief.md` until the Pre-Generation Headless Context Completeness Gate passes
|
|
162
|
-
|
|
163
|
-
## Rules Configuration (after Infrastructure)
|
|
164
|
-
|
|
165
|
-
After Infrastructure configuration is complete (CP-AP-1.5), check whether the project's development layers have custom rules configured. Rules are per-layer documents (frontend-rules.md, backend-rules.md, database-rules.md, mobile-rules.md) that tell AI coding assistants how to generate code for that layer — UI framework, state management, naming conventions, etc.
|
|
166
|
-
|
|
167
|
-
Rules are optional. If the user skips, AI uses general best practices freely — no reminders, no blocking.
|
|
168
|
-
|
|
169
|
-
→ Read `${SKILL_DIR}/references/rules-configuration.md` for the full contract: layer detection, explicit Quick/Full/Skip authorization, interactive decisions, invariant-only fixed rules, selected-option derivation with semantic fallback, dual-native profiles, conflict detection, deterministic resource validation, template rendering, and the `root.prizm` `LAYER_RULES:` pointer update. Run `${SKILL_DIR}/scripts/validate-rules-configuration.py` before questioning and again before final rendering. Before writing rule files or updating the pointer, require both a passing decision-conflict gate and the Pre-Generation Headless Context Completeness Gate for every proposed new or changed rule.
|
|
170
|
-
|
|
171
|
-
### After rules configuration
|
|
172
|
-
|
|
173
|
-
Proceed to Prerequisites and continue the app-planner workflow.
|
|
174
|
-
|
|
175
|
-
## Prerequisites
|
|
176
|
-
|
|
177
|
-
Before questions, check optional context files (never block if absent):
|
|
178
|
-
- `.prizmkit/prizm-docs/root.prizm` (architecture/project context)
|
|
179
|
-
- `.prizmkit/config.json` (existing stack preferences and detected tech stack)
|
|
180
|
-
- Resolved project instruction target `### Project Conventions` section (previously answered project conventions)
|
|
181
|
-
- Resolved project instruction target `### Infrastructure` section (database and deployment config from prizmkit-init or previous app-planner run)
|
|
182
|
-
|
|
183
|
-
**Tech stack auto-population from config.json:**
|
|
184
|
-
- If `.prizmkit/config.json` contains a `tech_stack` object, use it to pre-fill tech assumptions.
|
|
185
|
-
- Map config fields: `language`, `runtime`, `frontend_framework`, `frontend_styling`, `backend_framework`, `database`, `orm`, `testing`, `bundler`, `project_type`.
|
|
186
|
-
- Do NOT re-ask for tech stack info already in config.json. Show the detected stack and ask: "Is this correct? Any changes?"
|
|
187
|
-
- If config.json has no `tech_stack`, fall back to asking during Phase 2.
|
|
188
|
-
|
|
189
|
-
Note:
|
|
190
|
-
- This skill **reads** `.prizmkit/config.json` if present.
|
|
191
|
-
- This skill does **not** create `.prizmkit/config.json` directly.
|
|
192
|
-
- Creation/update is handled by bootstrap/init flows (e.g., `prizmkit-init`, `.prizmkit/dev-pipeline/scripts/init-change-artifact.py`).
|
|
60
|
+
## Reference Loading, Conventions, Rules & Prerequisites
|
|
193
61
|
|
|
194
|
-
|
|
62
|
+
- Do NOT use `app-planner` when user already has a brief and wants features or refactoring on an existing project (`feature-planner`), wants to run the pipeline (`feature-pipeline-launcher`), or wants debugging or direct coding.
|
|
63
|
+
- **On-demand guides**: load `${SKILL_DIR}/references/app-design-guide.md` on demand for greenfield vision or unresolved stack selection; load `architecture-decisions.md` (architecture choices), `frontend-design-guide.md` (UI), `brainstorm-guide.md` + `red-team-checklist.md` (exploration/Phase C), and `project-brief-guide.md` (brief rules).
|
|
64
|
+
- **Conventions & Infrastructure discovery** (after Intent Confirmation): resolve the target once through **Current-host project instruction target resolution**, inspect `### Project Conventions` (if missing/incomplete, read `${SKILL_DIR}/references/project-conventions-discovery.md` for project-specific AI discovery via `AskUserQuestion`—no fixed checklist; normalize & pass the Pre-Generation gate before saving under `### Project Conventions`). Then check `### Infrastructure` using `${SKILL_DIR}/references/infrastructure-convention-discovery.md` (DB/deployment/cloud services via `AskUserQuestion`, each question offering `"Skip — decide later"` → `<!-- [topic]: deferred -->`), pass the gate, and update `### Infrastructure`.
|
|
65
|
+
- **Rules Configuration (after CP-AP-1.5)**: optional per-layer rules (`.prizmkit/rules/<layer>-rules.md` — skip freely if declined). Read `${SKILL_DIR}/references/rules-configuration.md` and run `${SKILL_DIR}/scripts/validate-rules-configuration.py` before questioning and before rendering; pass both conflict and Pre-Generation gates before writing `.prizmkit/rules/` or updating `.prizmkit/prizm-docs/root.prizm` (`LAYER_RULES:` block only).
|
|
66
|
+
- **Project brief accumulation**: maintain normalized checklist items in memory or `.prizmkit/plans/project-brief.draft.md`; do not write the final `.prizmkit/plans/project-brief.md` until the Pre-Generation Headless Context Completeness Gate passes.
|
|
67
|
+
- **Prerequisites** (read-only, never block, do not create `config.json` here): check `.prizmkit/prizm-docs/root.prizm`, `.prizmkit/config.json` (`tech_stack` pre-fill — confirm instead of re-asking), and resolved `### Project Conventions` / `### Infrastructure`.
|
|
195
68
|
|
|
196
|
-
|
|
69
|
+
## Interaction Style & Intent Confirmation
|
|
197
70
|
|
|
198
|
-
|
|
199
|
-
- Intent confirmation
|
|
200
|
-
- Consequential project conventions, tech-stack selections, and architecture decisions not already determined by evidence
|
|
201
|
-
- Session exit gates
|
|
202
|
-
- Brownfield prerequisite checks that change the selected workflow
|
|
203
|
-
- Any other high-impact decision requiring user authorization
|
|
71
|
+
Use `AskUserQuestion` (clickable options, never plain text; `1-4` grouped questions, `2-4` options, `(Recommended)` first, `"Skip — decide later"` on every non-essential question) for mandatory authorization gates and consequential ambiguity; resolve low-risk/evidence-backed details directly.
|
|
204
72
|
|
|
205
|
-
|
|
73
|
+
**Mandatory First Step — Intent Confirmation** (`AskUserQuestion`: `"What would you like to do?"`):
|
|
74
|
+
- **Explore ideas first (Recommended)** → conventions check → `${SKILL_DIR}/references/brainstorm-guide.md` (Phases A–D → Vision Summary CP-AP-2) → ask next (`Continue to project planning`, `Continue refining`, `Save draft & exit` to `.prizmkit/plans/project-brief.draft.md`; checkpoints CP-AP-0/1 required, CP-AP-2–5 as reached).
|
|
75
|
+
- **Produce a project plan** → Core Workflow (`session goal = produce`).
|
|
76
|
+
- **Generate project context only** (brownfield Quick Context Mode; redirect greenfield to `produce`) → Project State Detection + proactive scan → draft brief → Run the Pre-Generation Headless Context Completeness Gate → Present brief for user confirmation → write → run CP-AP-6 Generated App-Plan Review Gate → completion summary.
|
|
206
77
|
|
|
207
|
-
**
|
|
208
|
-
- Group 1-4 related questions in one call when they share a decision context. Use another call when an earlier answer changes which later question is relevant; do not pursue rounds merely to eliminate low-impact uncertainty.
|
|
209
|
-
- Each question has 2-4 selectable options (the tool auto-adds "Other" for custom input)
|
|
210
|
-
- Use `multiSelect: true` when the user can pick more than one
|
|
211
|
-
- Mark the recommended option first and append "(Recommended)" to its label
|
|
212
|
-
- Use the `description` field to explain trade-offs or implications
|
|
213
|
-
- **Every non-essential question MUST include a "Skip" option** (e.g., "Skip — decide later"). Users should never be forced to answer something they want to defer. Skipped items are simply not written to conventions — they can be added in a future session.
|
|
78
|
+
**Project State Detection**: check manifests (`package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, `pom.xml`), `src/`/`app/`, and Git history; greenfield runs standard Core Workflow while brownfield reads `${SKILL_DIR}/references/project-state-detection.md` (prerequisite check, proactive scan, inferred confirmation, targeted follow-ups).
|
|
214
79
|
|
|
215
|
-
|
|
216
|
-
- **Cannot skip**: Intent confirmation (must know the session goal)
|
|
217
|
-
- **Everything else can be skipped**: conventions, tech stack choices, architecture decisions, design direction, etc. If the user skips, move on — do not re-ask or block progress.
|
|
80
|
+
## Core Workflow & Checkpoints
|
|
218
81
|
|
|
219
|
-
|
|
82
|
+
1. **Goal & Scope**: confirm intent (`CP-AP-0`), clarify consequential vision/users/scope/non-goals via `AskUserQuestion` + open-ended idea prompts.
|
|
83
|
+
2. **Constraints & Tech Direction**: compare unresolved material stack choices via `${SKILL_DIR}/references/app-design-guide.md` §2; for frontend projects without UI/UX docs, ask via `AskUserQuestion` (`Establish design direction now (Recommended)`, `Skip for now`, `I have external designs`). If framework-shaping architecture decisions emerge, follow `${SKILL_DIR}/references/architecture-decisions.md`, pass the Pre-Generation gate, and append to `### Architecture Decisions` on the resolved target (never write architecture decisions directly to `root.prizm`; recommend `prizmkit-prizm-docs` init when needed).
|
|
84
|
+
3. **Gate & Brief Finalization**: run Pre-Generation Headless Context Completeness Gate on all new/changed lines; write `.prizmkit/plans/project-brief.md` via `${SKILL_DIR}/references/project-brief-guide.md`.
|
|
85
|
+
4. **Local Plan Review & Summary**: run §Generated App-Plan Review Gate (`CP-AP-6`), then present completion summary.
|
|
220
86
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
After initial greeting, use `AskUserQuestion` to confirm intent:
|
|
224
|
-
|
|
225
|
-
**Question**: "What would you like to do?"
|
|
226
|
-
- **Explore ideas first (Recommended)** — brainstorm and refine ideas before committing to a plan
|
|
227
|
-
- **Produce a project plan** — define vision, tech stack, and constraints → generates project-brief.md for pipeline use
|
|
228
|
-
- **Generate project context only** — for an existing project that needs a project brief without full planning
|
|
229
|
-
|
|
230
|
-
Route by answer:
|
|
231
|
-
- **Produce a project plan** → Continue to Core Workflow. Set session goal = `produce`.
|
|
232
|
-
- **Explore ideas first** → Enter **Exploration Mode**:
|
|
233
|
-
- Run project conventions check first
|
|
234
|
-
- Load `${SKILL_DIR}/references/brainstorm-guide.md` and follow its structured ideation process (Phases A-D)
|
|
235
|
-
- Brainstorm Phase D output serves as the Vision Summary (CP-AP-2)
|
|
236
|
-
- After brainstorm completes, use `AskUserQuestion`: "Ideas are taking shape. What's next?"
|
|
237
|
-
- **Continue to project planning (Recommended)** — capture tech stack, conventions, and architecture decisions
|
|
238
|
-
- **Continue refining** — keep brainstorming
|
|
239
|
-
- **Save draft & exit** — save progress to `.prizmkit/plans/project-brief.draft.md`
|
|
240
|
-
- **Checkpoints in explore mode**: CP-AP-0 (required), CP-AP-1 (required), CP-AP-2 (from brainstorm output), CP-AP-3 (only if user proceeds to Phase 2), CP-AP-4 and CP-AP-5 (only if user transitions to produce mode)
|
|
241
|
-
- **Generate project context only** → Enter **Quick Context Mode** (brownfield only):
|
|
242
|
-
- Run Project State Detection → if greenfield, redirect to produce mode
|
|
243
|
-
- Proactively scan the project (same as brownfield behavior)
|
|
244
|
-
- Generate the proposed project brief in memory or `.prizmkit/plans/project-brief.draft.md` from inferred context
|
|
245
|
-
- Skip extensive brainstorming and constraint phases
|
|
246
|
-
- Run the Pre-Generation Headless Context Completeness Gate → Present brief for user confirmation → write → run CP-AP-6 Generated App-Plan Review Gate → completion summary
|
|
247
|
-
|
|
248
|
-
Session goal tracking: Track the intent (`produce`, `explore`, or `quick_context`) throughout the session. If `explore`, always re-prompt before ending.
|
|
249
|
-
|
|
250
|
-
## Project State Detection (after Intent Confirmation)
|
|
251
|
-
|
|
252
|
-
Detect whether this is a **greenfield** (new) or **brownfield** (existing) project and adapt the workflow accordingly.
|
|
253
|
-
|
|
254
|
-
### Detection Signals
|
|
255
|
-
|
|
256
|
-
| Signal | Greenfield | Brownfield |
|
|
257
|
-
|--------|-----------|------------|
|
|
258
|
-
| `package.json` / `pyproject.toml` / `go.mod` / `Cargo.toml` / `pom.xml` | absent | present |
|
|
259
|
-
| `src/` or `app/` directory with source files | absent | present |
|
|
260
|
-
| `.git` with commit history | absent or initial commit only | present with history |
|
|
261
|
-
| Empty or near-empty directory | yes | no |
|
|
262
|
-
|
|
263
|
-
### Greenfield Behavior (default)
|
|
264
|
-
|
|
265
|
-
Proceed with the standard Core Workflow — ask all questions from scratch.
|
|
266
|
-
|
|
267
|
-
### Brownfield Behavior
|
|
268
|
-
|
|
269
|
-
When an existing project is detected, read `${SKILL_DIR}/references/project-state-detection.md` for the full 4-step brownfield procedure:
|
|
270
|
-
|
|
271
|
-
- **Step 1**: Prerequisite check — verify `.prizmkit/prizm-docs/root.prizm`, `.prizmkit/config.json`, `.prizmkit/plans/project-brief.md` exist. If missing, offer to run `prizmkit-init` first.
|
|
272
|
-
- **Step 2**: Proactive scanning — read codebase structure, metadata files, and key source files yourself
|
|
273
|
-
- **Step 3**: Present inferred summary and confirm with `AskUserQuestion`
|
|
274
|
-
- **Step 4**: Pre-fill known information, focus questions on what cannot be inferred
|
|
275
|
-
|
|
276
|
-
## Core Workflow
|
|
277
|
-
|
|
278
|
-
Execute the planning workflow in conversation mode with mandatory checkpoints:
|
|
279
|
-
|
|
280
|
-
### Interactive Phases
|
|
281
|
-
1. Clarify business goal and scope
|
|
282
|
-
1.1 Confirm deliverable intent (→ Intent Confirmation — option-based)
|
|
283
|
-
1.2 **Requirement clarification** — classify uncertainty by impact. Use option-based questions for consequential ambiguity in vision, goals, target users, scope, or non-goals; resolve evidence-backed facts from project context and record low-risk reversible assumptions without mandatory questioning. Use open-ended questions for genuinely unique input (e.g., "describe your app idea") and group related follow-ups.
|
|
284
|
-
2. Confirm constraints and tech assumptions
|
|
285
|
-
2.1 Tech stack selection — use `${SKILL_DIR}/references/app-design-guide.md` §2 as a comparison aid. Ask only about unresolved choices that materially affect the project; do not mechanically ask for every framework, database, or styling preference when evidence or a safe deferral already resolves it.
|
|
286
|
-
2.2 **Frontend design check** (for frontend projects) — scan for existing UI/UX design docs. If none found, use `AskUserQuestion`:
|
|
287
|
-
- Question: "No UI/UX design docs found. Would you like to establish design direction?"
|
|
288
|
-
- Options: "Establish design direction now (Recommended)", "Skip for now", "I have external designs"
|
|
289
|
-
3. Capture architecture decisions, run the Pre-Generation Headless Context Completeness Gate on every proposed new or changed app-planning line, and finalize project brief only after the gate passes
|
|
290
|
-
4. Present completion summary with artifacts produced and possible next steps
|
|
291
|
-
|
|
292
|
-
### Checkpoints (Mandatory Gates)
|
|
293
|
-
|
|
294
|
-
Checkpoints catch cascading errors early — skipping one means the next phase builds on unvalidated assumptions.
|
|
295
|
-
|
|
296
|
-
| Checkpoint | Artifact/State | Criteria | Phase |
|
|
297
|
-
|-----------|----------------|----------|-------|
|
|
298
|
-
| **CP-AP-0** | Intent Confirmed | User confirmed session goal (produce / explore) | 1 |
|
|
299
|
-
| **CP-AP-1** | Conventions Checked | Current-host project instruction target resolved; its `### Project Conventions` section is loaded or asked and up to date | 1 |
|
|
300
|
-
| **CP-AP-1.5** | Infrastructure Checked | Resolved project instruction target `### Infrastructure` section addressed — database, deployment **and cloud services** each configured or explicitly deferred | 1-2 |
|
|
301
|
-
| **CP-AP-1.6** | Rules Configured | Rules resources pass deterministic validation; Quick defaults are explicitly authorized; every detected layer has a conflict-free `.prizmkit/rules/<layer>-rules.md` or an explicit skip; dual-native choices use separate profiles; no residual placeholders remain; `root.prizm` `LAYER_RULES:` pointer is up to date. | 2 |
|
|
302
|
-
| **CP-AP-2** | Vision Summary | Goal/users/differentiators confirmed by user. For brownfield: existing purpose confirmed or refined. | 1-2 |
|
|
303
|
-
| **CP-AP-3** | Frontend Design Evaluated | For frontend projects: checked for existing UI/UX design system; user was asked if missing. **Auto-pass** for backend-only or non-UI projects. | 2 |
|
|
304
|
-
| **CP-AP-4** | Project Brief Accumulated | The in-memory brief or `.prizmkit/plans/project-brief.draft.md` contains at least 3 ideas. For brownfield: already-implemented items marked `[x]` count toward this total. The final brief is not written before CP-AP-5.5. | 3 |
|
|
305
|
-
| **CP-AP-5** | Planning Complete | All project-level context captured: conventions, infrastructure config, tech stack, architecture decisions, project brief drafted | 4 |
|
|
306
|
-
| **CP-AP-5.5** | Fresh-Session Context Passed | Every new or changed brief line, convention, infrastructure decision, architecture decision, and rule passes the Pre-Generation Headless Context Completeness Gate before its final writer runs | 4 |
|
|
307
|
-
| **CP-AP-6** | Local Plan Review Passed | Local generated-plan review loaded `${SKILL_DIR}/references/generated-plan-review.md`, directly reviewed current-session final app-planning artifacts, repeated fresh-session simulation, applied accepted fixes through source/writer paths, and rechecked changed sections | 4 |
|
|
87
|
+
**Checkpoints**: **CP-AP-0** Intent Confirmed (1) · **CP-AP-1** Conventions Checked (1) · **CP-AP-1.5** Infrastructure Checked (1-2) · **CP-AP-1.6** Rules Configured (2) · **CP-AP-2** Vision Summary (1-2) · **CP-AP-3** Frontend Design Evaluated (2) · **CP-AP-4** Brief Draft >=3 ideas (`[x]` counts for brownfield; final brief waits for CP-AP-5.5; 3) · **CP-AP-5** Planning Complete (4) · **CP-AP-5.5** Fresh-Session Context Passed (4) · **CP-AP-6** Local Plan Review Passed (`generated-plan-review.md` reviewed current-session outputs, repeated fresh-session simulation, applied accepted fixes, rechecked changed sections; 4).
|
|
308
88
|
|
|
309
89
|
## Generated App-Plan Review Gate
|
|
310
90
|
|
|
@@ -318,58 +98,7 @@ Run this gate before any final handoff whenever the current `app-planner` sessio
|
|
|
318
98
|
6. **Recheck changed sections directly** after every accepted fix batch.
|
|
319
99
|
7. **Report CP-AP-6** in the completion summary: include local generated-plan review verdict, reviewed app-planning artifacts/sections, accepted fixes (or "none"), and final writer/validation result.
|
|
320
100
|
|
|
321
|
-
##
|
|
322
|
-
|
|
323
|
-
After Phase 2, if framework-shaping architecture decisions emerged during planning (tech stack, communication patterns, data model strategies — not individual feature details), read `${SKILL_DIR}/references/architecture-decisions.md` and follow the capture flow. Most sessions will NOT produce architecture decisions — only capture when genuinely impactful.
|
|
324
|
-
|
|
325
|
-
**How it works**:
|
|
326
|
-
1. If decisions are captured → run the Pre-Generation Headless Context Completeness Gate on each decision, then append passing decisions to the resolved project instruction target under `### Architecture Decisions`
|
|
327
|
-
2. Downstream skills (feature-planner, prizmkit-plan, etc.) read the current host's project instruction context, so they automatically receive these decisions
|
|
328
|
-
3. Do NOT write architecture decision content directly to `.prizmkit/prizm-docs/root.prizm` — that file is maintained by `prizmkit-prizm-docs` and `prizmkit-retrospective`. (The `LAYER_RULES:` pointer block is managed by Rules Configuration, not by this section.) If the project needs `.prizmkit/prizm-docs/`, recommend the user run `prizmkit-prizm-docs` init after planning.
|
|
329
|
-
|
|
330
|
-
## Project Brief Accumulation
|
|
331
|
-
|
|
332
|
-
During interactive planning, maintain the proposed brief in memory or `.prizmkit/plans/project-brief.draft.md` as a simple checklist of product ideas. After the Pre-Generation Headless Context Completeness Gate passes, write the final `.prizmkit/plans/project-brief.md` through the project brief writer path.
|
|
333
|
-
|
|
334
|
-
→ Read `${SKILL_DIR}/references/project-brief-guide.md` for full format and rules.
|
|
335
|
-
|
|
336
|
-
## Session Exit Gate
|
|
337
|
-
|
|
338
|
-
Prevent accidental session exit without completing the planning artifacts.
|
|
339
|
-
|
|
340
|
-
### Trigger Conditions
|
|
341
|
-
|
|
342
|
-
Activate when ALL true:
|
|
343
|
-
- Session goal = `produce`
|
|
344
|
-
- `.prizmkit/plans/project-brief.md` has not been written or is incomplete (fewer than 3 ideas listed)
|
|
345
|
-
|
|
346
|
-
### Gate Behavior
|
|
347
|
-
|
|
348
|
-
When the session appears to be ending:
|
|
349
|
-
1. **Remind**: "You set out to produce a project plan but `.prizmkit/plans/project-brief.md` isn't complete yet."
|
|
350
|
-
2. Use `AskUserQuestion`: "How would you like to proceed?"
|
|
351
|
-
- **Continue to completion (Recommended)** — finish the project brief
|
|
352
|
-
- **Save draft & exit** — write current progress as draft to `.prizmkit/plans/project-brief.draft.md`
|
|
353
|
-
- **Abandon** — exit without saving
|
|
354
|
-
|
|
355
|
-
## Completion Summary
|
|
356
|
-
|
|
357
|
-
After CP-AP-6 passes or is reported not applicable, present a summary and end the session:
|
|
358
|
-
|
|
359
|
-
1. **Summary** (as text): List all project-level artifacts produced:
|
|
360
|
-
- Project conventions → resolved project instruction target `### Project Conventions`
|
|
361
|
-
- Infrastructure config → resolved project instruction target `### Infrastructure` (database conventions + deployment config)
|
|
362
|
-
- Tech stack assumptions → captured in `.prizmkit/plans/project-brief.md` and reused from `.prizmkit/config.json` when it already exists
|
|
363
|
-
- Architecture decisions (if any) → resolved project instruction target `### Architecture Decisions`
|
|
364
|
-
- Dev rules (if configured) → `.prizmkit/rules/<layer>-rules.md` (with `root.prizm` `LAYER_RULES:` pointer)
|
|
365
|
-
- Project brief → `.prizmkit/plans/project-brief.md`
|
|
366
|
-
- Local generated-plan review → verdict, reviewed app-planning artifacts/sections, accepted fixes (or "none"), and final writer/validation result
|
|
367
|
-
|
|
368
|
-
2. **Suggest possible next steps** (as text, NOT auto-invoked):
|
|
369
|
-
> Project-level planning is complete. When you're ready, here are some possible next steps:
|
|
370
|
-
> - `feature-planner` — decompose the project into features and generate `feature-list.json`
|
|
371
|
-
> - `prizmkit-plan` — start working on a specific feature directly
|
|
372
|
-
> - `prizmkit-prizm-docs` — initialize or update project documentation
|
|
373
|
-
> - `prizmkit-deploy` — supplement infrastructure config or execute deployment (if AI-assisted deploy was configured)
|
|
101
|
+
## Session Exit Gate & Completion Summary
|
|
374
102
|
|
|
375
|
-
|
|
103
|
+
- **Session Exit Gate**: if `session goal = produce` and `.prizmkit/plans/project-brief.md` is missing or incomplete (`<3` ideas) on exit, remind and ask `AskUserQuestion` (`Continue to completion (Recommended)`, `Save draft & exit` to `.prizmkit/plans/project-brief.draft.md`, `Abandon`).
|
|
104
|
+
- **Completion Summary** (after CP-AP-6): list produced artifacts (resolved target `### Project Conventions` / `### Infrastructure` / `### Architecture Decisions`, `.prizmkit/plans/project-brief.md` with `config.json` stack assumptions, `.prizmkit/rules/<layer>-rules.md` + `root.prizm` `LAYER_RULES:`, Local generated-plan review → verdict, reviewed app-planning artifacts/sections, accepted fixes (or "none"), and final writer/validation result) and suggest possible next steps (`feature-planner`, `prizmkit-plan`, `prizmkit-prizm-docs`, `prizmkit-deploy`) as text only — do NOT invoke any of them.
|
|
@@ -97,7 +97,3 @@ Treat the matrices as comparison aids, not a universal stack prescription:
|
|
|
97
97
|
- Consider FastAPI for an ML/AI backend, Go for evidenced high-concurrency/resource constraints, or SQLite for a bounded prototype only when those conditions are confirmed and the trade-offs fit the intent.
|
|
98
98
|
- Ask about deployment when it materially constrains framework, data, cost, compliance, or operations. Otherwise record deployment as explicitly deferred rather than forcing a premature decision.
|
|
99
99
|
- Keep recommendations distinct from confirmed user decisions and state what evidence change would cause the recommendation to be reconsidered.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
> **Note**: Feature decomposition patterns (CRUD, SaaS, Social, E-commerce) have been moved to `feature-planner/references/decomposition-patterns.md`. Load that reference during feature decomposition phase.
|
|
@@ -89,7 +89,8 @@ Apply this stricter gate prospectively to new or changed content and preserve un
|
|
|
89
89
|
3. Apply accepted fixes to the source representation first: brief draft/checklist, instruction-file section source, rules answer/template source, or `root.prizm` `LAYER_RULES:` pointer source.
|
|
90
90
|
4. Regenerate or rewrite final artifacts through the same writer path used by app-planner. Do not hand-patch final artifacts as a shortcut when a draft/source representation exists.
|
|
91
91
|
5. Re-read the changed final artifacts directly and repeat the Headless Context Completeness Gate only for changed sections.
|
|
92
|
-
6.
|
|
92
|
+
6. **Confirmed-Decision Anchoring & Bounded Convergence**: user-confirmed product goals, behavioral scope, technical choices, and non-goals are anchored constraints; this loop may only repair self-containment, normalization, completeness, or schema/consistency defects and must never silently overturn confirmed decisions or oscillate between alternative designs across re-review passes (cap local re-review at 3 passes before asking the user to resolve any remaining ambiguity).
|
|
93
|
+
7. Do not report `PASS` until every required fresh-session answer is available and each changed artifact passes its final writer/validation check.
|
|
93
94
|
|
|
94
95
|
## Report Format
|
|
95
96
|
|
|
@@ -103,3 +103,17 @@ Once all criteria are met:
|
|
|
103
103
|
- Bad: `[ ] 首期采用通用电商方图;.agents/brainstorm/design.md — inspect accepted risks` because the brief breaks when the planning note is deleted.
|
|
104
104
|
- Good: state the accepted dimensions, deferred platform templates, and accepted risks directly in the brief, with no brainstorm-file path.
|
|
105
105
|
|
|
106
|
+
## Durable App Context Contract Reference
|
|
107
|
+
|
|
108
|
+
Every new or changed project brief line, convention, infrastructure decision, architecture decision, and rule must be understandable by a fresh AI session that has never seen the planning conversation. Record the actual selected product or technical decision, not conversational answer tokens.
|
|
109
|
+
|
|
110
|
+
### Artifact-Wide AI Readability & Normalization
|
|
111
|
+
|
|
112
|
+
- Every generated natural-language value (briefs/drafts, resolved project instruction files, conventions, infrastructure, architecture decisions, generated layer rules, appendices, comments, brainstorm summaries, quoted evidence, parentheticals) must be a standalone domain statement (machine IDs/enums/timestamps exempt).
|
|
113
|
+
- Never emit dialogue-role or chronology labels (`user said`, `user answered`, `original request`, `this round`, `previous discussion`, `as discussed earlier`, `用户本轮回答`, `如前面讨论`), planning question IDs, answer tokens, recommendation markers, checkpoint provenance, or raw internal answer-map entries. Quotes are allowed only as independently intelligible source evidence.
|
|
114
|
+
- Never persist standalone option labels (`A`, `B`, `C`, `方案A`, `方案B`) or transcript annotations (`(original response: "...")`). Expand selected options into complete decision meaning at matching detail, and retain an exact excerpt only when wording is independently intelligible and materially useful.
|
|
115
|
+
- Resolve `上面`, `这个`, `按推荐走`, `同前`, `继续这样`, `用刚才的方案`, `same as above`, `go with your recommendation` only when there is one provable antecedent; otherwise ask the user for clarification rather than guessing.
|
|
116
|
+
- Treat `所有问题都按你的推荐处理`, `全部按照推荐`, `use all recommendations`, and equivalent blanket recommendation approval as conversational authorization: apply concrete accepted defaults and omit the blanket approval. Preserve rejected alternatives only as necessary non-goals or compatibility boundaries.
|
|
117
|
+
- Purpose-tag every retained stable code/config/interface/URL reference (`src/auth/ — inspect identity-provider and session ownership`; this applies to paths and URLs in all app-planning artifacts). Never retain transient non-code planning paths (`.agents/brainstorm/*.md`, uploads, screenshots, ad-hoc logs) — copy or normalize the task-relevant content inline so the artifact must not depend on that source file still existing. For large materials, record purpose, preserve only task-relevant exact excerpts, and embed complete large materials only when the execution session cannot access the source and all content is genuinely required; preserve detailed user requirements at matching detail.
|
|
118
|
+
- Bad: `方案B`, `(original response: "方案B")`, `全部按照推荐`, `follow this`. Good: `Authentication uses organization-scoped OAuth with server-side sessions`, `Deployment target: managed container service with PostgreSQL in the same region`.
|
|
119
|
+
|