@pareto4/pp-core 1.17.1 → 1.19.0

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.
Files changed (199) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +5 -3
  3. package/agents/pp-code-fixer.md +9 -16
  4. package/agents/pp-code-reviewer.md +2 -78
  5. package/agents/pp-codebase-mapper.md +3 -0
  6. package/agents/pp-debugger.md +3 -2
  7. package/agents/pp-executor.md +25 -30
  8. package/agents/pp-integration-checker.md +1 -0
  9. package/agents/pp-phase-researcher.md +3 -1
  10. package/agents/pp-plan-checker.md +3 -0
  11. package/agents/pp-planner.md +16 -12
  12. package/agents/pp-research-synthesizer.md +1 -1
  13. package/agents/pp-ui-auditor.md +1 -0
  14. package/agents/pp-ui-researcher.md +3 -1
  15. package/agents/pp-vault-reviewer.md +43 -189
  16. package/agents/pp-verifier.md +10 -8
  17. package/commands/pp-add-tests.md +1 -1
  18. package/commands/pp-debug.md +1 -0
  19. package/commands/pp-init.md +4 -3
  20. package/commands/pp-ns-manage.md +1 -1
  21. package/commands/pp-ns-review.md +1 -1
  22. package/commands/pp-quick.md +3 -0
  23. package/commands/pp-review-backlog.md +2 -1
  24. package/commands/pp-vault-promote.md +7 -8
  25. package/commands/pp-vault-review.md +6 -7
  26. package/gemini-extension.json +1 -1
  27. package/package.json +3 -6
  28. package/pp-core/bin/lib/capability-registry.cjs +15 -357
  29. package/pp-core/bin/lib/capability-state.cjs +15 -79
  30. package/pp-core/bin/lib/capability-writer.cjs +2 -16
  31. package/pp-core/bin/lib/check-command-router.cjs +342 -2298
  32. package/pp-core/bin/lib/clusters.cjs +2 -2
  33. package/pp-core/bin/lib/commands.cjs +79 -4
  34. package/pp-core/bin/lib/compose-bindings.cjs +99 -16
  35. package/pp-core/bin/lib/config.cjs +3 -6
  36. package/pp-core/bin/lib/discovery-rollup.cjs +9 -6
  37. package/pp-core/bin/lib/discovery-screens.cjs +20 -2
  38. package/pp-core/bin/lib/discovery-sweep.cjs +12 -3
  39. package/pp-core/bin/lib/discovery-vault-check.cjs +37 -3
  40. package/pp-core/bin/lib/git-base-branch.cjs +10 -13
  41. package/pp-core/bin/lib/git-provider.cjs +5 -6
  42. package/pp-core/bin/lib/init-contract.cjs +55 -42
  43. package/pp-core/bin/lib/init-interactive.cjs +6 -20
  44. package/pp-core/bin/lib/io.cjs +2 -8
  45. package/pp-core/bin/lib/loop-resolver.cjs +8 -32
  46. package/pp-core/bin/lib/org-profile.cjs +16 -92
  47. package/pp-core/bin/lib/vault-command-router.cjs +174 -1206
  48. package/pp-core/bin/lib/vault-coordinates.cjs +4 -4
  49. package/pp-core/bin/lib/vault-index.cjs +44 -74
  50. package/pp-core/bin/lib/vault-seal.cjs +37 -122
  51. package/pp-core/bin/lib/vault-standards-promote.cjs +577 -0
  52. package/pp-core/bin/lib/vault-standards-review.cjs +293 -0
  53. package/pp-core/bin/lib/vault-standards.cjs +15 -16
  54. package/pp-core/bin/lib/vault-trace.cjs +40 -3016
  55. package/pp-core/bin/lib/vault-update.cjs +5 -26
  56. package/pp-core/bin/lib/vault.cjs +122 -316
  57. package/pp-core/bin/pp-tools.cjs +15 -36
  58. package/pp-core/org-profile.json +1 -1
  59. package/pp-core/references/autonomous-best-effort.md +4 -3
  60. package/pp-core/references/autonomous-lifecycle.md +1 -0
  61. package/pp-core/references/autonomous-smart-discuss.md +5 -1
  62. package/pp-core/references/discovery-id-conventions.md +35 -2
  63. package/pp-core/references/execute-mvp-tdd.md +3 -3
  64. package/pp-core/references/git-integration.md +57 -33
  65. package/pp-core/references/git-planning-commit.md +31 -9
  66. package/pp-core/references/phase-argument-parsing.md +1 -0
  67. package/pp-core/references/planner-gap-closure.md +1 -0
  68. package/pp-core/references/planner-revision.md +3 -1
  69. package/pp-core/references/planner-tdd.md +4 -4
  70. package/pp-core/references/planner-vault-standards.md +16 -25
  71. package/pp-core/references/planning-config.md +3 -3
  72. package/pp-core/references/shell-portability.md +28 -0
  73. package/pp-core/references/tdd.md +20 -16
  74. package/pp-core/references/worktree-path-safety.md +1 -0
  75. package/pp-core/templates/README.md +1 -1
  76. package/pp-core/templates/VAULT-REVIEW.md +24 -170
  77. package/pp-core/templates/milestone.md +5 -5
  78. package/pp-core/workflows/add-backlog.md +1 -1
  79. package/pp-core/workflows/add-tests.md +8 -5
  80. package/pp-core/workflows/add-todo.md +3 -1
  81. package/pp-core/workflows/ai-integration-phase.md +2 -1
  82. package/pp-core/workflows/audit-fix.md +7 -6
  83. package/pp-core/workflows/audit-milestone.md +1 -0
  84. package/pp-core/workflows/autonomous.md +6 -0
  85. package/pp-core/workflows/check-todos.md +2 -1
  86. package/pp-core/workflows/cleanup.md +3 -1
  87. package/pp-core/workflows/code-review-fix.md +15 -8
  88. package/pp-core/workflows/code-review.md +16 -58
  89. package/pp-core/workflows/complete-milestone.md +13 -3
  90. package/pp-core/workflows/debug.md +4 -2
  91. package/pp-core/workflows/diagnose-issues.md +1 -1
  92. package/pp-core/workflows/discovery-sprint/prototype.md +2 -2
  93. package/pp-core/workflows/discovery-sprint/session-13-gates.md +1 -1
  94. package/pp-core/workflows/discovery-sprint/sessions/01-kick-off.md +51 -7
  95. package/pp-core/workflows/discovery-sprint/sessions/02-as-is.md +5 -3
  96. package/pp-core/workflows/discovery-sprint/sessions/03-to-be.md +10 -8
  97. package/pp-core/workflows/discovery-sprint/sessions/04-ux-design.md +11 -2
  98. package/pp-core/workflows/discovery-sprint/sessions/05-architecture.md +5 -5
  99. package/pp-core/workflows/discovery-sprint/sessions/06-security.md +3 -3
  100. package/pp-core/workflows/discovery-sprint/sessions/07-identity.md +2 -2
  101. package/pp-core/workflows/discovery-sprint/sessions/08-integration.md +14 -2
  102. package/pp-core/workflows/discovery-sprint/sessions/09-qa.md +2 -2
  103. package/pp-core/workflows/discovery-sprint/sessions/10-infrastructure.md +10 -10
  104. package/pp-core/workflows/discovery-sprint/sessions/11-roadmap.md +11 -8
  105. package/pp-core/workflows/discovery-sprint/sessions/12-delivery-model.md +21 -18
  106. package/pp-core/workflows/discovery-sprint/sessions/13-wrap-up.md +5 -3
  107. package/pp-core/workflows/discovery-sprint/templates/context-template.md +9 -3
  108. package/pp-core/workflows/discovery-sprint/vault-context.md +17 -12
  109. package/pp-core/workflows/discovery-sprint.md +11 -8
  110. package/pp-core/workflows/discovery-to-build/steps/architecture-deliverables.md +1 -0
  111. package/pp-core/workflows/discuss-phase-assumptions.md +5 -3
  112. package/pp-core/workflows/discuss-phase.md +8 -3
  113. package/pp-core/workflows/docs-update.md +1 -0
  114. package/pp-core/workflows/eval-review.md +2 -1
  115. package/pp-core/workflows/execute-phase/steps/check-query-gate.md +13 -14
  116. package/pp-core/workflows/execute-phase/steps/cross-ai-delegation.md +1 -0
  117. package/pp-core/workflows/execute-phase/steps/execute-pre-dispatch.md +5 -25
  118. package/pp-core/workflows/execute-phase/steps/per-plan-worktree-gate.md +1 -0
  119. package/pp-core/workflows/execute-phase/steps/vault-fetch.md +18 -6
  120. package/pp-core/workflows/execute-phase/steps/vault-load-gate.md +6 -109
  121. package/pp-core/workflows/execute-phase/steps/verify-post-gate.md +1 -17
  122. package/pp-core/workflows/execute-phase.md +21 -12
  123. package/pp-core/workflows/execute-plan.md +24 -15
  124. package/pp-core/workflows/explore.md +1 -1
  125. package/pp-core/workflows/forensics.md +4 -2
  126. package/pp-core/workflows/health.md +1 -0
  127. package/pp-core/workflows/help/modes/full.md +1 -1
  128. package/pp-core/workflows/import.md +2 -1
  129. package/pp-core/workflows/ingest-docs.md +1 -0
  130. package/pp-core/workflows/init/steps/client-context-capture.md +1 -0
  131. package/pp-core/workflows/init/steps/github-provisioning.md +145 -0
  132. package/pp-core/workflows/init/steps/gitlab-provisioning.md +18 -4
  133. package/pp-core/workflows/init/steps/reachability-outcome.md +3 -1
  134. package/pp-core/workflows/init.md +56 -66
  135. package/pp-core/workflows/map-codebase.md +5 -1
  136. package/pp-core/workflows/milestone-summary.md +2 -1
  137. package/pp-core/workflows/mvp-phase.md +1 -0
  138. package/pp-core/workflows/new-milestone.md +9 -5
  139. package/pp-core/workflows/new-project.md +9 -8
  140. package/pp-core/workflows/new-workspace.md +1 -0
  141. package/pp-core/workflows/next.md +2 -1
  142. package/pp-core/workflows/pause-work.md +6 -4
  143. package/pp-core/workflows/plan-milestone-gaps.md +3 -1
  144. package/pp-core/workflows/plan-phase/steps/chunked-planning.md +1 -1
  145. package/pp-core/workflows/plan-phase.md +21 -6
  146. package/pp-core/workflows/plan-review-convergence.md +2 -0
  147. package/pp-core/workflows/plant-seed.md +4 -2
  148. package/pp-core/workflows/pr-branch.md +2 -0
  149. package/pp-core/workflows/progress.md +5 -0
  150. package/pp-core/workflows/quick.md +19 -12
  151. package/pp-core/workflows/reapply-patches.md +3 -0
  152. package/pp-core/workflows/remove-phase.md +1 -1
  153. package/pp-core/workflows/resume-project.md +3 -0
  154. package/pp-core/workflows/review.md +7 -1
  155. package/pp-core/workflows/secure-phase.md +2 -1
  156. package/pp-core/workflows/session-report.md +1 -0
  157. package/pp-core/workflows/ship.md +8 -1
  158. package/pp-core/workflows/sketch-wrap-up.md +1 -1
  159. package/pp-core/workflows/sketch.md +3 -2
  160. package/pp-core/workflows/spec-phase.md +2 -1
  161. package/pp-core/workflows/spike-wrap-up.md +1 -1
  162. package/pp-core/workflows/spike.md +4 -3
  163. package/pp-core/workflows/sync-skills.md +5 -2
  164. package/pp-core/workflows/thread.md +3 -2
  165. package/pp-core/workflows/transition.md +6 -0
  166. package/pp-core/workflows/ui-phase.md +3 -1
  167. package/pp-core/workflows/ui-review.md +2 -1
  168. package/pp-core/workflows/ultraplan-phase.md +1 -0
  169. package/pp-core/workflows/undo.md +14 -10
  170. package/pp-core/workflows/update.md +5 -0
  171. package/pp-core/workflows/validate-phase.md +9 -6
  172. package/pp-core/workflows/vault-review.md +65 -186
  173. package/pp-core/workflows/vault-write-back.md +78 -110
  174. package/pp-core/workflows/verify-phase.md +5 -0
  175. package/pp-core/workflows/verify-work.md +9 -2
  176. package/scripts/gen-capability-registry.cjs +12 -93
  177. package/scripts/lint-test-file-count.allowlist.json +1 -19
  178. package/scripts/lint-test-file-count.cjs +5 -6
  179. package/scripts/prompt-injection-scan.sh +1 -4
  180. package/scripts/sync-runtime-launcher.cjs +115 -5
  181. package/pp-core/bin/lib/practices-review-check.cjs +0 -944
  182. package/pp-core/bin/lib/vault-audit.cjs +0 -2594
  183. package/pp-core/bin/lib/vault-mode.cjs +0 -235
  184. package/pp-core/bin/lib/vault-practices.cjs +0 -2057
  185. package/pp-core/bin/lib/vault-review.cjs +0 -2102
  186. package/pp-core/bin/lib/vault-write-back.cjs +0 -905
  187. package/pp-core/references/planner-vault-practices.md +0 -95
  188. package/pp-core/references/practice-arithmetic-contract.md +0 -121
  189. package/pp-core/references/verifier-practice-verdicts.md +0 -263
  190. package/pp-core/templates/practices/README.md +0 -248
  191. package/pp-core/templates/practices/error-handling.md +0 -18
  192. package/pp-core/templates/practices/minimal-comments.md +0 -14
  193. package/pp-core/templates/practices/naming-convention.md +0 -18
  194. package/pp-core/templates/practices/practice-template.md +0 -23
  195. package/pp-core/workflows/execute-phase/steps/verifier-practice-payload.md +0 -165
  196. package/scripts/gen-practice-arithmetic-contract.cjs +0 -412
  197. package/scripts/practice-arithmetic-contract.allow.json +0 -35
  198. package/scripts/record-vault-mode-golden.cjs +0 -89
  199. package/scripts/vault-calibrate.cjs +0 -996
