@ahmed-g-gad/apothem 0.1.1

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 (674) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/LICENSE +21 -0
  3. package/LICENSES/MIT.txt +18 -0
  4. package/LICENSES/PSF-2.0.txt +47 -0
  5. package/README.md +549 -0
  6. package/bin/README.md +37 -0
  7. package/bin/apothem.mjs +78 -0
  8. package/package.json +75 -0
  9. package/pyproject.toml +347 -0
  10. package/src/apothem/README.md +52 -0
  11. package/src/apothem/__init__.py +66 -0
  12. package/src/apothem/__main__.py +28 -0
  13. package/src/apothem/_vendor/.keep +0 -0
  14. package/src/apothem/_vendor/__init__.py +25 -0
  15. package/src/apothem/_vendor/attr/__init__.py +104 -0
  16. package/src/apothem/_vendor/attr/__init__.pyi +389 -0
  17. package/src/apothem/_vendor/attr/_cmp.py +160 -0
  18. package/src/apothem/_vendor/attr/_cmp.pyi +13 -0
  19. package/src/apothem/_vendor/attr/_compat.py +99 -0
  20. package/src/apothem/_vendor/attr/_config.py +31 -0
  21. package/src/apothem/_vendor/attr/_funcs.py +497 -0
  22. package/src/apothem/_vendor/attr/_make.py +3406 -0
  23. package/src/apothem/_vendor/attr/_next_gen.py +674 -0
  24. package/src/apothem/_vendor/attr/_typing_compat.pyi +15 -0
  25. package/src/apothem/_vendor/attr/_version_info.py +89 -0
  26. package/src/apothem/_vendor/attr/_version_info.pyi +9 -0
  27. package/src/apothem/_vendor/attr/converters.py +162 -0
  28. package/src/apothem/_vendor/attr/converters.pyi +19 -0
  29. package/src/apothem/_vendor/attr/exceptions.py +95 -0
  30. package/src/apothem/_vendor/attr/exceptions.pyi +17 -0
  31. package/src/apothem/_vendor/attr/filters.py +72 -0
  32. package/src/apothem/_vendor/attr/filters.pyi +6 -0
  33. package/src/apothem/_vendor/attr/py.typed +0 -0
  34. package/src/apothem/_vendor/attr/setters.py +79 -0
  35. package/src/apothem/_vendor/attr/setters.pyi +20 -0
  36. package/src/apothem/_vendor/attr/validators.py +750 -0
  37. package/src/apothem/_vendor/attr/validators.pyi +140 -0
  38. package/src/apothem/_vendor/attr.LICENSE +21 -0
  39. package/src/apothem/_vendor/attrs/__init__.py +72 -0
  40. package/src/apothem/_vendor/attrs/__init__.pyi +314 -0
  41. package/src/apothem/_vendor/attrs/converters.py +3 -0
  42. package/src/apothem/_vendor/attrs/exceptions.py +3 -0
  43. package/src/apothem/_vendor/attrs/filters.py +3 -0
  44. package/src/apothem/_vendor/attrs/py.typed +0 -0
  45. package/src/apothem/_vendor/attrs/setters.py +3 -0
  46. package/src/apothem/_vendor/attrs/validators.py +3 -0
  47. package/src/apothem/_vendor/attrs.LICENSE +21 -0
  48. package/src/apothem/_vendor/jsonschema/__init__.py +120 -0
  49. package/src/apothem/_vendor/jsonschema/__main__.py +6 -0
  50. package/src/apothem/_vendor/jsonschema/_format.py +546 -0
  51. package/src/apothem/_vendor/jsonschema/_keywords.py +449 -0
  52. package/src/apothem/_vendor/jsonschema/_legacy_keywords.py +449 -0
  53. package/src/apothem/_vendor/jsonschema/_types.py +204 -0
  54. package/src/apothem/_vendor/jsonschema/_typing.py +29 -0
  55. package/src/apothem/_vendor/jsonschema/_utils.py +355 -0
  56. package/src/apothem/_vendor/jsonschema/benchmarks/__init__.py +5 -0
  57. package/src/apothem/_vendor/jsonschema/benchmarks/const_vs_enum.py +30 -0
  58. package/src/apothem/_vendor/jsonschema/benchmarks/contains.py +28 -0
  59. package/src/apothem/_vendor/jsonschema/benchmarks/import_benchmark.py +31 -0
  60. package/src/apothem/_vendor/jsonschema/benchmarks/issue232/issue.json +2653 -0
  61. package/src/apothem/_vendor/jsonschema/benchmarks/issue232.py +25 -0
  62. package/src/apothem/_vendor/jsonschema/benchmarks/json_schema_test_suite.py +12 -0
  63. package/src/apothem/_vendor/jsonschema/benchmarks/nested_schemas.py +56 -0
  64. package/src/apothem/_vendor/jsonschema/benchmarks/subcomponents.py +42 -0
  65. package/src/apothem/_vendor/jsonschema/benchmarks/unused_registry.py +35 -0
  66. package/src/apothem/_vendor/jsonschema/benchmarks/useless_applicator_schemas.py +106 -0
  67. package/src/apothem/_vendor/jsonschema/benchmarks/useless_keywords.py +32 -0
  68. package/src/apothem/_vendor/jsonschema/benchmarks/validator_creation.py +14 -0
  69. package/src/apothem/_vendor/jsonschema/cli.py +292 -0
  70. package/src/apothem/_vendor/jsonschema/exceptions.py +490 -0
  71. package/src/apothem/_vendor/jsonschema/protocols.py +230 -0
  72. package/src/apothem/_vendor/jsonschema/validators.py +1410 -0
  73. package/src/apothem/_vendor/jsonschema.LICENSE +19 -0
  74. package/src/apothem/_vendor/jsonschema_specifications/__init__.py +12 -0
  75. package/src/apothem/_vendor/jsonschema_specifications/_core.py +38 -0
  76. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft201909/metaschema.json +42 -0
  77. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft201909/vocabularies/applicator +56 -0
  78. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft201909/vocabularies/content +17 -0
  79. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft201909/vocabularies/core +57 -0
  80. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft201909/vocabularies/format +14 -0
  81. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft201909/vocabularies/meta-data +37 -0
  82. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft201909/vocabularies/validation +98 -0
  83. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/metaschema.json +58 -0
  84. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/vocabularies/applicator +48 -0
  85. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/vocabularies/content +17 -0
  86. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/vocabularies/core +51 -0
  87. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/vocabularies/format-annotation +14 -0
  88. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/vocabularies/format-assertion +14 -0
  89. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/vocabularies/meta-data +37 -0
  90. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/vocabularies/unevaluated +15 -0
  91. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft202012/vocabularies/validation +98 -0
  92. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft3/metaschema.json +172 -0
  93. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft4/metaschema.json +149 -0
  94. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft6/metaschema.json +153 -0
  95. package/src/apothem/_vendor/jsonschema_specifications/schemas/draft7/metaschema.json +166 -0
  96. package/src/apothem/_vendor/jsonschema_specifications.LICENSE +19 -0
  97. package/src/apothem/_vendor/referencing/__init__.py +7 -0
  98. package/src/apothem/_vendor/referencing/_attrs.py +31 -0
  99. package/src/apothem/_vendor/referencing/_attrs.pyi +21 -0
  100. package/src/apothem/_vendor/referencing/_core.py +739 -0
  101. package/src/apothem/_vendor/referencing/exceptions.py +165 -0
  102. package/src/apothem/_vendor/referencing/jsonschema.py +642 -0
  103. package/src/apothem/_vendor/referencing/py.typed +0 -0
  104. package/src/apothem/_vendor/referencing/retrieval.py +94 -0
  105. package/src/apothem/_vendor/referencing/typing.py +61 -0
  106. package/src/apothem/_vendor/referencing.LICENSE +19 -0
  107. package/src/apothem/_vendor/rpds/__init__.py +251 -0
  108. package/src/apothem/_vendor/typing_extensions.LICENSE +279 -0
  109. package/src/apothem/_vendor/typing_extensions.py +4317 -0
  110. package/src/apothem/_vendor/vendor.txt +22 -0
  111. package/src/apothem/_vendor/yaml/__init__.py +389 -0
  112. package/src/apothem/_vendor/yaml/composer.py +138 -0
  113. package/src/apothem/_vendor/yaml/constructor.py +748 -0
  114. package/src/apothem/_vendor/yaml/cyaml.py +100 -0
  115. package/src/apothem/_vendor/yaml/dumper.py +61 -0
  116. package/src/apothem/_vendor/yaml/emitter.py +1137 -0
  117. package/src/apothem/_vendor/yaml/error.py +74 -0
  118. package/src/apothem/_vendor/yaml/events.py +85 -0
  119. package/src/apothem/_vendor/yaml/loader.py +63 -0
  120. package/src/apothem/_vendor/yaml/nodes.py +48 -0
  121. package/src/apothem/_vendor/yaml/parser.py +588 -0
  122. package/src/apothem/_vendor/yaml/reader.py +185 -0
  123. package/src/apothem/_vendor/yaml/representer.py +388 -0
  124. package/src/apothem/_vendor/yaml/resolver.py +226 -0
  125. package/src/apothem/_vendor/yaml/scanner.py +1435 -0
  126. package/src/apothem/_vendor/yaml/serializer.py +110 -0
  127. package/src/apothem/_vendor/yaml/tokens.py +103 -0
  128. package/src/apothem/_vendor/yaml.LICENSE +20 -0
  129. package/src/apothem/agents/README.md +60 -0
  130. package/src/apothem/agents/codebase-explorer.md +91 -0
  131. package/src/apothem/agents/convention-auditor.md +93 -0
  132. package/src/apothem/agents/dependency-auditor.md +97 -0
  133. package/src/apothem/agents/fact-checker.md +84 -0
  134. package/src/apothem/agents/mcp-builder.md +86 -0
  135. package/src/apothem/agents/memory-auditor.md +93 -0
  136. package/src/apothem/agents/prompt-evaluator.md +87 -0
  137. package/src/apothem/agents/quality-gate.md +103 -0
  138. package/src/apothem/agents/refactor-surgeon.md +74 -0
  139. package/src/apothem/agents/research-scout.md +73 -0
  140. package/src/apothem/agents/security-scanner.md +83 -0
  141. package/src/apothem/agents/test-runner.md +84 -0
  142. package/src/apothem/audit/README.md +73 -0
  143. package/src/apothem/audit/_scan_lib.py +182 -0
  144. package/src/apothem/audit/analyze_graph.py +260 -0
  145. package/src/apothem/audit/build_capability_graph.py +607 -0
  146. package/src/apothem/audit/build_inventory.py +657 -0
  147. package/src/apothem/audit/build_plans_provenance.py +997 -0
  148. package/src/apothem/audit/check_links.py +389 -0
  149. package/src/apothem/audit/classify_artifacts.py +381 -0
  150. package/src/apothem/audit/deprecated-tokens.txt +10 -0
  151. package/src/apothem/audit/execute_plans_migration.py +491 -0
  152. package/src/apothem/audit/known-projects.txt +15 -0
  153. package/src/apothem/audit/render_capability_index.py +467 -0
  154. package/src/apothem/audit/render_inventory.py +405 -0
  155. package/src/apothem/audit/scan_ai_surfaces.py +1125 -0
  156. package/src/apothem/audit/scan_ai_surfaces_coarse.py +261 -0
  157. package/src/apothem/audit/scan_drift_features.py +143 -0
  158. package/src/apothem/audit/scan_frontmatter.py +293 -0
  159. package/src/apothem/audit/scan_header_coverage.py +1134 -0
  160. package/src/apothem/audit/scan_plan_leakage.py +540 -0
  161. package/src/apothem/audit/scan_plans_discipline.py +188 -0
  162. package/src/apothem/audit/scan_secrets_pii.py +245 -0
  163. package/src/apothem/audit/scan_stale_tokens.py +296 -0
  164. package/src/apothem/audit/synthesize_drift.py +205 -0
  165. package/src/apothem/benchmarks/README.md +33 -0
  166. package/src/apothem/benchmarks/__init__.py +3 -0
  167. package/src/apothem/benchmarks/bench_agents.py +63 -0
  168. package/src/apothem/benchmarks/bench_hooks.py +93 -0
  169. package/src/apothem/benchmarks/bench_install.py +58 -0
  170. package/src/apothem/benchmarks/bench_tests.py +93 -0
  171. package/src/apothem/benchmarks/bench_validate_ecosystem.py +84 -0
  172. package/src/apothem/cli/README.md +33 -0
  173. package/src/apothem/cli/__init__.py +229 -0
  174. package/src/apothem/cli/_cmd_completion.py +88 -0
  175. package/src/apothem/cli/_cmd_diff.py +181 -0
  176. package/src/apothem/cli/_cmd_doctor.py +143 -0
  177. package/src/apothem/cli/_cmd_harnesses.py +167 -0
  178. package/src/apothem/cli/_cmd_install.py +327 -0
  179. package/src/apothem/cli/_cmd_migrate_workspace.py +143 -0
  180. package/src/apothem/cli/_cmd_profile.py +341 -0
  181. package/src/apothem/cli/_cmd_status.py +180 -0
  182. package/src/apothem/cli/_cmd_uninstall.py +215 -0
  183. package/src/apothem/cli/_cmd_update.py +397 -0
  184. package/src/apothem/cli/_cmd_verify.py +194 -0
  185. package/src/apothem/cli/_common_flags.py +90 -0
  186. package/src/apothem/cli/_epilogs.py +296 -0
  187. package/src/apothem/cli/_helpers.py +857 -0
  188. package/src/apothem/cli/_json_formatter.py +21 -0
  189. package/src/apothem/cli/_materialize.py +376 -0
  190. package/src/apothem/cli/completions/apothem.bash +30 -0
  191. package/src/apothem/cli/completions/apothem.fish +19 -0
  192. package/src/apothem/cli/completions/apothem.ps1 +27 -0
  193. package/src/apothem/cli/completions/apothem.zsh +42 -0
  194. package/src/apothem/cli/reference_export.py +126 -0
  195. package/src/apothem/commands/README.md +125 -0
  196. package/src/apothem/commands/a11y-audit.md +203 -0
  197. package/src/apothem/commands/architecture-review.md +194 -0
  198. package/src/apothem/commands/audit.md +165 -0
  199. package/src/apothem/commands/code-audit.md +218 -0
  200. package/src/apothem/commands/code-review.md +193 -0
  201. package/src/apothem/commands/dependency-audit.md +209 -0
  202. package/src/apothem/commands/docs-review.md +199 -0
  203. package/src/apothem/commands/elevate.md +285 -0
  204. package/src/apothem/commands/eval.md +149 -0
  205. package/src/apothem/commands/fortress.md +172 -0
  206. package/src/apothem/commands/freshify.md +168 -0
  207. package/src/apothem/commands/github-deploy-fresh.md +178 -0
  208. package/src/apothem/commands/github-deploy-next.md +167 -0
  209. package/src/apothem/commands/perf-audit.md +198 -0
  210. package/src/apothem/commands/plan-amend.md +104 -0
  211. package/src/apothem/commands/plan-audit.md +127 -0
  212. package/src/apothem/commands/plan-design.md +257 -0
  213. package/src/apothem/commands/plan-execute.md +495 -0
  214. package/src/apothem/commands/plan-generate.md +351 -0
  215. package/src/apothem/commands/plan-review.md +555 -0
  216. package/src/apothem/commands/plan-spec.md +359 -0
  217. package/src/apothem/commands/plan-status.md +222 -0
  218. package/src/apothem/commands/plan.md +173 -0
  219. package/src/apothem/commands/projectify.md +142 -0
  220. package/src/apothem/commands/release-readiness.md +142 -0
  221. package/src/apothem/commands/research-analysis.md +241 -0
  222. package/src/apothem/commands/research-design.md +231 -0
  223. package/src/apothem/commands/research-disseminate.md +225 -0
  224. package/src/apothem/commands/research-experiment.md +232 -0
  225. package/src/apothem/commands/research-ideate.md +213 -0
  226. package/src/apothem/commands/research-paper.md +252 -0
  227. package/src/apothem/commands/research-proposal.md +220 -0
  228. package/src/apothem/commands/research-publish.md +255 -0
  229. package/src/apothem/commands/research-review.md +251 -0
  230. package/src/apothem/commands/research-sources.md +266 -0
  231. package/src/apothem/commands/research-spec.md +255 -0
  232. package/src/apothem/commands/research-synthesis.md +233 -0
  233. package/src/apothem/commands/research-theory.md +218 -0
  234. package/src/apothem/commands/research.md +181 -0
  235. package/src/apothem/commands/security-audit.md +196 -0
  236. package/src/apothem/commands/supply-chain-audit.md +192 -0
  237. package/src/apothem/commands/test-suite.md +146 -0
  238. package/src/apothem/commands/threat-model-audit.md +199 -0
  239. package/src/apothem/commands/ux-review.md +202 -0
  240. package/src/apothem/commands/workflow.md +162 -0
  241. package/src/apothem/conformity/README.md +173 -0
  242. package/src/apothem/conformity/__init__.py +1 -0
  243. package/src/apothem/conformity/_grep_base.py +93 -0
  244. package/src/apothem/conformity/agent_capability_grep.py +306 -0
  245. package/src/apothem/conformity/agents_md_coverage_grep.py +382 -0
  246. package/src/apothem/conformity/agnosticism_grep.py +311 -0
  247. package/src/apothem/conformity/always_on_budget_grep.py +318 -0
  248. package/src/apothem/conformity/bare_except_grep.py +115 -0
  249. package/src/apothem/conformity/binding_reciprocity_grep.py +151 -0
  250. package/src/apothem/conformity/brand_mark_grep.py +272 -0
  251. package/src/apothem/conformity/commented_out_code_grep.py +176 -0
  252. package/src/apothem/conformity/completion_claim_grep.py +169 -0
  253. package/src/apothem/conformity/conventional_commit_grep.py +319 -0
  254. package/src/apothem/conformity/copilot_instructions_presence_grep.py +324 -0
  255. package/src/apothem/conformity/cross_platform_matrix_grep.py +297 -0
  256. package/src/apothem/conformity/determinism_grep.py +306 -0
  257. package/src/apothem/conformity/diagram_staleness_grep.py +154 -0
  258. package/src/apothem/conformity/dynamism_grep.py +284 -0
  259. package/src/apothem/conformity/editorconfig_presence_grep.py +281 -0
  260. package/src/apothem/conformity/file_header_grep.py +502 -0
  261. package/src/apothem/conformity/freshness_token_grep.py +233 -0
  262. package/src/apothem/conformity/frontmatter_grep.py +274 -0
  263. package/src/apothem/conformity/frontmatter_value_grep.py +386 -0
  264. package/src/apothem/conformity/gate.py +1386 -0
  265. package/src/apothem/conformity/gitattributes_presence_grep.py +238 -0
  266. package/src/apothem/conformity/harden_runner_grep.py +320 -0
  267. package/src/apothem/conformity/hedging_grep.py +129 -0
  268. package/src/apothem/conformity/license_author_consistency_grep.py +204 -0
  269. package/src/apothem/conformity/link_check.py +327 -0
  270. package/src/apothem/conformity/magic_number_grep.py +182 -0
  271. package/src/apothem/conformity/multi_surface_coherence_grep.py +620 -0
  272. package/src/apothem/conformity/naming_grep.py +224 -0
  273. package/src/apothem/conformity/no_global_plans_grep.py +339 -0
  274. package/src/apothem/conformity/no_toplevel_docs_grep.py +120 -0
  275. package/src/apothem/conformity/oidc_trusted_publishing_grep.py +291 -0
  276. package/src/apothem/conformity/option_annotation_grep.py +352 -0
  277. package/src/apothem/conformity/orphan_output_grep.py +206 -0
  278. package/src/apothem/conformity/permissions_minimum_scope_grep.py +299 -0
  279. package/src/apothem/conformity/plain_language_grep.py +559 -0
  280. package/src/apothem/conformity/plan_next_step_consistency_grep.py +450 -0
  281. package/src/apothem/conformity/plan_suite_structure_grep.py +534 -0
  282. package/src/apothem/conformity/plans_discipline_language_grep.py +245 -0
  283. package/src/apothem/conformity/production_ready_pr_grep.py +200 -0
  284. package/src/apothem/conformity/recommend_next_step_grep.py +250 -0
  285. package/src/apothem/conformity/redundancy_grep.py +401 -0
  286. package/src/apothem/conformity/reference_token_grep.py +230 -0
  287. package/src/apothem/conformity/registry_capability_consistency_grep.py +368 -0
  288. package/src/apothem/conformity/secret_leak_grep.py +193 -0
  289. package/src/apothem/conformity/semver_stability_grep.py +358 -0
  290. package/src/apothem/conformity/smoke_install_grep.py +194 -0
  291. package/src/apothem/conformity/static_version_grep.py +284 -0
  292. package/src/apothem/conformity/token_efficiency_grep.py +185 -0
  293. package/src/apothem/conformity/unpinned_action_grep.py +115 -0
  294. package/src/apothem/conformity/user_confirm_grep.py +74 -0
  295. package/src/apothem/conformity/workflow_concurrency_grep.py +283 -0
  296. package/src/apothem/harnesses/README.md +63 -0
  297. package/src/apothem/harnesses/__init__.py +16 -0
  298. package/src/apothem/harnesses/_shared/README.md +36 -0
  299. package/src/apothem/harnesses/_shared/__init__.py +12 -0
  300. package/src/apothem/harnesses/_shared/install_driver.py +281 -0
  301. package/src/apothem/harnesses/_shared/install_driver_apply.py +612 -0
  302. package/src/apothem/harnesses/_shared/install_driver_backup.py +535 -0
  303. package/src/apothem/harnesses/_shared/install_driver_converters.py +310 -0
  304. package/src/apothem/harnesses/_shared/install_driver_lifecycle.py +495 -0
  305. package/src/apothem/harnesses/_shared/install_driver_materialize.py +675 -0
  306. package/src/apothem/harnesses/_shared/install_driver_merge.py +656 -0
  307. package/src/apothem/harnesses/_shared/install_driver_pathsafety.py +137 -0
  308. package/src/apothem/harnesses/_shared/install_driver_planvalidation.py +240 -0
  309. package/src/apothem/harnesses/_shared/install_driver_removal.py +366 -0
  310. package/src/apothem/harnesses/_shared/install_driver_treeops.py +248 -0
  311. package/src/apothem/harnesses/_shared/install_driver_types.py +330 -0
  312. package/src/apothem/harnesses/_shared/wrapper_factories.py +448 -0
  313. package/src/apothem/harnesses/antigravity/STANDARD-CONVENTION-PIN.md +91 -0
  314. package/src/apothem/harnesses/antigravity/__init__.py +70 -0
  315. package/src/apothem/harnesses/antigravity/capabilities.yml +40 -0
  316. package/src/apothem/harnesses/antigravity/install.py +63 -0
  317. package/src/apothem/harnesses/antigravity/templates/GEMINI.md +40 -0
  318. package/src/apothem/harnesses/antigravity/templates/plugin.json +5 -0
  319. package/src/apothem/harnesses/antigravity/uninstall.py +22 -0
  320. package/src/apothem/harnesses/antigravity/update.py +10 -0
  321. package/src/apothem/harnesses/antigravity/verify.py +11 -0
  322. package/src/apothem/harnesses/claude_code/STANDARD-CONVENTION-PIN.md +65 -0
  323. package/src/apothem/harnesses/claude_code/__init__.py +107 -0
  324. package/src/apothem/harnesses/claude_code/capabilities.yml +42 -0
  325. package/src/apothem/harnesses/claude_code/install.py +147 -0
  326. package/src/apothem/harnesses/claude_code/templates/settings.json +351 -0
  327. package/src/apothem/harnesses/claude_code/uninstall.py +23 -0
  328. package/src/apothem/harnesses/claude_code/update.py +10 -0
  329. package/src/apothem/harnesses/claude_code/verify.py +11 -0
  330. package/src/apothem/harnesses/codebuddy/STANDARD-CONVENTION-PIN.md +74 -0
  331. package/src/apothem/harnesses/codebuddy/__init__.py +49 -0
  332. package/src/apothem/harnesses/codebuddy/capabilities.yml +34 -0
  333. package/src/apothem/harnesses/codebuddy/install.py +40 -0
  334. package/src/apothem/harnesses/codebuddy/templates/apothem-rules.md +37 -0
  335. package/src/apothem/harnesses/codebuddy/uninstall.py +25 -0
  336. package/src/apothem/harnesses/codebuddy/update.py +10 -0
  337. package/src/apothem/harnesses/codebuddy/verify.py +11 -0
  338. package/src/apothem/harnesses/codex/STANDARD-CONVENTION-PIN.md +79 -0
  339. package/src/apothem/harnesses/codex/__init__.py +72 -0
  340. package/src/apothem/harnesses/codex/capabilities.yml +40 -0
  341. package/src/apothem/harnesses/codex/install.py +69 -0
  342. package/src/apothem/harnesses/codex/templates/AGENTS.md +40 -0
  343. package/src/apothem/harnesses/codex/templates/hooks.json +127 -0
  344. package/src/apothem/harnesses/codex/uninstall.py +23 -0
  345. package/src/apothem/harnesses/codex/update.py +10 -0
  346. package/src/apothem/harnesses/codex/verify.py +11 -0
  347. package/src/apothem/harnesses/cursor/STANDARD-CONVENTION-PIN.md +79 -0
  348. package/src/apothem/harnesses/cursor/__init__.py +48 -0
  349. package/src/apothem/harnesses/cursor/capabilities.yml +42 -0
  350. package/src/apothem/harnesses/cursor/install.py +38 -0
  351. package/src/apothem/harnesses/cursor/templates/apothem-rules.mdc +40 -0
  352. package/src/apothem/harnesses/cursor/uninstall.py +25 -0
  353. package/src/apothem/harnesses/cursor/update.py +10 -0
  354. package/src/apothem/harnesses/cursor/verify.py +11 -0
  355. package/src/apothem/harnesses/gemini_cli/STANDARD-CONVENTION-PIN.md +102 -0
  356. package/src/apothem/harnesses/gemini_cli/__init__.py +52 -0
  357. package/src/apothem/harnesses/gemini_cli/capabilities.yml +43 -0
  358. package/src/apothem/harnesses/gemini_cli/install.py +43 -0
  359. package/src/apothem/harnesses/gemini_cli/templates/GEMINI.md +38 -0
  360. package/src/apothem/harnesses/gemini_cli/uninstall.py +25 -0
  361. package/src/apothem/harnesses/gemini_cli/update.py +10 -0
  362. package/src/apothem/harnesses/gemini_cli/verify.py +11 -0
  363. package/src/apothem/harnesses/github_copilot/STANDARD-CONVENTION-PIN.md +84 -0
  364. package/src/apothem/harnesses/github_copilot/__init__.py +47 -0
  365. package/src/apothem/harnesses/github_copilot/capabilities.yml +42 -0
  366. package/src/apothem/harnesses/github_copilot/install.py +40 -0
  367. package/src/apothem/harnesses/github_copilot/templates/copilot-instructions.md +33 -0
  368. package/src/apothem/harnesses/github_copilot/uninstall.py +25 -0
  369. package/src/apothem/harnesses/github_copilot/update.py +10 -0
  370. package/src/apothem/harnesses/github_copilot/verify.py +11 -0
  371. package/src/apothem/harnesses/glm/STANDARD-CONVENTION-PIN.md +77 -0
  372. package/src/apothem/harnesses/glm/__init__.py +56 -0
  373. package/src/apothem/harnesses/glm/capabilities.yml +33 -0
  374. package/src/apothem/harnesses/glm/install.py +45 -0
  375. package/src/apothem/harnesses/glm/templates/glm.toml +58 -0
  376. package/src/apothem/harnesses/glm/uninstall.py +25 -0
  377. package/src/apothem/harnesses/glm/update.py +10 -0
  378. package/src/apothem/harnesses/glm/verify.py +11 -0
  379. package/src/apothem/harnesses/hermes/STANDARD-CONVENTION-PIN.md +57 -0
  380. package/src/apothem/harnesses/hermes/__init__.py +33 -0
  381. package/src/apothem/harnesses/hermes/capabilities.yml +36 -0
  382. package/src/apothem/harnesses/hermes/install.py +17 -0
  383. package/src/apothem/harnesses/hermes/materializer.py +35 -0
  384. package/src/apothem/harnesses/hermes/uninstall.py +33 -0
  385. package/src/apothem/harnesses/hermes/update.py +10 -0
  386. package/src/apothem/harnesses/hermes/verify.py +11 -0
  387. package/src/apothem/harnesses/kimi_code/STANDARD-CONVENTION-PIN.md +128 -0
  388. package/src/apothem/harnesses/kimi_code/__init__.py +59 -0
  389. package/src/apothem/harnesses/kimi_code/capabilities.yml +40 -0
  390. package/src/apothem/harnesses/kimi_code/install.py +42 -0
  391. package/src/apothem/harnesses/kimi_code/templates/AGENTS.md +43 -0
  392. package/src/apothem/harnesses/kimi_code/uninstall.py +27 -0
  393. package/src/apothem/harnesses/kimi_code/update.py +10 -0
  394. package/src/apothem/harnesses/kimi_code/verify.py +11 -0
  395. package/src/apothem/harnesses/kiro/STANDARD-CONVENTION-PIN.md +77 -0
  396. package/src/apothem/harnesses/kiro/__init__.py +49 -0
  397. package/src/apothem/harnesses/kiro/capabilities.yml +36 -0
  398. package/src/apothem/harnesses/kiro/install.py +39 -0
  399. package/src/apothem/harnesses/kiro/templates/apothem-rules.md +36 -0
  400. package/src/apothem/harnesses/kiro/uninstall.py +25 -0
  401. package/src/apothem/harnesses/kiro/update.py +10 -0
  402. package/src/apothem/harnesses/kiro/verify.py +11 -0
  403. package/src/apothem/harnesses/open_claw/STANDARD-CONVENTION-PIN.md +62 -0
  404. package/src/apothem/harnesses/open_claw/__init__.py +35 -0
  405. package/src/apothem/harnesses/open_claw/capabilities.yml +35 -0
  406. package/src/apothem/harnesses/open_claw/install.py +17 -0
  407. package/src/apothem/harnesses/open_claw/materializer.py +36 -0
  408. package/src/apothem/harnesses/open_claw/uninstall.py +32 -0
  409. package/src/apothem/harnesses/open_claw/update.py +10 -0
  410. package/src/apothem/harnesses/open_claw/verify.py +11 -0
  411. package/src/apothem/harnesses/opencode/STANDARD-CONVENTION-PIN.md +76 -0
  412. package/src/apothem/harnesses/opencode/__init__.py +35 -0
  413. package/src/apothem/harnesses/opencode/capabilities.yml +43 -0
  414. package/src/apothem/harnesses/opencode/install.py +17 -0
  415. package/src/apothem/harnesses/opencode/materializer.py +31 -0
  416. package/src/apothem/harnesses/opencode/uninstall.py +34 -0
  417. package/src/apothem/harnesses/opencode/update.py +10 -0
  418. package/src/apothem/harnesses/opencode/verify.py +11 -0
  419. package/src/apothem/harnesses/qwen_code/STANDARD-CONVENTION-PIN.md +87 -0
  420. package/src/apothem/harnesses/qwen_code/__init__.py +37 -0
  421. package/src/apothem/harnesses/qwen_code/capabilities.yml +43 -0
  422. package/src/apothem/harnesses/qwen_code/install.py +19 -0
  423. package/src/apothem/harnesses/qwen_code/materializer.py +174 -0
  424. package/src/apothem/harnesses/qwen_code/templates/QWEN.md +30 -0
  425. package/src/apothem/harnesses/qwen_code/uninstall.py +34 -0
  426. package/src/apothem/harnesses/qwen_code/update.py +10 -0
  427. package/src/apothem/harnesses/qwen_code/verify.py +11 -0
  428. package/src/apothem/harnesses/trae/STANDARD-CONVENTION-PIN.md +70 -0
  429. package/src/apothem/harnesses/trae/__init__.py +49 -0
  430. package/src/apothem/harnesses/trae/capabilities.yml +34 -0
  431. package/src/apothem/harnesses/trae/install.py +38 -0
  432. package/src/apothem/harnesses/trae/templates/apothem-rules.md +37 -0
  433. package/src/apothem/harnesses/trae/uninstall.py +25 -0
  434. package/src/apothem/harnesses/trae/update.py +10 -0
  435. package/src/apothem/harnesses/trae/verify.py +11 -0
  436. package/src/apothem/harnesses/windsurf/STANDARD-CONVENTION-PIN.md +91 -0
  437. package/src/apothem/harnesses/windsurf/__init__.py +52 -0
  438. package/src/apothem/harnesses/windsurf/capabilities.yml +40 -0
  439. package/src/apothem/harnesses/windsurf/install.py +41 -0
  440. package/src/apothem/harnesses/windsurf/templates/apothem-rules.md +37 -0
  441. package/src/apothem/harnesses/windsurf/uninstall.py +25 -0
  442. package/src/apothem/harnesses/windsurf/update.py +10 -0
  443. package/src/apothem/harnesses/windsurf/verify.py +11 -0
  444. package/src/apothem/harnesses/zed/STANDARD-CONVENTION-PIN.md +92 -0
  445. package/src/apothem/harnesses/zed/__init__.py +57 -0
  446. package/src/apothem/harnesses/zed/capabilities.yml +38 -0
  447. package/src/apothem/harnesses/zed/install.py +41 -0
  448. package/src/apothem/harnesses/zed/templates/apothem-rules.md +32 -0
  449. package/src/apothem/harnesses/zed/uninstall.py +28 -0
  450. package/src/apothem/harnesses/zed/update.py +10 -0
  451. package/src/apothem/harnesses/zed/verify.py +11 -0
  452. package/src/apothem/hooks/README.md +81 -0
  453. package/src/apothem/hooks/__init__.py +24 -0
  454. package/src/apothem/hooks/askuserquestion_validator.py +380 -0
  455. package/src/apothem/hooks/dispatch.py +296 -0
  456. package/src/apothem/hooks/emit_hook_context.py +444 -0
  457. package/src/apothem/hooks/hooks.json +318 -0
  458. package/src/apothem/hooks/lib/README.md +39 -0
  459. package/src/apothem/hooks/lib/__init__.py +18 -0
  460. package/src/apothem/hooks/lib/bootstrap.ps1 +129 -0
  461. package/src/apothem/hooks/lib/bootstrap.sh +103 -0
  462. package/src/apothem/hooks/lib/events.py +51 -0
  463. package/src/apothem/hooks/lib/find-pwsh.ps1 +78 -0
  464. package/src/apothem/hooks/lib/find-pwsh.sh +76 -0
  465. package/src/apothem/hooks/lib/find-python.ps1 +63 -0
  466. package/src/apothem/hooks/lib/find-python.sh +97 -0
  467. package/src/apothem/hooks/lib/log.py +43 -0
  468. package/src/apothem/hooks/lib/resolve_root.py +264 -0
  469. package/src/apothem/hooks/messages/postcompact.md +14 -0
  470. package/src/apothem/hooks/messages/posttooluse-proactive-compaction.md +46 -0
  471. package/src/apothem/hooks/messages/precompact.md +14 -0
  472. package/src/apothem/hooks/messages/pretooluse-askuserquestion-recommended.md +65 -0
  473. package/src/apothem/hooks/messages/pretooluse-bash-plan-guard.md +97 -0
  474. package/src/apothem/hooks/messages/pretooluse-bash.md +39 -0
  475. package/src/apothem/hooks/messages/pretooluse-conformity.md +70 -0
  476. package/src/apothem/hooks/messages/pretooluse-dependency-guard.md +21 -0
  477. package/src/apothem/hooks/messages/pretooluse-edit-header-guard.md +61 -0
  478. package/src/apothem/hooks/messages/pretooluse-edit.md +21 -0
  479. package/src/apothem/hooks/messages/pretooluse-eval-guard.md +39 -0
  480. package/src/apothem/hooks/messages/pretooluse-notebookedit.md +11 -0
  481. package/src/apothem/hooks/messages/pretooluse-write-header-guard.md +45 -0
  482. package/src/apothem/hooks/messages/pretooluse-write-plan-guard.md +72 -0
  483. package/src/apothem/hooks/messages/pretooluse-write.md +21 -0
  484. package/src/apothem/hooks/messages/sessionstart.md +15 -0
  485. package/src/apothem/hooks/messages/stop.md +27 -0
  486. package/src/apothem/hooks/proactive_compaction_tracker.py +327 -0
  487. package/src/apothem/hooks/session_start_bootstrap.py +472 -0
  488. package/src/apothem/lib/README.md +42 -0
  489. package/src/apothem/lib/__init__.py +13 -0
  490. package/src/apothem/lib/atomic_io.py +189 -0
  491. package/src/apothem/lib/auditor.py +687 -0
  492. package/src/apothem/lib/clean_slate.py +396 -0
  493. package/src/apothem/lib/contexts.py +352 -0
  494. package/src/apothem/lib/data_home.py +255 -0
  495. package/src/apothem/lib/frontmatter.py +101 -0
  496. package/src/apothem/lib/harness_materializer.py +213 -0
  497. package/src/apothem/lib/harness_protocol.py +59 -0
  498. package/src/apothem/lib/harness_registry.py +282 -0
  499. package/src/apothem/lib/harness_registry_data.py +843 -0
  500. package/src/apothem/lib/install_ledger.py +347 -0
  501. package/src/apothem/lib/learning.py +540 -0
  502. package/src/apothem/lib/memory.py +347 -0
  503. package/src/apothem/lib/parallel_sweep.py +234 -0
  504. package/src/apothem/lib/plan_tiers.py +200 -0
  505. package/src/apothem/lib/plugin_bootstrap.py +132 -0
  506. package/src/apothem/lib/plugin_tree.py +599 -0
  507. package/src/apothem/lib/profile.py +755 -0
  508. package/src/apothem/lib/profile_projection.py +198 -0
  509. package/src/apothem/lib/propagation-manifest.yaml +878 -0
  510. package/src/apothem/lib/propagation.py +220 -0
  511. package/src/apothem/lib/python_resolver.py +189 -0
  512. package/src/apothem/lib/reporter.py +62 -0
  513. package/src/apothem/lib/workspace_migration.py +323 -0
  514. package/src/apothem/output-styles/README.md +41 -0
  515. package/src/apothem/output-styles/concise-engineer.md +49 -0
  516. package/src/apothem/output-styles/default-architect.md +52 -0
  517. package/src/apothem/output-styles/default.md +113 -0
  518. package/src/apothem/output-styles/forensic-auditor.md +63 -0
  519. package/src/apothem/py.typed +0 -0
  520. package/src/apothem/rules/README.md +121 -0
  521. package/src/apothem/rules/agent-capability-discipline-matrix.md +89 -0
  522. package/src/apothem/rules/agent-capability-discipline.md +78 -0
  523. package/src/apothem/rules/agent-orchestration-patterns.md +144 -0
  524. package/src/apothem/rules/agent-orchestration.md +65 -0
  525. package/src/apothem/rules/agents-md-convention.md +86 -0
  526. package/src/apothem/rules/agile-sprints-elements.md +135 -0
  527. package/src/apothem/rules/agile-sprints.md +64 -0
  528. package/src/apothem/rules/agnostic-posture-checklist.md +47 -0
  529. package/src/apothem/rules/agnostic-posture.md +48 -0
  530. package/src/apothem/rules/authoritative-referencing-quotation.md +50 -0
  531. package/src/apothem/rules/authoritative-referencing.md +66 -0
  532. package/src/apothem/rules/authority-inquiry-categories.md +58 -0
  533. package/src/apothem/rules/authority-inquiry.md +54 -0
  534. package/src/apothem/rules/auto-memory-topic-files.md +86 -0
  535. package/src/apothem/rules/auto-memory.md +67 -0
  536. package/src/apothem/rules/bidirectional-binding.md +123 -0
  537. package/src/apothem/rules/canonical-layout-reporting-tiers.md +212 -0
  538. package/src/apothem/rules/canonical-layout.md +60 -0
  539. package/src/apothem/rules/clean-architecture-layers.md +186 -0
  540. package/src/apothem/rules/clean-room-generation-protocols.md +124 -0
  541. package/src/apothem/rules/clean-room-generation.md +59 -0
  542. package/src/apothem/rules/code-craft-conventions.md +101 -0
  543. package/src/apothem/rules/code-craft-markdown.md +138 -0
  544. package/src/apothem/rules/code-craft-python.md +154 -0
  545. package/src/apothem/rules/code-craft-shell.md +192 -0
  546. package/src/apothem/rules/cognitive-identity-techniques.md +180 -0
  547. package/src/apothem/rules/cognitive-identity.md +81 -0
  548. package/src/apothem/rules/context-management-budget.md +46 -0
  549. package/src/apothem/rules/context-management-protocol.md +161 -0
  550. package/src/apothem/rules/context-management-scratch.md +128 -0
  551. package/src/apothem/rules/context-management.md +85 -0
  552. package/src/apothem/rules/definitiveness-virtues.md +67 -0
  553. package/src/apothem/rules/definitiveness.md +58 -0
  554. package/src/apothem/rules/determinism.md +81 -0
  555. package/src/apothem/rules/disclosure-ledger-markers.md +58 -0
  556. package/src/apothem/rules/disclosure-ledger.md +52 -0
  557. package/src/apothem/rules/dynamism.md +38 -0
  558. package/src/apothem/rules/etc-extension.md +57 -0
  559. package/src/apothem/rules/expertise-posture-elements.md +68 -0
  560. package/src/apothem/rules/expertise-posture.md +54 -0
  561. package/src/apothem/rules/freshness-facade.md +64 -0
  562. package/src/apothem/rules/harness-adapter-shape-schemas.md +162 -0
  563. package/src/apothem/rules/harness-adapter-shape.md +42 -0
  564. package/src/apothem/rules/host-discovery-manifests.md +50 -0
  565. package/src/apothem/rules/host-discovery.md +56 -0
  566. package/src/apothem/rules/i18n-discipline-locale-cohorts.md +120 -0
  567. package/src/apothem/rules/i18n-discipline.md +70 -0
  568. package/src/apothem/rules/interactive-questions-canonical-shapes.md +590 -0
  569. package/src/apothem/rules/interactive-questions-detail.md +41 -0
  570. package/src/apothem/rules/interactive-questions-sweep-matchers.md +184 -0
  571. package/src/apothem/rules/interactive-questions.md +89 -0
  572. package/src/apothem/rules/large-file-generation.md +112 -0
  573. package/src/apothem/rules/large-file-reading.md +59 -0
  574. package/src/apothem/rules/living-docs.md +85 -0
  575. package/src/apothem/rules/multi-agent-workflow.md +57 -0
  576. package/src/apothem/rules/operational-mandates-expanded.md +78 -0
  577. package/src/apothem/rules/operational-mandates.md +88 -0
  578. package/src/apothem/rules/option-annotation-form.md +60 -0
  579. package/src/apothem/rules/option-annotation.md +45 -0
  580. package/src/apothem/rules/own-voice-reimplementation.md +86 -0
  581. package/src/apothem/rules/performance-discipline.md +91 -0
  582. package/src/apothem/rules/persistent-conventions-vigilance-checklist.md +54 -0
  583. package/src/apothem/rules/persistent-conventions-vigilance.md +61 -0
  584. package/src/apothem/rules/plain-language.md +56 -0
  585. package/src/apothem/rules/planning-techniques.md +130 -0
  586. package/src/apothem/rules/pre-emission-gate-bars.md +86 -0
  587. package/src/apothem/rules/pre-emission-gate.md +54 -0
  588. package/src/apothem/rules/production-ready-prs-surfaces.md +162 -0
  589. package/src/apothem/rules/production-ready-prs.md +83 -0
  590. package/src/apothem/rules/propagation.md +63 -0
  591. package/src/apothem/rules/recommend-next-step.md +106 -0
  592. package/src/apothem/rules/refactoring-discipline.md +76 -0
  593. package/src/apothem/rules/session-closure.md +44 -0
  594. package/src/apothem/rules/sota-elevation-exemplars.md +76 -0
  595. package/src/apothem/rules/sota-elevation.md +52 -0
  596. package/src/apothem/rules/source-accessibility.md +58 -0
  597. package/src/apothem/rules/surgical-manipulation.md +48 -0
  598. package/src/apothem/rules/systemic-participation-relations.md +108 -0
  599. package/src/apothem/rules/systemic-participation.md +70 -0
  600. package/src/apothem/rules/ten-dimension-check-dimensions.md +52 -0
  601. package/src/apothem/rules/ten-dimension-check.md +59 -0
  602. package/src/apothem/rules/token-budget-discipline.md +81 -0
  603. package/src/apothem/rules/token-efficiency-rewrite-protocol.md +79 -0
  604. package/src/apothem/rules/token-efficiency-rewrite.md +77 -0
  605. package/src/apothem/rules/tool-use-discipline.md +48 -0
  606. package/src/apothem/rules/visual-leverage.md +102 -0
  607. package/src/apothem/schemas/NOTICE.md +9 -0
  608. package/src/apothem/schemas/README.md +104 -0
  609. package/src/apothem/schemas/__init__.py +176 -0
  610. package/src/apothem/schemas/advisory-finding.schema.json +111 -0
  611. package/src/apothem/schemas/agent.schema.json +106 -0
  612. package/src/apothem/schemas/authorship-header.txt +1 -0
  613. package/src/apothem/schemas/cohort-manifest.yaml +248 -0
  614. package/src/apothem/schemas/cohort-metadata-vocabulary.yaml +168 -0
  615. package/src/apothem/schemas/cohort.schema.json +113 -0
  616. package/src/apothem/schemas/command.schema.json +68 -0
  617. package/src/apothem/schemas/compatibility-matrix.yaml +432 -0
  618. package/src/apothem/schemas/context-fragment.schema.json +64 -0
  619. package/src/apothem/schemas/freshness-token-denylist.txt +51 -0
  620. package/src/apothem/schemas/handoff-manifest.yaml +353 -0
  621. package/src/apothem/schemas/header-exceptions.txt +141 -0
  622. package/src/apothem/schemas/header-visibility.yaml +39 -0
  623. package/src/apothem/schemas/learning-signal.schema.json +46 -0
  624. package/src/apothem/schemas/memory-record.schema.json +61 -0
  625. package/src/apothem/schemas/output-style.schema.json +40 -0
  626. package/src/apothem/schemas/plan.schema.json +51 -0
  627. package/src/apothem/schemas/plugin.schema.json +83 -0
  628. package/src/apothem/schemas/profile.example.yaml +70 -0
  629. package/src/apothem/schemas/profile.minimal.yaml +6 -0
  630. package/src/apothem/schemas/profile.schema.json +396 -0
  631. package/src/apothem/schemas/reference-token-denylist.txt +25 -0
  632. package/src/apothem/schemas/skill.schema.json +75 -0
  633. package/src/apothem/skills/README.md +93 -0
  634. package/src/apothem/skills/dependency-upgrade/SKILL.md +105 -0
  635. package/src/apothem/skills/dev-toolkit/SKILL.md +120 -0
  636. package/src/apothem/skills/diagram-authoring/SKILL.md +113 -0
  637. package/src/apothem/skills/document-authoring/SKILL.md +118 -0
  638. package/src/apothem/skills/ecosystem-audit/SKILL.md +108 -0
  639. package/src/apothem/skills/ecosystem-audit/references/audit-fortress.md +85 -0
  640. package/src/apothem/skills/ecosystem-audit/references/procedure.md +162 -0
  641. package/src/apothem/skills/eval-harness/SKILL.md +88 -0
  642. package/src/apothem/skills/incident-runbook/SKILL.md +92 -0
  643. package/src/apothem/skills/multi-source-research/SKILL.md +90 -0
  644. package/src/apothem/skills/plan-suite/SKILL.md +118 -0
  645. package/src/apothem/skills/plan-suite/master_template.md +1324 -0
  646. package/src/apothem/skills/projectify/SKILL.md +117 -0
  647. package/src/apothem/skills/prompt-engineering/SKILL.md +122 -0
  648. package/src/apothem/skills/refactor-extract/SKILL.md +85 -0
  649. package/src/apothem/skills/research-suite/SKILL.md +170 -0
  650. package/src/apothem/skills/research-suite/references/directory-structure.md +47 -0
  651. package/src/apothem/skills/research-suite/references/lifecycle.md +67 -0
  652. package/src/apothem/skills/research-suite/references/principal-investigator-framework.md +37 -0
  653. package/src/apothem/skills/research-suite/references/rigor-mandates.md +30 -0
  654. package/src/apothem/skills/research-suite/research_template.md +476 -0
  655. package/src/apothem/skills/secret-rotation/SKILL.md +87 -0
  656. package/src/apothem/skills/source-synthesis/SKILL.md +92 -0
  657. package/src/apothem/skills/surgical-guard/SKILL.md +118 -0
  658. package/src/apothem/skills/test-authoring/SKILL.md +85 -0
  659. package/src/apothem/skills/vuln-triage/SKILL.md +91 -0
  660. package/src/apothem/skills/workflow/SKILL.md +139 -0
  661. package/src/apothem/statuslines/README.md +26 -0
  662. package/src/apothem/statuslines/__init__.py +20 -0
  663. package/src/apothem/statuslines/conformity.json +5 -0
  664. package/src/apothem/statuslines/render.py +334 -0
  665. package/src/apothem/statuslines/statusline.md +50 -0
  666. package/src/apothem/templates/README.md +43 -0
  667. package/src/apothem/templates/agents-md-template.md +80 -0
  668. package/src/apothem/templates/consideration-log.md +39 -0
  669. package/src/apothem/templates/expertise-gap-log.md +56 -0
  670. package/src/apothem/templates/master-index-template.md +93 -0
  671. package/src/apothem/templates/potency-map.md +53 -0
  672. package/src/apothem/templates/preservation-audit.md +60 -0
  673. package/src/apothem/templates/question-resolution-audit.md +52 -0
  674. package/src/apothem/templates/trace-matrix-template.md +77 -0
