prizmkit 1.1.154 → 1.1.156
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/codex/skill-adapter.js +1 -1
- package/bundled/adapters/pi/skill-adapter.js +2 -1
- package/bundled/dev-pipeline/.env.example +2 -6
- package/bundled/dev-pipeline/README.md +21 -27
- package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +341 -15
- package/bundled/dev-pipeline/prizmkit_runtime/cli.py +0 -3
- package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +1 -15
- package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +48 -14
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +50 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +0 -9
- package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +3 -3
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +120 -22
- package/bundled/dev-pipeline/prizmkit_runtime/runtime_commit.py +482 -0
- package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +64 -11
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +145 -367
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +91 -62
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +105 -69
- package/bundled/dev-pipeline/scripts/prompt_framework.py +36 -41
- package/bundled/dev-pipeline/scripts/update-bug-status.py +1 -4
- package/bundled/dev-pipeline/scripts/update-checkpoint.py +61 -13
- package/bundled/dev-pipeline/scripts/update-feature-status.py +1 -4
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +1 -4
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +22 -27
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +71 -104
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +59 -111
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +37 -72
- package/bundled/dev-pipeline/templates/sections/artifact-manifest.md +39 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-critical-paths.md +3 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +8 -25
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +3 -3
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-implement.md +2 -2
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +3 -3
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +2 -2
- package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +4 -4
- package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +0 -1
- package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +7 -4
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +14 -27
- package/bundled/dev-pipeline/templates/sections/feature-completion-summary.md +20 -0
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +8 -71
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +7 -7
- package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +3 -3
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +4 -4
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +5 -17
- package/bundled/dev-pipeline/templates/sections/refactor-critical-paths.md +3 -1
- package/bundled/dev-pipeline/templates/sections/refactor-phase-commit-report.md +10 -23
- package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +2 -2
- package/bundled/dev-pipeline/templates/sections/refactor-phase-plan.md +2 -2
- package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +3 -3
- package/bundled/dev-pipeline/templates/sections/refactor-phase-test.md +2 -2
- package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +7 -7
- package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +0 -1
- package/bundled/dev-pipeline/templates/sections/retrospective.md +12 -0
- package/bundled/dev-pipeline/templates/sections/runtime-commit-handoff.md +35 -0
- package/bundled/dev-pipeline/templates/session-status-schema.json +45 -62
- package/bundled/dev-pipeline/tests/test_checkpoint_state.py +469 -18
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +262 -175
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +62 -23
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +76 -28
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +168 -18
- package/bundled/dev-pipeline/tests/test_recovery_workflow.py +111 -0
- package/bundled/dev-pipeline/tests/test_reset_preserve.py +0 -2
- package/bundled/dev-pipeline/tests/test_runtime_commit.py +608 -0
- package/bundled/dev-pipeline/tests/test_unified_cli.py +167 -25
- package/bundled/skills/_metadata.json +9 -9
- package/bundled/skills/app-planner/SKILL.md +3 -3
- package/bundled/skills/app-planner/references/generated-plan-review.md +2 -1
- package/bundled/skills/app-planner/references/rules/backend/derivation-rules.md +56 -64
- package/bundled/skills/app-planner/references/rules/backend/fixed-rules.md +85 -240
- package/bundled/skills/app-planner/references/rules/backend/question-bank.md +25 -25
- package/bundled/skills/app-planner/references/rules/backend/question-manifest.json +16 -7
- package/bundled/skills/app-planner/references/rules/backend/template.md +74 -92
- package/bundled/skills/app-planner/references/rules/database/derivation-rules.md +93 -93
- package/bundled/skills/app-planner/references/rules/database/fixed-rules.md +66 -173
- package/bundled/skills/app-planner/references/rules/database/question-bank.md +31 -26
- package/bundled/skills/app-planner/references/rules/database/question-manifest.json +13 -4
- package/bundled/skills/app-planner/references/rules/database/template.md +76 -98
- package/bundled/skills/app-planner/references/rules/frontend/derivation-rules.md +68 -95
- package/bundled/skills/app-planner/references/rules/frontend/fixed-rules.md +93 -166
- package/bundled/skills/app-planner/references/rules/frontend/question-bank.md +46 -36
- package/bundled/skills/app-planner/references/rules/frontend/question-manifest.json +11 -2
- package/bundled/skills/app-planner/references/rules/frontend/template.md +79 -257
- package/bundled/skills/app-planner/references/rules/mobile/derivation-rules.md +91 -99
- package/bundled/skills/app-planner/references/rules/mobile/fixed-rules.md +73 -246
- package/bundled/skills/app-planner/references/rules/mobile/question-bank.md +17 -17
- package/bundled/skills/app-planner/references/rules/mobile/question-manifest.json +17 -2
- package/bundled/skills/app-planner/references/rules/mobile/template.md +73 -85
- package/bundled/skills/app-planner/references/rules-configuration.md +133 -65
- package/bundled/skills/app-planner/scripts/validate-rules-configuration.py +291 -0
- package/bundled/skills/prizmkit/SKILL.md +17 -18
- package/bundled/skills/prizmkit/references/workflow-state-protocol.md +22 -18
- package/bundled/skills/prizmkit-code-review/SKILL.md +22 -58
- package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +6 -6
- package/bundled/skills/prizmkit-code-review/references/review-report-template.md +2 -2
- package/bundled/skills/prizmkit-committer/SKILL.md +82 -132
- package/bundled/skills/prizmkit-deploy/SKILL.md +27 -11
- package/bundled/skills/prizmkit-deploy/assets/deploy-document-template.md +89 -0
- package/bundled/skills/prizmkit-deploy/references/ci-cd-workflows.md +44 -14
- package/bundled/skills/prizmkit-deploy/references/cloud-platform-deploy.md +19 -3
- package/bundled/skills/prizmkit-deploy/references/database-setup.md +22 -12
- package/bundled/skills/prizmkit-deploy/references/deploy-config-schema.md +3 -1
- package/bundled/skills/prizmkit-deploy/references/deploy-history-schema.md +22 -6
- package/bundled/skills/prizmkit-deploy/references/deploy-metadata-schema.json +49 -0
- package/bundled/skills/prizmkit-deploy/references/live-validation-notes.md +1 -1
- package/bundled/skills/prizmkit-deploy/references/pending-input-schema.json +164 -0
- package/bundled/skills/prizmkit-deploy/references/ssh-adapter-flow.md +9 -8
- package/bundled/skills/prizmkit-deploy/references/ssh-execution-flow.md +6 -6
- package/bundled/skills/prizmkit-implement/SKILL.md +30 -66
- package/bundled/skills/prizmkit-implement/references/implementation-subagent-procedure.md +4 -4
- package/bundled/skills/prizmkit-init/SKILL.md +4 -0
- package/bundled/skills/prizmkit-plan/SKILL.md +21 -64
- package/bundled/skills/prizmkit-plan/references/artifact-identity.md +38 -0
- package/bundled/skills/prizmkit-plan/references/independent-plan-review.md +4 -4
- package/bundled/skills/prizmkit-plan/references/review-plan-spec-loop.md +5 -5
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +75 -11
- package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +191 -56
- package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +18 -18
- package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +14 -8
- package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +12 -5
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +23 -12
- package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +13 -9
- package/bundled/skills/prizmkit-retrospective/SKILL.md +94 -97
- package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +79 -37
- package/bundled/skills/prizmkit-retrospective/references/retrospective-result-schema.json +138 -0
- package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +111 -54
- package/bundled/skills/prizmkit-test/SKILL.md +64 -51
- package/bundled/skills/prizmkit-test/references/boundary-contract-and-test-double-guidance.md +206 -0
- package/bundled/skills/prizmkit-test/references/independent-test-review.md +17 -9
- package/bundled/skills/prizmkit-test/references/test-coverage-model.md +45 -21
- package/bundled/skills/prizmkit-test/references/test-report-template.md +20 -13
- package/bundled/skills/prizmkit-workflow/SKILL.md +35 -37
- package/bundled/skills/prizmkit-workflow/references/artifact-identity.md +34 -0
- package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +22 -18
- package/bundled/skills/recovery-workflow/SKILL.md +2 -1
- package/bundled/skills/recovery-workflow/references/detection.md +4 -3
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +15 -5
- package/bundled/templates/hooks/validate-prizm-docs.py +124 -12
- package/package.json +1 -1
- package/src/scaffold.js +33 -22
- package/bundled/dev-pipeline/templates/sections/bugfix-artifacts.md +0 -16
- package/bundled/dev-pipeline/templates/sections/bugfix-session-status.md +0 -31
- package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +0 -7
- package/bundled/dev-pipeline/templates/sections/critical-paths-lite.md +0 -7
- package/bundled/dev-pipeline/templates/sections/directory-convention-agent.md +0 -9
- package/bundled/dev-pipeline/templates/sections/directory-convention-lite.md +0 -6
- package/bundled/dev-pipeline/templates/sections/headless-commit-authorization.md +0 -15
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +0 -61
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +0 -24
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-lite-suffix.md +0 -12
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +0 -44
- package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +0 -25
- package/bundled/dev-pipeline/templates/sections/phase-plan-agent.md +0 -20
- package/bundled/dev-pipeline/templates/sections/phase-plan-lite.md +0 -20
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +0 -20
- package/bundled/dev-pipeline/templates/sections/refactor-artifacts.md +0 -17
- package/bundled/dev-pipeline/templates/sections/refactor-session-status.md +0 -28
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery-agent.md +0 -52
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery-lite.md +0 -52
- package/bundled/skills/prizmkit-code-review/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-committer/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-implement/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-plan/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-retrospective/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-test/references/external-contract-mock-guidance.md +0 -119
|
@@ -1,158 +1,136 @@
|
|
|
1
1
|
# Database Rules — {{ project_name }}
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
> Audience:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
|
16
|
-
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## 1. Schema Design
|
|
3
|
+
> Generated by app-planner Rules Configuration
|
|
4
|
+
> Audience: project contributors, data operators, and AI coding assistants working on persistence
|
|
5
|
+
|
|
6
|
+
This document applies invariant safety principles through the selected datastore and operational decisions. SQL and relational rules are not active for document or embedded stores unless explicitly selected.
|
|
7
|
+
|
|
8
|
+
## 1. Decision Ledger
|
|
9
|
+
|
|
10
|
+
| Domain | Selected Decision |
|
|
11
|
+
|---|---|
|
|
12
|
+
| Primary datastore | {{ database }} |
|
|
13
|
+
| Cache | {{ cache }} |
|
|
14
|
+
| Identifier strategy | {{ pk_strategy }} |
|
|
15
|
+
| Soft deletion | {{ soft_delete }} |
|
|
16
|
+
| Modeling/normalization | {{ normalization }} |
|
|
17
|
+
| Migration mechanism | {{ migration_tool }} |
|
|
18
|
+
| Workload | {{ workload_type }} |
|
|
19
|
+
| Estimated scale | {{ data_scale }} |
|
|
20
|
+
| Data sensitivity | {{ data_sensitivity }} |
|
|
21
|
+
| Audit/CDC | {{ audit }} |
|
|
22
|
+
| Deployment | {{ deployment }} |
|
|
23
|
+
| Backup | {{ backup }} |
|
|
24
|
+
| Availability | {{ ha }} |
|
|
25
|
+
| AI structure-change permission | {{ ai_ddl_permission }} |
|
|
26
|
+
| AI destructive-operation policy | {{ ai_safety_constraint }} |
|
|
27
|
+
|
|
28
|
+
Deferred and not-applicable decisions remain explicit.
|
|
29
|
+
|
|
30
|
+
## 2. Data Model and Types
|
|
31
|
+
|
|
32
|
+
### 2.1 Model invariants
|
|
36
33
|
|
|
37
34
|
{{ FIXED_RULES_SCHEMA }}
|
|
38
35
|
|
|
39
|
-
|
|
36
|
+
### 2.2 Selected identifier and modeling rules
|
|
40
37
|
|
|
41
|
-
|
|
38
|
+
{{ schema_rules }}
|
|
42
39
|
|
|
43
|
-
|
|
40
|
+
### 2.3 Type invariants and datastore-specific rules
|
|
44
41
|
|
|
45
42
|
{{ FIXED_RULES_TYPES }}
|
|
46
43
|
|
|
47
44
|
{{ tech_rules }}
|
|
48
45
|
|
|
49
|
-
|
|
46
|
+
## 3. Access, Atomicity, and Performance
|
|
50
47
|
|
|
51
|
-
|
|
48
|
+
### 3.1 Access paths
|
|
52
49
|
|
|
53
50
|
{{ FIXED_RULES_INDEX }}
|
|
54
51
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
## 3b. Transaction Isolation
|
|
52
|
+
### 3.2 Atomicity and concurrency
|
|
58
53
|
|
|
59
54
|
{{ FIXED_RULES_TRANSACTION }}
|
|
60
55
|
|
|
61
|
-
|
|
56
|
+
### 3.3 Workload and scale
|
|
62
57
|
|
|
63
|
-
|
|
58
|
+
{{ FIXED_RULES_PERFORMANCE }}
|
|
59
|
+
|
|
60
|
+
{{ performance_rules }}
|
|
61
|
+
|
|
62
|
+
### 3.4 Client and connection lifecycle
|
|
63
|
+
|
|
64
|
+
{{ FIXED_RULES_CONNECTION }}
|
|
65
|
+
|
|
66
|
+
## 4. Change Management
|
|
64
67
|
|
|
65
68
|
{{ FIXED_RULES_MIGRATION }}
|
|
66
69
|
|
|
67
70
|
{{ migration_rules }}
|
|
68
71
|
|
|
69
|
-
|
|
72
|
+
Migration, rollback, and compatibility behavior follows the selected datastore and tool; no SQL-only rollback format is implied for other technologies.
|
|
70
73
|
|
|
71
|
-
## 5. Query
|
|
74
|
+
## 5. Query and Mutation Safety
|
|
72
75
|
|
|
73
76
|
{{ FIXED_RULES_QUERY }}
|
|
74
77
|
|
|
75
|
-
|
|
78
|
+
Data-access organization may also be described in `backend-rules.md`. Shared datastore and ORM decisions must agree before either file is written.
|
|
76
79
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
## 6. Security & Permissions
|
|
80
|
+
## 6. Security and Sensitivity
|
|
80
81
|
|
|
81
82
|
{{ FIXED_RULES_SECURITY }}
|
|
82
83
|
|
|
83
84
|
{{ security_rules }}
|
|
84
85
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
## 7. Backup & Recovery
|
|
86
|
+
## 7. Audit and Change Streams
|
|
88
87
|
|
|
89
|
-
{{
|
|
90
|
-
|
|
91
|
-
{{ ops_rules }}
|
|
88
|
+
{{ audit_rules }}
|
|
92
89
|
|
|
93
|
-
|
|
90
|
+
When audit and CDC are not selected, this section states that they are not applicable rather than inheriting enterprise defaults.
|
|
94
91
|
|
|
95
|
-
## 8.
|
|
92
|
+
## 8. Backup, Availability, and Operations
|
|
96
93
|
|
|
97
|
-
{{
|
|
94
|
+
{{ FIXED_RULES_BACKUP }}
|
|
98
95
|
|
|
99
|
-
{{
|
|
96
|
+
{{ ops_rules }}
|
|
100
97
|
|
|
101
|
-
|
|
98
|
+
The selected backup and availability decisions own this domain. Development-only choices must be labeled and must not silently become production guidance.
|
|
102
99
|
|
|
103
|
-
##
|
|
100
|
+
## 9. Cache
|
|
104
101
|
|
|
105
|
-
{{
|
|
102
|
+
{{ cache_rules }}
|
|
106
103
|
|
|
107
|
-
|
|
104
|
+
When no cache is selected, render an explicit no-cache decision and omit cache-specific operational requirements.
|
|
108
105
|
|
|
109
|
-
##
|
|
106
|
+
## 10. AI Data-Change Permissions
|
|
110
107
|
|
|
111
|
-
###
|
|
108
|
+
### 10.1 Invariant safety
|
|
112
109
|
|
|
113
110
|
{{ FIXED_RULES_AI_BASE }}
|
|
114
111
|
|
|
115
|
-
###
|
|
116
|
-
|
|
117
|
-
- **Database structure change permission**: {{ ai_ddl_rule }}
|
|
118
|
-
- **Safety operation constraints**: {{ ai_safety_rule }}
|
|
119
|
-
|
|
120
|
-
### 9.3 Mandatory Pre-Actions (before generating any SQL/Migration)
|
|
121
|
-
|
|
122
|
-
AI must complete the following in order before performing any database-related operation:
|
|
112
|
+
### 10.2 Selected permissions
|
|
123
113
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
3. Confirm the target database type and version
|
|
127
|
-
4. If involving indexes/DDL, first assess EXPLAIN and estimated execution time
|
|
114
|
+
- Structure-change permission: {{ ai_ddl_rule }}
|
|
115
|
+
- Destructive-operation policy: {{ ai_safety_rule }}
|
|
128
116
|
|
|
129
|
-
|
|
117
|
+
If these selected policies conflict, generation fails until the user chooses a coherent combination.
|
|
130
118
|
|
|
131
|
-
##
|
|
132
|
-
|
|
133
|
-
{{ audit_rules }}
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## 11. Caching
|
|
138
|
-
|
|
139
|
-
{{ cache_rules }}
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
## Appendix A: Deny List (Quick Reference)
|
|
144
|
-
|
|
145
|
-
> This appendix is auto-generated by AI in Phase 4 by extracting all forbidden entries from each section.
|
|
119
|
+
## Appendix A: Active Deny List
|
|
146
120
|
|
|
147
121
|
{{ deny_list_summary }}
|
|
148
122
|
|
|
149
|
-
|
|
123
|
+
Include only prohibitions from active invariant and selected blocks.
|
|
150
124
|
|
|
151
|
-
|
|
125
|
+
## Appendix B: Compatible Recommendations
|
|
152
126
|
|
|
153
127
|
{{ recommended_libs }}
|
|
154
128
|
|
|
155
|
-
|
|
129
|
+
Recommendations must match the selected datastore, deployment, and AI permission decisions.
|
|
130
|
+
|
|
131
|
+
## Source Contract
|
|
156
132
|
|
|
157
|
-
|
|
158
|
-
|
|
133
|
+
- Owner: app-planner Rules Configuration
|
|
134
|
+
- Resource family: `references/rules/database/`
|
|
135
|
+
- Regenerate after a decision or source-contract change.
|
|
136
|
+
- Generation metadata value: {{ generated_at }}
|
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
+
## SEMANTIC_FALLBACK_POLICY
|
|
19
|
+
|
|
20
|
+
Every confirmed option is valid input even when this file has no pre-authored block for it. For an unmatched option, render a concise rule that names the selected technology or practice, follows its current official and detected project conventions, preserves brownfield behavior unless migration was selected, and imports no rules from a recommended alternative. For `none`, `not required`, deferred, or conditionally skipped decisions, render an explicit not-applicable or deferred statement. Never leave a rule placeholder blank.
|
|
21
|
+
|
|
22
|
+
Before output, compare all active blocks with the decision ledger. A selected decision owns its policy domain; incompatible blocks fail generation instead of being merged.
|
|
18
23
|
|
|
19
24
|
## Phase 2 Normalized Semantic Fill Table
|
|
20
25
|
|
|
@@ -218,7 +223,7 @@ Appendix placeholders are auto-generated by AI in Phase 4:
|
|
|
218
223
|
**Trigger**: Q2 = Next.js | **Inject into**: `{{ tech_stack_rules }}`
|
|
219
224
|
|
|
220
225
|
- Images must use `next/image`. Forbid `<img>` (unless SVG inline).
|
|
221
|
-
-
|
|
226
|
+
- Apply the selected Q4b font strategy consistently. When `next/font` is compatible with that strategy, prefer it for framework integration; do not override a confirmed self-hosted, CDN, system-font, or deferred decision.
|
|
222
227
|
- Links must use `next/link`. Forbid using `<a>` for internal navigation.
|
|
223
228
|
|
|
224
229
|
### D-NUXT-01
|
|
@@ -238,9 +243,9 @@ Appendix placeholders are auto-generated by AI in Phase 4:
|
|
|
238
243
|
### D-PNPM-01
|
|
239
244
|
**Trigger**: Q3 = pnpm | **Inject into**: `{{ tech_stack_rules }}`
|
|
240
245
|
|
|
241
|
-
-
|
|
242
|
-
-
|
|
243
|
-
-
|
|
246
|
+
- Use pnpm as selected and preserve one authoritative `pnpm-lock.yaml` according to repository policy.
|
|
247
|
+
- Record the resolved pnpm version in package metadata/tooling when the project uses that mechanism; never emit an `x.y.z` placeholder.
|
|
248
|
+
- Use pnpm workspaces only when the repository is a selected/detected monorepo; do not invent a workspace from the package-manager choice.
|
|
244
249
|
|
|
245
250
|
### D-TAILWIND-01
|
|
246
251
|
**Trigger**: Q4 = Tailwind | **Inject into**: `{{ style_specific_rules }}`
|
|
@@ -433,9 +438,8 @@ Appendix placeholders are auto-generated by AI in Phase 4:
|
|
|
433
438
|
### D-DARK-NONE-01
|
|
434
439
|
**Trigger**: Q10 = No dark mode | **Inject into**: `{{ dark_mode_rules }}`
|
|
435
440
|
|
|
436
|
-
- Dark mode not supported
|
|
437
|
-
-
|
|
438
|
-
- Forbid hardcoding colors in components. All colors must go through Semantic Tokens.
|
|
441
|
+
- Dark mode is not supported in the current scope; do not emit theme-switching controls, alternate-value requirements, or expansion infrastructure.
|
|
442
|
+
- Continue to follow the separately selected token-layering and styling decisions.
|
|
439
443
|
|
|
440
444
|
### D-RESP-MF-01
|
|
441
445
|
**Trigger**: Q11 = Mobile-first | **Inject into**: `{{ breakpoint_rules }}`
|
|
@@ -476,19 +480,15 @@ Appendix placeholders are auto-generated by AI in Phase 4:
|
|
|
476
480
|
### D-I18N-01
|
|
477
481
|
**Trigger**: Q13 = Multi-language | **Inject into**: `{{ i18n_rules }}`
|
|
478
482
|
|
|
479
|
-
-
|
|
480
|
-
-
|
|
481
|
-
-
|
|
482
|
-
- Example: `login.form.submitButton`, `order.detail.priceLabel`.
|
|
483
|
-
- Translation files split by language: `locales/zh-CN.json`, `locales/en-US.json`.
|
|
484
|
-
- Plurals, dates, and currency use ICU MessageFormat. Forbid string concatenation.
|
|
485
|
-
- Missing keys must cause CI errors. Translation files sorted by key for easy diffing.
|
|
483
|
+
- Use the confirmed existing or dependency-authorized i18n framework compatible with Q1/Q2; do not add a React/Vue library to another stack.
|
|
484
|
+
- Centralize user-visible text under one documented key and locale-file convention and include the explicitly selected locales.
|
|
485
|
+
- Use locale-aware plural, date, number, and currency formatting and define missing-key behavior appropriate to build/runtime risk.
|
|
486
486
|
|
|
487
487
|
### D-I18N-NONE-01
|
|
488
488
|
**Trigger**: Q13 = Single-language, centralized | **Inject into**: `{{ i18n_rules }}`
|
|
489
489
|
|
|
490
|
-
-
|
|
491
|
-
-
|
|
490
|
+
- Keep the selected single language centralized through the project's confirmed text catalog boundary.
|
|
491
|
+
- Record the actual stable catalog path; do not invent `src/i18n/<lang>.ts` or install a full runtime framework unless separately authorized.
|
|
492
492
|
|
|
493
493
|
### D-I18N-HARDCODE-01
|
|
494
494
|
**Trigger**: Q13 = Single-language, hardcoding | **Inject into**: `{{ i18n_rules }}`
|
|
@@ -507,30 +507,21 @@ Appendix placeholders are auto-generated by AI in Phase 4:
|
|
|
507
507
|
|
|
508
508
|
### D-TEST-01 (Dynamically Assembled)
|
|
509
509
|
**Trigger**: Q15 + Q16 + Q17 combination | **Inject into**: `{{ test_rules }}`
|
|
510
|
-
**Generation rule**: Dynamically assemble based on user selection.
|
|
510
|
+
**Generation rule**: Dynamically assemble based on user selection. When Q15 selects `Not required yet`, render only an explicit deferred-testing statement and inject no framework or coverage requirements. Otherwise omit the corresponding framework line when not asked (Q16 is only asked for Q15=A/B; Q17 is only asked for Q15=A/C).
|
|
511
511
|
|
|
512
512
|
- Testing strategy: {{ Q15 description }}
|
|
513
|
-
- Unit test framework: {{ Q16 choice }} (only if Q15=A or B;
|
|
514
|
-
- E2E framework: {{ Q17 choice }} (only if Q15=A or C;
|
|
515
|
-
-
|
|
516
|
-
- Unit
|
|
517
|
-
|
|
518
|
-
- Prefer `getByRole` / `getByLabelText`, then `getByText`. Avoid `getByTestId` (unless no semantics available).
|
|
519
|
-
- Async assertions use `findBy*` or `waitFor`. Forbid `setTimeout`.
|
|
520
|
-
- E2E principles (if enabled):
|
|
521
|
-
- Cases cover critical business paths (login, checkout, payment, etc.).
|
|
522
|
-
- Data isolation. Each case has independent setup/teardown.
|
|
523
|
-
- Screenshot comparison only for core visual components.
|
|
513
|
+
- Unit test framework: {{ Q16 choice }} (only if Q15=A or B; use its compatible project-native component/DOM testing boundary without silently adding dependencies)
|
|
514
|
+
- E2E framework: {{ Q17 choice }} (only if Q15=A or C; execute headlessly in CI through the repository's selected layout/configuration)
|
|
515
|
+
- Do not invent numeric coverage thresholds. Add them only when explicitly confirmed outside the tier choice.
|
|
516
|
+
- Unit tests assert behavior and accessible semantics, isolate unstable dependencies, and use deterministic async assertions.
|
|
517
|
+
- E2E tests cover product-defined critical flows rather than generic login/checkout/payment examples, with isolated data and deterministic setup/teardown.
|
|
524
518
|
|
|
525
519
|
### D-AI-DEP-STRICT-01
|
|
526
520
|
**Trigger**: Q19 = No, forbid self-initiated | **Inject into**: `{{ ai_dependency_rule }}`
|
|
527
521
|
|
|
528
|
-
- AI
|
|
529
|
-
-
|
|
530
|
-
|
|
531
|
-
2. Await human review approval.
|
|
532
|
-
3. After approval, human executes `pnpm add`.
|
|
533
|
-
- Exception: lockfile updates (`pnpm-lock.yaml`) may be modified by AI.
|
|
522
|
+
- AI must not modify dependency declarations or lockfiles without the explicit review/approval required by this selected option.
|
|
523
|
+
- A proposal states package, version/range, purpose, alternatives, security/license, and size/runtime impact.
|
|
524
|
+
- After approval, use the Q3-selected package manager; never hardcode `pnpm` or exempt one lockfile.
|
|
534
525
|
|
|
535
526
|
### D-AI-DEP-ANNOUNCE-01
|
|
536
527
|
**Trigger**: Q19 = Yes, with declaration | **Inject into**: `{{ ai_dependency_rule }}`
|
|
@@ -554,10 +545,7 @@ Appendix placeholders are auto-generated by AI in Phase 4:
|
|
|
554
545
|
1. Full-text search for callers in the repository (grep / IDE reference finder).
|
|
555
546
|
2. List **all affected files** in the change description.
|
|
556
547
|
3. Assess whether existing usage is broken (API signature, behavior).
|
|
557
|
-
- If it is a breaking change,
|
|
558
|
-
- Provide a codemod or migration guide.
|
|
559
|
-
- Prefix the PR title with `[BREAKING]`.
|
|
560
|
-
- Bump the major version number.
|
|
548
|
+
- If it is a breaking change, provide the repository's selected consumer migration or compatibility plan and follow its existing version/release conventions.
|
|
561
549
|
|
|
562
550
|
### D-AI-BREAK-LOOSE-01
|
|
563
551
|
**Trigger**: Q20 = No | **Inject into**: `{{ ai_breaking_change_rule }}`
|
|
@@ -567,18 +555,16 @@ Appendix placeholders are auto-generated by AI in Phase 4:
|
|
|
567
555
|
### D-AI-INDEX-STRICT-01
|
|
568
556
|
**Trigger**: Q18 = Enforce index sync | **Inject into**: `{{ ai_index_rule }}`
|
|
569
557
|
|
|
570
|
-
-
|
|
571
|
-
-
|
|
572
|
-
-
|
|
573
|
-
-
|
|
574
|
-
- CI should have a script to validate: all `*.tsx` files under `components/` must appear in `index.ts` exports (orphan files treated as build failure).
|
|
558
|
+
- Record the detected/confirmed authoritative component export-registry path as part of this selected decision.
|
|
559
|
+
- Synchronize additions, removals, and renames with that registry and follow its existing ordering/comment conventions.
|
|
560
|
+
- Search the registry and component ownership area before creating a duplicate.
|
|
561
|
+
- Add registry validation only when existing tooling supports it or the dependency/config permission authorizes the change.
|
|
575
562
|
|
|
576
563
|
### D-AI-INDEX-LOOSE-01
|
|
577
564
|
**Trigger**: Q18 = Not required | **Inject into**: `{{ ai_index_rule }}`
|
|
578
565
|
|
|
579
|
-
-
|
|
580
|
-
-
|
|
581
|
-
- The team should periodically (recommended: each milestone) organize `components/index.ts` and archive stable components.
|
|
566
|
+
- No central component registry is required. Update direct exports and affected consumers through the repository's existing structure.
|
|
567
|
+
- Search the relevant component ownership areas before creating a duplicate; do not invent or periodically maintain an unselected index file.
|
|
582
568
|
|
|
583
569
|
### D-AI-LINES-01
|
|
584
570
|
**Trigger**: Q22 = N | **Inject into**: `{{ ai_max_lines }}`
|
|
@@ -587,39 +573,29 @@ Appendix placeholders are auto-generated by AI in Phase 4:
|
|
|
587
573
|
### D-PERF-25-01
|
|
588
574
|
**Trigger**: Q23 = LCP < 2.5s | **Inject into**: `{{ performance_rules }}`
|
|
589
575
|
|
|
590
|
-
-
|
|
591
|
-
-
|
|
592
|
-
-
|
|
593
|
-
- Critical path optimization:
|
|
594
|
-
- Critical CSS inlined. Non-critical CSS loaded asynchronously.
|
|
595
|
-
- First screen images `loading="eager"`. Others `loading="lazy"`.
|
|
596
|
-
- Fonts use `font-display: swap`. Preload critical fonts (`<link rel="preload">`).
|
|
597
|
-
- CI integrates Lighthouse validation. PRs blocked if performance regresses by > 10%.
|
|
576
|
+
- Measure first-screen LCP against the selected <2.5s target under a documented device/network/cache scenario.
|
|
577
|
+
- Diagnose render, asset, font, server, and JavaScript contributors before selecting a compatible optimization.
|
|
578
|
+
- Add CI measurement or regression thresholds only when the environment is stable and configuration/dependency permission allows it; do not inject unselected INP/CLS targets.
|
|
598
579
|
|
|
599
580
|
### D-PERF-15-01
|
|
600
581
|
**Trigger**: Q23 = LCP < 1.5s | **Inject into**: `{{ performance_rules }}`
|
|
601
582
|
|
|
602
|
-
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
- Must use SSR / SSG pre-rendering.
|
|
606
|
-
- Images must use AVIF/WebP and have LQIP placeholders.
|
|
607
|
-
- CDN enables HTTP/3, Brotli compression.
|
|
583
|
+
- Measure first-screen LCP against the selected <1.5s target under a documented scenario.
|
|
584
|
+
- Select optimizations compatible with Q2, deployment, image/browser support, and Q4b. Do not force SSR/SSG, a CDN protocol, image format, or an extra bundle target from the LCP choice alone.
|
|
585
|
+
- If the selected architecture cannot meet the target with acceptable evidence, fail the conflict/feasibility gate and return to clarification.
|
|
608
586
|
|
|
609
587
|
### D-CHUNK-300-01
|
|
610
588
|
**Trigger**: Q24 = chunk < 300KB | **Inject into**: `{{ performance_rules }}`
|
|
611
589
|
|
|
612
|
-
-
|
|
613
|
-
-
|
|
614
|
-
-
|
|
615
|
-
- Large dependencies (chart libraries, rich text editors, map SDKs) must be loaded on demand.
|
|
590
|
+
- Enforce the selected single-chunk target: <300KB uncompressed and <100KB compressed under the recorded measurement tool.
|
|
591
|
+
- Split only boundaries that exceed or materially threaten the target, using the selected framework's compatible lazy-loading mechanism.
|
|
592
|
+
- Reuse existing bundle analysis tooling or request authorization before adding/configuring a visualizer dependency.
|
|
616
593
|
|
|
617
594
|
### D-CHUNK-500-01
|
|
618
595
|
**Trigger**: Q24 = chunk < 500KB | **Inject into**: `{{ performance_rules }}`
|
|
619
596
|
|
|
620
|
-
-
|
|
621
|
-
-
|
|
622
|
-
- CI integrates bundle size analysis.
|
|
597
|
+
- Enforce the selected single-chunk target of <500KB using a recorded compressed/uncompressed interpretation.
|
|
598
|
+
- Introduce compatible lazy-loading boundaries where evidence requires them and add CI analysis only under selected config/dependency permissions.
|
|
623
599
|
|
|
624
600
|
### D-BEM-01
|
|
625
601
|
**Trigger**: Q4 = Plain CSS + BEM | **Inject into**: `{{ style_specific_rules }}`
|
|
@@ -653,10 +629,9 @@ Appendix placeholders are auto-generated by AI in Phase 4:
|
|
|
653
629
|
### D-CUSTOM-FETCH-01
|
|
654
630
|
**Trigger**: Q6 = Custom fetch hook wrapper | **Inject into**: `{{ server_state_rules }}`
|
|
655
631
|
|
|
656
|
-
-
|
|
657
|
-
-
|
|
658
|
-
-
|
|
659
|
-
- Request cancellation via AbortController on unmount.
|
|
632
|
+
- Put custom data access behind one documented project boundary rather than inventing a universal `src/hooks/api/` path.
|
|
633
|
+
- Define its data, pending, error, refresh/revalidation, and cancellation contract from consumer needs.
|
|
634
|
+
- Keep raw transport calls out of presentation code except at an explicitly selected framework data boundary.
|
|
660
635
|
|
|
661
636
|
### D-TYPES-MANUAL-01
|
|
662
637
|
**Trigger**: Q7 = Hand-written .d.ts | **Inject into**: `{{ server_state_rules }}`
|
|
@@ -668,9 +643,8 @@ Appendix placeholders are auto-generated by AI in Phase 4:
|
|
|
668
643
|
### D-TYPES-MONOREPO-01
|
|
669
644
|
**Trigger**: Q7 = Shared monorepo type package | **Inject into**: `{{ server_state_rules }}`
|
|
670
645
|
|
|
671
|
-
-
|
|
672
|
-
-
|
|
673
|
-
- Type package version bumps must be coordinated.
|
|
646
|
+
- Import contracts from the confirmed stable shared-package path; do not invent `@project/shared-types`.
|
|
647
|
+
- Avoid divergent local redeclarations and coordinate compatibility/version changes with backend consumers.
|
|
674
648
|
|
|
675
649
|
### D-RESP-DESKTOP-ONLY-01
|
|
676
650
|
**Trigger**: Q11 = Desktop only | **Inject into**: `{{ breakpoint_rules }}`
|
|
@@ -708,27 +682,26 @@ Appendix placeholders are auto-generated by AI in Phase 4:
|
|
|
708
682
|
### D-SPA-01
|
|
709
683
|
**Trigger**: Q2 = Plain SPA (Vite) | **Inject into**: `{{ tech_stack_rules }}`
|
|
710
684
|
|
|
711
|
-
-
|
|
712
|
-
-
|
|
713
|
-
- All rendering client-side.
|
|
685
|
+
- Use the selected plain Vite SPA boundary with client-side rendering.
|
|
686
|
+
- Add a routing library only when navigation requirements and dependency permission authorize it; otherwise use the existing project router/boundary.
|
|
714
687
|
|
|
715
688
|
### D-NPM-01
|
|
716
689
|
**Trigger**: Q3 = npm | **Inject into**: `{{ tech_stack_rules }}`
|
|
717
690
|
|
|
718
|
-
-
|
|
719
|
-
-
|
|
691
|
+
- Use npm as selected and preserve one authoritative npm lockfile according to repository policy.
|
|
692
|
+
- Record the resolved npm version in package metadata/tooling when the project uses that mechanism; never emit an `x.y.z` placeholder.
|
|
720
693
|
|
|
721
694
|
### D-YARN-01
|
|
722
695
|
**Trigger**: Q3 = yarn | **Inject into**: `{{ tech_stack_rules }}`
|
|
723
696
|
|
|
724
|
-
-
|
|
725
|
-
-
|
|
697
|
+
- Use Yarn as selected and preserve one authoritative Yarn lockfile according to repository policy.
|
|
698
|
+
- Record the resolved Yarn version in package metadata/tooling when the project uses that mechanism; never emit an unresolved version placeholder.
|
|
726
699
|
|
|
727
700
|
### D-BUN-01
|
|
728
701
|
**Trigger**: Q3 = bun | **Inject into**: `{{ tech_stack_rules }}`
|
|
729
702
|
|
|
730
|
-
-
|
|
731
|
-
-
|
|
703
|
+
- Use Bun as selected and preserve its authoritative lockfile format for the resolved Bun version according to repository policy.
|
|
704
|
+
- Record the resolved version when the project uses package-manager metadata; never emit an unresolved version placeholder.
|
|
732
705
|
|
|
733
706
|
### D-A11Y-AA-01
|
|
734
707
|
**Trigger**: Q14 = WCAG 2.1 AA | **Inject into**: `{{ a11y_extra_rules }}`
|
|
@@ -760,7 +733,7 @@ Appendix placeholders are auto-generated by AI in Phase 4:
|
|
|
760
733
|
|
|
761
734
|
## Template Placeholder Coverage Self-Check Table (Mandatory Check Before Phase 4 Rendering)
|
|
762
735
|
|
|
763
|
-
> This table
|
|
736
|
+
> This table documents placeholder fill sources for `template.md`. The deterministic `scripts/validate-rules-configuration.py` check is authoritative for placeholder-set alignment; every placeholder must still resolve to active invariant, selected, fallback, not-applicable, auto-generated, or metadata content before rendering.
|
|
764
737
|
|
|
765
738
|
| Placeholder | Fill Source | Source Type |
|
|
766
739
|
|-------------|------------|-------------|
|
|
@@ -803,17 +776,17 @@ Appendix placeholders are auto-generated by AI in Phase 4:
|
|
|
803
776
|
| `{{ ai_breaking_change_rule }}` | D-AI-BREAK-{STRICT/LOOSE}-01 | Derivation |
|
|
804
777
|
| `{{ ai_config_rule }}` | D-AI-CONFIG-FRONTEND-{STRICT/LOOSE}-01 | Derivation |
|
|
805
778
|
| `{{ ai_index_rule }}` | D-AI-INDEX-{STRICT/LOOSE}-01 | Derivation |
|
|
806
|
-
| `{{ FIXED_RULES_COMPONENT_CONTRACT }}` | fixed-rules.md
|
|
807
|
-
| `{{ FIXED_RULES_I18N_BASELINE }}` | fixed-rules.md
|
|
808
|
-
| `{{ FIXED_RULES_ERROR_HANDLING }}` | fixed-rules.md
|
|
809
|
-
| `{{ FIXED_RULES_DENY_LIST }}` | fixed-rules.md
|
|
810
|
-
| `{{ FIXED_RULES_TYPESCRIPT }}` | fixed-rules.md
|
|
811
|
-
| `{{ FIXED_RULES_NAMING }}` | fixed-rules.md
|
|
812
|
-
| `{{ FIXED_RULES_A11Y }}` | fixed-rules.md
|
|
813
|
-
| `{{ FIXED_RULES_PERFORMANCE }}` | fixed-rules.md
|
|
814
|
-
| `{{ FIXED_RULES_AI_BASE }}` | fixed-rules.md
|
|
815
|
-
| `{{ FIXED_RULES_GIT }}` | fixed-rules.md
|
|
816
|
-
| `{{ FIXED_RULES_SECURITY }}` | fixed-rules.md
|
|
779
|
+
| `{{ FIXED_RULES_COMPONENT_CONTRACT }}` | fixed-rules.md I4 | Invariant injection |
|
|
780
|
+
| `{{ FIXED_RULES_I18N_BASELINE }}` | fixed-rules.md I5 | Invariant injection |
|
|
781
|
+
| `{{ FIXED_RULES_ERROR_HANDLING }}` | fixed-rules.md I6 | Invariant injection |
|
|
782
|
+
| `{{ FIXED_RULES_DENY_LIST }}` | fixed-rules.md I3 | Invariant injection |
|
|
783
|
+
| `{{ FIXED_RULES_TYPESCRIPT }}` | fixed-rules.md I1 | Invariant injection |
|
|
784
|
+
| `{{ FIXED_RULES_NAMING }}` | fixed-rules.md I2 | Invariant injection |
|
|
785
|
+
| `{{ FIXED_RULES_A11Y }}` | fixed-rules.md I7 | Invariant injection |
|
|
786
|
+
| `{{ FIXED_RULES_PERFORMANCE }}` | fixed-rules.md I8 | Invariant injection |
|
|
787
|
+
| `{{ FIXED_RULES_AI_BASE }}` | fixed-rules.md I9 | Invariant injection |
|
|
788
|
+
| `{{ FIXED_RULES_GIT }}` | fixed-rules.md I10 | Invariant injection |
|
|
789
|
+
| `{{ FIXED_RULES_SECURITY }}` | fixed-rules.md I11 | Invariant injection |
|
|
817
790
|
| `{{ deny_list_summary }}` | Phase 4 auto-extract all ❌ entries from §1.5/§3/§7.4/§9 | Auto-generated |
|
|
818
791
|
| `{{ recommended_libs }}` | Phase 4 recommend based on framework + style_solution + state_lib | Auto-generated |
|
|
819
792
|
|