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
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
+
## SEMANTIC_FALLBACK_POLICY
|
|
16
|
+
|
|
17
|
+
Every confirmed option is valid input even when no pre-authored block exists. Render unmatched choices as complete datastore-specific rules using current official and detected project conventions, without borrowing a recommended alternative's SQL, topology, backup, or permission policy. Render `no cache`, `no audit`, deferred, development-only, and conditionally skipped decisions explicitly; never leave placeholders blank.
|
|
18
|
+
|
|
19
|
+
Validate all active blocks against the decision ledger. Datastore model, identifier strategy, normalization/document modeling, backup/availability, and AI execution permissions each have one owner. Incompatible combinations fail generation and return to clarification.
|
|
15
20
|
|
|
16
21
|
## Phase 2 Normalized Semantic Fill Table
|
|
17
22
|
|
|
@@ -49,6 +54,7 @@ Resolve each selected option or custom reply into the complete semantic value sh
|
|
|
49
54
|
| Q1 = SQLite | `D-SQLITE-01` | `{{ tech_rules }}` |
|
|
50
55
|
| Q2 = Redis | `D-REDIS-BACKEND-01` | `{{ cache_rules }}` |
|
|
51
56
|
| Q2 = Memcached | `D-MEMCACHED-DB-01` | `{{ cache_rules }}` |
|
|
57
|
+
| Q3 = Native ObjectId | `D-MONGO-ID-01` | `{{ schema_rules }}` |
|
|
52
58
|
| Q3 = UUID v7 | `D-UUID-01` | `{{ schema_rules }}` |
|
|
53
59
|
| Q3 = ULID | `D-ULID-01` | `{{ schema_rules }}` |
|
|
54
60
|
| Q3 = Auto-increment + UUID mapping | `D-AUTOINC-01` | `{{ schema_rules }}` |
|
|
@@ -142,6 +148,13 @@ Resolve each selected option or custom reply into the complete semantic value sh
|
|
|
142
148
|
- No persistence — data lost on restart. Only cache data that can be regenerated from the database.
|
|
143
149
|
- Client sharding across multiple memcached instances via consistent hashing.
|
|
144
150
|
|
|
151
|
+
### D-MONGO-ID-01
|
|
152
|
+
**Trigger**: Q1 = MongoDB and Q3 = Native ObjectId | **Inject into**: `{{ schema_rules }}`
|
|
153
|
+
|
|
154
|
+
- Use MongoDB `_id` with native ObjectId semantics as the document identity unless a confirmed integration requires another stable public identifier.
|
|
155
|
+
- If public URLs must not expose `_id`, add an explicit opaque public identifier; do not imply relational auto-increment mapping.
|
|
156
|
+
- References and indexes use the selected identifier type consistently.
|
|
157
|
+
|
|
145
158
|
### D-UUID-01
|
|
146
159
|
**Trigger**: Q3 = UUID v7 | **Inject into**: `{{ schema_rules }}`
|
|
147
160
|
|
|
@@ -160,25 +173,24 @@ Resolve each selected option or custom reply into the complete semantic value sh
|
|
|
160
173
|
### D-AUTOINC-01
|
|
161
174
|
**Trigger**: Q3 = Auto-increment + UUID mapping | **Inject into**: `{{ schema_rules }}`
|
|
162
175
|
|
|
163
|
-
-
|
|
164
|
-
-
|
|
165
|
-
-
|
|
176
|
+
- Use the selected datastore's monotonic numeric identity mechanism for the internal key and a separate UUID for external identity.
|
|
177
|
+
- Define one authoritative mapping between the two identifiers and index the external UUID uniquely.
|
|
178
|
+
- External contracts expose the UUID, not the internal sequence value.
|
|
166
179
|
|
|
167
180
|
### D-DIRECT-AUTOINC-01
|
|
168
181
|
**Trigger**: Q3 = Direct auto-increment | **Inject into**: `{{ schema_rules }}`
|
|
169
182
|
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
- Auto-increment IDs must be BIGINT (never INT for production tables expected to grow).
|
|
183
|
+
- Use the selected datastore's direct monotonic numeric identity mechanism.
|
|
184
|
+
- This option's declared external-reference limitation remains active: do not expose sequence values through public URLs or contracts; add an opaque identifier if an external reference is later required.
|
|
185
|
+
- Select numeric width from projected lifetime cardinality and datastore capability rather than a universal type name.
|
|
174
186
|
|
|
175
187
|
### D-SOFTDELETE-01
|
|
176
188
|
**Trigger**: Q4 = deleted_at | **Inject into**: `{{ schema_rules }}`
|
|
177
189
|
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
190
|
+
- Persist a nullable deletion marker using the selected datastore's appropriate timestamp or state representation for models that participate in soft deletion.
|
|
191
|
+
- Default active-record access paths exclude deleted records, while authorized recovery/audit paths opt in explicitly.
|
|
192
|
+
- Uniqueness applies to active records. Use a partial unique index where supported; otherwise use the datastore's supported generated-key, scoped-key, or transactional strategy.
|
|
193
|
+
- Retention, restoration, legal erasure, and archival behavior come from the data lifecycle and sensitivity decisions.
|
|
182
194
|
|
|
183
195
|
### D-3NF-01
|
|
184
196
|
**Trigger**: Q5 = Strict 3NF | **Inject into**: `{{ schema_rules }}`
|
|
@@ -189,134 +201,123 @@ Resolve each selected option or custom reply into the complete semantic value sh
|
|
|
189
201
|
### D-PARTIAL-DENORM-01
|
|
190
202
|
**Trigger**: Q5 = Allow partial denormalization | **Inject into**: `{{ schema_rules }}`
|
|
191
203
|
|
|
192
|
-
-
|
|
193
|
-
-
|
|
194
|
-
-
|
|
204
|
+
- Permit denormalization only for a named access path with evidence that the normalized model does not meet it.
|
|
205
|
+
- Document the authoritative source, consistency mechanism, reconciliation behavior, and accepted staleness for each duplicated value.
|
|
206
|
+
- Keep write amplification and concurrency behavior within the selected workload objective.
|
|
195
207
|
|
|
196
208
|
### D-ORM-MIGRATE-01
|
|
197
209
|
**Trigger**: Q6 = ORM built-in | **Inject into**: `{{ migration_rules }}`
|
|
198
210
|
|
|
199
|
-
-
|
|
200
|
-
-
|
|
201
|
-
- Version
|
|
202
|
-
- Test migrations on a staging database before deployment.
|
|
211
|
+
- Use the selected ORM's supported migration workflow as the authoritative schema/model history.
|
|
212
|
+
- Follow that tool's rules for generated versus editable migrations; do not impose another tool's file convention.
|
|
213
|
+
- Version changes and verify forward compatibility plus the selected rollback/recovery path in an isolated representative environment before production.
|
|
203
214
|
|
|
204
215
|
### D-FLYWAY-01
|
|
205
216
|
**Trigger**: Q6 = Standalone tool | **Inject into**: `{{ migration_rules }}`
|
|
206
217
|
|
|
207
|
-
- Use
|
|
208
|
-
-
|
|
209
|
-
-
|
|
218
|
+
- Use the explicitly selected standalone migration tool and its native ordering, checksum, and recovery conventions.
|
|
219
|
+
- Keep applied migrations immutable and reject duplicate or regressing versions where the tool uses ordered versions.
|
|
220
|
+
- A down migration is required only when safe and supported; otherwise document forward repair or restore behavior.
|
|
210
221
|
|
|
211
222
|
### D-MANUAL-MIGRATE-01
|
|
212
223
|
**Trigger**: Q6 = Manual SQL files | **Inject into**: `{{ migration_rules }}`
|
|
213
224
|
|
|
214
|
-
-
|
|
215
|
-
- Each
|
|
216
|
-
-
|
|
225
|
+
- Store ordered, immutable SQL migration files under one documented project convention.
|
|
226
|
+
- Each change states prerequisites, forward effect, compatibility window, data transformation, operational risk, and safe recovery behavior.
|
|
227
|
+
- Do not promise an exact rollback for destructive or irreversible transformations; use backup/restore or forward repair when that is the truthful strategy.
|
|
217
228
|
|
|
218
229
|
### D-OLTP-01
|
|
219
230
|
**Trigger**: Q7 = OLTP | **Inject into**: `{{ performance_rules }}`
|
|
220
231
|
|
|
221
|
-
-
|
|
222
|
-
-
|
|
223
|
-
-
|
|
224
|
-
- Connection pool config: `pool_size = CPU cores × 2`. Max wait time ≤ 30s.
|
|
232
|
+
- Optimize for frequent bounded reads/writes and short atomic operations.
|
|
233
|
+
- Set slow-operation, transaction, and client-concurrency thresholds from the confirmed service objective and observed datastore capacity.
|
|
234
|
+
- Full scans are acceptable only for demonstrably bounded datasets or maintenance paths; verify critical access paths with the datastore profiler.
|
|
225
235
|
|
|
226
236
|
### D-OLAP-01
|
|
227
237
|
**Trigger**: Q7 = OLAP | **Inject into**: `{{ performance_rules }}`
|
|
228
238
|
|
|
229
|
-
-
|
|
230
|
-
-
|
|
231
|
-
-
|
|
232
|
-
- Forbid running DDL during OLAP query execution.
|
|
239
|
+
- Optimize for analytical scans, aggregation, and batch throughput using capabilities of the selected datastore.
|
|
240
|
+
- Choose pre-aggregation, materialized views, columnar paths, or batch windows only from measured query patterns.
|
|
241
|
+
- Coordinate structural changes and heavy analytical work through documented resource and maintenance boundaries.
|
|
233
242
|
|
|
234
243
|
### D-MIXED-01
|
|
235
244
|
**Trigger**: Q7 = Mixed | **Inject into**: `{{ performance_rules }}`
|
|
236
245
|
|
|
237
|
-
-
|
|
238
|
-
-
|
|
239
|
-
-
|
|
240
|
-
- Forbid running DDL during OLAP query execution windows.
|
|
246
|
+
- Classify transactional and analytical access paths separately and give each a confirmed service objective.
|
|
247
|
+
- Isolate analytical load through replicas, warehouses, materialized data, or scheduling only when compatible with the selected availability topology and consistency needs.
|
|
248
|
+
- Document resource contention and refresh/staleness behavior for shared infrastructure.
|
|
241
249
|
|
|
242
250
|
### D-PARTITION-01
|
|
243
251
|
**Trigger**: Q8 = > 10M rows | **Inject into**: `{{ performance_rules }}`
|
|
244
252
|
|
|
245
|
-
-
|
|
246
|
-
-
|
|
247
|
-
-
|
|
253
|
+
- Evaluate partitioning or sharding from measured access paths, retention, write distribution, and operational support; scale alone does not force time partitioning.
|
|
254
|
+
- When partitioning is selected, choose a key that enables pruning without creating hotspots and test cross-partition operations.
|
|
255
|
+
- Archival and partition retirement follow the selected retention and backup rules.
|
|
248
256
|
|
|
249
257
|
### D-MEDIUM-SCALE-01
|
|
250
258
|
**Trigger**: Q8 = 1M-10M rows | **Inject into**: `{{ performance_rules }}`
|
|
251
259
|
|
|
252
|
-
-
|
|
253
|
-
-
|
|
254
|
-
-
|
|
255
|
-
- Archival strategy: identify cold data (> 90 days untouched) and plan archival path.
|
|
260
|
+
- Record projected growth and monitor size plus critical access paths.
|
|
261
|
+
- Reserve a partitioning strategy only when workload evidence identifies a viable key and benefit; do not add speculative columns or trigger at a universal row count.
|
|
262
|
+
- Run datastore-specific index maintenance and archival from observed health and selected retention policy.
|
|
256
263
|
|
|
257
264
|
### D-PII-01
|
|
258
265
|
**Trigger**: Q9 = Contains PII | **Inject into**: `{{ security_rules }}`
|
|
259
266
|
|
|
260
|
-
-
|
|
261
|
-
- Passwords use
|
|
262
|
-
-
|
|
263
|
-
-
|
|
264
|
-
- GDPR "right to be forgotten": user data deletion must be true deletion (or irreversible anonymization), not soft delete.
|
|
267
|
+
- Classify sensitive fields and identify applicable legal, contractual, and product obligations before selecting controls.
|
|
268
|
+
- Passwords use a current password-hashing construction and are never reversibly encrypted; reversible sensitive fields use authenticated encryption or an approved managed boundary when required.
|
|
269
|
+
- Redact sensitive values from query/slow logs and protect exports and backups according to their classification.
|
|
270
|
+
- Erasure, anonymization, retention, and soft deletion follow the applicable obligation; do not claim one jurisdiction universally.
|
|
265
271
|
|
|
266
272
|
### D-AUDIT-01
|
|
267
273
|
**Trigger**: Q10 = Audit tables | **Inject into**: `{{ audit_rules }}`
|
|
268
274
|
|
|
269
|
-
-
|
|
270
|
-
-
|
|
271
|
-
-
|
|
272
|
-
- Audit tables are partitioned and periodically archived.
|
|
275
|
+
- Define audited entities, operations, actor attribution, before/after data policy, tamper resistance, access, and retention from the audit requirement.
|
|
276
|
+
- Implement through datastore audit features, append-only records, triggers, or the application boundary according to the selected technology and trust model.
|
|
277
|
+
- Use datastore-appropriate types; do not inject PostgreSQL JSONB or table-per-entity design into every datastore.
|
|
273
278
|
|
|
274
279
|
### D-CDC-01
|
|
275
280
|
**Trigger**: Q10 = CDC | **Inject into**: `{{ audit_rules }}`
|
|
276
281
|
|
|
277
|
-
-
|
|
278
|
-
-
|
|
279
|
-
-
|
|
282
|
+
- Select a CDC mechanism supported by the datastore or managed service and state snapshot, ordering, schema-change, offset, and duplicate-delivery behavior.
|
|
283
|
+
- Route change events through the separately selected transport; CDC does not implicitly authorize Kafka or any message queue.
|
|
284
|
+
- Make connector failure observable and define recovery without corrupting or blocking the primary write path.
|
|
280
285
|
|
|
281
286
|
### D-CLOUD-01
|
|
282
287
|
**Trigger**: Q11 = Cloud managed | **Inject into**: `{{ ops_rules }}`
|
|
283
288
|
|
|
284
|
-
-
|
|
285
|
-
-
|
|
286
|
-
-
|
|
287
|
-
- Upgrade windows set during low-traffic periods.
|
|
289
|
+
- Use the selected managed service's private-network and identity controls and encrypt remote connections.
|
|
290
|
+
- Configure backup strictly from Q12 and availability/failover strictly from Q13; managed deployment alone enables neither policy implicitly.
|
|
291
|
+
- Choose upgrade and maintenance behavior from the confirmed availability objective and provider capability.
|
|
288
292
|
|
|
289
293
|
### D-SELFHOST-01
|
|
290
294
|
**Trigger**: Q11 = Self-hosted | **Inject into**: `{{ ops_rules }}`
|
|
291
295
|
|
|
292
|
-
-
|
|
293
|
-
-
|
|
294
|
-
-
|
|
295
|
-
- Regular recovery drills (at least quarterly).
|
|
296
|
+
- Keep the datastore off the public internet and restrict administrative and runtime identities separately.
|
|
297
|
+
- Monitor capacity, connections, and slow operations; monitor replication only when Q13 selected a replicated topology.
|
|
298
|
+
- Implement backups and recovery verification strictly from Q12 rather than enabling them as a hidden self-hosting default.
|
|
296
299
|
|
|
297
300
|
### D-DOCKER-DEV-01
|
|
298
301
|
**Trigger**: Q11 = Development environment Docker Compose | **Inject into**: `{{ ops_rules }}`
|
|
299
302
|
|
|
300
|
-
- Docker Compose
|
|
301
|
-
-
|
|
302
|
-
-
|
|
303
|
-
-
|
|
303
|
+
- Docker Compose is the selected local development boundary; production deployment remains a separate decision.
|
|
304
|
+
- Persist database data through an explicit development volume unless an ephemeral reset was requested.
|
|
305
|
+
- Commit the Compose definition when repository policy allows it. Include only selected services; a cache service appears only when Q2 selected one.
|
|
306
|
+
- Configure health checks and dependency readiness for services that participate in the selected topology.
|
|
304
307
|
|
|
305
308
|
### D-PITR-01
|
|
306
309
|
**Trigger**: Q12 = Daily full + continuous incremental | **Inject into**: `{{ ops_rules }}`
|
|
307
310
|
|
|
308
|
-
-
|
|
309
|
-
-
|
|
310
|
-
-
|
|
311
|
-
- Backups retained for 30 days, stored offsite.
|
|
311
|
+
- Enable the selected datastore or managed service's continuous log/journal backup mechanism in addition to daily full backups.
|
|
312
|
+
- Record the required RPO, RTO, retention, encryption, and independent storage boundary before production generation; do not invent numeric objectives.
|
|
313
|
+
- Verify that one restore can reach a chosen point between full backups and capture the evidence.
|
|
312
314
|
|
|
313
315
|
### D-FULL-BACKUP-01
|
|
314
316
|
**Trigger**: Q12 = Daily full backup only | **Inject into**: `{{ ops_rules }}`
|
|
315
317
|
|
|
316
|
-
-
|
|
317
|
-
-
|
|
318
|
-
-
|
|
319
|
-
- Recovery drill: monthly restore test from latest backup.
|
|
318
|
+
- Run one full backup per day through the selected datastore or managed service mechanism.
|
|
319
|
+
- Record retention, encryption, storage independence, and restore-verification cadence from product and compliance needs.
|
|
320
|
+
- Without continuous change-log backup, the accepted recovery point may lose changes since the latest successful full backup; state that risk explicitly.
|
|
320
321
|
|
|
321
322
|
### D-NO-BACKUP-01
|
|
322
323
|
**Trigger**: Q12 = No automatic backup needed | **Inject into**: `{{ ops_rules }}`
|
|
@@ -328,33 +329,32 @@ Resolve each selected option or custom reply into the complete semantic value sh
|
|
|
328
329
|
### D-REPLICA-01
|
|
329
330
|
**Trigger**: Q13 = Primary-replica | **Inject into**: `{{ ops_rules }}`
|
|
330
331
|
|
|
331
|
-
-
|
|
332
|
-
-
|
|
333
|
-
-
|
|
334
|
-
-
|
|
332
|
+
- Configure the selected managed-failover or primary-replica topology and document its consistency behavior.
|
|
333
|
+
- Route reads to replicas only when stale reads are acceptable and the application has an explicit read-routing boundary; failover alone does not imply read/write splitting.
|
|
334
|
+
- Monitor replication/failover health against the selected availability objective and verify recovery at an approved cadence.
|
|
335
|
+
- Size client pools from topology and datastore capacity rather than a universal primary/replica ratio.
|
|
335
336
|
|
|
336
337
|
### D-SINGLE-01
|
|
337
338
|
**Trigger**: Q13 = Single instance is sufficient | **Inject into**: `{{ ops_rules }}`
|
|
338
339
|
|
|
339
|
-
-
|
|
340
|
-
-
|
|
341
|
-
-
|
|
342
|
-
- Connection pool sized for one instance. No read/write split needed.
|
|
340
|
+
- Use one database instance with no database-level failover.
|
|
341
|
+
- Record the accepted outage and recovery risk; do not invent a default maintenance window.
|
|
342
|
+
- Size clients for one instance and do not create replica routing.
|
|
343
343
|
|
|
344
344
|
### D-MULTIMASTER-01
|
|
345
345
|
**Trigger**: Q13 = Multi-master cluster | **Inject into**: `{{ ops_rules }}`
|
|
346
346
|
|
|
347
|
-
-
|
|
348
|
-
-
|
|
349
|
-
-
|
|
350
|
-
-
|
|
347
|
+
- Use only a datastore-supported multi-writer topology and state its consistency and partition behavior.
|
|
348
|
+
- Choose and test conflict resolution for the affected business invariants; do not assume last-write-wins is safe.
|
|
349
|
+
- The selected identifier strategy must remain collision-safe across writers; apply datastore-supported allocation only when auto-generated numeric IDs were selected.
|
|
350
|
+
- Route clients using the supported topology driver or service boundary rather than hand-built load balancing by default.
|
|
351
351
|
|
|
352
352
|
### D-AI-DDL-AUDIT-01
|
|
353
353
|
**Trigger**: Q14 = Migration only | **Inject into**: `{{ ai_ddl_rule }}`
|
|
354
354
|
|
|
355
|
-
- AI may generate migration
|
|
356
|
-
- Each
|
|
357
|
-
-
|
|
355
|
+
- AI may generate changes through the selected migration mechanism but must not execute them.
|
|
356
|
+
- Each generated change states forward behavior, compatibility/rollback or recovery behavior, data transformation, and lock/rewrite or equivalent operational risk where applicable.
|
|
357
|
+
- The generated migration or model change must be reviewed before execution.
|
|
358
358
|
|
|
359
359
|
### D-AI-DDL-FORBID-01
|
|
360
360
|
**Trigger**: Q14 = Fully forbid | **Inject into**: `{{ ai_ddl_rule }}`
|
|
@@ -366,9 +366,9 @@ Resolve each selected option or custom reply into the complete semantic value sh
|
|
|
366
366
|
### D-AI-DDL-FREE-01
|
|
367
367
|
**Trigger**: Q14 = Free operation | **Inject into**: `{{ ai_ddl_rule }}`
|
|
368
368
|
|
|
369
|
-
- AI may
|
|
370
|
-
- All DDL changes
|
|
371
|
-
-
|
|
369
|
+
- AI may generate DDL and may execute it only in an explicitly identified disposable development environment under the separately selected safety-confirmation policy.
|
|
370
|
+
- All DDL changes remain version-controlled through the selected migration mechanism.
|
|
371
|
+
- This permission never applies to shared, staging, or production data and must be narrowed before deployment.
|
|
372
372
|
|
|
373
373
|
### D-AI-SAFETY-STRICT-01
|
|
374
374
|
**Trigger**: Q15 = Forbid destructive | **Inject into**: `{{ ai_safety_rule }}`
|