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,175 +1,163 @@
|
|
|
1
1
|
# Mobile Rules — {{ project_name }}
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
> Audience:
|
|
5
|
-
>
|
|
6
|
-
> **Usage**:
|
|
7
|
-
> 1. All AI coding assistants must read this file before generating or modifying any mobile code
|
|
8
|
-
> 2. This document takes precedence over "general best practices" in AI training data
|
|
9
|
-
> 3. Code conflicting with this document must not be committed
|
|
3
|
+
> Generated by app-planner Rules Configuration
|
|
4
|
+
> Audience: project contributors and AI coding assistants working on mobile applications
|
|
10
5
|
|
|
11
|
-
|
|
6
|
+
This document contains confirmed mobile decisions. In dual-native mode, platform-specific rules belong to their named profile and never become an unqualified cross-platform requirement.
|
|
12
7
|
|
|
13
|
-
##
|
|
8
|
+
## 1. Decision Ledger
|
|
14
9
|
|
|
15
|
-
|
|
|
16
|
-
|
|
10
|
+
| Domain | Selected Decision |
|
|
11
|
+
|---|---|
|
|
17
12
|
| Platform | {{ platform }} |
|
|
18
|
-
|
|
|
19
|
-
| Architecture
|
|
20
|
-
| UI
|
|
13
|
+
| Minimum OS support | {{ min_os_version }} |
|
|
14
|
+
| Architecture | {{ architecture }} |
|
|
15
|
+
| UI framework | {{ ui_framework }} |
|
|
21
16
|
| Navigation | {{ navigation }} |
|
|
22
|
-
| State
|
|
17
|
+
| State management | {{ state_management }} |
|
|
23
18
|
| Networking | {{ networking }} |
|
|
24
|
-
|
|
|
25
|
-
| Push
|
|
26
|
-
| Background
|
|
27
|
-
|
|
|
28
|
-
| Test
|
|
29
|
-
| Unit
|
|
30
|
-
| E2E
|
|
19
|
+
| Persistence | {{ persistence }} |
|
|
20
|
+
| Push notifications | {{ push_notifications }} |
|
|
21
|
+
| Background work | {{ background_tasks }} |
|
|
22
|
+
| Permission timing | {{ permissions_strategy }} |
|
|
23
|
+
| Test depth | {{ test_coverage }} |
|
|
24
|
+
| Unit test framework | {{ unit_test_framework }} |
|
|
25
|
+
| UI/E2E framework | {{ e2e_framework }} |
|
|
31
26
|
| Distribution | {{ distribution }} |
|
|
32
|
-
| Performance
|
|
33
|
-
| Accessibility
|
|
27
|
+
| Performance | {{ performance_target }} |
|
|
28
|
+
| Accessibility | {{ a11y_target }} |
|
|
34
29
|
|
|
35
|
-
|
|
30
|
+
For dual-native projects, scalar cells summarize the profiles below; they do not replace profile-specific choices.
|
|
36
31
|
|
|
37
|
-
##
|
|
32
|
+
## 2. Platform Profiles
|
|
33
|
+
|
|
34
|
+
{{ platform_profiles }}
|
|
35
|
+
|
|
36
|
+
Single-platform projects render one profile. Dual-native projects render separate `iOS` and `Android` profiles containing UI framework, state management, networking, persistence, unit testing, and UI/E2E testing decisions.
|
|
37
|
+
|
|
38
|
+
## 3. Project Structure and Architecture
|
|
39
|
+
|
|
40
|
+
### 3.1 Platform ownership invariants
|
|
38
41
|
|
|
39
42
|
{{ FIXED_RULES_STRUCTURE }}
|
|
40
43
|
|
|
44
|
+
### 3.2 Selected platform and OS rules
|
|
45
|
+
|
|
41
46
|
{{ tech_stack_rules }}
|
|
42
47
|
|
|
43
|
-
|
|
48
|
+
### 3.3 Selected architecture
|
|
49
|
+
|
|
50
|
+
{{ arch_rules }}
|
|
44
51
|
|
|
45
|
-
##
|
|
52
|
+
## 4. UI and Navigation
|
|
53
|
+
|
|
54
|
+
### 4.1 UI invariants and selected framework
|
|
46
55
|
|
|
47
56
|
{{ FIXED_RULES_UI }}
|
|
48
57
|
|
|
49
58
|
{{ ui_rules }}
|
|
50
59
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## 3. Navigation & Deep Linking
|
|
60
|
+
### 4.2 Navigation
|
|
54
61
|
|
|
55
62
|
{{ FIXED_RULES_NAVIGATION }}
|
|
56
63
|
|
|
57
64
|
{{ navigation_rules }}
|
|
58
65
|
|
|
59
|
-
|
|
66
|
+
A no-deep-link selection suppresses deep-link setup rules and records the accepted limitation explicitly.
|
|
67
|
+
|
|
68
|
+
## 5. State, Networking, and Persistence
|
|
60
69
|
|
|
61
|
-
|
|
70
|
+
### 5.1 State
|
|
62
71
|
|
|
63
72
|
{{ FIXED_RULES_STATE }}
|
|
64
73
|
|
|
65
74
|
{{ state_rules }}
|
|
66
75
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
## 5. Networking
|
|
76
|
+
### 5.2 Networking
|
|
70
77
|
|
|
71
78
|
{{ FIXED_RULES_NETWORKING }}
|
|
72
79
|
|
|
73
80
|
{{ networking_rules }}
|
|
74
81
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
## 6. Data Persistence
|
|
82
|
+
### 5.3 Persistence
|
|
78
83
|
|
|
79
84
|
{{ FIXED_RULES_PERSISTENCE }}
|
|
80
85
|
|
|
81
86
|
{{ persistence_rules }}
|
|
82
87
|
|
|
83
|
-
|
|
88
|
+
In dual-native mode, each derived block is assigned to its platform profile before rendering.
|
|
84
89
|
|
|
85
|
-
##
|
|
90
|
+
## 6. Platform Features
|
|
86
91
|
|
|
87
92
|
{{ FIXED_RULES_PLATFORM_FEATURES }}
|
|
88
93
|
|
|
89
94
|
{{ platform_features_rules }}
|
|
90
95
|
|
|
91
|
-
|
|
96
|
+
Push and background sections are explicit `not applicable` statements when those capabilities are not selected. Permission behavior follows the selected timing decision.
|
|
97
|
+
|
|
98
|
+
## 7. Performance and Accessibility
|
|
92
99
|
|
|
93
|
-
|
|
100
|
+
### 7.1 Performance
|
|
94
101
|
|
|
95
102
|
{{ FIXED_RULES_PERFORMANCE }}
|
|
96
103
|
|
|
97
104
|
{{ performance_rules }}
|
|
98
105
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
## 9. Accessibility
|
|
106
|
+
### 7.2 Accessibility
|
|
102
107
|
|
|
103
108
|
{{ FIXED_RULES_A11Y }}
|
|
104
109
|
|
|
105
110
|
{{ a11y_rules }}
|
|
106
111
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
## 10. Security
|
|
112
|
+
## 8. Security
|
|
110
113
|
|
|
111
114
|
{{ FIXED_RULES_SECURITY }}
|
|
112
115
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
## 11. Testing
|
|
116
|
+
## 9. Testing
|
|
116
117
|
|
|
117
118
|
{{ FIXED_RULES_TEST }}
|
|
118
119
|
|
|
119
120
|
{{ test_rules }}
|
|
120
121
|
|
|
121
|
-
|
|
122
|
+
Only selected test tiers are mandatory. Dual-native test frameworks are stated per profile.
|
|
122
123
|
|
|
123
|
-
##
|
|
124
|
+
## 10. Distribution
|
|
124
125
|
|
|
125
126
|
{{ FIXED_RULES_DISTRIBUTION }}
|
|
126
127
|
|
|
127
128
|
{{ distribution_rules }}
|
|
128
129
|
|
|
129
|
-
|
|
130
|
+
Public-store, enterprise, and undecided distribution rules are mutually exclusive unless the user explicitly selects multiple channels.
|
|
130
131
|
|
|
131
|
-
##
|
|
132
|
+
## 11. AI Change Permissions
|
|
132
133
|
|
|
133
|
-
###
|
|
134
|
+
### 11.1 Invariant change safety
|
|
134
135
|
|
|
135
136
|
{{ FIXED_RULES_AI_BASE }}
|
|
136
137
|
|
|
137
|
-
###
|
|
138
|
-
|
|
139
|
-
- **Adding dependencies**: {{ ai_dependency_rule }}
|
|
140
|
-
- **Modifying shared code**: {{ ai_breaking_change_rule }}
|
|
141
|
-
- **Platform-specific code**: {{ ai_platform_rule }}
|
|
142
|
-
|
|
143
|
-
### 13.3 Mandatory Pre-Actions (before every code generation)
|
|
144
|
-
|
|
145
|
-
AI must complete the following in order before generating or modifying any mobile code:
|
|
138
|
+
### 11.2 Selected permissions
|
|
146
139
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
4. If modifying navigation routes or deep link schemes, assess all entry points
|
|
140
|
+
- Dependency changes: {{ ai_dependency_rule }}
|
|
141
|
+
- Shared-code impact analysis: {{ ai_breaking_change_rule }}
|
|
142
|
+
- Platform-specific flexibility: {{ ai_platform_rule }}
|
|
151
143
|
|
|
152
|
-
|
|
144
|
+
These decisions own their domains for each applicable platform profile.
|
|
153
145
|
|
|
154
|
-
##
|
|
155
|
-
|
|
156
|
-
{{ arch_rules }}
|
|
157
|
-
|
|
158
|
-
---
|
|
159
|
-
|
|
160
|
-
## Appendix A: Deny List (Quick Reference)
|
|
161
|
-
|
|
162
|
-
> This appendix is auto-generated by AI in Phase 4 by extracting all forbidden entries from each section.
|
|
146
|
+
## Appendix A: Active Deny List
|
|
163
147
|
|
|
164
148
|
{{ deny_list_summary }}
|
|
165
149
|
|
|
166
|
-
|
|
150
|
+
Include only prohibitions from active invariant and selected blocks.
|
|
167
151
|
|
|
168
|
-
|
|
152
|
+
## Appendix B: Compatible Recommendations
|
|
169
153
|
|
|
170
154
|
{{ recommended_libs }}
|
|
171
155
|
|
|
172
|
-
|
|
156
|
+
Recommendations must match the active platform profile and dependency-permission decision.
|
|
157
|
+
|
|
158
|
+
## Source Contract
|
|
173
159
|
|
|
174
|
-
|
|
175
|
-
|
|
160
|
+
- Owner: app-planner Rules Configuration
|
|
161
|
+
- Resource family: `references/rules/mobile/`
|
|
162
|
+
- Regenerate after a decision or source-contract change.
|
|
163
|
+
- Generation metadata value: {{ generated_at }}
|
|
@@ -1,77 +1,145 @@
|
|
|
1
|
-
# Rules Configuration —
|
|
1
|
+
# Rules Configuration — Contract and Procedure
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Configure optional per-layer development rules during app planning without mixing unconditional invariants with user-owned technology or workflow decisions.
|
|
4
|
+
|
|
5
|
+
## Design Contract
|
|
6
|
+
|
|
7
|
+
Rules Configuration uses four resource roles per layer:
|
|
8
|
+
|
|
9
|
+
1. `question-manifest.json` — structural contract: question order, conditions, placeholders, fallback policy, and multi-profile behavior.
|
|
10
|
+
2. `question-bank.md` — user-facing decision wording and recommended options.
|
|
11
|
+
3. `fixed-rules.md` — invariant safety and correctness principles only.
|
|
12
|
+
4. `derivation-rules.md` — rules owned by selected technologies, practices, permissions, and explicit defaults.
|
|
13
|
+
5. `template.md` — output layout; it contains no hidden decision that can override a confirmed answer.
|
|
14
|
+
|
|
15
|
+
**Selected-decision precedence:** when a selected or explicitly authorized default conflicts with an unconditional rule, the selected decision wins and the unconditional content is invalid. Fix the source resources and rerun validation; never emit both rules.
|
|
16
|
+
|
|
17
|
+
**Fixed-rule boundary:** a rule is invariant only when it remains correct for every option the layer exposes. Framework choice, architecture, API style, database model, test depth, dependency permission, deployment topology, localization strategy, navigation capability, and performance target are decision-owned and must not be placed in `fixed-rules.md`.
|
|
4
18
|
|
|
5
19
|
## Step 1: Detect Layers
|
|
6
20
|
|
|
7
21
|
- Prefer `.prizmkit/config.json` `tech_stack` when present.
|
|
8
22
|
- Otherwise infer layers from project files:
|
|
9
|
-
- frontend:
|
|
10
|
-
- backend:
|
|
11
|
-
- database: migrations, ORM
|
|
12
|
-
- mobile: Flutter
|
|
13
|
-
- Present detected layers
|
|
23
|
+
- frontend: browser UI framework, bundler, or frontend package indicators;
|
|
24
|
+
- backend: service framework, API entrypoint, or server runtime indicators;
|
|
25
|
+
- database: schema, migrations, ORM, query, or database dependency indicators;
|
|
26
|
+
- mobile: Flutter, React Native, iOS, Android, or native project indicators.
|
|
27
|
+
- Present detected layers through the current host's structured-choice capability when available; otherwise ask the same concise question in chat and wait for explicit input.
|
|
28
|
+
- Include `Skip rules configuration` as a non-blocking option.
|
|
14
29
|
|
|
15
30
|
## Step 2: Choose Configuration Mode
|
|
16
31
|
|
|
17
|
-
|
|
18
|
-
- Full mode asks every manifest group in order.
|
|
19
|
-
- Skip mode records no rules file for that layer and continues without reminders.
|
|
32
|
+
Present three modes:
|
|
20
33
|
|
|
21
|
-
|
|
34
|
+
- **Quick** — ask only manifest groups marked `quick_mode: true`; use the question bank's recommended option for every remaining applicable question.
|
|
35
|
+
- **Full** — ask every applicable manifest group in order.
|
|
36
|
+
- **Skip** — create no rule file for that layer and continue without reminders.
|
|
22
37
|
|
|
23
|
-
|
|
24
|
-
- Do not ask users to type letter shortcuts such as `A` or `1`; those shortcuts are legacy notation in question banks only.
|
|
25
|
-
- Every non-essential question includes a skip/defer option.
|
|
38
|
+
Quick mode is explicit authorization to apply the concrete recommended meanings for unasked applicable questions. Record the resulting decisions, not the phrase `use recommendations`. If a question has no single recommendation for the selected technology or prior answer, Quick mode must ask it rather than guess.
|
|
26
39
|
|
|
27
|
-
## Step
|
|
28
|
-
|
|
29
|
-
For each selected layer
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
40
|
+
## Step 3: Load and Validate Resources
|
|
41
|
+
|
|
42
|
+
For each selected layer:
|
|
43
|
+
|
|
44
|
+
1. Read:
|
|
45
|
+
- `${SKILL_DIR}/references/rules/<layer>/question-manifest.json`
|
|
46
|
+
- `${SKILL_DIR}/references/rules/<layer>/question-bank.md`
|
|
47
|
+
- `${SKILL_DIR}/references/rules/<layer>/fixed-rules.md`
|
|
48
|
+
- `${SKILL_DIR}/references/rules/<layer>/derivation-rules.md`
|
|
49
|
+
- `${SKILL_DIR}/references/rules/<layer>/template.md`
|
|
50
|
+
2. Run the deterministic resource validator before asking questions:
|
|
51
|
+
```bash
|
|
52
|
+
python3 ${SKILL_DIR}/scripts/validate-rules-configuration.py \
|
|
53
|
+
--rules-root ${SKILL_DIR}/references/rules
|
|
54
|
+
```
|
|
55
|
+
3. If the manifest, question bank, fixed injection map, derivation fallback contract, or template placeholders drift, fail generation. Do not trust one source and continue because an incomplete rule document is worse than no rule document.
|
|
56
|
+
|
|
57
|
+
## Step 4: Ask and Normalize Decisions
|
|
58
|
+
|
|
59
|
+
- Ask one manifest group at a time, with at most three questions per interaction.
|
|
60
|
+
- Use the current host's structured-choice capability when available. A named platform tool is an implementation example, not part of this protocol.
|
|
61
|
+
- Every non-essential question includes a skip/defer option.
|
|
62
|
+
- Do not require letter shortcuts. Question-bank labels such as `A` and `B` are internal matching aids only.
|
|
63
|
+
- Resolve every answer to a complete semantic decision immediately.
|
|
64
|
+
- Track each question as one of:
|
|
65
|
+
- `answered`;
|
|
66
|
+
- `quick_default_authorized`;
|
|
67
|
+
- `auto_derived`;
|
|
68
|
+
- `conditionally_not_applicable`;
|
|
69
|
+
- `explicitly_deferred`.
|
|
70
|
+
- Never copy raw answer text, turns, question IDs, option labels, recommendation markers, or answer-map syntax into secondary outputs. Pass only normalized semantic values to rendering and review.
|
|
71
|
+
|
|
72
|
+
### Conditional Questions
|
|
73
|
+
|
|
74
|
+
- `required_if` false means the question is not applicable.
|
|
75
|
+
- `auto_derived_when` true means the complete semantic answer is derived from an earlier decision.
|
|
76
|
+
- `options_vary_by` changes the option set but never authorizes guessing.
|
|
77
|
+
- For Mobile `Q1 == E`, follow `multi_profile_contract`: collect the listed dimensions separately for iOS and Android and render both profiles. A scalar answer must never overwrite the other platform's decision.
|
|
78
|
+
|
|
79
|
+
## Step 5: Derive Rule Blocks
|
|
80
|
+
|
|
81
|
+
Apply derivation rules after all applicable decisions are normalized:
|
|
82
|
+
|
|
83
|
+
1. Match a normalized decision to a named derivation block.
|
|
84
|
+
2. If a pre-authored block exists, use it only for the matching option and compatible prior decisions.
|
|
85
|
+
3. If no pre-authored block exists, apply `SEMANTIC_FALLBACK_POLICY`:
|
|
86
|
+
- state the selected technology or practice;
|
|
87
|
+
- require consistency with its official/current project conventions;
|
|
88
|
+
- preserve detected brownfield behavior unless the user explicitly chose migration;
|
|
89
|
+
- do not import a recommended option's rules;
|
|
90
|
+
- do not leave the placeholder blank.
|
|
91
|
+
4. For `No`, `None`, `Not required`, deferred, or conditionally skipped choices, render an explicit not-applicable or deferred statement. Never leave unexplained empty sections.
|
|
92
|
+
|
|
93
|
+
## Step 6: Conflict Gate
|
|
94
|
+
|
|
95
|
+
Before rendering, build a decision ledger with one owner per policy domain, such as:
|
|
96
|
+
|
|
97
|
+
- frontend localization, dependency permission, caller analysis, config permission, testing depth;
|
|
98
|
+
- backend architecture, API style, authentication, data technology, cache/queue/deployment, observability, testing, AI permissions;
|
|
99
|
+
- database model, identifier strategy, normalization, cache, audit, backup/HA, DDL permission;
|
|
100
|
+
- mobile platform profile, navigation, platform features, testing, distribution, performance, AI permissions.
|
|
101
|
+
|
|
102
|
+
Check every fixed and derived rule against the ledger:
|
|
103
|
+
|
|
104
|
+
- Fixed content may constrain only invariant safety/correctness.
|
|
105
|
+
- Derived content may constrain only the option that owns the domain.
|
|
106
|
+
- A selected `none` or `not required` decision suppresses incompatible requirement blocks.
|
|
107
|
+
- Cross-layer references must agree on shared decisions; report disagreement instead of choosing silently.
|
|
108
|
+
- If two active rules require incompatible behavior, fail generation, identify both source blocks, repair the source/decision state, and rerun the gate.
|
|
109
|
+
|
|
110
|
+
## Step 7: Render and Validate
|
|
111
|
+
|
|
112
|
+
1. Fill every template placeholder from the manifest categories:
|
|
113
|
+
- `from_questions` — normalized decisions and compatible derivation blocks;
|
|
114
|
+
- `from_fixed_rules` — invariant-only blocks;
|
|
115
|
+
- `auto_generated` — bounded summaries, deny lists, recommendations, and platform profiles;
|
|
116
|
+
- `metadata` — project identity and scope.
|
|
117
|
+
2. Recommendations are non-binding and must not contradict the decision ledger.
|
|
118
|
+
3. Scan the rendered document:
|
|
119
|
+
- no residual `{{ ... }}`;
|
|
120
|
+
- no raw answer tokens or dialogue provenance;
|
|
121
|
+
- no blank policy section without an explicit not-applicable statement;
|
|
122
|
+
- no duplicate policy domain with conflicting requirements;
|
|
123
|
+
- no platform-specific source-of-truth path;
|
|
124
|
+
- no reference to a retired independent layer-rules skill.
|
|
125
|
+
4. Run the app-planner Pre-Generation Headless Context Completeness Gate on every generated rule.
|
|
126
|
+
5. Write `.prizmkit/rules/<layer>-rules.md` only after all checks pass.
|
|
127
|
+
|
|
128
|
+
## Step 8: Update `root.prizm`
|
|
129
|
+
|
|
130
|
+
- Ensure `.prizmkit/prizm-docs/root.prizm` has a concise `RULES:` pointer to configured rule files.
|
|
131
|
+
- If `root.prizm` exists, update only the `RULES:` line.
|
|
132
|
+
- If absent, create only the minimal valid root plus the `RULES:` pointer allowed by the parent Skill.
|
|
133
|
+
- Do not write architecture decisions, project brief content, temporal metadata, or changelog content into `root.prizm`.
|
|
134
|
+
|
|
135
|
+
## Completion Evidence
|
|
136
|
+
|
|
137
|
+
Report:
|
|
138
|
+
|
|
139
|
+
- configured and skipped layers;
|
|
140
|
+
- mode used per layer;
|
|
141
|
+
- explicitly selected, quick-authorized, deferred, and not-applicable decisions;
|
|
142
|
+
- deterministic resource validation result;
|
|
143
|
+
- conflict-gate result;
|
|
144
|
+
- rendered files and residual-placeholder check;
|
|
145
|
+
- `root.prizm` pointer result.
|