@pareto4/pp-core 1.5.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 (618) hide show
  1. package/.claude-plugin/plugin.json +23 -0
  2. package/GEMINI.md +53 -0
  3. package/LICENSE +22 -0
  4. package/README.md +100 -0
  5. package/agents/pp-advisor-researcher.md +108 -0
  6. package/agents/pp-ai-researcher.md +114 -0
  7. package/agents/pp-assumptions-analyzer.md +105 -0
  8. package/agents/pp-code-fixer.md +669 -0
  9. package/agents/pp-code-reviewer.md +387 -0
  10. package/agents/pp-codebase-mapper.md +853 -0
  11. package/agents/pp-debug-session-manager.md +315 -0
  12. package/agents/pp-debugger.md +1453 -0
  13. package/agents/pp-doc-classifier.md +168 -0
  14. package/agents/pp-doc-synthesizer.md +204 -0
  15. package/agents/pp-doc-verifier.md +217 -0
  16. package/agents/pp-doc-writer.md +616 -0
  17. package/agents/pp-domain-researcher.md +147 -0
  18. package/agents/pp-eval-auditor.md +191 -0
  19. package/agents/pp-eval-planner.md +154 -0
  20. package/agents/pp-executor.md +808 -0
  21. package/agents/pp-framework-selector.md +160 -0
  22. package/agents/pp-integration-checker.md +470 -0
  23. package/agents/pp-intel-updater.md +339 -0
  24. package/agents/pp-mempalace-curator.md +47 -0
  25. package/agents/pp-nyquist-auditor.md +204 -0
  26. package/agents/pp-pattern-mapper.md +335 -0
  27. package/agents/pp-phase-researcher.md +867 -0
  28. package/agents/pp-plan-checker.md +988 -0
  29. package/agents/pp-planner.md +1052 -0
  30. package/agents/pp-project-researcher.md +612 -0
  31. package/agents/pp-research-synthesizer.md +260 -0
  32. package/agents/pp-roadmapper.md +741 -0
  33. package/agents/pp-security-auditor.md +156 -0
  34. package/agents/pp-ui-auditor.md +495 -0
  35. package/agents/pp-ui-checker.md +309 -0
  36. package/agents/pp-ui-researcher.md +375 -0
  37. package/agents/pp-user-profiler.md +171 -0
  38. package/agents/pp-verifier.md +967 -0
  39. package/assets/gsd-logo-2000-transparent.png +0 -0
  40. package/assets/gsd-logo-2000-transparent.svg +17 -0
  41. package/assets/gsd-logo-2000.png +0 -0
  42. package/assets/gsd-logo-2000.svg +21 -0
  43. package/assets/terminal.svg +68 -0
  44. package/bin/install.js +12370 -0
  45. package/bin/lib/ui-safety-gate.cjs +107 -0
  46. package/commands/pp-add-tests.md +42 -0
  47. package/commands/pp-ai-integration-phase.md +37 -0
  48. package/commands/pp-audit-fix.md +34 -0
  49. package/commands/pp-audit-milestone.md +37 -0
  50. package/commands/pp-audit-uat.md +24 -0
  51. package/commands/pp-autonomous.md +51 -0
  52. package/commands/pp-capture.md +62 -0
  53. package/commands/pp-cleanup.md +24 -0
  54. package/commands/pp-code-review.md +59 -0
  55. package/commands/pp-complete-milestone.md +143 -0
  56. package/commands/pp-config.md +56 -0
  57. package/commands/pp-debug.md +52 -0
  58. package/commands/pp-discovery.md +34 -0
  59. package/commands/pp-discuss-phase.md +77 -0
  60. package/commands/pp-docs-update.md +49 -0
  61. package/commands/pp-eval-review.md +33 -0
  62. package/commands/pp-execute-phase.md +65 -0
  63. package/commands/pp-explore.md +27 -0
  64. package/commands/pp-extract-learnings.md +23 -0
  65. package/commands/pp-fast.md +31 -0
  66. package/commands/pp-forensics.md +57 -0
  67. package/commands/pp-graphify.md +204 -0
  68. package/commands/pp-health.md +31 -0
  69. package/commands/pp-help.md +28 -0
  70. package/commands/pp-import.md +45 -0
  71. package/commands/pp-inbox.md +39 -0
  72. package/commands/pp-ingest-docs.md +42 -0
  73. package/commands/pp-manager.md +45 -0
  74. package/commands/pp-map-codebase.md +83 -0
  75. package/commands/pp-mempalace-capture.md +71 -0
  76. package/commands/pp-mempalace-recall.md +102 -0
  77. package/commands/pp-milestone-summary.md +51 -0
  78. package/commands/pp-mvp-phase.md +45 -0
  79. package/commands/pp-new-milestone.md +45 -0
  80. package/commands/pp-new-project.md +47 -0
  81. package/commands/pp-ns-context.md +25 -0
  82. package/commands/pp-ns-ideate.md +24 -0
  83. package/commands/pp-ns-manage.md +36 -0
  84. package/commands/pp-ns-project.md +27 -0
  85. package/commands/pp-ns-review.md +29 -0
  86. package/commands/pp-ns-workflow.md +35 -0
  87. package/commands/pp-pause-work.md +43 -0
  88. package/commands/pp-phase.md +56 -0
  89. package/commands/pp-plan-phase.md +63 -0
  90. package/commands/pp-plan-review-convergence.md +60 -0
  91. package/commands/pp-pr-branch.md +26 -0
  92. package/commands/pp-profile-user.md +46 -0
  93. package/commands/pp-progress.md +49 -0
  94. package/commands/pp-quick.md +174 -0
  95. package/commands/pp-resume-work.md +30 -0
  96. package/commands/pp-review-backlog.md +63 -0
  97. package/commands/pp-review.md +42 -0
  98. package/commands/pp-secure-phase.md +36 -0
  99. package/commands/pp-settings.md +29 -0
  100. package/commands/pp-ship.md +24 -0
  101. package/commands/pp-sketch.md +60 -0
  102. package/commands/pp-spec-phase.md +63 -0
  103. package/commands/pp-spike.md +57 -0
  104. package/commands/pp-stats.md +20 -0
  105. package/commands/pp-surface.md +162 -0
  106. package/commands/pp-thread.md +24 -0
  107. package/commands/pp-ui-phase.md +35 -0
  108. package/commands/pp-ui-review.md +33 -0
  109. package/commands/pp-ultraplan-phase.md +34 -0
  110. package/commands/pp-undo.md +35 -0
  111. package/commands/pp-update.md +49 -0
  112. package/commands/pp-validate-phase.md +36 -0
  113. package/commands/pp-verify-work.md +39 -0
  114. package/commands/pp-workspace.md +52 -0
  115. package/commands/pp-workstreams.md +70 -0
  116. package/gemini-extension.json +6 -0
  117. package/hooks/dist/lib/git-cmd.js +150 -0
  118. package/hooks/dist/lib/pp-graphify-rebuild.sh +65 -0
  119. package/hooks/dist/managed-hooks-registry.cjs +39 -0
  120. package/hooks/dist/pp-check-update-worker.js +108 -0
  121. package/hooks/dist/pp-check-update.js +66 -0
  122. package/hooks/dist/pp-config-reload.js +133 -0
  123. package/hooks/dist/pp-context-monitor.js +196 -0
  124. package/hooks/dist/pp-cursor-post-tool.js +75 -0
  125. package/hooks/dist/pp-cursor-session-start.js +52 -0
  126. package/hooks/dist/pp-ensure-canonical-path.js +305 -0
  127. package/hooks/dist/pp-graphify-update.sh +158 -0
  128. package/hooks/dist/pp-phase-boundary.sh +47 -0
  129. package/hooks/dist/pp-prompt-guard.js +97 -0
  130. package/hooks/dist/pp-read-guard.js +101 -0
  131. package/hooks/dist/pp-read-injection-scanner.js +203 -0
  132. package/hooks/dist/pp-session-state.sh +59 -0
  133. package/hooks/dist/pp-statusline.js +566 -0
  134. package/hooks/dist/pp-update-banner.js +138 -0
  135. package/hooks/dist/pp-validate-commit.sh +57 -0
  136. package/hooks/dist/pp-workflow-guard.js +167 -0
  137. package/hooks/dist/pp-worktree-path-guard.js +185 -0
  138. package/hooks/hooks.json +70 -0
  139. package/hooks/lib/git-cmd.js +150 -0
  140. package/hooks/lib/pp-graphify-rebuild.sh +65 -0
  141. package/hooks/managed-hooks-registry.cjs +39 -0
  142. package/hooks/pp-check-update-worker.js +108 -0
  143. package/hooks/pp-check-update.js +66 -0
  144. package/hooks/pp-config-reload.js +133 -0
  145. package/hooks/pp-context-monitor.js +196 -0
  146. package/hooks/pp-cursor-post-tool.js +75 -0
  147. package/hooks/pp-cursor-session-start.js +52 -0
  148. package/hooks/pp-ensure-canonical-path.js +305 -0
  149. package/hooks/pp-graphify-update.sh +158 -0
  150. package/hooks/pp-phase-boundary.sh +47 -0
  151. package/hooks/pp-prompt-guard.js +97 -0
  152. package/hooks/pp-read-guard.js +101 -0
  153. package/hooks/pp-read-injection-scanner.js +203 -0
  154. package/hooks/pp-session-state.sh +59 -0
  155. package/hooks/pp-statusline.js +566 -0
  156. package/hooks/pp-update-banner.js +138 -0
  157. package/hooks/pp-validate-commit.sh +57 -0
  158. package/hooks/pp-workflow-guard.js +167 -0
  159. package/hooks/pp-worktree-path-guard.js +185 -0
  160. package/package.json +125 -0
  161. package/pp-core/bin/check-latest-version.cjs +161 -0
  162. package/pp-core/bin/lib/active-workstream-store.cjs +297 -0
  163. package/pp-core/bin/lib/adr-parser.cjs +399 -0
  164. package/pp-core/bin/lib/agent-command-router.cjs +68 -0
  165. package/pp-core/bin/lib/agent-install-check.cjs +143 -0
  166. package/pp-core/bin/lib/artifacts.cjs +51 -0
  167. package/pp-core/bin/lib/audit-command-router.cjs +61 -0
  168. package/pp-core/bin/lib/audit.cjs +743 -0
  169. package/pp-core/bin/lib/capability-activation.cjs +113 -0
  170. package/pp-core/bin/lib/capability-registry.cjs +3727 -0
  171. package/pp-core/bin/lib/capability-state.cjs +497 -0
  172. package/pp-core/bin/lib/capability-writer.cjs +355 -0
  173. package/pp-core/bin/lib/check-command-router.cjs +800 -0
  174. package/pp-core/bin/lib/cjs-command-router-adapter.cjs +81 -0
  175. package/pp-core/bin/lib/cli-exit.cjs +61 -0
  176. package/pp-core/bin/lib/clock.cjs +95 -0
  177. package/pp-core/bin/lib/clusters.cjs +131 -0
  178. package/pp-core/bin/lib/code-review-flags.cjs +59 -0
  179. package/pp-core/bin/lib/command-aliases.cjs +809 -0
  180. package/pp-core/bin/lib/command-arg-projection.cjs +55 -0
  181. package/pp-core/bin/lib/command-roster.cjs +19 -0
  182. package/pp-core/bin/lib/command-routing-hub.cjs +300 -0
  183. package/pp-core/bin/lib/commands.cjs +1244 -0
  184. package/pp-core/bin/lib/config-loader.cjs +714 -0
  185. package/pp-core/bin/lib/config-schema.cjs +58 -0
  186. package/pp-core/bin/lib/config-types.cjs +20 -0
  187. package/pp-core/bin/lib/config.cjs +796 -0
  188. package/pp-core/bin/lib/configuration.cjs +209 -0
  189. package/pp-core/bin/lib/context-utilization.cjs +48 -0
  190. package/pp-core/bin/lib/core-utils.cjs +198 -0
  191. package/pp-core/bin/lib/decisions.cjs +136 -0
  192. package/pp-core/bin/lib/docs.cjs +264 -0
  193. package/pp-core/bin/lib/drift.cjs +364 -0
  194. package/pp-core/bin/lib/edge-probe.cjs +196 -0
  195. package/pp-core/bin/lib/fallow-runner.cjs +153 -0
  196. package/pp-core/bin/lib/federated-config.cjs +182 -0
  197. package/pp-core/bin/lib/frontmatter.cjs +494 -0
  198. package/pp-core/bin/lib/gap-checker.cjs +260 -0
  199. package/pp-core/bin/lib/git-base-branch.cjs +220 -0
  200. package/pp-core/bin/lib/graphify-command-router.cjs +72 -0
  201. package/pp-core/bin/lib/graphify.cjs +472 -0
  202. package/pp-core/bin/lib/gsd2-import.cjs +456 -0
  203. package/pp-core/bin/lib/init-command-router.cjs +62 -0
  204. package/pp-core/bin/lib/init.cjs +1912 -0
  205. package/pp-core/bin/lib/install-profiles.cjs +814 -0
  206. package/pp-core/bin/lib/installer-migration-authoring.cjs +122 -0
  207. package/pp-core/bin/lib/installer-migration-report.cjs +351 -0
  208. package/pp-core/bin/lib/installer-migrations/000-first-time-baseline.cjs +225 -0
  209. package/pp-core/bin/lib/installer-migrations/001-legacy-orphan-files.cjs +48 -0
  210. package/pp-core/bin/lib/installer-migrations/002-codex-legacy-hooks-json.cjs +94 -0
  211. package/pp-core/bin/lib/installer-migrations/003-rename-get-shit-done-to-gsd-core.cjs +108 -0
  212. package/pp-core/bin/lib/installer-migrations/004-prune-stale-pristine-snapshots.cjs +123 -0
  213. package/pp-core/bin/lib/installer-migrations/005-rename-gsd-core-to-pp-core.cjs +109 -0
  214. package/pp-core/bin/lib/installer-migrations/006-rename-gsd-command-namespace.cjs +135 -0
  215. package/pp-core/bin/lib/installer-migrations.cjs +823 -0
  216. package/pp-core/bin/lib/intel-command-router.cjs +119 -0
  217. package/pp-core/bin/lib/intel.cjs +584 -0
  218. package/pp-core/bin/lib/io.cjs +220 -0
  219. package/pp-core/bin/lib/learnings.cjs +270 -0
  220. package/pp-core/bin/lib/legacy-cleanup.cjs +253 -0
  221. package/pp-core/bin/lib/loop-host-contract.cjs +105 -0
  222. package/pp-core/bin/lib/loop-resolver.cjs +479 -0
  223. package/pp-core/bin/lib/milestone.cjs +381 -0
  224. package/pp-core/bin/lib/model-catalog.cjs +154 -0
  225. package/pp-core/bin/lib/model-profiles.cjs +24 -0
  226. package/pp-core/bin/lib/model-resolver.cjs +467 -0
  227. package/pp-core/bin/lib/observability/event.cjs +51 -0
  228. package/pp-core/bin/lib/observability/logger.cjs +146 -0
  229. package/pp-core/bin/lib/observability/redaction.cjs +48 -0
  230. package/pp-core/bin/lib/package-identity.cjs +35 -0
  231. package/pp-core/bin/lib/package-legitimacy.cjs +368 -0
  232. package/pp-core/bin/lib/phase-command-router.cjs +209 -0
  233. package/pp-core/bin/lib/phase-id.cjs +213 -0
  234. package/pp-core/bin/lib/phase-lifecycle.cjs +74 -0
  235. package/pp-core/bin/lib/phase-locator.cjs +145 -0
  236. package/pp-core/bin/lib/phase.cjs +1446 -0
  237. package/pp-core/bin/lib/phases-command-router.cjs +43 -0
  238. package/pp-core/bin/lib/plan-drift-guard.cjs +117 -0
  239. package/pp-core/bin/lib/plan-scan.cjs +91 -0
  240. package/pp-core/bin/lib/planning-workspace.cjs +245 -0
  241. package/pp-core/bin/lib/probe-core.cjs +402 -0
  242. package/pp-core/bin/lib/profile-output.cjs +1164 -0
  243. package/pp-core/bin/lib/profile-pipeline-command-router.cjs +138 -0
  244. package/pp-core/bin/lib/profile-pipeline.cjs +519 -0
  245. package/pp-core/bin/lib/prohibition-enforcement.cjs +660 -0
  246. package/pp-core/bin/lib/project-root.cjs +119 -0
  247. package/pp-core/bin/lib/prompt-budget.cjs +305 -0
  248. package/pp-core/bin/lib/research-provider.cjs +137 -0
  249. package/pp-core/bin/lib/research-store.cjs +167 -0
  250. package/pp-core/bin/lib/review-reviewer-selection.cjs +121 -0
  251. package/pp-core/bin/lib/roadmap-command-router.cjs +166 -0
  252. package/pp-core/bin/lib/roadmap-parser.cjs +456 -0
  253. package/pp-core/bin/lib/roadmap-upgrade.cjs +476 -0
  254. package/pp-core/bin/lib/roadmap.cjs +738 -0
  255. package/pp-core/bin/lib/runtime-artifact-conversion.cjs +1966 -0
  256. package/pp-core/bin/lib/runtime-artifact-layout.cjs +342 -0
  257. package/pp-core/bin/lib/runtime-config-adapter-registry.cjs +103 -0
  258. package/pp-core/bin/lib/runtime-homes.cjs +272 -0
  259. package/pp-core/bin/lib/runtime-hooks-surface.cjs +1460 -0
  260. package/pp-core/bin/lib/runtime-name-policy.cjs +97 -0
  261. package/pp-core/bin/lib/runtime-slash.cjs +137 -0
  262. package/pp-core/bin/lib/schema-detect.cjs +159 -0
  263. package/pp-core/bin/lib/secrets.cjs +34 -0
  264. package/pp-core/bin/lib/security.cjs +480 -0
  265. package/pp-core/bin/lib/semver-compare.cjs +42 -0
  266. package/pp-core/bin/lib/shell-command-projection.cjs +550 -0
  267. package/pp-core/bin/lib/state-command-router.cjs +172 -0
  268. package/pp-core/bin/lib/state-document.cjs +312 -0
  269. package/pp-core/bin/lib/state.cjs +2587 -0
  270. package/pp-core/bin/lib/surface.cjs +505 -0
  271. package/pp-core/bin/lib/task-command-router.cjs +85 -0
  272. package/pp-core/bin/lib/teams-status.cjs +74 -0
  273. package/pp-core/bin/lib/template.cjs +246 -0
  274. package/pp-core/bin/lib/uat-predicate.cjs +329 -0
  275. package/pp-core/bin/lib/uat.cjs +359 -0
  276. package/pp-core/bin/lib/ui-safety-gate.cjs +98 -0
  277. package/pp-core/bin/lib/update-context.cjs +221 -0
  278. package/pp-core/bin/lib/validate-command-router.cjs +91 -0
  279. package/pp-core/bin/lib/validate.cjs +122 -0
  280. package/pp-core/bin/lib/verification-command-router.cjs +31 -0
  281. package/pp-core/bin/lib/verification.cjs +196 -0
  282. package/pp-core/bin/lib/verify-command-router.cjs +44 -0
  283. package/pp-core/bin/lib/verify.cjs +1932 -0
  284. package/pp-core/bin/lib/workstream-inventory-builder.cjs +81 -0
  285. package/pp-core/bin/lib/workstream-inventory.cjs +147 -0
  286. package/pp-core/bin/lib/workstream-name-policy.cjs +91 -0
  287. package/pp-core/bin/lib/workstream.cjs +386 -0
  288. package/pp-core/bin/lib/worktree-base-ref.cjs +350 -0
  289. package/pp-core/bin/lib/worktree-safety.cjs +985 -0
  290. package/pp-core/bin/pp-tools.cjs +2239 -0
  291. package/pp-core/bin/pp_run +20 -0
  292. package/pp-core/bin/shared/config-defaults.manifest.json +97 -0
  293. package/pp-core/bin/shared/config-schema.manifest.json +176 -0
  294. package/pp-core/bin/shared/model-catalog.json +160 -0
  295. package/pp-core/bin/shared/runtime-aliases.manifest.json +79 -0
  296. package/pp-core/bin/verify-reapply-patches.cjs +400 -0
  297. package/pp-core/contexts/dev.md +21 -0
  298. package/pp-core/contexts/research.md +22 -0
  299. package/pp-core/contexts/review.md +23 -0
  300. package/pp-core/references/agent-contracts.md +79 -0
  301. package/pp-core/references/ai-evals.md +156 -0
  302. package/pp-core/references/ai-frameworks.md +186 -0
  303. package/pp-core/references/artifact-types.md +131 -0
  304. package/pp-core/references/autonomous-smart-discuss.md +277 -0
  305. package/pp-core/references/checkpoints.md +814 -0
  306. package/pp-core/references/common-bug-patterns.md +114 -0
  307. package/pp-core/references/context-budget.md +85 -0
  308. package/pp-core/references/continuation-format.md +253 -0
  309. package/pp-core/references/debugger-philosophy.md +76 -0
  310. package/pp-core/references/decimal-phase-calculation.md +64 -0
  311. package/pp-core/references/doc-conflict-engine.md +91 -0
  312. package/pp-core/references/domain-probes.md +125 -0
  313. package/pp-core/references/edge-probe-fixtures/01-round-half-even/expected-coverage.json +7 -0
  314. package/pp-core/references/edge-probe-fixtures/01-round-half-even/requirements.json +1 -0
  315. package/pp-core/references/edge-probe-fixtures/02-merge-intervals/expected-coverage.json +8 -0
  316. package/pp-core/references/edge-probe-fixtures/02-merge-intervals/requirements.json +1 -0
  317. package/pp-core/references/edge-probe-fixtures/03-truncate-graphemes/expected-coverage.json +7 -0
  318. package/pp-core/references/edge-probe-fixtures/03-truncate-graphemes/requirements.json +1 -0
  319. package/pp-core/references/edge-probe-fixtures/04-money-rounding/expected-coverage.json +7 -0
  320. package/pp-core/references/edge-probe-fixtures/04-money-rounding/requirements.json +1 -0
  321. package/pp-core/references/edge-probe-fixtures/05-list-dedupe/expected-coverage.json +8 -0
  322. package/pp-core/references/edge-probe-fixtures/05-list-dedupe/requirements.json +1 -0
  323. package/pp-core/references/edge-probe-fixtures/06-resolved-mixed/expected-coverage.json +8 -0
  324. package/pp-core/references/edge-probe-fixtures/06-resolved-mixed/requirements.json +1 -0
  325. package/pp-core/references/edge-probe-fixtures/06-resolved-mixed/resolutions.json +4 -0
  326. package/pp-core/references/edge-probe.md +272 -0
  327. package/pp-core/references/execute-mvp-tdd.md +81 -0
  328. package/pp-core/references/executor-examples.md +110 -0
  329. package/pp-core/references/few-shot-examples/plan-checker.md +73 -0
  330. package/pp-core/references/few-shot-examples/verifier.md +109 -0
  331. package/pp-core/references/gate-prompts.md +100 -0
  332. package/pp-core/references/gates.md +70 -0
  333. package/pp-core/references/git-integration.md +298 -0
  334. package/pp-core/references/git-planning-commit.md +40 -0
  335. package/pp-core/references/ios-scaffold.md +123 -0
  336. package/pp-core/references/loop-hook-dispatch.md +61 -0
  337. package/pp-core/references/mandatory-initial-read.md +2 -0
  338. package/pp-core/references/model-profile-resolution.md +38 -0
  339. package/pp-core/references/model-profiles.md +245 -0
  340. package/pp-core/references/mvp-concepts.md +49 -0
  341. package/pp-core/references/phase-argument-parsing.md +61 -0
  342. package/pp-core/references/planner-antipatterns.md +176 -0
  343. package/pp-core/references/planner-chunked.md +49 -0
  344. package/pp-core/references/planner-gap-closure.md +62 -0
  345. package/pp-core/references/planner-graphify-auto-update.md +67 -0
  346. package/pp-core/references/planner-guidance.md +186 -0
  347. package/pp-core/references/planner-human-verify-mode.md +57 -0
  348. package/pp-core/references/planner-interface-context.md +62 -0
  349. package/pp-core/references/planner-load-graph-context.md +36 -0
  350. package/pp-core/references/planner-mvp-mode.md +53 -0
  351. package/pp-core/references/planner-reviews.md +42 -0
  352. package/pp-core/references/planner-revision.md +87 -0
  353. package/pp-core/references/planner-source-audit.md +73 -0
  354. package/pp-core/references/planning-config.md +477 -0
  355. package/pp-core/references/prohibition-probe-fixtures/01-streak-reminder/expected.json +14 -0
  356. package/pp-core/references/prohibition-probe-fixtures/02-clean-utility/expected.json +4 -0
  357. package/pp-core/references/prohibition-probe-fixtures/03-multi-prohibition/expected.json +32 -0
  358. package/pp-core/references/prohibition-probe.md +326 -0
  359. package/pp-core/references/project-skills-discovery.md +19 -0
  360. package/pp-core/references/questioning.md +162 -0
  361. package/pp-core/references/research-documentation-lookup.md +29 -0
  362. package/pp-core/references/research-philosophy.md +29 -0
  363. package/pp-core/references/research-verification-protocol.md +27 -0
  364. package/pp-core/references/revision-loop.md +97 -0
  365. package/pp-core/references/scout-codebase.md +51 -0
  366. package/pp-core/references/skeleton-template.md +48 -0
  367. package/pp-core/references/sketch-interactivity.md +41 -0
  368. package/pp-core/references/sketch-theme-system.md +94 -0
  369. package/pp-core/references/sketch-tooling.md +45 -0
  370. package/pp-core/references/sketch-variant-patterns.md +81 -0
  371. package/pp-core/references/spidr-splitting.md +69 -0
  372. package/pp-core/references/tdd.md +330 -0
  373. package/pp-core/references/thinking-models-debug.md +44 -0
  374. package/pp-core/references/thinking-models-execution.md +50 -0
  375. package/pp-core/references/thinking-models-planning.md +62 -0
  376. package/pp-core/references/thinking-models-research.md +50 -0
  377. package/pp-core/references/thinking-models-verification.md +55 -0
  378. package/pp-core/references/thinking-partner.md +96 -0
  379. package/pp-core/references/ui-brand.md +162 -0
  380. package/pp-core/references/universal-anti-patterns.md +63 -0
  381. package/pp-core/references/user-profiling.md +681 -0
  382. package/pp-core/references/user-story-template.md +58 -0
  383. package/pp-core/references/verification-overrides.md +227 -0
  384. package/pp-core/references/verification-patterns.md +612 -0
  385. package/pp-core/references/verify-mvp-mode.md +85 -0
  386. package/pp-core/references/workstream-flag.md +111 -0
  387. package/pp-core/references/worktree-branch-check.md +44 -0
  388. package/pp-core/references/worktree-path-safety.md +67 -0
  389. package/pp-core/templates/AI-SPEC.md +246 -0
  390. package/pp-core/templates/DEBUG.md +169 -0
  391. package/pp-core/templates/README.md +77 -0
  392. package/pp-core/templates/SECURITY.md +61 -0
  393. package/pp-core/templates/UAT.md +265 -0
  394. package/pp-core/templates/UI-SPEC.md +100 -0
  395. package/pp-core/templates/VALIDATION.md +76 -0
  396. package/pp-core/templates/claude-md.md +145 -0
  397. package/pp-core/templates/codebase/architecture.md +255 -0
  398. package/pp-core/templates/codebase/concerns.md +310 -0
  399. package/pp-core/templates/codebase/conventions.md +307 -0
  400. package/pp-core/templates/codebase/integrations.md +280 -0
  401. package/pp-core/templates/codebase/stack.md +186 -0
  402. package/pp-core/templates/codebase/structure.md +285 -0
  403. package/pp-core/templates/codebase/testing.md +480 -0
  404. package/pp-core/templates/config.json +62 -0
  405. package/pp-core/templates/context.md +352 -0
  406. package/pp-core/templates/continue-here.md +78 -0
  407. package/pp-core/templates/copilot-instructions.md +7 -0
  408. package/pp-core/templates/debug-subagent-prompt.md +91 -0
  409. package/pp-core/templates/dev-preferences.md +21 -0
  410. package/pp-core/templates/discovery.md +146 -0
  411. package/pp-core/templates/discussion-log.md +63 -0
  412. package/pp-core/templates/milestone-archive.md +123 -0
  413. package/pp-core/templates/milestone.md +115 -0
  414. package/pp-core/templates/phase-prompt.md +610 -0
  415. package/pp-core/templates/planner-subagent-prompt.md +117 -0
  416. package/pp-core/templates/project.md +203 -0
  417. package/pp-core/templates/requirements.md +231 -0
  418. package/pp-core/templates/research-project/ARCHITECTURE.md +204 -0
  419. package/pp-core/templates/research-project/FEATURES.md +147 -0
  420. package/pp-core/templates/research-project/PITFALLS.md +200 -0
  421. package/pp-core/templates/research-project/STACK.md +120 -0
  422. package/pp-core/templates/research-project/SUMMARY.md +170 -0
  423. package/pp-core/templates/research.md +592 -0
  424. package/pp-core/templates/retrospective.md +54 -0
  425. package/pp-core/templates/roadmap.md +202 -0
  426. package/pp-core/templates/spec.md +333 -0
  427. package/pp-core/templates/state.md +195 -0
  428. package/pp-core/templates/summary-complex.md +60 -0
  429. package/pp-core/templates/summary-minimal.md +42 -0
  430. package/pp-core/templates/summary-standard.md +49 -0
  431. package/pp-core/templates/summary.md +249 -0
  432. package/pp-core/templates/user-profile.md +146 -0
  433. package/pp-core/templates/user-setup.md +311 -0
  434. package/pp-core/templates/verification-report.md +335 -0
  435. package/pp-core/workflows/_runtime-launcher.snippet.sh +1 -0
  436. package/pp-core/workflows/add-backlog.md +91 -0
  437. package/pp-core/workflows/add-phase.md +113 -0
  438. package/pp-core/workflows/add-tests.md +355 -0
  439. package/pp-core/workflows/add-todo.md +161 -0
  440. package/pp-core/workflows/ai-integration-phase.md +295 -0
  441. package/pp-core/workflows/analyze-dependencies.md +96 -0
  442. package/pp-core/workflows/audit-fix.md +178 -0
  443. package/pp-core/workflows/audit-milestone.md +362 -0
  444. package/pp-core/workflows/audit-uat.md +110 -0
  445. package/pp-core/workflows/autonomous.md +886 -0
  446. package/pp-core/workflows/check-todos.md +180 -0
  447. package/pp-core/workflows/cleanup.md +195 -0
  448. package/pp-core/workflows/code-review-fix.md +506 -0
  449. package/pp-core/workflows/code-review.md +696 -0
  450. package/pp-core/workflows/complete-milestone.md +857 -0
  451. package/pp-core/workflows/debug.md +237 -0
  452. package/pp-core/workflows/diagnose-issues.md +245 -0
  453. package/pp-core/workflows/discovery-phase.md +291 -0
  454. package/pp-core/workflows/discovery-sprint.md +1546 -0
  455. package/pp-core/workflows/discuss-phase/modes/advisor.md +176 -0
  456. package/pp-core/workflows/discuss-phase/modes/all.md +28 -0
  457. package/pp-core/workflows/discuss-phase/modes/analyze.md +44 -0
  458. package/pp-core/workflows/discuss-phase/modes/auto.md +57 -0
  459. package/pp-core/workflows/discuss-phase/modes/batch.md +52 -0
  460. package/pp-core/workflows/discuss-phase/modes/chain.md +98 -0
  461. package/pp-core/workflows/discuss-phase/modes/default.md +141 -0
  462. package/pp-core/workflows/discuss-phase/modes/power.md +44 -0
  463. package/pp-core/workflows/discuss-phase/modes/text.md +55 -0
  464. package/pp-core/workflows/discuss-phase/templates/checkpoint.json +18 -0
  465. package/pp-core/workflows/discuss-phase/templates/context.md +136 -0
  466. package/pp-core/workflows/discuss-phase/templates/discussion-log.md +50 -0
  467. package/pp-core/workflows/discuss-phase-assumptions.md +675 -0
  468. package/pp-core/workflows/discuss-phase-power.md +291 -0
  469. package/pp-core/workflows/discuss-phase.md +520 -0
  470. package/pp-core/workflows/do.md +111 -0
  471. package/pp-core/workflows/docs-update.md +1168 -0
  472. package/pp-core/workflows/edit-phase.md +295 -0
  473. package/pp-core/workflows/eval-review.md +159 -0
  474. package/pp-core/workflows/execute-phase/steps/codebase-drift-gate.md +95 -0
  475. package/pp-core/workflows/execute-phase/steps/per-plan-worktree-gate.md +94 -0
  476. package/pp-core/workflows/execute-phase/steps/post-merge-gate.md +117 -0
  477. package/pp-core/workflows/execute-phase/steps/worktree-recovery-policy.md +9 -0
  478. package/pp-core/workflows/execute-phase.md +1707 -0
  479. package/pp-core/workflows/execute-plan.md +541 -0
  480. package/pp-core/workflows/explore.md +146 -0
  481. package/pp-core/workflows/extract-learnings.md +243 -0
  482. package/pp-core/workflows/fast.md +124 -0
  483. package/pp-core/workflows/forensics.md +279 -0
  484. package/pp-core/workflows/graduation.md +196 -0
  485. package/pp-core/workflows/health.md +224 -0
  486. package/pp-core/workflows/help/modes/brief.md +22 -0
  487. package/pp-core/workflows/help/modes/default.md +50 -0
  488. package/pp-core/workflows/help/modes/full.md +791 -0
  489. package/pp-core/workflows/help/modes/topic.md +74 -0
  490. package/pp-core/workflows/help.md +24 -0
  491. package/pp-core/workflows/import.md +256 -0
  492. package/pp-core/workflows/inbox.md +387 -0
  493. package/pp-core/workflows/ingest-docs.md +340 -0
  494. package/pp-core/workflows/insert-phase.md +152 -0
  495. package/pp-core/workflows/list-phase-assumptions.md +178 -0
  496. package/pp-core/workflows/list-workspaces.md +57 -0
  497. package/pp-core/workflows/manager.md +435 -0
  498. package/pp-core/workflows/map-codebase.md +444 -0
  499. package/pp-core/workflows/milestone-summary.md +224 -0
  500. package/pp-core/workflows/mvp-phase.md +222 -0
  501. package/pp-core/workflows/new-milestone.md +643 -0
  502. package/pp-core/workflows/new-project.md +1563 -0
  503. package/pp-core/workflows/new-workspace.md +240 -0
  504. package/pp-core/workflows/next.md +347 -0
  505. package/pp-core/workflows/node-repair.md +92 -0
  506. package/pp-core/workflows/note.md +158 -0
  507. package/pp-core/workflows/pause-work.md +250 -0
  508. package/pp-core/workflows/plan-milestone-gaps.md +281 -0
  509. package/pp-core/workflows/plan-phase.md +1755 -0
  510. package/pp-core/workflows/plan-review-convergence.md +369 -0
  511. package/pp-core/workflows/plant-seed.md +230 -0
  512. package/pp-core/workflows/pr-branch.md +159 -0
  513. package/pp-core/workflows/profile-user.md +455 -0
  514. package/pp-core/workflows/progress.md +756 -0
  515. package/pp-core/workflows/quick.md +1045 -0
  516. package/pp-core/workflows/reapply-patches.md +443 -0
  517. package/pp-core/workflows/remove-phase.md +156 -0
  518. package/pp-core/workflows/remove-workspace.md +108 -0
  519. package/pp-core/workflows/resume-project.md +348 -0
  520. package/pp-core/workflows/review.md +765 -0
  521. package/pp-core/workflows/scan.md +107 -0
  522. package/pp-core/workflows/secure-phase.md +184 -0
  523. package/pp-core/workflows/session-report.md +146 -0
  524. package/pp-core/workflows/settings-advanced.md +816 -0
  525. package/pp-core/workflows/settings-integrations.md +312 -0
  526. package/pp-core/workflows/settings.md +592 -0
  527. package/pp-core/workflows/ship.md +465 -0
  528. package/pp-core/workflows/sketch-wrap-up.md +286 -0
  529. package/pp-core/workflows/sketch.md +361 -0
  530. package/pp-core/workflows/spec-phase.md +495 -0
  531. package/pp-core/workflows/spike-wrap-up.md +307 -0
  532. package/pp-core/workflows/spike.md +453 -0
  533. package/pp-core/workflows/stats.md +80 -0
  534. package/pp-core/workflows/sync-skills.md +182 -0
  535. package/pp-core/workflows/thread.md +222 -0
  536. package/pp-core/workflows/transition.md +694 -0
  537. package/pp-core/workflows/ui-phase.md +328 -0
  538. package/pp-core/workflows/ui-review.md +193 -0
  539. package/pp-core/workflows/ultraplan-phase.md +199 -0
  540. package/pp-core/workflows/undo.md +314 -0
  541. package/pp-core/workflows/update.md +501 -0
  542. package/pp-core/workflows/validate-phase.md +183 -0
  543. package/pp-core/workflows/verify-phase.md +569 -0
  544. package/pp-core/workflows/verify-work.md +804 -0
  545. package/scripts/affected-tests-lib.cjs +554 -0
  546. package/scripts/audit-workflow-script-paths.cjs +73 -0
  547. package/scripts/base64-scan.sh +351 -0
  548. package/scripts/build-hooks.js +254 -0
  549. package/scripts/changeset/README.md +129 -0
  550. package/scripts/changeset/cli.cjs +597 -0
  551. package/scripts/changeset/github-release-notes.cjs +199 -0
  552. package/scripts/changeset/lint.cjs +147 -0
  553. package/scripts/changeset/new.cjs +151 -0
  554. package/scripts/changeset/parse.cjs +114 -0
  555. package/scripts/changeset/render.cjs +34 -0
  556. package/scripts/changeset/serialize.cjs +130 -0
  557. package/scripts/check-alias-drift.cjs +114 -0
  558. package/scripts/check-env.cjs +312 -0
  559. package/scripts/check-npm-integrity.cjs +215 -0
  560. package/scripts/ci-guard-runner.cjs +22 -0
  561. package/scripts/ci-prepare-test-scope.cjs +93 -0
  562. package/scripts/ci-rebase-check.cjs +86 -0
  563. package/scripts/ci-test-scope.cjs +441 -0
  564. package/scripts/command-contract-helpers.cjs +64 -0
  565. package/scripts/diff-touches-shipped-paths.cjs +149 -0
  566. package/scripts/fix-slash-commands.cjs +161 -0
  567. package/scripts/gen-capability-registry.cjs +2646 -0
  568. package/scripts/gen-commands-reference.cjs +139 -0
  569. package/scripts/gen-inventory-manifest.cjs +114 -0
  570. package/scripts/gen-loop-host-contract.cjs +526 -0
  571. package/scripts/gen-research-agents.cjs +276 -0
  572. package/scripts/generate-package-identity.cjs +134 -0
  573. package/scripts/issue-dedupe.cjs +278 -0
  574. package/scripts/issue-version-gate.cjs +140 -0
  575. package/scripts/lib/allowlist-ratchet.cjs +236 -0
  576. package/scripts/lib/cli-exit.cjs +56 -0
  577. package/scripts/lint-allow-test-rule-refs.allowlist.json +328 -0
  578. package/scripts/lint-allow-test-rule-refs.cjs +162 -0
  579. package/scripts/lint-command-contract.cjs +118 -0
  580. package/scripts/lint-descriptions.cjs +87 -0
  581. package/scripts/lint-docs-required.cjs +222 -0
  582. package/scripts/lint-legacy-dir-name.cjs +166 -0
  583. package/scripts/lint-package-identity-drift.cjs +141 -0
  584. package/scripts/lint-pr-check-project-dir.cjs +99 -0
  585. package/scripts/lint-regression-test-names.allowlist.json +269 -0
  586. package/scripts/lint-regression-test-names.cjs +117 -0
  587. package/scripts/lint-shell-command-projection-drift.cjs +62 -0
  588. package/scripts/lint-skill-deps.cjs +185 -0
  589. package/scripts/lint-test-file-count.allowlist.json +181 -0
  590. package/scripts/lint-test-file-count.cjs +246 -0
  591. package/scripts/lint-windows-test-portability.cjs +178 -0
  592. package/scripts/mutation-matrix.cjs +323 -0
  593. package/scripts/pr-target-policy.cjs +63 -0
  594. package/scripts/pr-template-policy.cjs +268 -0
  595. package/scripts/prompt-injection-scan.sh +207 -0
  596. package/scripts/registry-smoke.cjs +337 -0
  597. package/scripts/release-notes/discord-release-summary.cjs +373 -0
  598. package/scripts/release-notes/format-github-release-notes.cjs +261 -0
  599. package/scripts/release-tarball-smoke.cjs +763 -0
  600. package/scripts/research-profiles.cjs +149 -0
  601. package/scripts/run-affected-tests.cjs +7 -0
  602. package/scripts/run-tests.cjs +589 -0
  603. package/scripts/secret-scan-lint.sh +231 -0
  604. package/scripts/secret-scan.sh +358 -0
  605. package/scripts/setup-branch-protection.sh +234 -0
  606. package/scripts/strip-prose-atrefs.cjs +106 -0
  607. package/scripts/sync-manifest-versions.cjs +119 -0
  608. package/scripts/sync-next-version.cjs +133 -0
  609. package/scripts/sync-rulesets.sh +34 -0
  610. package/scripts/sync-runtime-launcher.cjs +425 -0
  611. package/scripts/test-failure-reasons.cjs +34 -0
  612. package/scripts/update-size-baseline.cjs +68 -0
  613. package/scripts/verify-npm-publish.cjs +240 -0
  614. package/scripts/verify-opengsd-sweep.cjs +288 -0
  615. package/scripts/verify-phase-02-rename.sh +258 -0
  616. package/scripts/verify-phase-03-rename.sh +376 -0
  617. package/scripts/workflow-policy.cjs +483 -0
  618. package/scripts/workflow-size.cjs +90 -0