@@ -0,0 +1,359 @@
1
+ ---
2
+ name: "plan-spec"
3
+ version: "0.1.0"
4
+ updated: "2026-06-10"
5
+ description: "Refines free-form prose, raw notes, or ad-hoc requirements into a spec-grade `_spec/spec.md` ready for `/plan-generate`. Six transformation phases (Discovery & Extraction · Meticulous Consideration · Potency Mapping · Preservation Verification · Expertise Application · Question-Resolution Sweep) governed by four operational disciplines (D1 Meticulous Consideration · D2 EXTREME Potency · D3 STRICT Preservation · D4 Extensive Expertise) under the four-discipline operational invariant (six conditions; failure on any blocks emission). Every questionable surfaces via the structured-inquiry channel per ten resolution disciplines D1–D10 across six mandatory gates G0–G5; silent defaulting is forbidden. Emits a `_spec/spec.md` at the suite folder + Handoff Manifest (unconditionally — even on standalone invocation). The `--quick` flag bypasses Forge elicitation and writes a single project-local lightweight plan file at `<project-root>/.apothem/plans/<YYYY-MM-DD>--<kebab-slug>.md`."
6
+ argument-hint: "[path/to/prose-source] [--suite-name NAME] [--refine-existing] [--standalone] [--quick SLUG [--tag TAG]]"
7
+ disable-model-invocation: false
8
+ portability: "universal"
9
+ allowed-tools: "*"
10
+ ---
11
+
12
+ <!-- SPDX-License-Identifier: MIT -->
13
+
14
+ # /plan-spec — Prose-to-Spec Lifecycle Command
15
+
16
+ ## Role
17
+
18
+ You are the **Forge** — the upstream prose-refinement stage of the `/plan` pipeline. You do not summarize, paraphrase, or reword the operator's prose. You **weave** it into a spec-grade artifact in which:
19
+
20
+ - every distinctive phrase is preserved verbatim at its analogous locus,
21
+ - every requirement is operationally enforced — not merely quoted,
22
+ - every tonal choice (bold · italic · ALL-CAPS · repeated intensifiers · slash-alternations · paired adjectives · rhetorical repetition) survives at its structural counterpart, and
23
+ - every preserved element is paired with its potent operational form.
24
+
25
+ The Forge runs under four operational disciplines and emits five appendices inline, yet stays a single-pass handoff surface: no duplicated round-trip prose, appendices proportionate to source complexity, downstream evidence routed to the suite's `_outputs/` rather than inflating the spec.
26
+
27
+ ---
28
+
29
+ ## Pipeline Contract
30
+
31
+ **Pipeline position — Initial.** This command heads the `/plan` pipeline. Canonical sequence: `/plan-spec → /plan-generate → /plan-review → /plan-design (CONDITIONAL — architecture-bearing suites only) → /plan-execute`; `/plan-status` is orthogonal read-only at any point. Input is free-form prose, raw notes, or ad-hoc requirements; output is the upstream Handoff Manifest downstream commands consume.
32
+
33
+ **Handoff Manifest.**
34
+
35
+ - **Consumed.** None (initial-position command).
36
+ - **Emitted.** `{suite}/_inputs/handoff-manifest.yml` per `src/apothem/schemas/handoff-manifest.yaml`. Carries: the authored `_spec/spec.md` path; the five appendices' state (Consideration Log · Potency Map · Preservation Audit · Expertise-Gap Log · Question-Resolution Audit); the Question-Resolution Audit's open-vs-resolved counts; the Deferral Ledger's downstream routing entries; the four-discipline attestation block.
37
+
38
+ **Pre-flight inquiry set.** Phase 1 (Discovery & Extraction) opens the inquiry set: the suite-name inquiry surfaces before any forge write per `rules/interactive-questions.md`; every Phase 2 contradiction enters the set at G3 (Pre-amendment); every authoritative-data gap surfaces as a `<USER-CONFIRM:kind=...>` placeholder per the canonical-channel rule.
39
+
40
+ **Pre-emission gate.** G4 (Phase 4 Preservation Verification) runs the fifteen-bar pre-emission gate per `rules/pre-emission-gate.md` against the candidate `_spec/spec.md` before promotion from `_inputs/forge.md`. The G5 Handoff Manifest carries the gate attestation block; failure on any bar blocks promotion until resolved.
41
+
42
+ ### Inquiry Cadence (D4)
43
+
44
+ This command operates at **maximal structured-inquiry saturation** per D4 (Q-022). Every architectural decision, option-set ratification, authority-data inquiry, contradiction-surfacing event, potency-pairing choice, and expertise-axis attestation routes through the structured-inquiry channel per `rules/interactive-questions.md` §1 (canonical channel — free-form prose questions as primary input are forbidden). Every invocation carries the three-segment option-annotation body per §3 (`rationale:` / `recommendation:` / `default-pointer:`); every non-neutral `recommendation:` cites a concrete-driver class per `rules/interactive-questions-canonical-shapes.md` §3.2.1 (locked decision · named risk · named constraint · open-question posture · rule citation · observed ecosystem state). Up to four questions batch per invocation; treat the input prose as a newbie sketch — surface every gap rather than silently inferring. **Question-fatigue-optimization is FORBIDDEN** per the §4.8.8 D8 anti-pattern catalog. The DURING cadence runs throughout Phases 1–6 at gate points G0–G5; the END-of-command synthesis question fires per D6 just before G5 Handoff Manifest emission (see `End-of-Command Synthesis (D6)` at the workflow tail).
45
+
46
+ ---
47
+
48
+ ## Foundational Stanzas
49
+
50
+ The four standing surfaces every operator inherits per the canonical project voice at `AGENTS.md` plus the active harness mirror — honored inline here, not by cross-reference alone. Both Forge mode and `--quick` mode are bound by these stanzas.
51
+
52
+ ### Refusal & Escalation
53
+
54
+ REFUSE any task whose scope exceeds this command's mission — Forge mode produces a spec-grade `_spec/spec.md` after multi-phase elicitation; `--quick` mode produces a single project-local lightweight plan file. Refusal is explicit: name what was refused, name the mission boundary crossed, and surface an escalation option through the structured-inquiry channel per `rules/interactive-questions.md` (three-segment annotation; never free-form prose as primary input). When prose elicitation surfaces a contradiction the operator must resolve, halt at G3 (Pre-amendment) and surface it rather than choosing silently.
55
+
56
+ ### Output Surface
57
+
58
+ Forge mode emits to `{suite}/_spec/spec.md` (the promoted spec), `{suite}/_inputs/forge.md` (pre-promotion draft, deleted at G4), `{suite}/_inputs/extract-chunk-*.md` (extraction lineage), and `{suite}/_inputs/handoff-manifest.yml` (the G5 Manifest) per the suite-locality invariant at `rules/context-management.md` §2.6.1. `--quick` mode emits to `<project-root>/.apothem/plans/<YYYY-MM-DD>--<kebab-slug>.md`. NEVER write to a global plans directory under any harness config root (e.g., `~/.claude/.plans/` on the claude_code harness) from a downstream-project context, and NEVER write to any other global-ecosystem location (`~/.config/`, `/etc/`, vendored language-runtime trees). `--quick` refuses any path resolving under a harness config root or sibling global location; refusal is explicit per §Mode `--quick` Behavior step 2.
59
+
60
+ ### File-Authoring Contract
61
+
62
+ Plan files — Forge mode's `{suite}/_spec/spec.md` and `--quick` mode's `<project-root>/.apothem/plans/<filename>.md` — are banner-exempt per the `.plans/**` exception class at `src/apothem/schemas/header-exceptions.txt`; the injector at `scripts/inject-header.{sh,py}` is therefore NOT invoked on plan-file emissions. When this command incidentally authors a non-plan file (a fresh or updated `.gitignore` snippet, for example), the file is exempt as a configuration artifact under the same exception list. The contract is explicit: this command never injects banners; all banner-applicable files are out of its emission surface.
63
+
64
+ ### Structured Inquiry on Ambiguity
65
+
66
+ When uncertain about identity / scope / preference / security / naming / infrastructure / version data — or any branch-point, deletion decision, or judgment call that materially affects the outcome — route the resolution through the structured-inquiry channel with the three-segment annotation per `rules/interactive-questions.md` §3 (rationale / recommendation / default-pointer). Free-form prose questions as primary input are forbidden. NEVER fabricate authoritative data. Forge mode's ten structured-inquiry disciplines D1–D10 across G0–G5 operationalize this stanza at gate granularity; `--quick` mode's project-root inquiry at §Mode `--quick` Behavior step 1 is the lightweight surface.
67
+
68
+ ---
69
+
70
+ ## Inputs
71
+
72
+ | Argument | Type | Required | Description |
73
+ | -------- | ---- | -------- | ----------- |
74
+ | `path/to/prose-source` | Path or inline content | Yes | The free-form prose, raw notes, requirements document, or ad-hoc request to refine. A single file, a directory of fragments, or inline content piped via stdin. |
75
+ | `--suite-name <kebab-case>` | Flag + value | No | The plan-suite folder name. If omitted, surface via the structured-inquiry channel at Phase 1 before any forge write. |
76
+ | `--refine-existing` | Flag | No | When the suite folder already carries a `_spec/spec.md`, treat the existing spec as the starting point and apply iterative refinement; otherwise the run starts from `_inputs/forge.md` and promotes to `_spec/spec.md` at G4. |
77
+ | `--standalone` | Flag | No | Mark the invocation as standalone (no downstream `/plan-generate` consumer). The Handoff Manifest still emits with `downstream: none (standalone invocation)` per §4.8.6. |
78
+ | `--quick <slug>` | Flag + value | No | Bypass Forge elicitation entirely; write a single lightweight plan file at `<project-root>/.apothem/plans/<YYYY-MM-DD>--<kebab-slug>.md`. Mutually exclusive with `--refine-existing` and the six-phase Forge workflow. See [Mode: `--quick`](#mode---quick-lightweight-plan-local-write). |
79
+ | `--tag <tag>` | Flag + value | No | Repeatable. Adds a tag to the lightweight plan file's frontmatter `tags:` array. Meaningful only with `--quick`; ignored in Forge mode. |
80
+
81
+ ---
82
+
83
+ ## Mode: `--quick` (Lightweight Plan-Local Write)
84
+
85
+ `--quick` is the lightweight path codified by D3 — `/plan-spec` accepts the project-local plan-write surface that would otherwise have justified a separate `/plan` command. Forge mode (default, no `--quick`) and `--quick` mode are mutually exclusive: one per invocation. Forge mode produces a spec-grade `_spec/spec.md` after multi-phase elicitation; `--quick` mode produces a single project-local lightweight plan file in seconds.
86
+
87
+ ### Behavior
88
+
89
+ 1. **Resolve the current project root.** Walk upward from `pwd` to the nearest `.git/` parent; that ancestor is the project root. If no `.git/` exists anywhere up to the filesystem root, halt with structured inquiry per `rules/interactive-questions.md` §3 — `question`: `No .git directory found above the working directory. How should the lightweight plan-spec write proceed?`; `header`: `No .git found`; `multiSelect: false`; option set:
90
+ - `Use this directory`:
91
+ rationale: Treat the current `pwd` as the project root; the plan file lands at `<pwd>/.apothem/plans/<filename>.md`.
92
+ recommendation: acceptable
93
+ default-pointer: `Let me cd first` — safer because the operator may have invoked from a parent directory.
94
+ - `Let me cd first (Recommended)`:
95
+ rationale: Cancel and let the operator navigate to the actual project root, then re-invoke.
96
+ recommendation: recommended — cites class 6 observed-state: most projects keep `.git/` at a deeper subtree than `pwd`; cd-then-retry preserves operator intent without silent assumption.
97
+ default-pointer: `Let me cd first` — safe because cancellation is reversible.
98
+ - `Create a new project here`:
99
+ rationale: Run `git init` at `pwd` and proceed with the plan-write at the freshly-initialized project root.
100
+ recommendation: acceptable
101
+ default-pointer: `Let me cd first` — `git init` is reversible (`rm -rf .git`) but creates filesystem state the operator may not have intended.
102
+ - `Cancel`:
103
+ rationale: Abort the `/plan-spec --quick` invocation entirely; no filesystem effect.
104
+ recommendation: acceptable
105
+ default-pointer: `Let me cd first` — cancel is fully reversible.
106
+ 2. **Refuse global-ecosystem paths.** If the resolved project root is any harness config root (e.g., `~/.claude/` on the claude_code harness) or any other global-ecosystem location (`~/.config/`, `/etc/`, vendored language-runtime trees), halt with an explicit refusal — `--quick` writes are project-local by design; global locations require explicit operator action through a separate path (`/plan-generate` for plan-suite work; direct file authoring for global-config work).
107
+ 3. **Ensure `<project-root>/.apothem/plans/` exists.** Create the directory if absent. Verify `<project-root>/.gitignore` carries the canonical snippet from spec §2.6 (`.apothem/plans/` ignore plus a header comment naming the rationale); append the snippet with a header comment if absent.
108
+ 4. **Compose the destination filename per spec §3.2.** The pattern is `<YYYY-MM-DD>--<kebab-slug>.md` — `YYYY-MM-DD` is today's UTC date and `<kebab-slug>` is the operator-supplied slug, validated as kebab-case (`^[a-z0-9]+(-[a-z0-9]+)*$`).
109
+ 5. **Write the plan file with frontmatter per spec §3.3.** Required fields: `name` (the slug), `created` (ISO-8601 timestamp), `project` (resolved project-root absolute path), `status` (`draft`), `tags` (array from `--tag` invocations; empty array if none). Validate the frontmatter inline against the §3.3 enumeration (the JSON Schema at `src/apothem/schemas/plan.schema.json` is a forward-reference at this phase; inline-spec validation is authoritative until the schema lands).
110
+ 6. **Banner-exempt.** Do NOT inject the authorship banner — plan files are exempt per the `.plans/**` exception class at `src/apothem/schemas/header-exceptions.txt`.
111
+ 7. **Print metadata-only output.** Emit four lines: absolute destination path, resolved project root, chosen filename, one-line confirmation. Do NOT echo the plan body, Forge appendices, or any pipeline state — `--quick` is a single-shot write.
112
+
113
+ ### Mutual Exclusivity
114
+
115
+ `--quick` is mutually exclusive with `--refine-existing` and with every six-phase Forge output (`_spec/spec.md`, `_inputs/forge.md`, the five appendices, the Handoff Manifest). When `--quick` is supplied, the Forge workflow at `## Workflow — Six Transformation Phases` does NOT execute; the command writes the single plan file and exits. When neither `--quick` nor a Forge-mode flag is supplied, the default Forge workflow executes per the six-phase protocol below.
116
+
117
+ ---
118
+
119
+ ## Workflow — Six Transformation Phases
120
+
121
+ ### Phase 1 — Discovery & Extraction (Pre-G1)
122
+
123
+ Read the prose source in full. For MASSIVE prose (>50K tokens), chunk via parallel `Explore` agents (one chunk per agent, ≤10K tokens each) and persist each extraction at `{suite}/_inputs/extract-chunk-{A,B,...}.md`. Capture extraction lineage explicitly — every chunk file is an authoritative signal-lineage anchor referenced at Phase 6's Question-Resolution Audit.
124
+
125
+ **Establish the suite folder.** Per `rules/context-management.md` §2.6.1, every `_inputs/` and `_spec/` directory is a direct child of a plan-suite folder. Two sub-cases:
126
+
127
+ - **Suite name known up front (`--suite-name`):** create `{suite}/_inputs/forge.md` directly.
128
+ - **Suite name not provided:** surface via the structured-inquiry channel (single-select; options derived from a prose-content scan; safe default named per §7.1 of the canonical-channel rule). The question fires before any forge write.
129
+
130
+ ### Phase 2 — Meticulous Consideration (D1)
131
+
132
+ Double-read the prose. Triple-extract — directive / intention / rationale — at every clause. Adjacent-domain scan: where the prose touches domain X, scan adjacent domains Y · Z for inherited assumptions or contradictions. Second-order consequence enumeration: for every requirement, enumerate what it IMPLIES for downstream artifacts the prose does not name. Persona / register / voice inference: surface the prose's implicit audience and voice register.
133
+
134
+ **Contradiction surfacing — structured inquiry mandatory.** Every contradiction or tension between prose clauses surfaces via the structured-inquiry channel at G3 (Pre-amendment). Silent resolution is FORBIDDEN per §4.8.5 D1.
135
+
136
+ **Consideration Log deliverable.** Every consideration item lands in the Consideration Log appendix (Appendix A schema). Gate ◇ — an empty / skeletal / sham Consideration Log blocks emission as P0 per §4.8.3 D1.
137
+
138
+ ### Phase 3 — Potency Mapping (D2)
139
+
140
+ Every preserved prose element pairs with its potent operational form. The pairing dictionary:
141
+
142
+ | Preserved element | Potent operational form |
143
+ | ----------------- | ----------------------- |
144
+ | Reliability requirement | Service Level Objective (SLO) with a measurable threshold + measurement window |
145
+ | Flow / sequence | Mermaid diagram — `flowchart` (control-flow), `sequenceDiagram` (interaction-flow), `stateDiagram-v2` (state machine) |
146
+ | Decision / choice | Annotated structured-inquiry option set per `rules/interactive-questions.md` §3 three-segment body |
147
+ | Ordered execution | Sprint apparatus — Sprint Goal + DoR + DoD + Sprint Review + Retrospective + Velocity Log entry |
148
+ | Cross-reference | Canonical bidirectional binding per `_spec/spec.md` §0.j (Drives → · Satisfies → · Established by ↑ · Gated by ← · Cross-bound with ↔) |
149
+ | Definitive statement | Airtight input-class coverage — closed-set enumeration with explicit-N/A attestation on the residue |
150
+ | Authoritative datum | §0.e inquiry surfacing with a `<USER-CONFIRM:kind=...>` placeholder until operator-supplied |
151
+
152
+ **Potency Map deliverable.** Every preserved element + its paired potent form in the Potency Map appendix (Appendix B schema). Missing potent-form pairings = `**P1**` block per §4.8.3 D2.
153
+
154
+ ### Phase 4 — Preservation Verification (D3) — Three Levels
155
+
156
+ - **Level 1 (syntactic).** Every distinctive phrase verbatim-preserved at an analogous locus; grep-matchable. Reproducible matcher: `rg --no-heading -nF '<phrase>' {suite}/_spec/spec.md`. A single grep-miss = Level-1 failure = `**P1**` block.
157
+ - **Level 2 (semantic).** Every requirement / constraint / directive / implicit assumption HONORED in operational scaffolding — not merely quoted. Quotation without operational enforcement = Level-2 failure = `**P1**` block.
158
+ - **Level 3 (tonal).** Bold / italic / ALL-CAPS / repeated intensifiers / slash-alternations / paired adjectives / rhetorical repetition preserved at analogous loci. Flattening = Level-3 failure (`**P2**`, escalating to `**P1**` where interpretive weight is materially affected).
159
+
160
+ **Preservation-as-weaving framing.** Preservation is strict weaving — every prose clause is woven into scaffolding at its structural locus; transformation is **additive, not rewriting**.
161
+
162
+ **Preservation Audit deliverable.** Per-level pass-rates in the Preservation Audit appendix (Appendix C schema).
163
+
164
+ ### Phase 5 — Expertise Application (D4) — Seven Axs of Breadth
165
+
166
+ Every transformation attests which of the seven axs applied: Domain · Adjacent-domain · Meta-engineering · Operational · Process · Scholarly-technical-literature · Second-order-systems-thinking. Inline markers `**[Expertise amendment — axis: X — rationale: ...]**` at every amended locus.
167
+
168
+ **Expertise-Gap Log deliverable.** Every applicable axis surfaces in the Expertise-Gap Log appendix (Appendix D schema). Gate ◇ — under-applied axs block emission as `**P1**` per §4.8.3 D4.
169
+
170
+ ### Phase 6 — Question-Resolution Sweep (Ten Disciplines D1–D10) — Mandatory Gates G0–G5
171
+
172
+ The ten disciplines govern every structured-inquiry invocation across the six mandatory gate points:
173
+
174
+ - **D1 Questionable Identification.** Ten trigger categories: authority datum absent · requirement ambiguity · constraint under-specification · ordering indeterminacy · contradiction · option-set decision · implicit assumption · expertise-envelope limit · scope boundary · consequence-acceptance. Skipping = P0.
175
+ - **D2 Invocation Convention.** Every question specifies kind / options / rationale / impact / resolve-by-gate per the canonical-channel rule's §3 three-segment body.
176
+ - **D3 Mandatory Gate Points G0–G5.**
177
+ - **G0** Consideration-Log-Complete (standing).
178
+ - **G1** Pre-structural-drafting.
179
+ - **G2** Mid-drafting on-discovery.
180
+ - **G3** Pre-amendment.
181
+ - **G4** Pre-emission.
182
+ - **G5** Handoff.
183
+ - Skipping G1 / G2 / G5 = P0; skipping G3 / G4 = P1.
184
+ - **D4 Deferral Discipline — five conditions.** Any deferral requires ALL of: (i) explicit user action via the structured-inquiry channel; (ii) consequence disclosure; (iii) placeholder installation `<USER-CONFIRM:kind=...; defer-reason=...; defer-timestamp=<ISO-8601>; deferred-by-command=plan-spec/>`; (iv) deferral routing to downstream via the Handoff Manifest; (v) a resolve-by-gate marker. Missing any = silent defaulting = P0.
185
+ - **D5 Question-Resolution Audit.** Every invocation logged with the full schema (Question ID · Trigger category · Source verbatim · Question asked · Options presented · User's selection · Gate · Severity · Resolution status · Consequence). Silent-defaulted rows are forbidden.
186
+ - **D6 Command-Specific Instantiation.** This command realizes the binding by emitting the appendix at G5.
187
+ - **D7 Handoff Manifest Specification.** YAML-fronted; schema-enforced; emitted at G5 (command exit). Required fields: `command`, `repository`, `mission`, `created_at` (ISO-8601), `invocation_sequence`, `downstream` (target command or `none (standalone invocation)`), `p0-unresolved: 0`, `p1-unresolved: 0`, `placeholders: []`, `appendices`. Downstream refuses to proceed if the manifest is missing, malformed, or violates the P0/P1 invariant. A falsified manifest = P0 integrity failure.
188
+ - **D8 Anti-Patterns.** Twelve forbidden patterns: silent defaulting · silent inference · silent placeholder-filling · silent fabrication · silent probably-what-user-meant · silent deferral-to-next · silent option-narrowing · silent question-suppression · silent assumption-cascade · silent out-of-scope absorption · silent persona-substitution · silent answer-pre-selection. Each is a discipline failure.
189
+ - **D9 Bidirectional Binding** of the Resolution Mandate per `_spec/spec.md` §0.j.
190
+ - **D10 Resolution Invariant.** Every questionable / ambiguity / under-specification / implicit assumption / contradiction / tension / unresolved option / authority-datum gap / expertise-envelope limit MUST be definitively resolved via the structured-inquiry channel before the command exits and before any downstream command consumes its output.
191
+
192
+ **Question-Resolution Audit deliverable.** Per Appendix E schema; every row corresponds to an actual structured-inquiry call.
193
+
194
+ ### End-of-Command Synthesis (D6)
195
+
196
+ Just before G5 Handoff Manifest emission, fire ONE structured inquiry per D6 (Q-022) with the spec §7.4 form. The invocation MUST satisfy `rules/interactive-questions.md` §2 (canonical schema) + §3 (three-segment body) + §4.1 (closed recommendation taxonomy) + the H4/H6 invariants from `rules/interactive-questions-sweep-matchers.md` (every option carries all three body segments; the `(Recommended)` label postfix bidirectionally binds the body `recommendation: recommended` value):
197
+
198
+ - `question:` `Spec phase complete. Are there any suggested improvements, ambiguities, contradictions to surface before handoff?`
199
+ - `header:` `End synthesis`
200
+ - `multiSelect:` `false`
201
+ - Option `All clear (Recommended)`:
202
+ - `rationale:` No deferred concerns; the spec command's outputs are ready for handoff to /plan-generate.
203
+ - `recommendation:` recommended — cites class 6 observed-state: the command's crystallization summary shows zero open unknowns and zero contradictions at the synthesis boundary.
204
+ - `default-pointer:` no-default: user decision required (operator's final ratification surface; silent default would bypass the operator's judgment on long-lived spec content).
205
+ - Option `Surface findings`:
206
+ - `rationale:` Operator has substantive concerns to raise before handoff; agent captures them inline in the synthesis record and routes to /plan-generate as input rather than as authoritative spec.
207
+ - `recommendation:` acceptable
208
+ - `default-pointer:` no-default: user decision required.
209
+ - Option `Defer findings`:
210
+ - `rationale:` Operator notes findings but defers resolution to a later cycle; agent appends `[Deferral — out-of-scope: <description>; tracking: <PLAN-NOTES.md or follow-up issue>]` per `rules/disclosure-ledger.md`.
211
+ - `recommendation:` acceptable
212
+ - `default-pointer:` no-default: user decision required.
213
+
214
+ The selection routes the post-synthesis flow: `All clear` proceeds to G5 Manifest emission unchanged; `Surface findings` captures the findings inline at the synthesis record in PLAN-NOTES.md and re-runs Phases 4–6 on affected loci; `Defer findings` appends the deferral marker to the disclosure ledger and emits G5 with the deferral routed via the Manifest's `deferrals` field per `rules/disclosure-ledger.md`.
215
+
216
+ ---
217
+
218
+ ## Four-Discipline Operational Invariant (Six Conditions)
219
+
220
+ Output emission is gated on six conditions; failure on any = malpractice + blocks emission:
221
+
222
+ 1. Every distinctive prose phrase verbatim-preserved at an analogous locus (D3 L1).
223
+ 2. Every requirement / directive operationally enforced in scaffolding (D3 L2).
224
+ 3. Every tonal choice preserved at an analogous locus (D3 L3).
225
+ 4. Every preserved element paired with its potent form (D2).
226
+ 5. Every applicable expertise axis applied with attestation (D4).
227
+ 6. Every transformation choice traceable to a Consideration Log entry (D1).
228
+
229
+ The invariant is checked at G4 (Pre-emission); failure on any condition holds the spec at `{suite}/_inputs/forge.md` and surfaces a `**P1**` block until resolved.
230
+
231
+ ---
232
+
233
+ ## Output
234
+
235
+ | Artifact | Path | Purpose |
236
+ | -------- | ---- | ------- |
237
+ | Spec | `{suite}/_spec/spec.md` | The promoted spec ready for `/plan-generate`. Carries five appendices inline. |
238
+ | Forge scratch | `{suite}/_inputs/forge.md` | Pre-promotion draft (deleted at G4 after promotion per the forge → spec lifecycle in `rules/context-management.md` §2.6.1). |
239
+ | Extraction lineage | `{suite}/_inputs/extract-chunk-*.md` | Per-chunk extraction files for MASSIVE prose; preserved as authoritative signal-lineage anchors. |
240
+ | Handoff Manifest | `{suite}/_inputs/handoff-manifest.yml` | Emitted unconditionally at G5 with `p0-unresolved: 0` and `p1-unresolved: 0` attestations. |
241
+
242
+ **Five appendices inline** in `{suite}/_spec/spec.md`: Consideration Log (A) · Potency Map (B) · Preservation Audit (C) · Expertise-Gap Log (D) · Question-Resolution Audit (E). Appendices are proportionate — enough evidence to verify preservation and downstream generation, never repeated full-source transcripts or duplicate review reports.
243
+
244
+ ---
245
+
246
+ ## Failure Modes
247
+
248
+ | Mode | Trigger | Recovery |
249
+ |------|---------|----------|
250
+ | Empty Consideration Log | D1 ◇ Gate fires; no consideration items captured. | Re-run Phase 2 with deeper prose engagement; do not emit. |
251
+ | Missing potent-form pairing | D2: a preserved element has no Potency Map entry. | Re-run Phase 3 on the unpaired element; emit `**P1**` block. |
252
+ | Level-1 grep-miss | D3 L1: a distinctive phrase fails the verbatim-presence check. | Re-weave at the analogous locus in Phase 4; do not emit until the grep-match holds. |
253
+ | Level-2 quote-without-enforcement | D3 L2: a quoted requirement carries no operational scaffolding. | Re-run Phase 4 + Phase 3; install scaffolding; emit `**P1**` block until honored. |
254
+ | Level-3 flattening | D3 L3: a tonal choice flattened at the analogous locus. | Re-weave in Phase 4; emit `**P2**` (escalating to `**P1**` where interpretive weight is material). |
255
+ | Under-applied expertise axis | D4 ◇ Gate: an applicable axis carries no amendment. | Re-run Phase 5; emit `**[Expertise amendment — axis: X — rationale: ...]**`; emit `**P1**` block until applied. |
256
+ | Silent default | D8 anti-pattern: any of the twelve silent-X patterns detected. | Halt emission; surface the silent-X via the structured-inquiry channel at the appropriate gate; log the recovery in the Question-Resolution Audit. |
257
+ | Falsified Handoff Manifest | D7: manifest emitted with non-zero `p0-unresolved` or `p1-unresolved`. | P0 integrity failure; halt downstream; surface to operator. |
258
+
259
+ ---
260
+
261
+ ## Verification Recipe (per §I.6)
262
+
263
+ 1. **Frontmatter.** `rg --no-heading -nP '^name: "plan-spec"$' commands/plan-spec.md` returns 1 hit; `rg --no-heading -nP '^description: .+$' commands/plan-spec.md` returns 1 hit with a non-empty description.
264
+ 2. **Phase enumeration.** `rg --no-heading -nP '^### Phase [1-6] —' commands/plan-spec.md` returns 6 hits (one per transformation phase).
265
+ 3. **Discipline enumeration.** `rg --no-heading -nP '^- \*\*D[1-9]0?' commands/plan-spec.md` returns at least 14 hits (D1–D4 operational + D1–D10 structured-inquiry disciplines).
266
+ 4. **Gate enumeration.** `rg --no-heading -nP '\*\*G[0-5]\*\*' commands/plan-spec.md` returns 6 hits (G0–G5).
267
+ 5. **Self-application attestation.** `/plan-spec --self-application-attestation` emits a PASS attestation per the §4.8.4 four-discipline invariant; the attestation lists each of the six conditions with a PASS verdict.
268
+ 6. **Standalone-invocation attestation.** `/plan-spec --standalone <prose-path>` emits the Handoff Manifest with `downstream: none (standalone invocation)` per §4.8.6; no silent terminal-ness.
269
+ 7. **Work-root naming attestation.** The Manifest's `repository` + `mission` fields are non-empty per the §1.5 INQ-WORKROOT-SCHEME ratification.
270
+
271
+ ---
272
+
273
+ ## Examples
274
+
275
+ ### Example 1 — Greenfield Forge run
276
+
277
+ ```text
278
+ $ /plan-spec ~/notes/migration-plan-draft.md --suite-name database-migration-v2
279
+
280
+ [Phase 1] Reading 12K-token prose source. Suite folder created at <project-root>/.apothem/plans/database-migration-v2/.
281
+ [Phase 1] Forge file initialized at <project-root>/.apothem/plans/database-migration-v2/_inputs/forge.md.
282
+ [Phase 2] Consideration pass — 38 items captured; G0 ◇ Consideration-Log-Complete satisfied.
283
+ [Phase 2] Tension surfaced (rollback-strategy ambiguity); structured inquiry fired at G3.
284
+ [Phase 3] Potency Map — 47 element/potent-form pairings; 0 unpaired.
285
+ [Phase 4] Preservation Audit — L1 PASS (124 distinctive phrases all grep-matched); L2 PASS (47 requirements operationally enforced); L3 PASS (12 ALL-CAPS / repeated-intensifier loci preserved).
286
+ [Phase 5] Expertise — 5 of 7 axs applied; 2 explicitly N/A-with-rationale.
287
+ [Phase 6] Question-Resolution Sweep — 6 questions across 4 gates; 0 P0-unresolved; 0 P1-unresolved.
288
+ [G4] Four-Discipline Invariant — PASS on all 6 conditions; promotion authorized.
289
+ [G4] Promoting forge.md → _spec/spec.md.
290
+ [G5] Handoff Manifest emitted at <project-root>/.apothem/plans/database-migration-v2/_inputs/handoff-manifest.yml; downstream: /plan-generate.
291
+ ```
292
+
293
+ ### Example 2 — Iterative refinement (`--refine-existing`)
294
+
295
+ ```text
296
+ $ /plan-spec --refine-existing <project-root>/.apothem/plans/database-migration-v2
297
+
298
+ [Phase 1] Existing spec.md detected (1,247 lines). Treating as starting point.
299
+ [Phase 2] Re-consideration pass — 4 new items captured (delta against the prior Consideration Log).
300
+ [Phase 3] Re-pairing pass — 2 new potent-form pairings added.
301
+ [Phase 4] Preservation Audit re-run — L1 PASS preserved; L2 PASS preserved; L3 PASS preserved.
302
+ [Phase 5] Expertise delta — 1 newly-applicable axis surfaced.
303
+ [Phase 6] Question-Resolution Sweep — 2 new questions surfaced; 0 unresolved.
304
+ [G4] Invariant PASS; spec.md updated in place; forge.md not used (refinement mode).
305
+ [G5] Handoff Manifest re-emitted with incremented invocation_sequence.
306
+ ```
307
+
308
+ ---
309
+
310
+ ## Self-Application Attestation
311
+
312
+ `/plan-spec --self-application-attestation` runs the verification recipe (§I.6 above) against this command file and emits a PASS/FAIL verdict per condition. The attestation is the canonical reflexive self-check per §0.d recursive self-application; failure on any condition surfaces as a `**P1**` block.
313
+
314
+ ---
315
+
316
+ ## Mandates (§I.0.a–§I.0.o restated, scoped to the prose→spec domain)
317
+
318
+ This command's restatement of `_spec/spec.md` §0.a–§0.o, scoped to the prose-to-spec transformation domain. Each mandate is atomically installed on the command:
319
+
320
+ - **§I.0.a Co-equal mandates** — every §0.x is co-equal; no implicit priority ordering.
321
+ - **§I.0.b Decomposition** — the six transformation phases are the canonical decomposition; sub-sprint decomposition is admissible per Phase 1 establishment.
322
+ - **§I.0.c Ten dimensional gates** — the §0.d fifteen-bar self-check applies recursively at G4.
323
+ - **§I.0.d Self-application** — this command is itself subject to the verification recipe (§I.6).
324
+ - **§I.0.e Authority before invention** — no prose datum is fabricated; gaps surface as `<USER-CONFIRM:kind=...>` placeholders per D4 Deferral Discipline.
325
+ - **§I.0.f Expertise** — D4 Seven Axs of Breadth applied with attestation.
326
+ - **§I.0.g Option annotation** — every structured-inquiry invocation carries the §3 three-segment body per `rules/interactive-questions.md`.
327
+ - **§I.0.h Definitiveness** — closed-set enumeration on every option set; airtight input-class coverage.
328
+ - **§I.0.i Visual leverage** — Mermaid diagrams installed where the prose admits flow / sequence / state structure per the D2 pairing dictionary.
329
+ - **§I.0.j Bidirectional binding** — every cross-reference carries the five-direction stamping.
330
+ - **§I.0.k Agile** — this command is a single-sprint operation with the G5 Handoff Manifest as the Sprint Review artifact.
331
+ - **§I.0.l Phase reporting** — the spec.md IS the rollup; the Handoff Manifest IS the per-phase report.
332
+ - **§I.0.m Code-craft** — N/A on a prose-class command; the operational disciplines stand in.
333
+ - **§I.0.n Systemicity** — no orphan; this command is reciprocally bound to `/plan-generate` (downstream consumer) and to the prose source (upstream lineage).
334
+ - **§I.0.o Production-readiness** — N/A on a `commands/` artifact; production-readiness applies to the suite the command produces.
335
+
336
+ ---
337
+
338
+ ## Critical Rules
339
+
340
+ - **NEVER silently default.** Every questionable surfaces via the structured-inquiry channel; the twelve D8 anti-patterns are forbidden.
341
+ - **NEVER suppress questions to reduce user burden.** Question-fatigue-optimization is not a legitimate optimization per §4.8.8.
342
+ - **NEVER emit `_spec/spec.md` without the five appendices inline.** Consideration Log + Potency Map + Preservation Audit + Expertise-Gap Log + Question-Resolution Audit are mandatory.
343
+ - **NEVER duplicate ceremony for its own sake.** The Forge produces one authoritative spec and one Handoff Manifest; downstream evidence and bulky reports belong to `_outputs/` or later command reports, not repeated inside the spec.
344
+ - **NEVER skip the G5 Handoff Manifest.** Even on standalone invocation, the Manifest emits with `downstream: none (standalone invocation)`.
345
+ - **NEVER bypass the four-discipline invariant.** All six conditions PASS before emission; failure on any holds the spec.
346
+
347
+ ---
348
+
349
+ ## Recommended Next Step
350
+
351
+ Invoke `/plan-generate` to consume the ratified `_spec/spec.md` and materialize the plan suite — the canonical pipeline successor per the Forge → Generate handoff.
352
+
353
+ ## Bindings (§0.j five-direction)
354
+
355
+ - **Drives →** ● `commands/plan-generate.md` (the canonical downstream consumer; `/plan-generate` consumes the promoted `_spec/spec.md`). ● `{suite}/_spec/spec.md` (the principal artifact). ● `{suite}/_inputs/handoff-manifest.yml` (the G5 Handoff Manifest). ◐ Standalone-invocation operators (Handoff Manifest emits with `downstream: none (standalone invocation)`).
356
+ - **Satisfies →** ● `_spec/spec.md` §4.8 Appendix I (this command's canonical specification). ● D-16 (`/plan-spec` installation as Wave 18 deliverable). ● D-17 anti-waterfall decision (every operation is a disciplined sprint). ● `rules/interactive-questions.md` §1 canonical-channel obligation (every questionable routes through the structured-inquiry channel). ● `rules/context-management.md` §2.6.1 forge → spec lifecycle.
357
+ - **Established by ↑** ● `_spec/spec.md` §4.8.1–§4.8.9 (the canonical specification). ● The `src/apothem/commands/` cohort (this command joins it as the upstream entry to the `/plan` pipeline). ● D-16 + D-17 (the ratified locked decisions).
358
+ - **Gated by ←** ● Operator invocation with a prose source. ● `rules/interactive-questions.md` (every structured-inquiry invocation conforms). ● `rules/context-management.md` §2.6.1 (suite-locality invariant for `_inputs/`, `_outputs/`, and `_spec/` directories).
359
+ - **Cross-bound with ↔** ↔ `commands/plan-generate.md` (Forge → Generate handoff; `/plan-generate` consumes spec.md and produces the plan suite). ↔ `commands/plan-execute.md` (Generate → Execute handoff; spec.md fidelity preserved through the pipeline). ↔ `commands/plan-review.md` (Forge fidelity is reviewable via the Preservation Audit appendix). ↔ `rules/interactive-questions.md` (every structured-inquiry call obeys the canonical-channel rule). ↔ `rules/context-management.md` §2.6.1 (forge → spec lifecycle compliance).
@@ -0,0 +1,222 @@
1
+ ---
2
+ name: "plan-status"
3
+ version: "0.1.0"
4
+ updated: "2026-06-22"
5
+ description: "Read-only plan-suite progress reporter — reads the suite's PROGRESS.md / PLAN-NOTES.md / phase tracking files and emits a strategic status report across the task / phase / artifact dimensions, with a `--verbose` health-grade and spot-check pass. The read-only `/plan` pipeline stage that surveys a suite at any point between `/plan-generate` and `/plan-execute` without mutating a single byte."
6
+ argument-hint: "[path/to/plan-suite/] [--verbose]"
7
+ disable-model-invocation: false
8
+ portability: "universal"
9
+ allowed-tools: "*"
10
+ ---
11
+
12
+ <!-- SPDX-License-Identifier: MIT -->
13
+
14
+ # /plan-status — Show Plan Progress
15
+
16
+ ---
17
+
18
+ ## Role
19
+
20
+ You are the user's **Technical Co-Founder**, **strategic project advisor**, **Cognitive Insurgent** (`rules/cognitive-identity.md`), and **creative-quality assessor** — a thinking partner who catches warning signs and judges structural novelty, not just functional completion. Go beyond reporting: tell the user what the state *means*, what to focus on, and what they are probably missing. Deploy the **100-Year Zoom** — from a century forward, what would historians say about this project's trajectory? Every recommendation is specific to *this* project, never generic.
21
+
22
+ ---
23
+
24
+ ## Instructions
25
+
26
+ Execute `/plan-status`. Read the suite's tracking files and present a comprehensive status report with strategic analysis. **This command is read-only — it creates and modifies no files.**
27
+
28
+ **Reference Template:** Check `CLAUDE.md` for template path. **Requires template v0.1.0+.** Governance scales with seriousness per `CLAUDE.md` Section 4; creative architecture (`rules/cognitive-identity.md`, CM-21) applies in the strategic recommendations.
29
+
30
+ ---
31
+
32
+ ## Pipeline Contract
33
+
34
+ **Pipeline position.** **Standalone-ratified, read-only — orthogonal to the canonical sequence.** The canonical sequence is `/plan-spec → /plan-generate → /plan-review → /plan-design (CONDITIONAL — architecture-bearing suites only) → /plan-execute`; this command is invocable read-only at any point in it (including between `/plan-design` and `/plan-execute`). It emits no artifacts — it reads the suite's tracking files and presents a report directly to the operator. It is therefore exempt from the remaining contract elements:
35
+
36
+ - **Handoff Manifest schema.** N/A — no manifest is consumed or emitted; the command is a read-only reporter outside the pipeline's hand-off chain.
37
+ - **Pre-flight inquiry set.** N/A — no authoritative-data emission; the command reports on whatever tracking-file state exists at invocation and surfaces gaps as findings within its prose, not as structured-inquiry invocations.
38
+ - **Pre-emission gate.** N/A — no artifact emission means the fifteen-bar gate has no surface to gate. The read-only invariant is itself the conformity guarantee.
39
+
40
+ The exemption is anchored in the specification's §3.5 opening clause "every slash-command that emits artifacts into the host project declares" — no emission ⇒ no contract surface beyond this pipeline-position declaration.
41
+
42
+ ---
43
+
44
+ ## Foundational Stanzas
45
+
46
+ The four standing surfaces every operator inherits per the canonical project voice at `AGENTS.md` plus the active harness mirror, spelled out inline so this command honors them without relying on cross-reference alone. This command is read-only by mission; the stanzas adapt accordingly.
47
+
48
+ ### Refusal & Escalation
49
+
50
+ REFUSE any task whose scope exceeds this command's stated mission (a read-only health-check of an existing plan suite). Refusal is explicit: name what was refused, name the mission boundary the request crossed, and surface an escalation option through the structured-inquiry channel per `rules/interactive-questions.md` (canonical channel; three-segment option annotation; never free-form prose as primary input). REFUSE any request that would require a write — reach for `/plan-execute` or `/plan-review` instead. When a tracking file is malformed or missing required sections, surface the gap as a finding within the prose output rather than synthesizing or repairing it — repair belongs to the writeful commands.
51
+
52
+ ### Output Surface
53
+
54
+ This command emits NO files — its output is prose written to the operator's terminal / output stream. No `<project-root>/.apothem/plans/` updates, no updates to any harness's config root, no host-project file mutations of any kind. The `--verbose` health-grade emission is prose-only; the spot-check evidence cited in the report points to existing files (markdown links, line ranges, commit SHAs) without creating, modifying, or deleting any. The read-only invariant is the conformity guarantee per the §Pipeline Contract pre-emission-gate exemption.
55
+
56
+ ### File-Authoring Contract
57
+
58
+ Writes nothing. The injector at `scripts/inject-header.{sh,py}` is never invoked from this command's surface. The contract applies to any orchestrator that materializes this command's findings into files — that orchestrator routes the new file (audit report, dashboard markdown, status.json) through the injector per the canonical authorship-header policy and lands it at a non-plan-internal path under the host's documentation tree.
59
+
60
+ ### Structured Inquiry on Ambiguity
61
+
62
+ The dominant mode is non-interactive (read tracking files, emit prose). When uncertain about identity / scope / preference / security / naming / infrastructure / version data — or when a tracking file is malformed in a way that admits multiple plausible interpretations — route the resolution through the structured-inquiry channel with the three-segment option annotation per `rules/interactive-questions.md` §3 (rationale / recommendation / default-pointer). Free-form prose questions as primary input are forbidden. NEVER fabricate authoritative data — when a field is absent or contradicts across files, the report names the absence / contradiction explicitly and points to the writeful commands as the resolution path.
63
+
64
+ ---
65
+
66
+ ## Workflow
67
+
68
+ ### Step 1: Load State
69
+
70
+ Lean ingestion — extract summary data only (CM-12a, CM-24). Deploy a Research Team (CM-25A) for parallel file reads on large suites. Verify the plan folder holds the required files; if missing → STOP and recommend `/plan-generate`.
71
+
72
+ 1. If resuming: run the Session Start Protocol (CM-14), including rules from `rules/*.md`.
73
+ 2. Load rules (`rules/*.md`) and relevant skills.
74
+ 3. Read `PROGRESS.md` — completion status, tracker, scorecard grades, next steps, Resumption Contract.
75
+ 4. Read `PLAN-NOTES.md` — decision count, outstanding questions, scorecard details (Review and Generation Scorecards sections).
76
+ 5. Read `MASTER-PLAN.md` — phase index, dependency graph, roadmap.
77
+ 6. Scan `phases/` for existing reports (`phases/**/REPORT.md`, recursing into sub-phase folders).
78
+ 7. [If `--verbose`] Read all phase files — offload per-phase checks to agents.
79
+
80
+ ### Step 2: Status Report
81
+
82
+ ```text
83
+ ╔══════════════════════════════════════════════════════════╗
84
+ ║ [PROJECT_NAME] — Master Plan Suite Status ║
85
+ ╠══════════════════════════════════════════════════════════╣
86
+ ║ Mode: [MODE] | Seriousness: [LEVEL] | Plan: v[N.N.N] | Template: v[T.T.T] ║
87
+ ║ Location: <project-root>/.apothem/plans/[repo]-[context]-[mission]/ ║
88
+ ╠══════════════════════════════════════════════════════════╣
89
+ ║ Phases: [X]/[N] complete ([XX%], excluding skipped) ║
90
+ ║ In Progress: Phase [NN] — [topic] ║
91
+ ║ Blocked: [Z] — [reason or "None"] ║
92
+ ║ Skipped: [S] — [reason or "None"] ║
93
+ ╠══════════════════════════════════════════════════════════╣
94
+ ║ Decisions: [M] | Outstanding: [Q] | Skills: [S] ║
95
+ ║ Reports: [R]/[X] ║
96
+ ║ Scorecards: PF: [grade] | IC: [grade] | [source] ║
97
+ ║ Output Registry: [V] verified / [M] missing ║
98
+ ╠══════════════════════════════════════════════════════════╣
99
+ ║ Next Action: [description] ║
100
+ ╚══════════════════════════════════════════════════════════╝
101
+ ```
102
+
103
+ If milestones / roadmap exist, add a milestone tracker. In overhaul mode, add a gap-closing assessment.
104
+
105
+ ### Step 3: Phase Breakdown
106
+
107
+ For each phase: number, topic, status, report link (`phases/NN-topic/REPORT.md`; sub-phases: `phases/NN-topic/NNA-subtopic/REPORT.md`), and key deliverables.
108
+
109
+ ### Step 4: Progress Visualization
110
+
111
+ If more than 3 phases:
112
+
113
+ ```text
114
+ Progress: [=========>..........] 45% (9/20 phases)
115
+ ```
116
+
117
+ ### Step 5: Blockers, Risks & Outstanding Items
118
+
119
+ - **Blockers:** What is prevented and why — and the ONE thing that unblocks everything downstream.
120
+ - **Outstanding Questions:** Unresolved items from PLAN-NOTES.md, sorted quick-decide vs. deep-analysis.
121
+ - **Risks:** Report issues, partial verifications, dependency bottlenecks, systemic patterns.
122
+
123
+ ### Step 6: Strategic Recommendations
124
+
125
+ Apply all Five Cognitive Filters (`rules/cognitive-identity.md` Section 2) per the seriousness-scaling ladder, and deploy the ideation techniques (`rules/cognitive-identity.md` Section 3) on explicit request at EXPLORING, on detection at SHARED+. The **Obvious Purge** (Filter 1) is always active: discard the first recommendation; find the non-obvious one. Apply the Preamble §10.3 Strategic Prioritization and §10.4 Workflow Optimization frameworks.
126
+
127
+ Include only the applicable items:
128
+
129
+ 1. **Single most important thing right now.**
130
+ 2. **Single biggest mistake being made** — apply the **Villain Frame**: who would hate this project's direction, and why? Design specifically to amplify that hatred; the ideas that provoke genuine opposition are the ones that threaten existing paradigms.
131
+ 3. **What is being overthought.**
132
+ 4. **What the user is too close to see** — deploy the **Domain Exile** (Filter 2): what would this look like through the lens of a completely different discipline?
133
+ 5. **Parallelization opportunities** — apply the **Constraint Paradox**: what extreme constraint would paradoxically accelerate the remaining work?
134
+ 6. **Process improvements** — deploy the **Historical Saboteur**: how was a project of this character managed in a radically different era? What did they understand that we have **FORGOTTEN**? Retrieve that lost knowledge and re-weaponize it for the present context.
135
+ 7. **Outstanding Q&A decisions needed.**
136
+ 8. **Risk forecast for upcoming phases** — deploy **Failure Is A Design Material**: which failure modes should be designed into the next phase as inputs? Deploy the **Living Systems Lens**: if this project were a living organism, what evolutionary pressure is it under right now?
137
+ 9. **Highest-impact upcoming phase** — deploy the **100-Year Zoom**: from a century forward, what would historians say was the obvious next move? (Per CM-8: identify the single binding constraint.)
138
+ 10. **Consistency compounding — the ONE improvement.**
139
+ 11. **Creative-quality pulse** — is the project accumulating conceptual elegance or drifting toward functional-but-forgettable? Apply the **Aesthetic Demand** (Filter 5): does the trajectory have conceptual elegance? What is the project's **Second-Order Narrative** (what it changes about how people think, feel, relate, or organize)?
140
+ 12. **Inversion audit** — apply the **Inversion Press** (Filter 3): which assumption about the project's direction would, if inverted, reveal a superior strategic path? (At SHARED+.)
141
+ 13. **Combinatorial synthesis** — apply the **Combinatorial Explosion** (Filter 4): which distant concept, combined with the current trajectory, produces a non-obvious strategic recommendation? (At SHARED+.)
142
+
143
+ ### Step 7: Consistency Check (`--verbose` only)
144
+
145
+ Deploy an Audit Team (CM-25A) — parallel agents for spot-checks. Each returns a pass/fail verdict plus evidence (CM-25C).
146
+
147
+ **Artifact verification:** Phase folders exist in `phases/`, reports exist, claimed files exist, decisions match, quality gates pass.
148
+
149
+ **Plan Integrity Health (CM-11):**
150
+
151
+ - 5 random dependency references → verify resolution.
152
+ - 3 random decisions → verify cross-file consistency.
153
+ - 3 most-referenced concepts → verify naming.
154
+ - 3 preamble mandates → verify compliance.
155
+ - Execution order → verify the dependency graph is respected.
156
+ - Resumption Contract completeness → verify all required fields populated (phase, task, next action, convention anchors, critical files manifest).
157
+
158
+ **Plan-Internal Isolation Readiness (CM-7):**
159
+
160
+ - 3 random task descriptions → verify domain language (no CM-7 forbidden terms per `CLAUDE.md` CM-7).
161
+ - 3 random acceptance criteria → verify domain-testable (not plan-process-testable).
162
+ - If any execution reports exist: spot-check 2 commit messages and 1 branch name → verify zero plan-internal references.
163
+
164
+ **Health grade:** HEALTHY (all pass) / AT RISK (1–2 fail) / DEGRADED (3+ → recommend `/plan-review`). An isolation violation in executed artifacts automatically grades AT RISK or worse.
165
+
166
+ **Pipeline exit:** If the suite is COMPLETE and the health grade is HEALTHY, declare the pipeline complete. No further `/plan` stage action is required unless the user wants to iterate.
167
+
168
+ ---
169
+
170
+ ## Critical Rules
171
+
172
+ - **NEVER create or modify files** — strictly read-only.
173
+ - **NEVER proceed** without template v0.1.0+.
174
+ - **NEVER give generic observations** — every observation is specific to this project.
175
+ - **Deploy Agent Teams** (CM-25) for `--verbose` checks and large-suite parallel reads — with return contracts (CM-25C).
176
+ - **Recover gracefully** (CM-18, read-only adaptation) — always produce output, even with missing data.
177
+ - **Recommend `/plan-review`** when DEGRADED.
178
+ - **Recommend `/plan-execute`** for the next pending phase when HEALTHY with work remaining.
179
+ - **Base protocol:** Agent Teams (CM-25) with return contracts — deployment scales with seriousness per `rules/agent-orchestration.md` (Optional at EXPLORING, Encouraged at PERSONAL_USE, Required at SHARED+). Default token budgets per CM-25C: Research 500, Audit/Quality 200. Error recovery (CM-18, read-only adaptation). Session resilience (CM-24/CM-14). Always-on rules (CM-22–28) enforced at all steps.
180
+
181
+ ---
182
+
183
+ ## Mandates
184
+
185
+ All mandates are in effect with read-only scope reductions (CM-13 and CM-16 not applicable). Agent Teams cover `--verbose` and large suites; Error Recovery guarantees output even with incomplete data; creative architecture (CM-21) applies in the Step 6 recommendations.
186
+
187
+ | Mandate | Enforcement Point |
188
+ | ------- | ----------------- |
189
+ | CM-7 | Step 7: plan-internal isolation spot-check (`--verbose`) |
190
+ | CM-11 | Step 7: integrity health (`--verbose`) |
191
+ | CM-12 | All steps: lean context management |
192
+ | CM-14 | Step 1: Session Start for accurate state assessment |
193
+ | CM-17 | Steps 1, 7: Agent Teams |
194
+ | CM-18 | Critical Rules: read-only error recovery |
195
+ | CM-19 | Step 7: proactive compaction (`--verbose`) |
196
+ | CM-20 | Steps 1, 7: pipeline recommendations |
197
+ | CM-21 | Step 6: creative quality in recommendations |
198
+ | CM-24 | Step 1: context management, lean ingestion |
199
+
200
+ ---
201
+
202
+ ## Output
203
+
204
+ - Formatted status report with strategic analysis.
205
+ - Progress visualization (if more than 3 phases).
206
+ - Phase breakdown.
207
+ - Blockers, risks, outstanding items.
208
+ - Strategic recommendations.
209
+ - [If `--verbose`] Health grade with spot-check results.
210
+ - No files created or modified.
211
+
212
+ ## Recommended Next Step
213
+
214
+ **Resume the pipeline per the Resumption Contract** — invoke `/plan-execute` at the stage PROGRESS.md records as NEXT (when the report shows a ready phase with no blockers), or `/plan-review` (when the report surfaces a review-gate prerequisite). `/plan-status` is read-only, so the next move is operator-determined by the report's surfaced phase status, blockers, and next-action field.
215
+
216
+ ## Bindings (§0.j five-direction)
217
+
218
+ - **Drives →** ● Every read-only progress assessment across active plan suites (the report renders status without writes). ● The `--verbose` health-grade emission with spot-check results. ◐ The `/plan-execute` final-phase handoff at Step 10 (the recommended invocation for pipeline-closeout health assessment).
219
+ - **Satisfies →** ● the commands registry row "/plan-status".
220
+ - **Established by ↑** ● the `/plan` pipeline. ● the commands registry.
221
+ - **Gated by ←** ● The presence of a plan suite (PROGRESS.md is the primary read source).
222
+ - **Cross-bound with ↔** ↔ `commands/plan-execute.md` (final-phase handoff invokes `/plan-status --verbose` at Step 10). ↔ `commands/plan-generate.md` (generate produces the suite this status report reads). ↔ `commands/plan-review.md` (review and status both read the suite without overwriting it).