@@ -1,235 +0,0 @@
1
- "use strict";
2
- /**
3
- * src/vault-mode.cts — the vault mode vocabulary (Vault Assurance v1.2,
4
- * Phase 13-03, D-23).
5
- *
6
- * ADR-457 build-at-publish: this TypeScript file is the SOURCE OF TRUTH. It
7
- * compiles to the git-ignored `pp-core/bin/lib/vault-mode.cjs`; do NOT
8
- * hand-edit the compiled output. Behaviour is locked by
9
- * `tests/vault-mode.test.cjs`.
10
- *
11
- * `vault.mode` selects which vault shape governs a project: `practices` (the
12
- * v1.0/v1.1 practice-file matcher, check audit, review and write-back — the
13
- * default, byte-identical to 1.15.1) or `standards` (prose standards documents
14
- * indexed by the vault's INDEX.md). This module is the ONE owner of:
15
- * - the config key name and the two literals,
16
- * - the predicates every mode-aware surface uses,
17
- * - the typed reason codes, and
18
- * - every not-applicable / refusal text a parked surface prints.
19
- * A surface that needs to say "not applicable in standards mode" quotes a
20
- * function from here rather than spelling its own sentence, so the wording
21
- * cannot drift between the CLI verb, the gate and the workflow that relays it.
22
- *
23
- * It does NOT resolve the mode. `resolveVaultMode` lives in
24
- * `src/org-profile.cts` beside `resolveVaultRequired` (D-05) and reads the
25
- * project config raw, then the org profile, then `DEFAULT_VAULT_MODE`.
26
- *
27
- * It imports NOTHING project-internal (no node builtins either). This is
28
- * load-bearing: `src/org-profile.cts`, `src/vault.cts`,
29
- * `src/vault-command-router.cts`, `src/check-command-router.cts` and
30
- * `src/vault-write-back.cts` all require it, and a leaf with no dependencies
31
- * cannot close a require cycle among them.
32
- *
33
- * Message discipline (T-13-03): no text here takes or echoes a configured
34
- * value. An unrecognised mode is reported by naming the two allowed literals,
35
- * never by reproducing what was found, so a hand-edited config cannot inject
36
- * terminal escapes or agent-directed prose through the refusal.
37
- */
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.VAULT_MODE_REASON = exports.DEFAULT_VAULT_MODE = exports.VAULT_MODES = exports.VAULT_MODE_CONFIG_KEY = void 0;
40
- exports.isVaultMode = isVaultMode;
41
- exports.isStandardsMode = isStandardsMode;
42
- exports.vaultModeInvalidMessage = vaultModeInvalidMessage;
43
- exports.vaultModeUnresolvedMessage = vaultModeUnresolvedMessage;
44
- exports.vaultModeRefusalMessage = vaultModeRefusalMessage;
45
- exports.notApplicableMatchEnvelope = notApplicableMatchEnvelope;
46
- exports.notApplicableGateEnvelope = notApplicableGateEnvelope;
47
- exports.notApplicableReviewStatement = notApplicableReviewStatement;
48
- exports.notApplicableStandardsVerbMessage = notApplicableStandardsVerbMessage;
49
- exports.notApplicableStandardsVerbEnvelope = notApplicableStandardsVerbEnvelope;
50
- exports.notApplicableTraceVerbMessage = notApplicableTraceVerbMessage;
51
- exports.notApplicableTraceVerbEnvelope = notApplicableTraceVerbEnvelope;
52
- exports.notApplicableManifestVerbMessage = notApplicableManifestVerbMessage;
53
- exports.notApplicableManifestVerbEnvelope = notApplicableManifestVerbEnvelope;
54
- exports.notApplicablePromoteMessage = notApplicablePromoteMessage;
55
- // ─── Vocabulary ──────────────────────────────────────────────────────────────
56
- /** The dotted config key. Every other file references it through this constant. */
57
- exports.VAULT_MODE_CONFIG_KEY = 'vault.mode';
58
- /** The two recognised modes, in declaration order (matches capability.json `values`). */
59
- exports.VAULT_MODES = Object.freeze(['practices', 'standards']);
60
- /** The registered default (capabilities/vault/capability.json `vault.mode.default`). */
61
- exports.DEFAULT_VAULT_MODE = 'practices';
62
- /**
63
- * Machine-stable reason values. Frozen so a typo is a build error rather than
64
- * a refusal that silently reports a different code. `INVALID` equals
65
- * `ERROR_REASON.VAULT_MODE_INVALID` in `src/io.cts`; a test pins the equality
66
- * (this leaf may not import io.cjs, so the two literals are kept apart by
67
- * design and held together by that test).
68
- */
69
- exports.VAULT_MODE_REASON = Object.freeze({
70
- INVALID: 'vault_mode_invalid',
71
- // 13-REVIEW WR-01: the resolver itself failed (a throw, not a bad value).
72
- // Refused exactly like INVALID — never read as the default mode.
73
- UNRESOLVED: 'vault_mode_unresolved',
74
- NOT_APPLICABLE: 'vault_mode_not_applicable',
75
- });
76
- // ─── Predicates ──────────────────────────────────────────────────────────────
77
- /**
78
- * True only for a string whose trimmed form is one of the two literals.
79
- * Case-sensitive: `Practices` is not a mode. Non-strings are never a mode.
80
- */
81
- function isVaultMode(value) {
82
- if (typeof value !== 'string')
83
- return false;
84
- const trimmed = value.trim();
85
- return exports.VAULT_MODES.includes(trimmed);
86
- }
87
- /** True only for the resolved literal `standards`. */
88
- function isStandardsMode(mode) {
89
- return mode === 'standards';
90
- }
91
- // ─── Texts ───────────────────────────────────────────────────────────────────
92
- //
93
- // The not-applicable texts state only what is true in THIS build (13-REVIEW
94
- // WR-03). Phase 13 could not name the standards record, which did not exist
95
- // yet. Phase 15 built it: 15-07's `vault standards block` writes each plan's
96
- // record and 15-08's standards trace gate validates it. So Phase 15 D-22
97
- // rewords each parked text to point at that record and gate, and keeps the
98
- // practices alternative (`config-set vault.mode practices`). The texts spell
99
- // the record's tag and the SUMMARY heading as copies; tests/vault-mode.test.cjs
100
- // holds both copies to the vault-standards leaf, which owns them, and checks
101
- // that every gate point a text names declares a standards trace gate.
102
- /**
103
- * The refusal for an unrecognised `vault.mode`. Names both allowed values and
104
- * where to correct the setting; never takes or echoes the offending value.
105
- *
106
- * Names ONLY the places this refusal can come from (13-REVIEW WR-02): a
107
- * PROJECT value — `resolveVaultMode` level 1 reads the active workstream's
108
- * config.json and then the root `.planning/config.json`. An invalid org-profile
109
- * value never reaches here: it is dropped with a warning (D-09) and the mode
110
- * falls back to the default. The remedy is `config-set`, which writes the
111
- * planning dir's config — the workstream's when one is active — and so
112
- * outranks a bad value in either file.
113
- */
114
- function vaultModeInvalidMessage() {
115
- return ('vault.mode is set to a value this engine does not recognise. ' +
116
- 'Allowed values: practices, standards. ' +
117
- "The value is in the project configuration: .planning/config.json, or the active workstream's " +
118
- 'config.json on a workstream-partitioned project. ' +
119
- 'Set it with `pp-tools config-set vault.mode practices` (or `standards`) and run the command again.');
120
- }
121
- /**
122
- * The refusal when `vault.mode` could not be resolved at all (13-REVIEW WR-01):
123
- * the resolver threw. It is refused exactly like an unrecognised value (D-08)
124
- * — the engine does not know which mode governs the project, so it assumes
125
- * neither. Carries no error text: a message could hold a path or a value.
126
- */
127
- function vaultModeUnresolvedMessage() {
128
- return ('vault.mode could not be resolved: reading the project configuration or the org profile failed. ' +
129
- 'The vault commands and gates refuse rather than assume a mode. ' +
130
- 'Check that the project configuration and the org profile can be read, then run the command again.');
131
- }
132
- /** The refusal text for a `vaultModeVerdict` `ok: false` reason — the ONE chooser every refusing surface asks. */
133
- function vaultModeRefusalMessage(reason) {
134
- return reason === exports.VAULT_MODE_REASON.UNRESOLVED ? vaultModeUnresolvedMessage() : vaultModeInvalidMessage();
135
- }
136
- /**
137
- * Phase 15 D-22: names the standards record (each plan's block) and the verb
138
- * that writes it, in place of Phase 13's interim "not yet recorded" clause.
139
- */
140
- function notApplicableMatchEnvelope() {
141
- return {
142
- status: 'not_applicable',
143
- mode: 'standards',
144
- message: 'vault practices match is not applicable in standards mode (vault.mode = standards): ' +
145
- 'the client vault carries standards documents, not practice files, so no practice is matched; ' +
146
- "the standards record is each plan's `<vault_standards>` block (`vault standards block`). " +
147
- 'To match practice files instead, run `pp-tools config-set vault.mode practices`.',
148
- };
149
- }
150
- /**
151
- * Phase 15 D-22: names the gate that checks the standards record. Both
152
- * surfaces render only at verify:post and ship:pre, where the vault
153
- * capability also declares the standards trace gate (a test reads the
154
- * declarations), so the points this text names are points the gate runs at.
155
- */
156
- function notApplicableGateEnvelope(surface) {
157
- return {
158
- status: 'not_applicable',
159
- block: false,
160
- mode: 'standards',
161
- message: `${surface} is not applicable in standards mode (vault.mode = standards): ` +
162
- 'there is no practice layer to audit; ' +
163
- "the standards `check vault.trace` gate validates each plan's `<vault_standards>` block at verify:post and ship:pre. " +
164
- 'To use the practices checks instead, run `pp-tools config-set vault.mode practices`.',
165
- };
166
- }
167
- /**
168
- * The standards-mode statement of `check vault-review` (D-14). Phase 15 D-22:
169
- * names where standards mode records the consulted documents.
170
- */
171
- function notApplicableReviewStatement() {
172
- return ('Vault review: not applicable in standards mode (vault.mode = standards). ' +
173
- 'No practice was reviewed and no review payload was produced; ' +
174
- "standards mode records the consulted documents in each plan's `<vault_standards>` block " +
175
- "and its SUMMARY's `## Standards Consulted` section. " +
176
- 'To review practices instead, run `pp-tools config-set vault.mode practices`.');
177
- }
178
- /**
179
- * The practices-mode answer of `vault standards block|consulted` (15-07). The
180
- * mirror image of the not-applicable texts above: the standards record verbs
181
- * have nothing to record while the project runs the practices layer. One line,
182
- * names the mode the project is in and the way to switch.
183
- */
184
- function notApplicableStandardsVerbMessage() {
185
- return ('vault standards is not applicable in practices mode (vault.mode = practices): ' +
186
- 'the practices trace records which practice files applied; ' +
187
- 'in standards mode `vault standards block` and `vault standards consulted` record the consulted documents. ' +
188
- 'To record standards documents instead, run `pp-tools config-set vault.mode standards`.');
189
- }
190
- function notApplicableStandardsVerbEnvelope() {
191
- return { status: 'not_applicable', mode: 'practices', message: notApplicableStandardsVerbMessage() };
192
- }
193
- /**
194
- * Quick 261015-ect (QD-15): the standards-mode answer of `vault trace
195
- * scaffold|render`. The practices trace ledger is parked beside `vault
196
- * practices match` (PARK-01): a standards-mode plan carries no practices
197
- * ledger, so none is produced. Fixed text; nothing is interpolated.
198
- */
199
- function notApplicableTraceVerbMessage() {
200
- return ('vault trace is not applicable in standards mode (vault.mode = standards): ' +
201
- 'the practices trace ledger records practice files, and the client vault carries standards documents; ' +
202
- "the standards record is each plan's `<vault_standards>` block (`vault standards block`) " +
203
- "and the SUMMARY's Standards Consulted section (`vault standards consulted`). " +
204
- 'To write practices ledgers instead, run `pp-tools config-set vault.mode practices`.');
205
- }
206
- function notApplicableTraceVerbEnvelope() {
207
- return { status: 'not_applicable', mode: 'standards', message: notApplicableTraceVerbMessage() };
208
- }
209
- /**
210
- * Quick 261015-ect (QD-15): the standards-mode answer of `vault manifest
211
- * start|record`. The range the manifest anchors is read by `vault audit` and
212
- * `check vault.review` (both parked, PARK-02/PARK-04) and by `/pp-undo
213
- * --phase`, which falls back to its git-log search without it.
214
- */
215
- function notApplicableManifestVerbMessage() {
216
- return ('vault manifest is not applicable in standards mode (vault.mode = standards): ' +
217
- 'the phase range it anchors is read by `vault audit` and `check vault.review`, which answer not-applicable in this mode, ' +
218
- 'and by `/pp-undo --phase`, which falls back to its git-log search without it; nothing was written. ' +
219
- 'To use the practices checks instead, run `pp-tools config-set vault.mode practices`.');
220
- }
221
- function notApplicableManifestVerbEnvelope() {
222
- return {
223
- ok: false,
224
- reason: exports.VAULT_MODE_REASON.NOT_APPLICABLE,
225
- status: 'not_applicable',
226
- mode: 'standards',
227
- message: notApplicableManifestVerbMessage(),
228
- };
229
- }
230
- /** The standards-mode refusal of `vault practices promote` (D-14). */
231
- function notApplicablePromoteMessage() {
232
- return ('This practice was not promoted: vault write-back is not applicable in standards mode ' +
233
- '(vault.mode = standards). ' +
234
- 'Standards documents are maintained in the vault repo through its INDEX.md by the vault owner.');
235
- }