@@ -0,0 +1,1546 @@
1
+ <purpose>
2
+ Facilitate the 13-session Pareto Discovery Sprint. Guide each session topic-by-topic,
3
+ capture outputs into structured notes templates, and write all artifacts to
4
+ .planning/discovery/ (session-01.md … session-13.md, _progress.md, _context.md).
5
+ </purpose>
6
+
7
+ <required_reading>
8
+ @~/.claude/pp-core/references/ui-brand.md
9
+ </required_reading>
10
+
11
+ <process>
12
+
13
+ ## 0. Initialize
14
+
15
+ First parse `SESSION_ARG` (the optional session number 1–13) from `$ARGUMENTS` so the init call below receives it. The bash block extracts it directly — do not rely on a later prose step to populate it.
16
+
17
+ ```bash
18
+ _PP_SHIM_NAME="pp-tools.cjs"; _PP_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; PP_TOOLS="${_PP_RUNTIME_ROOT}/pp-core/bin/${_PP_SHIM_NAME}"; if [ -f "$PP_TOOLS" ]; then pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${_PP_RUNTIME_ROOT}/.claude/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${_PP_RUNTIME_ROOT}/.claude/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${_PP_RUNTIME_ROOT}/.codex/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${_PP_RUNTIME_ROOT}/.codex/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif command -v pp-tools >/dev/null 2>&1; then PP_TOOLS="$(command -v pp-tools)"; pp_run() { "$PP_TOOLS" "$@"; }; elif [ -f "$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${HERMES_HOME:-$HOME/.hermes}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${HERMES_HOME:-$HOME/.hermes}/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${CURSOR_CONFIG_DIR:-$HOME/.cursor}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CURSOR_CONFIG_DIR:-$HOME/.cursor}/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${CODEX_HOME:-$HOME/.codex}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CODEX_HOME:-$HOME/.codex}/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${GEMINI_CONFIG_DIR:-$HOME/.gemini}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${GEMINI_CONFIG_DIR:-$HOME/.gemini}/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${COPILOT_CONFIG_DIR:-$HOME/.copilot}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${COPILOT_CONFIG_DIR:-$HOME/.copilot}/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${AUGMENT_CONFIG_DIR:-$HOME/.augment}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${AUGMENT_CONFIG_DIR:-$HOME/.augment}/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${TRAE_CONFIG_DIR:-$HOME/.trae}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${TRAE_CONFIG_DIR:-$HOME/.trae}/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${QWEN_CONFIG_DIR:-$HOME/.qwen}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${QWEN_CONFIG_DIR:-$HOME/.qwen}/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${CLINE_CONFIG_DIR:-$HOME/.cline}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CLINE_CONFIG_DIR:-$HOME/.cline}/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${GROK_AGENTS_HOME:-$HOME/.agents}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${GROK_AGENTS_HOME:-$HOME/.agents}/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; else echo "ERROR: pp-tools.cjs not found at $PP_TOOLS and pp-tools is not on PATH. Run: npx -y @pareto4/pp-core@latest --claude --local" >&2; exit 1; fi; if [ -n "${CLAUDE_ENV_FILE:-}" ] && [ -n "${PP_TOOLS:-}" ]; then printf "export PATH='%s':\"\$PATH\"\n" "${PP_TOOLS%/*}" >> "$CLAUDE_ENV_FILE" 2>/dev/null || true; fi
19
+ SESSION_ARG=$(printf '%s\n' "${ARGUMENTS:-}" | grep -oE '(1[0-3]|[1-9])' | head -1)
20
+ INIT=$(pp_run query init.phase-op "${SESSION_ARG:-}")
21
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
22
+ ```
23
+
24
+ `SESSION_ARG` is the optional session number 1–13, extracted from `$ARGUMENTS` in the block above (empty when no argument was passed).
25
+
26
+ **Text mode:** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS` OR `text_mode` from init JSON is `true`. When TEXT_MODE is active, replace every `AskUserQuestion` call with a plain-text numbered list and ask the user to type their choice number. This is required for non-Claude runtimes (Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
27
+
28
+ **Dispatch:**
29
+ - If `SESSION_ARG` is empty → execute **Flow 1: Show Progress**
30
+ - If `SESSION_ARG` is a number 1–13 → execute **Flow 2: Facilitate Session N**
31
+ - Otherwise → show usage error
32
+
33
+ ---
34
+
35
+ ## Session Registry
36
+
37
+ | # | Session Name | Dependencies |
38
+ |---|-------------|-------------|
39
+ | 1 | Discovery Sprint Kick-off | None |
40
+ | 2 | Business Process Mapping (As-Is) | 1 |
41
+ | 3 | Business Requirements & Future State (To-Be) | 1, 2 |
42
+ | 4 | UX Design & User Experience Principles | 2, 3 |
43
+ | 5 | Application & Integration Architecture | 1, 2, 3, 4 |
44
+ | 6 | Security & Compliance Setup | 5 |
45
+ | 7 | User & Identity Management | 5, 6 |
46
+ | 8 | Integration & Interface Design | 5 |
47
+ | 9 | Quality Assurance & Testing Strategy | 3, 5 |
48
+ | 10 | Infrastructure & Deployment Readiness | 5 |
49
+ | 11 | Project Roadmap & Release Planning | 3, 5, 9 |
50
+ | 12 | Team & Delivery Model Definition | 11 |
51
+ | 13 | Discovery Sprint Wrap-up & Next Steps | 1–12 |
52
+
53
+ **Artifact paths:**
54
+ - Session files: `.planning/discovery/session-01.md` … `.planning/discovery/session-13.md`
55
+ - Progress tracker: `.planning/discovery/_progress.md`
56
+ - Context file: `.planning/discovery/_context.md`
57
+
58
+ **IMPORTANT — path constraint (T-04-03):** All Write/Edit calls in this workflow MUST target `.planning/discovery/` paths. Never write to a root-level directory, an absolute path, or a path containing `..`.
59
+
60
+ ---
61
+
62
+ ## Flow 1: Show Progress (no argument)
63
+
64
+ 1. Read `.planning/discovery/_progress.md`. If not found, tell the user no Discovery Sprint is set up for this project and suggest creating the artifacts first by running `/pp-discovery 1`.
65
+
66
+ 2. Parse the Session Progress table and display:
67
+ ```
68
+ Pareto Discovery Sprint Progress
69
+
70
+ Completed: X/13
71
+ In Progress: Y/13
72
+ Not Started: Z/13
73
+
74
+ | # | Session | Status |
75
+ |---|---------|--------|
76
+ | 1 | Discovery Sprint Kick-off | [status] |
77
+ ...
78
+ ```
79
+
80
+ 3. Recommend next session, in priority order:
81
+ - If any session is "In Progress", recommend resuming the lowest-numbered one:
82
+ > "Resume Session N — [Name] (in progress). Run `/pp-discovery N` to continue."
83
+ - Otherwise, find the first "Not Started" session whose dependencies are all "Completed":
84
+ > "Next recommended session: Session N — [Name]. Run `/pp-discovery N` to start."
85
+ - If every session is "Completed", say the Discovery Sprint is complete and point to Session 13's wrap-up output.
86
+
87
+ ---
88
+
89
+ ## Flow 2: Facilitate Session N (argument = 1–13)
90
+
91
+ ### Step 1: Locate and Validate
92
+
93
+ 1. Determine the session file path: `.planning/discovery/session-NN.md` (zero-padded, e.g. `session-03.md`).
94
+ 2. If the file does not exist, create it using the session template (see Session Content sections below).
95
+ 3. Read `.planning/discovery/_progress.md` (create if absent).
96
+ 4. Read `.planning/discovery/_context.md` (create if absent).
97
+
98
+ ### Step 2: Check Dependencies
99
+
100
+ For each session dependency, verify its status in `_progress.md`. If any dependency is not "Completed":
101
+ > "Session N depends on Session(s) X, Y which are not yet completed. Proceeding without these may result in incomplete context. Continue anyway?"
102
+
103
+ **Text mode fallback:** present as numbered list: 1) Yes, continue anyway / 2) No, go back.
104
+
105
+ If the user confirms, proceed. Otherwise, stop and suggest the incomplete dependency.
106
+
107
+ ### Step 3: Check for Resume
108
+
109
+ - If session status is "In Progress": tell the user and continue from the first unpopulated section.
110
+ - If session status is "Completed": ask whether to redo it (AskUserQuestion or text-mode numbered list). If yes, reset status to "In Progress".
111
+
112
+ ### Step 4: Mark In Progress
113
+
114
+ Update `.planning/discovery/session-NN.md` frontmatter: set `status: "In Progress"`. Set `started_date: "[YYYY-MM-DD]"` **only on the first start** (when the prior status was "Not Started" or `started_date` is empty) — on a resume, preserve the existing `started_date`.
115
+ Update `.planning/discovery/_progress.md`: set session row status to "In Progress".
116
+
117
+ ---
118
+
119
+ **Special protocols — check the session number before running Step 5:**
120
+
121
+ - **Session 3 only:** Execute the **Session 3: Process-First Protocol** (Steps 5A–5G) **in place of** the generic Step 5 topic loop. Do NOT also run the generic Step 5 — the protocol replaces it entirely. See dedicated section below.
122
+ - **Session 13 only:** Execute the **Session 13: Cross-Reference Protocol** (Step 0) **before** running the generic Step 5 (Step 5 still runs afterward). See dedicated section below.
123
+ - **All other sessions:** skip both protocols and run Step 5 as written.
124
+
125
+ ---
126
+
127
+ ### Step 5: Facilitate Topic by Topic
128
+
129
+ For each numbered topic in the session's "What We Cover" section:
130
+
131
+ 1. **Present the topic** conversationally: "Let's talk about [Topic Name]."
132
+ 2. **Ask guiding questions** using `AskUserQuestion` (or a plain-text numbered list in text mode).
133
+ 3. **Capture into Notes Template:** after discussion, populate the corresponding table or prose section using Edit tool. Save after each topic — do not wait until the end.
134
+ 4. **Confirm with user:** summarize what was captured. Ask if anything should be adjusted.
135
+
136
+ ### Step 6: Key Decisions and Action Items
137
+
138
+ Ask: "Any key decisions made?" → populate Key Decisions table.
139
+ Ask: "Any action items to track?" → populate Action Items table and update `_progress.md`.
140
+
141
+ ### Step 7: Complete the Session
142
+
143
+ 1. Update `.planning/discovery/session-NN.md` frontmatter: `status: "Completed"`, `completed_date: "[YYYY-MM-DD]"`, `completeness_score: [N]`. Compute `N = round(100 × topics_covered ÷ total_topics)` for this session — only use 100 when every topic was covered. If topics were skipped (see Edge Cases), the score reflects the proportion actually completed.
144
+ 2. Update `.planning/discovery/_progress.md`: set row to Completed with date and score.
145
+ 3. Update `.planning/discovery/_context.md`: populate the session's output section with concise summaries.
146
+
147
+ ### Step 8: Show Summary
148
+
149
+ ```
150
+ Session N — [Session Name] — Complete
151
+
152
+ Captured:
153
+ - [Brief bullets of what was documented]
154
+
155
+ Key Decisions: X recorded
156
+ Action Items: Y recorded
157
+
158
+ Discovery Progress: X/13 completed
159
+
160
+ Next recommended session: Session M — [Name]
161
+ Run /pp-discovery M to continue.
162
+ ```
163
+
164
+ ---
165
+
166
+ ## Session 3: Process-First Protocol
167
+
168
+ **This protocol replaces the generic Step 5 topic loop for Session 3 only.**
169
+ The agent proposes the process landscape from Session 2 outputs; the user validates; requirements are derived from validated process steps (not collected separately).
170
+
171
+ ### Step 5A: Propose Main Processes
172
+
173
+ Read `.planning/discovery/session-02.md` and `.planning/discovery/_context.md`. Propose the main business processes for the to-be state:
174
+
175
+ ```
176
+ Based on Session 2, I'm proposing these main processes for the to-be state:
177
+
178
+ | MP ID | Main Process | Trigger | End State | Primary Actor | Rationale (from S2) |
179
+ |-------|--------------|---------|-----------|---------------|---------------------|
180
+ | MP-01 | ... | ... | ... | ... | ... |
181
+
182
+ Validate: accept / edit / add / drop. Then we'll decompose each into sub-processes.
183
+ ```
184
+
185
+ Iterate until the user accepts the main-process list. Save to the Main Process Register table in `.planning/discovery/session-03.md`.
186
+
187
+ **Text mode fallback:** present numbered options: 1) Accept all / 2) Edit specific process / 3) Add process / 4) Drop process.
188
+
189
+ ### Step 5B: Decompose into Sub-Processes (per main process)
190
+
191
+ For each accepted main process, propose 3–8 sub-processes and emit a Mermaid flowchart:
192
+
193
+ ```mermaid
194
+ flowchart TD
195
+ Start([Trigger]) --> SP1[Sub-process 1]
196
+ SP1 --> D1{Decision}
197
+ D1 -->|Yes| SP2[Sub-process 2]
198
+ D1 -->|No| SP1_alt[Alternative path]
199
+ SP2 --> End([End state])
200
+ ```
201
+
202
+ Present to the user and iterate until accepted. Save the Mermaid block to the Sub-Process Flows section in `.planning/discovery/session-03.md`.
203
+
204
+ ### Step 5C: Step Matrix (per sub-process)
205
+
206
+ For each accepted sub-process, propose a step-level matrix:
207
+
208
+ | # | Step | Actor | UI (screen / component) | Data Objects (C/R/U/D) | Integration | Requirements (FR/BR/NFR IDs) |
209
+
210
+ - **Step:** one imperative verb phrase
211
+ - **Actor:** persona from Session 2 or "System"
212
+ - **UI:** screen/component, or `—` if backend-only
213
+ - **Data Objects:** entities with CRUD flags (e.g., `Order [C]`)
214
+ - **Integration:** external systems with direction
215
+ - **Requirements:** provisional IDs (`FR-MP01-SP1-001`)
216
+
217
+ Present one sub-process matrix at a time. After validation, save to `.planning/discovery/session-03.md`.
218
+
219
+ ### Step 5D: Consolidate Requirements
220
+
221
+ Walk all step matrices and populate the Requirements Matrix table:
222
+
223
+ | Req ID | Type (FR/BR/NFR) | Source Step | Requirement | Priority | Acceptance Criteria |
224
+
225
+ Flag orphan requirements (zero step rows) and uncovered step rows.
226
+
227
+ ### Step 5E: EPICs and User Stories
228
+
229
+ Group sub-processes into EPICs (one EPIC = one main process). Derive user stories from step-matrix rows where the actor is a persona. Link stories to source steps via `source_step` field.
230
+
231
+ ### Step 5F: Business Objectives and KPIs
232
+
233
+ Cover measurable outcomes and KPIs per main process. Link each KPI to `MP-XX` IDs.
234
+
235
+ ### Step 5G: Prototype Validation Plan
236
+
237
+ Define which sub-process flows will be clickable in the Session 3 prototype (happy paths + key error paths), which personas must be covered, and what "validated" means for each flow.
238
+
239
+ ---
240
+
241
+ ## Session 13: Cross-Reference Protocol
242
+
243
+ **Run this protocol (Step 0) before facilitating Session 13 topics.**
244
+ This ensures all inconsistencies across Sessions 1–12 are identified and resolved before the wrap-up discussion begins.
245
+
246
+ ### Step 0: Cross-Reference Analysis
247
+
248
+ #### 0a. Launch Parallel Cross-Reference Analysis
249
+
250
+ Analyze all prior sessions in three groups. Use Explore agents if available, or perform the analysis sequentially:
251
+
252
+ | Group | Sessions | Focus |
253
+ |-------|----------|-------|
254
+ | Business Functional | 1–4 (Kick-off, As-Is, To-Be, UX) | Scope alignment, requirement consistency, persona/role naming, process definitions |
255
+ | Technical | 5–8 (Architecture, Security, Identity, Integration) | Technology stack consistency, role/RBAC alignment, integration point definitions, API contracts |
256
+ | Governance & Costs | 9–12 (QA, Infrastructure, Roadmap, Team) | Timeline feasibility, resource allocation, test strategy alignment, sprint capacity |
257
+
258
+ For each group: read all session files AND `.planning/discovery/_context.md`. Cross-reference factual claims, role names, technology choices, integration points, and requirement IDs. Check for contradictions between sessions.
259
+
260
+ #### 0b. Issue Severity Categories
261
+
262
+ | Severity | Description |
263
+ |----------|-------------|
264
+ | Critical | Contradictions causing build failures or incorrect implementation |
265
+ | High | Significant inconsistencies affecting multiple sessions |
266
+ | Medium | Naming/terminology inconsistencies |
267
+ | Low | Minor administrative issues |
268
+
269
+ #### 0c. Cross-Reference Checklist
270
+
271
+ - [ ] **Roles & RBAC:** Same role names, count, and permissions across all sessions (especially S5 vs S7)
272
+ - [ ] **Technology stack:** Consistent tools/frameworks referenced (especially S5, S8, S10)
273
+ - [ ] **Integration points:** Same systems, directions, and protocols across S5, S8, S10
274
+ - [ ] **Requirements traceability:** Every S3 requirement addressable in S5 architecture
275
+ - [ ] **Scope boundaries:** In-scope/out-of-scope consistent between S1, S3, S11
276
+ - [ ] **Stakeholder names:** Consistent across all sessions
277
+ - [ ] **KPIs and metrics:** Consistent definitions between S1, S3, S11
278
+ - [ ] **Security constraints:** S6 constraints reflected in S5 and S10
279
+ - [ ] **Test strategy:** S9 covers all S3 requirements and S5 components
280
+ - [ ] **Timeline and capacity:** S11 roadmap feasible given S12 team and S9 test needs
281
+ - [ ] **Action items:** No duplicates or contradictions in `_progress.md`
282
+
283
+ #### 0d. Present Findings
284
+
285
+ After analysis, consolidate findings into a single report grouped by severity:
286
+
287
+ ```
288
+ Cross-Reference Analysis Complete
289
+
290
+ Found: X findings (C critical, H high, M medium, L low)
291
+
292
+ Critical/High Issues:
293
+ 1. [C1] Description — Sessions affected — Recommended fix
294
+
295
+ Medium Issues:
296
+ 1. [M1] Description — Sessions affected — Recommended fix
297
+
298
+ Low Issues:
299
+ 1. [L1] Description — Sessions affected — Recommended fix
300
+ ```
301
+
302
+ #### 0e. Resolve Issues
303
+
304
+ Ask the user how to proceed (AskUserQuestion or text-mode numbered list):
305
+
306
+ 1. Fix all + discuss planning (Recommended)
307
+ 2. Fix critical/high only — note the rest
308
+ 3. Review each finding one by one
309
+ 4. Skip cross-reference (not recommended)
310
+
311
+ Apply fixes using Edit tool across affected session files. Update `.planning/discovery/_context.md` if key facts change.
312
+
313
+ #### 0f. Record Cross-Reference Results
314
+
315
+ Capture in `.planning/discovery/session-13.md` notes:
316
+ - Total findings count and severity breakdown
317
+ - List of all fixes applied (file, what changed, why)
318
+ - Any findings deferred or noted but not fixed
319
+
320
+ Then proceed to Step 5 (Facilitate Session 13 topics).
321
+
322
+ ---
323
+
324
+ ## Session Content
325
+
326
+ ### Session 1: Discovery Sprint Kick-off
327
+
328
+ **Goal:** Align all participants on the Discovery Sprint purpose, establish project context, confirm business vision, identify stakeholders, and agree on the discovery approach, ground rules, and logistics.
329
+
330
+ **What We Cover:**
331
+
332
+ 1. **Project context and background**
333
+ - What is the business problem or opportunity that initiated this project?
334
+ - What has been tried before? What worked, what did not?
335
+ - Are there existing documents, RFPs, or prior assessments to reference?
336
+
337
+ 2. **Business vision and strategic alignment**
338
+ - What does success look like in 6 months? In 12 months?
339
+ - How does this initiative align with the broader organizational strategy?
340
+ - What are the key business drivers (revenue growth, cost reduction, compliance, customer experience)?
341
+
342
+ 3. **Stakeholder identification and roles**
343
+ - Who are the decision-makers, subject-matter experts, and end-users?
344
+ - Who has authority to approve scope changes or budget decisions?
345
+ - Are there external parties (vendors, regulators, partners) who need to be involved?
346
+
347
+ 4. **Discovery Sprint approach and logistics**
348
+ - Walk through the 13-session agenda and expected outputs
349
+ - What is the preferred meeting cadence and format (in-person, remote, hybrid)?
350
+ - How will decisions be documented and communicated?
351
+
352
+ 5. **Ground rules and ways of working**
353
+ - How do we handle disagreements or competing priorities?
354
+ - What is the escalation path for blockers?
355
+ - What tools will be used for collaboration?
356
+
357
+ 6. **Known constraints and risks**
358
+ - Are there hard deadlines (regulatory, contractual, market)?
359
+ - What budget constraints exist?
360
+ - Are there technology mandates or restrictions?
361
+
362
+ **Notes Template:**
363
+
364
+ **Stakeholder Register**
365
+
366
+ | Name | Role | Organization | Interest Area | Decision Authority | Availability |
367
+ |------|------|--------------|---------------|--------------------|--------------|
368
+ | | | | | | |
369
+
370
+ **Business Vision Summary**
371
+
372
+ | Dimension | Description |
373
+ |-----------|-------------|
374
+ | Business problem / opportunity | |
375
+ | Strategic alignment | |
376
+ | Success criteria (6-month) | |
377
+ | Success criteria (12-month) | |
378
+ | Key business drivers | |
379
+
380
+ **Constraints and Risks Register**
381
+
382
+ | ID | Type | Description | Impact (H/M/L) | Mitigation | Owner |
383
+ |----|------|-------------|-----------------|------------|-------|
384
+ | C1 | Constraint | | | | |
385
+ | R1 | Risk | | | | |
386
+
387
+ **Key Decisions**
388
+
389
+ | # | Decision | Rationale | Owner | Date |
390
+ |---|----------|-----------|-------|------|
391
+ | | | | | |
392
+
393
+ **Action Items**
394
+
395
+ | # | Action | Owner | Due Date | Status |
396
+ |---|--------|-------|----------|--------|
397
+ | | | | | |
398
+
399
+ ---
400
+
401
+ ### Session 2: Business Process Mapping (As-Is)
402
+
403
+ **Goal:** Document current-state business processes, identify pain points and inefficiencies, define user personas, map the existing systems landscape, and understand current data flows.
404
+
405
+ **What We Cover:**
406
+
407
+ 1. **Current business processes**
408
+ - What are the core business processes in scope for this initiative?
409
+ - Can you walk us through each process step-by-step, from trigger to completion?
410
+ - Who is involved at each step and what is their role?
411
+ - What is the average time to complete each process?
412
+ - Are there seasonal or volume-based variations?
413
+
414
+ 2. **Pain points and inefficiencies**
415
+ - Where do processes break down or cause delays?
416
+ - What manual workarounds exist today?
417
+ - What are the most frequent complaints from end-users or customers?
418
+ - Where is data re-entered or duplicated across systems?
419
+ - What processes are most error-prone?
420
+
421
+ 3. **User personas and stakeholders**
422
+ - Who are the primary users of the current system(s)?
423
+ - What are their roles, responsibilities, and technical proficiency levels?
424
+ - What are their daily tasks and frequency of system interaction?
425
+ - Are there external users (customers, partners, suppliers)?
426
+
427
+ 4. **Current systems landscape**
428
+ - What applications, tools, and platforms are currently in use?
429
+ - Which systems are the system of record for key data entities?
430
+ - Are there systems scheduled for decommissioning or replacement?
431
+
432
+ 5. **Data flows and information architecture**
433
+ - What are the key data entities (customer, order, product, invoice)?
434
+ - How does data flow between systems today?
435
+ - Are there batch processes, real-time integrations, or manual transfers?
436
+ - What data quality issues exist?
437
+
438
+ 6. **Regulatory and compliance context**
439
+ - Are there regulatory requirements that constrain current processes?
440
+ - What audit trails or reporting obligations exist?
441
+ - Are there data residency or retention requirements?
442
+
443
+ **Notes Template:**
444
+
445
+ **Process Inventory**
446
+
447
+ | Process ID | Process Name | Owner | Trigger | End State | Frequency | Avg Duration | Criticality |
448
+ |------------|-------------|-------|---------|-----------|-----------|--------------|-------------|
449
+ | P-01 | | | | | | | |
450
+
451
+ **Pain Points Register**
452
+
453
+ | ID | Process | Pain Point Description | Impact | Affected Users | Current Workaround | Severity (H/M/L) |
454
+ |----|---------|----------------------|--------|----------------|--------------------|-------------------|
455
+ | PP-01 | | | | | | |
456
+
457
+ **User Personas**
458
+
459
+ | Persona Name | Role / Title | Department | Key Tasks | System Interactions | Tech Proficiency | Frequency |
460
+ |-------------|-------------|------------|-----------|--------------------|-----------------|-----------:|
461
+ | | | | | | | |
462
+
463
+ **Systems Landscape**
464
+
465
+ | System Name | Type | Vendor | Purpose / Data Owned | Users | Integration Points | Status |
466
+ |-------------|------|--------|---------------------|-------|--------------------|--------|
467
+ | | | | | | | |
468
+
469
+ **Data Entity Map**
470
+
471
+ | Entity | System of Record | Consumers | Flow Type | Volume | Quality Issues |
472
+ |--------|-----------------|-----------|-----------|--------|----------------|
473
+ | | | | | | |
474
+
475
+ **Key Decisions**
476
+
477
+ | # | Decision | Rationale | Owner | Date |
478
+ |---|----------|-----------|-------|------|
479
+ | | | | | |
480
+
481
+ **Action Items**
482
+
483
+ | # | Action | Owner | Due Date | Status |
484
+ |---|--------|-------|----------|--------|
485
+ | | | | | |
486
+
487
+ ---
488
+
489
+ ### Session 3: Business Requirements & Future State (To-Be)
490
+
491
+ **Goal:** Define target-state business objectives, establish MVP scope, identify EPICs and user stories, and capture functional and non-functional requirements using a process-first decomposition approach.
492
+
493
+ **Special Protocol — Process-First (required for Session 3):**
494
+ This session uses the **Session 3: Process-First Protocol** (Steps 5A–5G described above). The agent proposes the main-process landscape derived from Session 2 outputs; the user validates; then sub-processes are decomposed with step matrices; requirements are derived from validated steps (not collected from a blank template).
495
+
496
+ **What We Cover:**
497
+
498
+ 1. **Business objectives and success metrics**
499
+ - What are the measurable business outcomes this initiative must achieve?
500
+ - How will we measure success? What KPIs will be tracked?
501
+ - What is the expected ROI or business case?
502
+ - Are there specific targets (e.g., reduce processing time by 50%)?
503
+
504
+ 2. **MVP scope definition**
505
+ - What is the minimum set of capabilities needed to deliver value?
506
+ - What can be deferred to a later release without jeopardizing the business case?
507
+ - How do we differentiate "must-have" from "nice-to-have"?
508
+ - What is the target go-live date for MVP?
509
+
510
+ 3. **EPICs and high-level features** (derived from process decomposition)
511
+ - What are the major feature areas (EPICs) that compose the solution?
512
+ - How do EPICs relate to the pain points identified in Session 2?
513
+ - What is the relative priority of each EPIC?
514
+
515
+ 4. **User stories and acceptance criteria** (derived from step matrices)
516
+ - For highest-priority EPICs, what are the key user stories?
517
+ - What does "done" look like for each story (acceptance criteria)?
518
+ - Are there edge cases or exception flows to account for?
519
+
520
+ 5. **Functional requirements** (derived from step matrices)
521
+ - What specific functions must the system perform?
522
+ - What calculations, transformations, or business logic are required?
523
+ - What reporting or analytics capabilities are needed?
524
+
525
+ 6. **Non-functional requirements**
526
+ - What are the performance expectations (response time, throughput)?
527
+ - What availability and uptime targets apply (e.g., 99.9%)?
528
+ - What are the scalability requirements (users, data volume, transactions)?
529
+ - What accessibility standards must be met (WCAG 2.1 AA)?
530
+
531
+ **Notes Template:**
532
+
533
+ **Main Process Register** (populated via process-first decomposition Step 5A)
534
+
535
+ | MP ID | Main Process | Trigger | End State | Primary Actor | Related EPICs |
536
+ |-------|--------------|---------|-----------|---------------|---------------|
537
+ | MP-01 | | | | | |
538
+
539
+ **Business Objectives**
540
+
541
+ | ID | Objective | Success Metric / KPI | Target Value | Priority |
542
+ |----|-----------|---------------------|--------------|----------|
543
+ | BO-01 | | | | |
544
+
545
+ **MVP Scope Boundary**
546
+
547
+ | Feature / Capability | In MVP | Deferred (Release) | Out of Scope | Rationale |
548
+ |---------------------|--------|-------------------|-------------|-----------|
549
+ | | | | | |
550
+
551
+ **EPIC Register**
552
+
553
+ | EPIC ID | EPIC Name | Description | Business Value | Priority (MoSCoW) | Source Process |
554
+ |---------|-----------|-------------|----------------|--------------------|--------------:|
555
+ | E-01 | | | | | |
556
+
557
+ **User Stories**
558
+
559
+ | Story ID | EPIC | User Story | Acceptance Criteria | Priority | Source Step |
560
+ |----------|------|------------|---------------------|----------|------------|
561
+ | US-01 | | | | | |
562
+
563
+ **Non-Functional Requirements**
564
+
565
+ | ID | Category | Requirement | Target / Threshold | Priority |
566
+ |----|----------|-------------|-------------------|----------|
567
+ | NFR-01 | Performance | | | |
568
+ | NFR-02 | Availability | | | |
569
+ | NFR-03 | Scalability | | | |
570
+ | NFR-04 | Accessibility | | | |
571
+
572
+ **Key Decisions**
573
+
574
+ | # | Decision | Rationale | Owner | Date |
575
+ |---|----------|-----------|-------|------|
576
+ | | | | | |
577
+
578
+ **Action Items**
579
+
580
+ | # | Action | Owner | Due Date | Status |
581
+ |---|--------|-------|----------|--------|
582
+ | | | | | |
583
+
584
+ ---
585
+
586
+ ### Session 4: UX Design & User Experience Principles
587
+
588
+ **Goal:** Establish UX design principles, define UX standards for the solution, refine user personas, make key screen and navigation decisions, and align on the user experience direction.
589
+
590
+ **What We Cover:**
591
+
592
+ 1. **Design principles and brand alignment**
593
+ - What design principles should guide the user experience (simplicity, consistency, accessibility)?
594
+ - Does the client have an existing design system, style guide, or brand guidelines?
595
+ - Are there reference applications or competitors whose UX to emulate or avoid?
596
+ - What is the desired "feel" of the application (professional, playful, minimal, data-dense)?
597
+
598
+ 2. **UX standards and patterns**
599
+ - What UI framework or component library will be used (Material Design, Fluent, custom)?
600
+ - What are the standards for form design, validation feedback, and error messaging?
601
+ - How should loading states, empty states, and error states be handled?
602
+ - What responsive design breakpoints are required (desktop, tablet, mobile)?
603
+
604
+ 3. **Personas refined**
605
+ - Review and refine personas from Session 2 with a UX lens
606
+ - What are each persona's goals, frustrations, and motivations when using the system?
607
+ - What is their typical device, browser, and context of use?
608
+ - Are there accessibility needs for any personas?
609
+
610
+ 4. **Key screen decisions**
611
+ - What are the primary screens/views in the application?
612
+ - What information hierarchy applies to each screen?
613
+ - What are the most critical user tasks and how should they be surfaced?
614
+ - Are there dashboard or analytics views required?
615
+
616
+ 5. **Navigation and information architecture**
617
+ - What is the primary navigation model (sidebar, top bar, tabs, breadcrumbs)?
618
+ - How many levels of navigation depth are acceptable?
619
+ - How do users move between major sections of the application?
620
+ - What is the approach to contextual help or onboarding?
621
+
622
+ 6. **Content and communication**
623
+ - What tone of voice should the application use (formal, conversational)?
624
+ - How should notifications and alerts be presented?
625
+ - What is the approach to tooltips, help text, and inline guidance?
626
+ - Are there multilingual requirements?
627
+
628
+ **Notes Template:**
629
+
630
+ **Design Principles**
631
+
632
+ | # | Principle | Description | Example / Application |
633
+ |---|-----------|-------------|-----------------------|
634
+ | 1 | | | |
635
+ | 2 | | | |
636
+ | 3 | | | |
637
+
638
+ **UX Standards Decisions**
639
+
640
+ | Decision Area | Choice | Rationale | Notes |
641
+ |---------------|--------|-----------|-------|
642
+ | UI framework / component library | | | |
643
+ | Responsive breakpoints | | | |
644
+ | Form design pattern | | | |
645
+ | Error messaging pattern | | | |
646
+ | Loading / empty states | | | |
647
+ | Accessibility standard | | | |
648
+
649
+ **Refined Personas**
650
+
651
+ | Persona | Goal | Frustration | Device / Context | Accessibility Needs | Key Tasks |
652
+ |---------|------|-------------|-----------------|--------------------|-----------|
653
+ | | | | | | |
654
+
655
+ **Screen Inventory**
656
+
657
+ | Screen ID | Screen Name | Purpose | Primary Persona | Key Information | User Actions | Priority |
658
+ |-----------|-------------|---------|-----------------|-----------------|--------------|----------|
659
+ | SCR-01 | | | | | | |
660
+
661
+ **Navigation Model**
662
+
663
+ | Level | Navigation Element | Sections / Items | Behavior | Notes |
664
+ |-------|--------------------|-----------------|----------|-------|
665
+ | Primary | | | | |
666
+ | Secondary | | | | |
667
+
668
+ **Key Decisions**
669
+
670
+ | # | Decision | Rationale | Owner | Date |
671
+ |---|----------|-----------|-------|------|
672
+ | | | | | |
673
+
674
+ **Action Items**
675
+
676
+ | # | Action | Owner | Due Date | Status |
677
+ |---|--------|-------|----------|--------|
678
+ | | | | | |
679
+
680
+ ---
681
+
682
+ ### Session 5: Application & Integration Architecture
683
+
684
+ **Goal:** Define the target application architecture, select the technology stack, identify key architectural components, map integration points, and document Architecture Decision Records (ADRs).
685
+
686
+ **What We Cover:**
687
+
688
+ 1. **Target architecture vision**
689
+ - What is the high-level architecture style (monolith, microservices, serverless)?
690
+ - What architectural principles will guide design decisions (loose coupling, event-driven)?
691
+ - What are the key architectural drivers (scalability, maintainability, time-to-market)?
692
+ - Are there existing architectural standards mandated by the client?
693
+
694
+ 2. **Technology stack selection**
695
+ - What is the preferred frontend technology (React, Angular, Vue, Mendix, etc.)?
696
+ - What is the preferred backend technology (Node.js, .NET, Java, Python)?
697
+ - What database technology is appropriate (relational, document, graph, time-series)?
698
+ - What messaging or eventing technology will be used (Kafka, RabbitMQ, Azure Service Bus)?
699
+ - What caching strategy applies (Redis, in-memory, CDN)?
700
+
701
+ 3. **Key architectural components**
702
+ - What are the major services or modules in the target architecture?
703
+ - How do components interact (synchronous, asynchronous, event-driven)?
704
+ - What is the API strategy (REST, GraphQL, gRPC)?
705
+ - How is the domain model organized (DDD bounded contexts, service boundaries)?
706
+
707
+ 4. **Integration points**
708
+ - What external systems must the solution integrate with?
709
+ - What are the integration patterns (API, file transfer, event, database-to-database)?
710
+ - Who owns each integration endpoint?
711
+ - What SLAs exist for external system availability?
712
+
713
+ 5. **Architecture Decision Records (ADRs)**
714
+ - Document key decisions with context, decision, and consequences
715
+ - What alternatives were considered and why were they rejected?
716
+ - What are the trade-offs of the chosen approach?
717
+
718
+ **Notes Template:**
719
+
720
+ **Technology Stack Decisions**
721
+
722
+ | Layer | Technology | Version | Rationale | Alternatives Considered | Risk |
723
+ |-------|-----------|---------|-----------|------------------------|------|
724
+ | Frontend | | | | | |
725
+ | Backend | | | | | |
726
+ | Database | | | | | |
727
+ | Messaging | | | | | |
728
+ | Caching | | | | | |
729
+ | API Gateway | | | | | |
730
+
731
+ **Component Inventory**
732
+
733
+ | Component ID | Name | Responsibility | Technology | Communication Pattern | Dependencies |
734
+ |-------------|------|----------------|------------|----------------------|--------------|
735
+ | C-01 | | | | | |
736
+
737
+ **Integration Points Map**
738
+
739
+ | ID | External System | Direction | Pattern | Protocol | Data Format | Frequency | Owner | SLA |
740
+ |----|----------------|-----------|---------|----------|-------------|-----------|-------|-----|
741
+ | INT-01 | | | | | | | | |
742
+
743
+ **Architecture Decision Records**
744
+
745
+ | ADR ID | Title | Context | Decision | Consequences | Status |
746
+ |--------|-------|---------|----------|--------------|--------|
747
+ | ADR-01 | | | | | Accepted |
748
+
749
+ **Key Decisions**
750
+
751
+ | # | Decision | Rationale | Owner | Date |
752
+ |---|----------|-----------|-------|------|
753
+ | | | | | |
754
+
755
+ **Action Items**
756
+
757
+ | # | Action | Owner | Due Date | Status |
758
+ |---|--------|-------|----------|--------|
759
+ | | | | | |
760
+
761
+ ---
762
+
763
+ ### Session 6: Security & Compliance Setup
764
+
765
+ **Goal:** Define data classification, establish the compliance framework, determine encryption and network access strategies, design audit logging, and set availability SLAs.
766
+
767
+ **What We Cover:**
768
+
769
+ 1. **Data classification**
770
+ - What categories of data will the system process (public, internal, confidential, restricted)?
771
+ - Does the system handle PII (personally identifiable information)?
772
+ - Does the system handle financial, health, or other regulated data?
773
+ - What data classification scheme does the client follow?
774
+
775
+ 2. **Compliance framework**
776
+ - What regulatory frameworks apply (GDPR, SOC 2, ISO 27001, HIPAA, PCI-DSS)?
777
+ - Are there industry-specific compliance requirements?
778
+ - What is the current compliance posture and certification status?
779
+ - What are the audit requirements and cadence?
780
+
781
+ 3. **Encryption strategy**
782
+ - What encryption is required at rest (AES-256, TDE)?
783
+ - What encryption is required in transit (TLS 1.2+, mTLS)?
784
+ - How will encryption keys be managed (HSM, KMS, Vault)?
785
+ - Are there requirements for field-level or application-level encryption?
786
+
787
+ 4. **Network and access security**
788
+ - What network segmentation is required (VPCs, subnets, firewalls)?
789
+ - What perimeter security requirements exist (WAF, DDoS protection)?
790
+ - How will IP whitelisting or geo-blocking be handled?
791
+ - What VPN or private connectivity requirements exist?
792
+
793
+ 5. **Audit logging and monitoring**
794
+ - What events must be logged for audit purposes (login, data access, admin actions)?
795
+ - What is the log retention period?
796
+ - What SIEM or security monitoring tool will be used?
797
+ - How will security incidents be detected and escalated?
798
+
799
+ 6. **Availability and SLAs**
800
+ - What is the target availability (e.g., 99.9%, 99.95%, 99.99%)?
801
+ - What is the RTO (Recovery Time Objective) and RPO (Recovery Point Objective)?
802
+ - What are the defined maintenance windows?
803
+ - What failover and disaster recovery requirements exist?
804
+
805
+ **Notes Template:**
806
+
807
+ **Data Classification Matrix**
808
+
809
+ | Data Entity | Classification | PII | Regulated | Encryption Required | Retention Period | Notes |
810
+ |-------------|----------------|-----|-----------|--------------------|--------------------|-------|
811
+ | | | | | | | |
812
+
813
+ **Compliance Requirements Register**
814
+
815
+ | ID | Framework | Requirement | Applicability | Current Status | Gap | Action Required |
816
+ |----|-----------|-------------|---------------|----------------|-----|-----------------|
817
+ | CR-01 | | | | | | |
818
+
819
+ **Encryption Strategy**
820
+
821
+ | Layer | Method | Standard | Key Management | Notes |
822
+ |-------|--------|----------|----------------|-------|
823
+ | Data at rest | | | | |
824
+ | Data in transit | | | | |
825
+ | Field-level | | | | |
826
+
827
+ **Audit Logging Requirements**
828
+
829
+ | Event Category | Events to Log | Detail Level | Retention | Alert Trigger | Notes |
830
+ |----------------|--------------|--------------|-----------|---------------|-------|
831
+ | Authentication | | | | | |
832
+ | Data access | | | | | |
833
+ | Data modification | | | | | |
834
+ | Admin actions | | | | | |
835
+
836
+ **Availability and DR Targets**
837
+
838
+ | Metric | Target | Notes |
839
+ |--------|--------|-------|
840
+ | Availability SLA | | |
841
+ | RTO | | |
842
+ | RPO | | |
843
+ | Maintenance window | | |
844
+ | Failover strategy | | |
845
+
846
+ **Key Decisions**
847
+
848
+ | # | Decision | Rationale | Owner | Date |
849
+ |---|----------|-----------|-------|------|
850
+ | | | | | |
851
+
852
+ **Action Items**
853
+
854
+ | # | Action | Owner | Due Date | Status |
855
+ |---|--------|-------|----------|--------|
856
+ | | | | | |
857
+
858
+ ---
859
+
860
+ ### Session 7: User & Identity Management
861
+
862
+ **Goal:** Design the RBAC model, plan Identity Provider (IdP) integration, define the user lifecycle, and map authentication and authorization flows.
863
+
864
+ **What We Cover:**
865
+
866
+ 1. **RBAC model design**
867
+ - What roles exist in the system (admin, manager, user, viewer, external partner)?
868
+ - What permissions does each role require (CRUD on which entities)?
869
+ - Are there hierarchical roles or role inheritance?
870
+ - Do permissions vary by data scope (e.g., a manager sees only their department's data)?
871
+ - How will role assignment and delegation work?
872
+
873
+ 2. **Identity Provider (IdP) integration**
874
+ - Does the client use an existing IdP (Azure AD, Okta, Auth0, Keycloak)?
875
+ - Will the solution federate with the existing IdP or manage its own user store?
876
+ - Is SSO (Single Sign-On) required? Which protocol (SAML 2.0, OIDC)?
877
+ - Are there multiple IdPs for different user populations (internal vs. external)?
878
+
879
+ 3. **User lifecycle management**
880
+ - How are users provisioned (self-registration, admin-created, directory sync, SCIM)?
881
+ - What is the approval workflow for new user accounts?
882
+ - How are users deprovisioned when they leave or change roles?
883
+ - What happens to data owned by deprovisioned users?
884
+
885
+ 4. **Authentication flows**
886
+ - What authentication methods are supported (password, MFA, biometric, certificate)?
887
+ - Is MFA mandatory for all users or specific roles?
888
+ - What is the session management strategy (token lifetime, refresh, idle timeout)?
889
+ - How is password policy enforced (complexity, rotation, history)?
890
+
891
+ 5. **Authorization patterns**
892
+ - How are fine-grained permissions evaluated (attribute-based, policy-based)?
893
+ - Are there data-level access controls (row-level security, field masking)?
894
+ - How are API endpoints protected (OAuth 2.0 scopes, API keys)?
895
+ - What is the approach to service-to-service authentication?
896
+
897
+ **Notes Template:**
898
+
899
+ **RBAC Matrix**
900
+
901
+ | Role | Entity 1 (C/R/U/D) | Entity 2 (C/R/U/D) | Entity 3 (C/R/U/D) | Data Scope | Notes |
902
+ |------|---------------------|---------------------|---------------------|------------|-------|
903
+ | Admin | | | | | |
904
+ | Manager | | | | | |
905
+ | User | | | | | |
906
+ | Viewer | | | | | |
907
+
908
+ **IdP Integration Design**
909
+
910
+ | Aspect | Decision | Notes |
911
+ |--------|----------|-------|
912
+ | IdP platform | | |
913
+ | Protocol (SAML / OIDC) | | |
914
+ | SSO required | | |
915
+ | User store location | | |
916
+
917
+ **User Lifecycle Flows**
918
+
919
+ | Event | Trigger | Process Steps | Approvals Required | Systems Affected | Automated? |
920
+ |-------|---------|--------------|-------------------|-----------------|------------|
921
+ | Provisioning | | | | | |
922
+ | Role change | | | | | |
923
+ | Deprovisioning | | | | | |
924
+
925
+ **Authentication Configuration**
926
+
927
+ | Setting | Value | Rationale |
928
+ |---------|-------|-----------|
929
+ | Authentication method | | |
930
+ | MFA required for | | |
931
+ | Session timeout (idle) | | |
932
+ | Token lifetime | | |
933
+ | Password complexity | | |
934
+
935
+ **Key Decisions**
936
+
937
+ | # | Decision | Rationale | Owner | Date |
938
+ |---|----------|-----------|-------|------|
939
+ | | | | | |
940
+
941
+ **Action Items**
942
+
943
+ | # | Action | Owner | Due Date | Status |
944
+ |---|--------|-------|----------|--------|
945
+ | | | | | |
946
+
947
+ ---
948
+
949
+ ### Session 8: Integration & Interface Design
950
+
951
+ **Goal:** Detail external system integrations, define interface patterns, agree on data exchange formats, and establish error handling and retry strategies.
952
+
953
+ **What We Cover:**
954
+
955
+ 1. **External systems inventory**
956
+ - What are all the systems the solution must integrate with?
957
+ - For each system, who is the technical owner and what is their availability?
958
+ - What is the maturity of each system's API (well-documented, legacy, in development)?
959
+ - Are there licensing or access constraints for any system?
960
+
961
+ 2. **Interface patterns and protocols**
962
+ - What integration patterns are appropriate (request/reply, publish/subscribe, file transfer, webhook)?
963
+ - What protocols will be used (REST, SOAP, gRPC, SFTP, AMQP)?
964
+ - Will an integration middleware or ESB be used?
965
+ - How will API versioning be handled?
966
+
967
+ 3. **Data exchange formats and contracts**
968
+ - What data formats will be used (JSON, XML, CSV, Avro, Protobuf)?
969
+ - How will data contracts be defined and managed (OpenAPI, JSON Schema, WSDL)?
970
+ - What data transformation or mapping is required between systems?
971
+ - How will schema evolution and backward compatibility be handled?
972
+
973
+ 4. **Error handling and retry strategy**
974
+ - How should integration failures be handled (retry, dead-letter queue, manual intervention)?
975
+ - What retry policies apply (exponential backoff, max retries, circuit breaker)?
976
+ - How will failed messages be monitored and reprocessed?
977
+ - What alerting is needed for integration failures?
978
+
979
+ 5. **Data synchronization and consistency**
980
+ - What is the consistency model (eventual consistency, strong consistency)?
981
+ - How will data conflicts between systems be resolved?
982
+ - What is the approach to idempotency for critical operations?
983
+ - Are there batch synchronization requirements (daily feeds, nightly reconciliation)?
984
+
985
+ **Notes Template:**
986
+
987
+ **Integration Design Register**
988
+
989
+ | ID | External System | Interface Name | Direction | Pattern | Protocol | Data Format | Frequency | SLA | Owner |
990
+ |----|----------------|---------------|-----------|---------|----------|-------------|-----------|-----|-------|
991
+ | IF-01 | | | | | | | | | |
992
+
993
+ **Data Transformation Map**
994
+
995
+ | Interface | Source Field | Target Field | Transformation Rule | Validation | Notes |
996
+ |-----------|------------|-------------|---------------------|------------|-------|
997
+ | IF-01 | | | | | |
998
+
999
+ **Error Handling Strategy**
1000
+
1001
+ | Interface | Failure Scenario | Handling Pattern | Retry Policy | Dead Letter | Alert | Escalation |
1002
+ |-----------|-----------------|-----------------|-------------|-------------|-------|------------|
1003
+ | IF-01 | | | | | | |
1004
+
1005
+ **Data Synchronization Approach**
1006
+
1007
+ | Data Entity | Source System | Target System | Sync Method | Frequency | Conflict Resolution | Idempotency Key |
1008
+ |-------------|-------------|--------------|-------------|-----------|--------------------|-----------------|
1009
+ | | | | | | | |
1010
+
1011
+ **Key Decisions**
1012
+
1013
+ | # | Decision | Rationale | Owner | Date |
1014
+ |---|----------|-----------|-------|------|
1015
+ | | | | | |
1016
+
1017
+ **Action Items**
1018
+
1019
+ | # | Action | Owner | Due Date | Status |
1020
+ |---|--------|-------|----------|--------|
1021
+ | | | | | |
1022
+
1023
+ ---
1024
+
1025
+ ### Session 9: Quality Assurance & Testing Strategy
1026
+
1027
+ **Goal:** Define the overall test strategy, select testing tooling, plan test environments, establish quality gates, and design the UAT approach.
1028
+
1029
+ **What We Cover:**
1030
+
1031
+ 1. **Test strategy and approach**
1032
+ - What testing levels will be applied (unit, integration, system, E2E, performance, security)?
1033
+ - What is the expected test coverage target for each level?
1034
+ - How will TDD or BDD be applied?
1035
+ - What is the approach to regression testing?
1036
+ - How will non-functional testing be addressed (load, stress, soak, accessibility)?
1037
+
1038
+ 2. **Testing tools and frameworks**
1039
+ - What unit testing frameworks will be used (Jest, xUnit, JUnit, PyTest)?
1040
+ - What integration and E2E testing tools are preferred (Cypress, Playwright, Selenium)?
1041
+ - What performance testing tools will be used (k6, JMeter, Gatling)?
1042
+ - What security testing tools will be applied (OWASP ZAP, Snyk, SonarQube)?
1043
+
1044
+ 3. **Test environments**
1045
+ - How many test environments are needed (dev, test, staging, pre-prod)?
1046
+ - How will test data be provisioned (synthetic data, anonymized production data, seed scripts)?
1047
+ - How will environments be kept in sync with production?
1048
+
1049
+ 4. **Quality gates and CI/CD integration**
1050
+ - What quality gates must pass before code is merged (code review, linting, unit tests, coverage threshold)?
1051
+ - What quality gates must pass before a release is promoted?
1052
+ - How will automated testing be integrated into the CI/CD pipeline?
1053
+
1054
+ 5. **UAT approach**
1055
+ - Who will perform UAT (business users, product owner, dedicated UAT team)?
1056
+ - How will UAT scenarios be defined and managed?
1057
+ - What constitutes UAT sign-off (criteria, approvers)?
1058
+ - How will UAT defects be triaged and prioritized?
1059
+
1060
+ **Notes Template:**
1061
+
1062
+ **Test Strategy Matrix**
1063
+
1064
+ | Test Level | Scope | Coverage Target | Automation Level | Tools | Responsible | When Executed |
1065
+ |-----------|-------|-----------------|-----------------|-------|-------------|---------------|
1066
+ | Unit | | | | | | |
1067
+ | Integration | | | | | | |
1068
+ | System / E2E | | | | | | |
1069
+ | Performance | | | | | | |
1070
+ | Security | | | | | | |
1071
+ | Accessibility | | | | | | |
1072
+
1073
+ **Testing Toolchain**
1074
+
1075
+ | Purpose | Tool | Version | License | Notes |
1076
+ |---------|------|---------|---------|-------|
1077
+ | Unit testing | | | | |
1078
+ | E2E testing | | | | |
1079
+ | Performance testing | | | | |
1080
+ | Security scanning | | | | |
1081
+ | Code quality | | | | |
1082
+
1083
+ **Test Environment Plan**
1084
+
1085
+ | Environment | Purpose | Data Strategy | Refresh Cadence | Access | Infrastructure | Owner |
1086
+ |-------------|---------|---------------|-----------------|--------|---------------|-------|
1087
+ | Dev | | | | | | |
1088
+ | Test | | | | | | |
1089
+ | Staging | | | | | | |
1090
+ | Pre-prod | | | | | | |
1091
+
1092
+ **Quality Gates**
1093
+
1094
+ | Gate | Stage | Criteria | Threshold | Blocking? | Tool |
1095
+ |------|-------|----------|-----------|-----------|------|
1096
+ | Code review | PR merge | | | Yes | |
1097
+ | Unit test pass | PR merge | | | Yes | |
1098
+ | Code coverage | PR merge | | | Yes | |
1099
+ | Integration tests | Deploy to staging | | | Yes | |
1100
+
1101
+ **UAT Process**
1102
+
1103
+ | Aspect | Decision | Notes |
1104
+ |--------|----------|-------|
1105
+ | UAT participants | | |
1106
+ | UAT scenario source | | |
1107
+ | Sign-off criteria | | |
1108
+ | Sign-off approver(s) | | |
1109
+ | Defect triage process | | |
1110
+
1111
+ **Key Decisions**
1112
+
1113
+ | # | Decision | Rationale | Owner | Date |
1114
+ |---|----------|-----------|-------|------|
1115
+ | | | | | |
1116
+
1117
+ **Action Items**
1118
+
1119
+ | # | Action | Owner | Due Date | Status |
1120
+ |---|--------|-------|----------|--------|
1121
+ | | | | | |
1122
+
1123
+ ---
1124
+
1125
+ ### Session 10: Infrastructure & Deployment Readiness
1126
+
1127
+ **Goal:** Define the cloud or hosting strategy, plan the deployment approach, establish monitoring and alerting, determine backup and disaster recovery procedures, and assess go-live readiness criteria.
1128
+
1129
+ **What We Cover:**
1130
+
1131
+ 1. **Cloud / hosting strategy**
1132
+ - What cloud provider will be used (AWS, Azure, GCP, on-premises, hybrid)?
1133
+ - What is the account and subscription structure?
1134
+ - What regions and availability zones are required?
1135
+ - Are there data sovereignty or residency requirements that constrain hosting?
1136
+ - What is the cost model and budget for infrastructure?
1137
+
1138
+ 2. **Deployment strategy**
1139
+ - What deployment model will be used (blue-green, canary, rolling, immutable)?
1140
+ - How will the CI/CD pipeline be structured?
1141
+ - What tools will be used for CI/CD (GitHub Actions, Azure DevOps, GitLab CI, Jenkins)?
1142
+ - How will infrastructure be managed (IaC with Terraform, Pulumi, CloudFormation)?
1143
+ - What is the approach to containerization (Docker, Kubernetes, ECS, App Service)?
1144
+
1145
+ 3. **Monitoring, logging, and alerting**
1146
+ - What monitoring platform will be used (Datadog, New Relic, Azure Monitor, CloudWatch)?
1147
+ - What metrics will be tracked (latency, error rate, throughput, saturation)?
1148
+ - What is the alerting strategy (thresholds, escalation chains, on-call rotation)?
1149
+ - How will application logs be aggregated and queried?
1150
+
1151
+ 4. **Backup and disaster recovery**
1152
+ - What is the backup strategy (frequency, retention, storage location)?
1153
+ - How will backups be tested and validated?
1154
+ - What is the DR strategy (active-passive, active-active, pilot light)?
1155
+ - How often will DR drills be conducted?
1156
+
1157
+ 5. **Go-live readiness criteria**
1158
+ - What must be true before the solution goes to production?
1159
+ - What operational runbooks are needed?
1160
+ - What is the support handover process?
1161
+ - What is the rollback strategy if go-live fails?
1162
+
1163
+ **Notes Template:**
1164
+
1165
+ **Infrastructure Architecture**
1166
+
1167
+ | Component | Service / Product | Region | Tier / SKU | Redundancy | Est. Monthly Cost | Notes |
1168
+ |-----------|------------------|--------|-----------|------------|-------------------|-------|
1169
+ | Compute | | | | | | |
1170
+ | Database | | | | | | |
1171
+ | Storage | | | | | | |
1172
+ | Networking | | | | | | |
1173
+ | CDN | | | | | | |
1174
+
1175
+ **Deployment Pipeline Design**
1176
+
1177
+ | Stage | Trigger | Actions | Quality Gate | Environment | Duration |
1178
+ |-------|---------|---------|-------------|-------------|----------|
1179
+ | Build | | | | | |
1180
+ | Unit test | | | | | |
1181
+ | Deploy to test | | | | | |
1182
+ | Deploy to staging | | | | | |
1183
+ | Deploy to production | | | | | |
1184
+
1185
+ **Monitoring and Alerting**
1186
+
1187
+ | Metric | Source | Threshold (Warning) | Threshold (Critical) | Alert Channel | Dashboard |
1188
+ |--------|--------|--------------------|--------------------|---------------|-----------|
1189
+ | Response time (P95) | | | | | |
1190
+ | Error rate | | | | | |
1191
+ | CPU utilization | | | | | |
1192
+
1193
+ **Backup and DR Plan**
1194
+
1195
+ | Aspect | Strategy | Details |
1196
+ |--------|----------|---------|
1197
+ | Backup frequency | | |
1198
+ | Backup retention | | |
1199
+ | DR strategy | | |
1200
+ | DR failover time (RTO) | | |
1201
+ | DR data loss tolerance (RPO) | | |
1202
+ | DR drill cadence | | |
1203
+
1204
+ **Go-Live Readiness Checklist**
1205
+
1206
+ | # | Criterion | Status | Owner | Notes |
1207
+ |---|-----------|--------|-------|-------|
1208
+ | 1 | All critical defects resolved | | | |
1209
+ | 2 | UAT sign-off obtained | | | |
1210
+ | 3 | Performance benchmarks met | | | |
1211
+ | 4 | Security scan passed | | | |
1212
+ | 5 | Monitoring and alerting configured | | | |
1213
+ | 6 | Runbooks documented | | | |
1214
+ | 7 | Rollback procedure tested | | | |
1215
+
1216
+ **Key Decisions**
1217
+
1218
+ | # | Decision | Rationale | Owner | Date |
1219
+ |---|----------|-----------|-------|------|
1220
+ | | | | | |
1221
+
1222
+ **Action Items**
1223
+
1224
+ | # | Action | Owner | Due Date | Status |
1225
+ |---|--------|-------|----------|--------|
1226
+ | | | | | |
1227
+
1228
+ ---
1229
+
1230
+ ### Session 11: Project Roadmap & Release Planning
1231
+
1232
+ **Goal:** Define project phases and timeline, confirm MVP scope, establish build order and milestones, and identify key risks with mitigation strategies.
1233
+
1234
+ **What We Cover:**
1235
+
1236
+ 1. **Project phases and timeline**
1237
+ - What are the major phases of the project (Discovery, Build, UAT, Go-Live, Hypercare)?
1238
+ - What is the overall timeline from build start to production go-live?
1239
+ - Are there hard deadlines driven by business events, regulatory dates, or contracts?
1240
+ - What is the sprint cadence (1-week, 2-week, 3-week)?
1241
+
1242
+ 2. **MVP scope confirmation**
1243
+ - Review the MVP scope boundary from Session 3
1244
+ - Has anything changed since the business requirements session?
1245
+ - Are all stakeholders aligned on what is in MVP vs. deferred?
1246
+ - What is the minimum viable product that demonstrates value to end-users?
1247
+
1248
+ 3. **Build order and dependencies**
1249
+ - In what order should EPICs be built?
1250
+ - What are the technical dependencies between EPICs?
1251
+ - Are there infrastructure or integration prerequisites that must be ready first?
1252
+ - What is the critical path?
1253
+
1254
+ 4. **Milestones and release plan**
1255
+ - What are the key milestones (alpha, beta, RC, GA)?
1256
+ - What functionality is included in each milestone?
1257
+ - What is the criteria for progressing from one milestone to the next?
1258
+
1259
+ 5. **Risk register and mitigation**
1260
+ - What are the top project risks (technical, resourcing, scope, external)?
1261
+ - What is the likelihood and impact of each risk?
1262
+ - What mitigation strategies will be applied?
1263
+ - Who owns each risk?
1264
+
1265
+ **Notes Template:**
1266
+
1267
+ **Project Timeline**
1268
+
1269
+ | Phase | Start Date | End Date | Duration | Key Activities | Dependencies |
1270
+ |-------|-----------|----------|----------|---------------|--------------|
1271
+ | Discovery | | | | | |
1272
+ | Sprint 0 / Setup | | | | | |
1273
+ | Build -- MVP | | | | | |
1274
+ | UAT | | | | | |
1275
+ | Go-Live | | | | | |
1276
+ | Hypercare | | | | | |
1277
+
1278
+ **EPIC Build Order**
1279
+
1280
+ | Order | EPIC ID | EPIC Name | Sprint(s) | Dependencies | Critical Path? | Notes |
1281
+ |-------|---------|-----------|-----------|--------------|---------------|-------|
1282
+ | 1 | | | | | | |
1283
+
1284
+ **Milestone Plan**
1285
+
1286
+ | Milestone | Target Date | Included EPICs / Features | Entry Criteria | Exit Criteria | Stakeholder Demo? |
1287
+ |-----------|------------|--------------------------|----------------|---------------|-------------------|
1288
+ | Alpha | | | | | |
1289
+ | Beta | | | | | |
1290
+ | Release Candidate | | | | | |
1291
+ | GA / Go-Live | | | | | |
1292
+
1293
+ **Risk Register**
1294
+
1295
+ | ID | Risk Description | Category | Likelihood (H/M/L) | Impact (H/M/L) | Risk Score | Mitigation | Owner | Status |
1296
+ |----|-----------------|----------|--------------------|-----------------|-----------|-----------:|-------|--------|
1297
+ | R-01 | | | | | | | | |
1298
+
1299
+ **Key Decisions**
1300
+
1301
+ | # | Decision | Rationale | Owner | Date |
1302
+ |---|----------|-----------|-------|------|
1303
+ | | | | | |
1304
+
1305
+ **Action Items**
1306
+
1307
+ | # | Action | Owner | Due Date | Status |
1308
+ |---|--------|-------|----------|--------|
1309
+ | | | | | |
1310
+
1311
+ ---
1312
+
1313
+ ### Session 12: Team & Delivery Model Definition
1314
+
1315
+ **Goal:** Define the team structure and roles, establish governance and decision-making processes, agree on agile ceremonies, and plan the support model for post-go-live.
1316
+
1317
+ **What We Cover:**
1318
+
1319
+ 1. **Team structure and roles**
1320
+ - What roles are needed for the build phase (PO, Scrum Master, developers, QA, UX, architect)?
1321
+ - How many people are needed for each role?
1322
+ - Which roles are filled by the client and which by the delivery partner?
1323
+ - Are there part-time or shared resources? What is their allocation?
1324
+
1325
+ 2. **Governance and decision-making**
1326
+ - What is the governance structure (steering committee, project board)?
1327
+ - How often does the governance body meet?
1328
+ - What decisions require steering committee approval vs. team-level authority?
1329
+ - What is the escalation path for blockers or scope changes?
1330
+
1331
+ 3. **Agile ceremonies and cadence**
1332
+ - What agile framework will be followed (Scrum, Kanban, SAFe, hybrid)?
1333
+ - What is the sprint cadence and duration?
1334
+ - What ceremonies are planned (standup, sprint planning, review, retrospective, backlog refinement)?
1335
+ - What tools will be used for backlog management (Jira, Azure DevOps, Linear)?
1336
+
1337
+ 4. **Communication and reporting**
1338
+ - How will progress be communicated to stakeholders (sprint review, status report, dashboard)?
1339
+ - What is the reporting cadence (weekly, bi-weekly)?
1340
+ - What metrics will be tracked (velocity, burndown, defect rate, cycle time)?
1341
+
1342
+ 5. **Support model and transition**
1343
+ - What support model will be in place post-go-live (L1, L2, L3)?
1344
+ - What is the SLA for incident response and resolution?
1345
+ - How will knowledge transfer to the support team be handled?
1346
+ - What is the warranty or hypercare period?
1347
+
1348
+ **Notes Template:**
1349
+
1350
+ **Team Structure**
1351
+
1352
+ | Role | Name / TBD | Allocation (%) | Responsible Party (Client / Partner) | Start Date | Notes |
1353
+ |------|-----------|----------------|--------------------------------------|-----------|-------|
1354
+ | Product Owner | | | | | |
1355
+ | Scrum Master | | | | | |
1356
+ | Solution Architect | | | | | |
1357
+ | Frontend Developer | | | | | |
1358
+ | Backend Developer | | | | | |
1359
+ | QA Engineer | | | | | |
1360
+ | UX Designer | | | | | |
1361
+
1362
+ **Governance Structure**
1363
+
1364
+ | Body | Members | Meeting Cadence | Decision Authority | Escalation From |
1365
+ |------|---------|----------------|-------------------|-----------------|
1366
+ | Steering Committee | | | | |
1367
+ | Project Board | | | | |
1368
+ | Delivery Team | | | | |
1369
+
1370
+ **Agile Ceremonies**
1371
+
1372
+ | Ceremony | Cadence | Duration | Participants | Facilitator | Tool |
1373
+ |----------|---------|----------|--------------|-------------|------|
1374
+ | Daily standup | Daily | | | | |
1375
+ | Sprint planning | Per sprint | | | | |
1376
+ | Sprint review | Per sprint | | | | |
1377
+ | Retrospective | Per sprint | | | | |
1378
+ | Backlog refinement | Weekly | | | | |
1379
+
1380
+ **Support Model**
1381
+
1382
+ | Level | Scope | SLA (Response) | SLA (Resolution) | Responsible | Escalation Path |
1383
+ |-------|-------|----------------|-----------------|-------------|-----------------|
1384
+ | L1 | | | | | |
1385
+ | L2 | | | | | |
1386
+ | L3 | | | | | |
1387
+
1388
+ **Key Decisions**
1389
+
1390
+ | # | Decision | Rationale | Owner | Date |
1391
+ |---|----------|-----------|-------|------|
1392
+ | | | | | |
1393
+
1394
+ **Action Items**
1395
+
1396
+ | # | Action | Owner | Due Date | Status |
1397
+ |---|--------|-------|----------|--------|
1398
+ | | | | | |
1399
+
1400
+ ---
1401
+
1402
+ ### Session 13: Discovery Sprint Wrap-up & Next Steps
1403
+
1404
+ **Goal:** Present consolidated Discovery Sprint findings, deliver the Go / No-Go recommendation, review open items, agree on the transition plan to the build phase, and formally close the Discovery Sprint.
1405
+
1406
+ **Special Protocol — Cross-Reference (required for Session 13):**
1407
+ Before facilitating any topics, execute the **Session 13: Cross-Reference Protocol** (Step 0) described above. Analyze Sessions 1–12 for inconsistencies, present findings, resolve critical and high issues, and capture results in the notes. This ensures the wrap-up discussion starts from a consistent, verified baseline. The cross-reference must complete before proceeding to the topic-by-topic facilitation below.
1408
+
1409
+ **What We Cover:**
1410
+
1411
+ 1. **Discovery Sprint summary**
1412
+ - What are the key findings across business, technical, and governance dimensions?
1413
+ - Were there any significant surprises or pivots during discovery?
1414
+ - Which assumptions were validated and which were invalidated?
1415
+ - What issues were identified and resolved by the cross-reference analysis?
1416
+
1417
+ 2. **Project Definition Document (PDD) review**
1418
+ - Walk through the PDD structure and key sections
1419
+ - Are there sections requiring further refinement?
1420
+ - Does the client agree with documented scope, architecture, and approach?
1421
+
1422
+ 3. **Go / No-Go assessment**
1423
+ - Are the business requirements sufficiently clear to begin building?
1424
+ - Is the technical architecture validated and feasible?
1425
+ - Are there blocking risks or unresolved dependencies?
1426
+ - What is the confidence level for the proposed timeline and budget?
1427
+
1428
+ 4. **Open items and parking lot**
1429
+ - What items remain unresolved from discovery sessions?
1430
+ - Which items can be deferred to the build phase without risk?
1431
+ - Which items must be resolved before the build phase begins?
1432
+
1433
+ 5. **Transition plan and next steps**
1434
+ - What is the proposed start date for the build phase?
1435
+ - What team onboarding or environment setup is needed?
1436
+ - How will the product backlog be handed over to the development team?
1437
+
1438
+ 6. **Feedback and lessons learned**
1439
+ - What worked well during the Discovery Sprint?
1440
+ - What could be improved for future engagements?
1441
+
1442
+ **Notes Template:**
1443
+
1444
+ **Go / No-Go Assessment**
1445
+
1446
+ | Criterion | Status (Green / Amber / Red) | Notes |
1447
+ |-----------|------------------------------|-------|
1448
+ | Business requirements clarity | | |
1449
+ | Technical architecture feasibility | | |
1450
+ | Security and compliance readiness | | |
1451
+ | Integration dependencies resolved | | |
1452
+ | Team and budget availability | | |
1453
+ | Timeline confidence | | |
1454
+ | Stakeholder alignment | | |
1455
+ | **Overall Recommendation** | | |
1456
+
1457
+ **Open Items Register**
1458
+
1459
+ | ID | Item | Source Session | Priority (H/M/L) | Must Resolve Before Build? | Owner | Target Date | Status |
1460
+ |----|------|---------------|-------------------|---------------------------|-------|-------------|--------|
1461
+ | OI-1 | | | | | | | |
1462
+
1463
+ **Cross-Reference Analysis Results**
1464
+
1465
+ | Metric | Count | Notes |
1466
+ |--------|-------|-------|
1467
+ | Total findings | | |
1468
+ | Critical | | |
1469
+ | High | | |
1470
+ | Medium | | |
1471
+ | Low | | |
1472
+ | Fixes applied | | |
1473
+ | Findings deferred | | |
1474
+
1475
+ **Transition Plan**
1476
+
1477
+ | Activity | Description | Owner | Target Date | Status |
1478
+ |----------|-------------|-------|-------------|--------|
1479
+ | Build phase kick-off | | | | |
1480
+ | Team onboarding | | | | |
1481
+ | Environment provisioning | | | | |
1482
+ | Backlog handover | | | | |
1483
+ | First sprint planning | | | | |
1484
+
1485
+ **Lessons Learned**
1486
+
1487
+ | Category | What Went Well | What Could Improve | Action for Next Time |
1488
+ |----------|----------------|--------------------|----------------------|
1489
+ | Facilitation | | | |
1490
+ | Stakeholder engagement | | | |
1491
+ | Documentation | | | |
1492
+ | Logistics | | | |
1493
+
1494
+ **Key Decisions**
1495
+
1496
+ | # | Decision | Rationale | Owner | Date |
1497
+ |---|----------|-----------|-------|------|
1498
+ | | | | | |
1499
+
1500
+ **Action Items**
1501
+
1502
+ | # | Action | Owner | Due Date | Status |
1503
+ |---|--------|-------|----------|--------|
1504
+ | | | | | |
1505
+
1506
+ ---
1507
+
1508
+ ## Context-Awareness Rules
1509
+
1510
+ When facilitating sessions, reference prior session outputs from `.planning/discovery/_context.md`:
1511
+
1512
+ | Current Session | Reference From |
1513
+ |----------------|----------------|
1514
+ | Session 2 | Session 1: project context, vision, stakeholders |
1515
+ | Session 3 | Session 2: pain points, processes, personas, systems, data flows |
1516
+ | Session 4 | Session 2: personas. Session 3: requirements, EPICs |
1517
+ | Session 5 | Session 3: requirements, scope. Session 4: UX decisions |
1518
+ | Session 6 | Session 5: architecture, technology stack |
1519
+ | Session 7 | Session 5: architecture. Session 6: security requirements |
1520
+ | Session 8 | Session 5: architecture, integration points |
1521
+ | Session 9 | Session 3: requirements. Session 5: architecture |
1522
+ | Session 10 | Session 5: architecture. Session 9: test environments |
1523
+ | Session 11 | Session 3: EPICs, scope. Session 5: architecture. Session 9: QA |
1524
+ | Session 12 | Session 11: roadmap, phases, timeline |
1525
+ | Session 13 | All previous sessions — full context review |
1526
+
1527
+ ---
1528
+
1529
+ ## Edge Cases
1530
+
1531
+ - **Session file not found:** Create it from the session template content above.
1532
+ - **All sessions completed:** Congratulate the user and suggest reviewing `_context.md` for a full summary.
1533
+ - **User wants to skip a topic:** Allow it. Note the topic was skipped and continue.
1534
+ - **User provides very brief answers:** Ask at least one follow-up question before accepting.
1535
+ - **Session 3:** ALWAYS use the Process-First Protocol (Steps 5A–5G) — never use the generic topic loop.
1536
+ - **Session 13:** ALWAYS run the Cross-Reference Protocol (Step 0) before topic facilitation.
1537
+
1538
+ </process>
1539
+
1540
+ <success_criteria>
1541
+ - All 13 sessions are facilitated as substantive guided steps with Goal, guiding questions, and notes templates.
1542
+ - The Session 3 process-first protocol and Session 13 cross-reference protocol are present as text procedures.
1543
+ - All artifact writes resolve to `.planning/discovery/session-NN.md`, `.planning/discovery/_progress.md`, `.planning/discovery/_context.md`.
1544
+ - No writes target a root-level capital-D Discovery directory, an absolute path, or a `..` path.
1545
+ - Text-mode fallback is documented for all AskUserQuestion steps.
1546
+ </success_criteria>