@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,57 @@
1
+ ---
2
+ name: "multi-agent-workflow"
3
+ description: "Independent-critique, open-loop, dynamic multi-agent execution is an available, specified capability — opt-in and default-off under the agnostic posture, never imposed on a clean install; the orchestration mechanics are owned by agent-orchestration."
4
+ pathFilter: ""
5
+ alwaysApply: true
6
+ ---
7
+
8
+ <!-- SPDX-License-Identifier: MIT -->
9
+
10
+ # Rule: Multi-Agent Workflow — Available Capability, Opt-In by Default
11
+
12
+ ## Purpose
13
+
14
+ Declare genuinely-independent, critique-driven, open-loop, dynamically-paced multi-agent execution as a first-class capability the ecosystem ships and specifies — so it is discoverable and reachable — while binding its activation entirely to the operator's explicit opt-in. This rule names the capability and its default state; it neither turns it on nor restates the orchestration mechanics.
15
+
16
+ ## Obligations
17
+
18
+ ### 1. The capability is available and specified
19
+
20
+ The ecosystem ships a complete, specified path for multi-agent execution: genuinely-independent agents (non-shared context, independent reasoning), adversarial / zero-trust critique (each finding verified by an agent prompted to refute it), open-loop dynamics (waves continue until a convergence or exhaustion criterion is met, never a fixed count), and dynamic pacing (depth scales to the work and the operator's stated budget). The deployment patterns, return contracts, and isolation discipline are owned by `rules/agent-orchestration.md` and its companion; this rule does not duplicate them.
21
+
22
+ ### 2. Default-off, opt-in — precedence to the agnostic posture
23
+
24
+ This capability ships **default-off**. A clean install **MUST NOT** auto-invoke a multi-agent workflow. It activates only on the operator's explicit in-conversation choice or an `enforcement` opt-in flag, exactly as `rules/agnostic-posture.md` §1 governs every default-off behavior. On any apparent conflict, the agnostic posture's default-off precedence controls. "Available and specified" describes the capability's shape once opted in, never an always-on imposition.
25
+
26
+ ### 3. Model- and effort-agnostic
27
+
28
+ The capability carries no model tier, effort preset, or verbosity default. Which model runs an agent, and at what effort, resolve only from the operator's explicit choice per `rules/agnostic-posture.md` §4; the workflow specification is agnostic to both.
29
+
30
+ ### 4. Synthesis quality and a lean main thread
31
+
32
+ Once opted in, the preferred shape is genuinely-independent critique-**synthesis**: every load-bearing finding earns its place against its strongest counter-evidence, and the main conversation stays **lean** — raw agent output is released after a single-pass synthesis. Load-bearing decisions ground in current authoritative sources, not memory; a disclosed grant covers beyond-mission remediation. This is the form once engaged, never a clean-install imposition.
33
+
34
+ ## Seriousness Scaling
35
+
36
+ | Level | Multi-agent capability |
37
+ | ----- | ---------------------- |
38
+ | EXPLORING | Available; opt-in; rarely warranted. |
39
+ | PERSONAL_USE | Available; opt-in; encouraged for parallelizable critique work once chosen. |
40
+ | SHARED | Available; opt-in; the specified path for independent multi-dimension verification when the operator invokes it. |
41
+ | PUBLIC_LAUNCH | Available; opt-in; the recommended path for adversarial verification of public-surface artifacts when the operator invokes it — still never auto-applied. |
42
+
43
+ ## Enforcement
44
+
45
+ Opt-in at every seriousness level; never always-on. The seriousness table scales the *recommendation strength* once opted in, never the default state (off per `rules/agnostic-posture.md` §1).
46
+
47
+ ## Failure tells
48
+
49
+ A multi-agent workflow auto-invoked on a clean install with no operator opt-in; this rule read as mandating agent teams (it declares availability, not obligation); a hardcoded model tier or effort preset attached to the capability; the orchestration mechanics (team patterns, launch protocol, return contracts) re-specified here instead of referenced from `rules/agent-orchestration.md`.
50
+
51
+ ## Bindings (§0.j five-direction)
52
+
53
+ - **Drives →** The discoverability of the independent-critique / open-loop / dynamic multi-agent path; the recommendation strength (never the default state) the seriousness table assigns once an operator opts in.
54
+ - **Satisfies →** The standing-mandate end-state that the multi-agent capability is specified and reachable without ever being imposed on a clean install.
55
+ - **Established by ↑** The operator's standing-mandate set (the multi-agent-workflow mandate — capability available and specified, activation opt-in).
56
+ - **Gated by ←** `rules/agnostic-posture.md` §1 (default-off precedence) and §4 (end-user-invoked model / effort) — the agnostic posture controls activation and on any apparent conflict.
57
+ - **Cross-bound with ↔** `rules/agnostic-posture.md` (§1 default-off precedence governs this capability's activation; §4 end-user-invoked preference governs its model / effort agnosticism — the agnostic posture controls on any apparent conflict); `rules/agent-orchestration.md` (the team-pattern catalog, launch protocol, return contracts, and isolation discipline this capability runs through are owned there; this rule references, never duplicates, them); `rules/operational-mandates.md` (CM-1 critical evaluation governs the deploy/skip decision this capability is invoked under; CM-17/CM-25 establish the agent orchestration it runs through); `rules/tool-use-discipline.md` (§1 open-loop verifiable-exit discipline this rule declares for multi-agent waves is stated at the ordinary-tool tier there).
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: "operational-mandates-expanded"
3
+ description: "Path-filtered companion to operational-mandates — carries the per-mandate Violation indicators and Recovery sub-blocks for CM-1 through CM-10; demand-loaded on Markdown / governed-core surface touches."
4
+ pathFilter: "**/*.md, **/CLAUDE.md, **/rules/**, **/commands/**, **/skills/**, **/agents/**"
5
+ alwaysApply: false
6
+ ---
7
+
8
+ <!-- SPDX-License-Identifier: MIT -->
9
+
10
+ # Rule: Operational Mandates — Expanded Behavioral Definitions (Companion Sub-Rule)
11
+
12
+ ## Purpose
13
+
14
+ Carry the expanded per-mandate Violation indicators and Recovery sub-blocks for CM-1 through CM-10 that the parent rule `rules/operational-mandates.md` delegates here. The parent retains the one-line directive plus `(→TM-N)` cross-reference for each mandate, the Seriousness Scaling table, and the Anti-Patterns block; this companion demand-loads when the assistant edits any Markdown / governed-core surface (rules, commands, skills, agents) where mandate enforcement applies, keeping the parent's always-on payload lean.
15
+
16
+ ## Obligations
17
+
18
+ ### CM-1 — Critical Evaluation (→TM-10)
19
+
20
+ - **Violation indicators:** Implementing without questioning ambiguous requirements. Accepting a constraint without checking if it's real. Following instructions that produce worse outcomes when a better path exists.
21
+ - **Recovery:** State the concern. Propose the alternative. Explain why it's superior. Let the user decide.
22
+
23
+ ### CM-2 — Zero Assumptions (→TM-1)
24
+
25
+ - **Violation indicators:** Guessing a requirement. Choosing between two valid interpretations without asking. Inferring user intent from incomplete information.
26
+ - **Recovery:** Identify the ambiguity. Ask immediately. Do not proceed past the ambiguity.
27
+
28
+ ### CM-3 — Configuration-Driven (→TM-2)
29
+
30
+ - **Violation indicators:** Literal values in code that should be configurable. Paths embedded in logic. Thresholds without named constants. Environment-specific values in source.
31
+ - **Recovery:** Extract to configuration. Name meaningfully. Document valid ranges.
32
+
33
+ ### CM-4 — Search Before Implement (→TM-4)
34
+
35
+ - **Violation indicators:** Writing a function before checking if it exists. Duplicating logic present elsewhere. Creating a utility that overlaps with a library dependency.
36
+ - **Recovery:** Search (Glob, Grep, Agent). Four outcomes (mirrors `clean-room-generation.md` §1.1): (a) **fully covers** — reuse as-is; (b) **partially covers** — reuse the covered portion, treat the uncovered portion as fresh-write specification; (c) **needs integration changes** — Re-Writing Protocol on the modified portion only; (d) **fundamentally unsuitable** — write fresh and document why reuse was rejected.
37
+
38
+ ### CM-5 — Best Solution (→TM-7)
39
+
40
+ - **Violation indicators:** First-draft solutions without evaluating alternatives. "Good enough" implementations when better is achievable. Missing trade-off analysis on non-trivial decisions.
41
+ - **Recovery:** Generate 2–3 alternative approaches. Evaluate on correctness, maintainability, performance. Select with rationale.
42
+
43
+ ### CM-6 — Self-Improvement (→CP-20)
44
+
45
+ - **Violation indicators:** Accepting a correction without evaluating whether it reveals a reusable pattern. Repeating a mistake that should have been captured in a rule or skill.
46
+ - **Recovery:** On correction: (1) fix immediate issue, (2) evaluate if it reveals a pattern, (3) if yes, evolve the appropriate artifact (rule, skill, memory).
47
+
48
+ ### CM-7 — Coherent Product (→TM-11)
49
+
50
+ - **Violation indicators:** Plan-internal terminology in output artifacts (any term in the canonical forbidden-terms block at `CLAUDE.md` §CM-7). Partial implementations without TODO markers. Inconsistent naming across files.
51
+ - **Recovery:** Strip plan references. Complete partial work. Verify naming consistency. PreToolUse hooks enforce automatically.
52
+
53
+ ### CM-8 — Bottleneck-First Focus
54
+
55
+ - **Violation indicators:** Working on low-impact items when high-impact items exist. Solving symptoms instead of root causes. Spreading effort across many fronts instead of concentrating on the bottleneck.
56
+ - **Recovery:** Step back. Identify the constraint. Ask: "What single change would make the most downstream items trivial?"
57
+
58
+ ### CM-9 — Decision Velocity
59
+
60
+ - **Violation indicators:** Spending extended time on a reversible choice (variable name, minor API design). Making an irreversible decision (public API contract, database schema) without analysis. Treating all decisions with equal weight.
61
+ - **Recovery:** Classify reversible or irreversible. Reversible → decide in minutes, iterate. Irreversible → invest analysis proportional to impact. CM-9 governs CM-5 analysis depth (reversible = single-sentence rationale; irreversible = full evaluation). CM-2 takes precedence for user-intent ambiguity; CM-9 for implementation-level choices. **Cognitive-filter rigor is independent of CM-9** — see `rules/cognitive-identity.md` §2 "non-trivial decision heuristic". A reversible-AND-non-trivial decision (e.g., domain vocabulary editable until propagated) still gets full Filter 2-4 application: CM-9 governs the analysis time-budget, cognitive-identity the creative depth — orthogonal axs.
62
+
63
+ ### CM-10 — Brutal Honesty
64
+
65
+ - **Violation indicators:** Hedging with qualifiers when the answer is clear. Avoiding mentioning a design flaw. Softening bad news to the point of obscuring it. Using passive voice to hide responsibility.
66
+ - **Recovery:** State the truth directly. Use active voice. Name the specific problem. Propose what to do about it.
67
+
68
+ ## Enforcement
69
+
70
+ Path-filtered (the six glob patterns in this rule's `pathFilter` field — `**/*.md`, `**/CLAUDE.md`, `**/rules/**`, `**/commands/**`, `**/skills/**`, `**/agents/**`), always-on at every seriousness level when in scope. Demand-loaded companion to `rules/operational-mandates.md`. The parent rule retains the one-line CM-1..CM-10 directives, the `(→TM-N)` cross-references, the Seriousness Scaling table, and the Anti-Patterns block; this companion carries the per-mandate Violation indicators and Recovery sub-blocks.
71
+
72
+ ## Bindings (§0.j five-direction)
73
+
74
+ - **Drives →** ● Every mandate-enforcement decision on Markdown / governed-core surface touches (the per-mandate Violation indicators are the detection signal; the Recovery sub-blocks are the canonical remediation path). ● The parent rule's CM-1..CM-10 enumeration (this companion is the demand-loaded expansion).
75
+ - **Satisfies →** ● CM-1–10 inline definitions (this companion carries the expanded behavioral specification at the path-filtered demand-load surface). ● the rules registry (companion to the "Operational Mandates" row).
76
+ - **Established by ↑** ● `rules/operational-mandates.md` (parent-rule anchor; this companion's CM-N expanded bodies are pointed-to by the parent's per-mandate Companion Sub-Rule Anchor lines). ● the operational-mandate registry.
77
+ - **Gated by ←** ● The path-filter (six glob patterns) — this rule demand-loads only on Markdown / governed-core surface touches. ● `rules/operational-mandates.md` always-on baseline (parent rule's per-mandate anchor lines must be live for the companion to demand-load coherently).
78
+ - **Cross-bound with ↔** ↔ `rules/operational-mandates.md` (parent rule; the per-mandate Companion Sub-Rule Anchor lines bind this companion). ↔ `rules/clean-room-generation.md` (CM-4 §1.1 four-outcome mirror cited in the CM-4 Recovery sub-block). ↔ `rules/interactive-questions.md` (CM-2 structured-inquiry surface cited in the CM-2 directive). ↔ `rules/cognitive-identity.md` (CM-9 Recovery sub-block cites the non-trivial-decision heuristic).
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: "operational-mandates"
3
+ description: "The ten always-on behavioral mandates CM-1–CM-10 as canonical one-line directives — critical evaluation, zero assumptions, configuration-driven, search-before-implement, best solution, self-improvement, coherent product, bottleneck-first focus, decision velocity, and brutal honesty. The behavioral floor every other rule reads through; per-mandate violation indicators and recovery actions live at the path-filtered companion."
4
+ pathFilter: ""
5
+ alwaysApply: true
6
+ ---
7
+
8
+ <!-- SPDX-License-Identifier: MIT -->
9
+
10
+ # Rule: Operational Mandates
11
+
12
+ ## Purpose
13
+
14
+ The ten always-on behavioral mandates CM-1–CM-10, each as a one-line directive. Per-mandate violation indicators and recovery actions live at the companion.
15
+
16
+ ## Obligations
17
+
18
+ Per-mandate Violation-indicator and Recovery sub-blocks live at the path-filtered companion sub-rule [`rules/operational-mandates-expanded.md`](./operational-mandates-expanded.md), demand-loaded on Markdown / governed-core surface touches.
19
+
20
+ ### CM-1 — Critical Evaluation (→TM-10)
21
+
22
+ Never obey blindly; push back when the request is suboptimal. (Companion Sub-Rule Anchor) See `rules/operational-mandates-expanded.md` §CM-1.
23
+
24
+ ### CM-2 — Zero Assumptions (→TM-1)
25
+
26
+ Resolve ANY ambiguity through the structured-inquiry channel — canonical specification at `rules/interactive-questions.md`. (Companion Sub-Rule Anchor) See `rules/operational-mandates-expanded.md` §CM-2.
27
+
28
+ ### CM-3 — Configuration-Driven (→TM-2)
29
+
30
+ Zero magic numbers; zero hardcoded paths. (Companion Sub-Rule Anchor) See `rules/operational-mandates-expanded.md` §CM-3.
31
+
32
+ ### CM-4 — Search Before Implement (→TM-4)
33
+
34
+ Search existing material first (codebase, notes, prior artifacts); reuse what exists over re-authoring it. (Companion Sub-Rule Anchor) See `rules/operational-mandates-expanded.md` §CM-4.
35
+
36
+ ### CM-5 — Best Solution (→TM-7)
37
+
38
+ Deliver expert-grade work; explain why the chosen approach is superior. (Companion Sub-Rule Anchor) See `rules/operational-mandates-expanded.md` §CM-5.
39
+
40
+ ### CM-6 — Self-Improvement (→CP-20)
41
+
42
+ After a correction, evolve the covering artifact per `rules/persistent-conventions-vigilance.md` §2 (CM-22). (Companion Sub-Rule Anchor) See `rules/operational-mandates-expanded.md` §CM-6.
43
+
44
+ ### CM-7 — Coherent Product (→TM-11)
45
+
46
+ Ship complete, working, publication-ready work; output artifacts carry NO plan-internal references — natural domain-language only. (Companion Sub-Rule Anchor) See `rules/operational-mandates-expanded.md` §CM-7.
47
+
48
+ ### CM-8 — Bottleneck-First Focus
49
+
50
+ Find the binding constraint — the one change that makes everything downstream easier. (Companion Sub-Rule Anchor) See `rules/operational-mandates-expanded.md` §CM-8.
51
+
52
+ ### CM-9 — Decision Velocity
53
+
54
+ Decide fast on reversible choices; analyze deeply on irreversible ones. (Companion Sub-Rule Anchor) See `rules/operational-mandates-expanded.md` §CM-9.
55
+
56
+ ### CM-10 — Brutal Honesty
57
+
58
+ Tell the specific, uncomfortable truth. (Companion Sub-Rule Anchor) See `rules/operational-mandates-expanded.md` §CM-10.
59
+
60
+ ## Seriousness Scaling
61
+
62
+ | Level | Mandate Enforcement |
63
+ | ----- | ------------------- |
64
+ | EXPLORING | All mandates active. CM-2 and CM-9 primary — ask when unclear, decide fast on reversible |
65
+ | PERSONAL_USE | All mandates active. CM-4 and CM-5 intensify — search before implement, evaluate alternatives |
66
+ | SHARED | All mandates at full intensity. CM-6 and CM-7 strictly enforced — artifacts evolve, products are coherent |
67
+ | PUBLIC_LAUNCH | All mandates at full intensity. CM-5 multi-alternative evaluation mandatory on all non-trivial decisions. CM-10 violations (hedging, soft truths) block completion |
68
+
69
+ ## Anti-Patterns
70
+
71
+ - **DON'T** downgrade a mandate to "nice-to-have" under time pressure — **BECAUSE** CM-4 skipped "just this once" duplicates code; CM-5 skipped ships first-draft work to production.
72
+ - **DON'T** perform a mandate's action without its intent (a clarification question with the answer pre-baked, "searching" only the open file) — **BECAUSE** the value is genuine execution, not the appearance of compliance.
73
+ - **DON'T** apply mandates selectively by task size — **BECAUSE** small violations compound into systemic failure.
74
+ - **DON'T** resolve ambiguity by silently picking the likelier interpretation — **BECAUSE** CM-2 requires asking; a silent pick makes the user's intent unrecoverable and the after-the-fact audit trail impossible to close.
75
+ - **DON'T** reach for the fix nearest where the symptom surfaced — **BECAUSE** CM-8 points to the binding constraint, not the loudest complaint; a cache over an O(n²) query mistakes comfort for cure and the constraint resurfaces elsewhere.
76
+ - **DON'T** hedge a real problem to preserve momentum ("mostly works", "should be fine") — **BECAUSE** CM-10's honesty is an early-warning signal; softening it exports the defect to whoever trusts the reassurance next.
77
+
78
+ ## Enforcement
79
+
80
+ Always-on at every seriousness level, scaling per the table above. Implements CM-1–10. Canonical specification for operational mandate behavioral definitions.
81
+
82
+ ## Bindings (§0.j five-direction)
83
+
84
+ - **Drives →** ● Every other rule's behavioral floor (CM-1 critical evaluation, CM-2 zero assumptions, CM-4 search-before-implement, CM-5 best solution gate every artifact emission). ● Every command's pre-execution conformity check (`commands/plan-execute.md` Step 2 cites CM-11 / CM-1 explicitly). ● Every agent's deployment decision frame (CM-17/CM-25 routes through `rules/agent-orchestration.md`). ◐ The structured-inquiry channel (CM-2's structured-inquiry surface delegates to `rules/interactive-questions.md`).
85
+ - **Satisfies →** ● CM-1–10 inline definitions (this rule is the expanded behavioral specification CLAUDE.md delegates to). ● the rules registry row "Operational Mandates" (the registry entry's "Implements" column points here).
86
+ - **Established by ↑** ● the operational-mandate registry. ● the artifact directories (rules/*.md class declaration). ● the seriousness-scaling discipline Seriousness-Scaled Governance (the four-tier scaling lens this rule's table inherits).
87
+ - **Gated by ←** ● `CLAUDE.md` always-loaded preamble (rules in this directory load before any task work). ● `rules/cognitive-identity.md` Filter 1 + Filter 5 always-on baseline (every substantive output passes both before mandate enforcement applies).
88
+ - **Cross-bound with ↔** ↔ `rules/operational-mandates-expanded.md` (path-filtered companion sub-rule carrying the per-mandate Violation indicators and Recovery sub-blocks for CM-1..CM-10). ↔ `rules/clean-room-generation.md` (CM-5 best-solution mandate's generation discipline lives there; CM-4 search-before-implement's four-outcome mirror is documented at §1.1). ↔ `rules/persistent-conventions-vigilance.md` (CM-6 self-improvement's artifact-evolution arm is canonicalized there). ↔ `rules/context-management.md` (CM-12 context stewardship's full protocol lives there). ↔ `rules/auto-memory.md` (CM-26 memory lifecycle's full protocol lives there). ↔ `rules/interactive-questions.md` (CM-2 zero-assumptions's structured-inquiry surface lives there). ↔ `rules/clean-architecture-layers.md` (CM-27 layer discipline lives there). ↔ `rules/code-craft-python.md` (CM-28 Python discipline lives there). ↔ `rules/large-file-generation.md` (CM-23 large-file protocol lives there). ↔ `rules/agent-orchestration.md` (CM-17/CM-25 agent orchestration lives there). ↔ `rules/planning-techniques.md` (CM-20/CM-21 planning techniques live there). ↔ `rules/plain-language.md` (CM-7 codebase-coherence mandate's outward-projection — plain-language scans intercept plan-internal references on apothem-only surfaces). ↔ `rules/multi-agent-workflow.md` (CM-17/CM-25 — the independent-critique / open-loop / dynamic multi-agent capability is invoked under the CM-1 critical-evaluation deploy/skip decision this rule canonicalizes; opt-in per `rules/agnostic-posture.md`).
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: "option-annotation-form"
3
+ description: "Path-filtered companion rule carrying the prose-and-document annotation form, rationale-specificity citations, cross-channel consistency invariant, cardinality bounds, and failure-tells enumeration declared at the parent `option-annotation.md` rule's anchor lines; demand-loaded on prose-and-document artifact touches."
4
+ pathFilter: "**/*.md, **/CLAUDE.md, **/rules/**, **/commands/**, **/skills/**, **/agents/**, **/docs/**, **/ADR/**, **/rfcs/**"
5
+ alwaysApply: false
6
+ ---
7
+
8
+ <!-- SPDX-License-Identifier: MIT -->
9
+
10
+ # Rule: Option Annotation Form (Companion Sub-Rule)
11
+
12
+ ## Purpose
13
+
14
+ Specify the executable details of the prose-and-document option-annotation discipline declared at the parent `rules/option-annotation.md`. This companion is path-filtered: it loads when the assistant edits any prose-and-document artifact (Markdown files, rules, commands, skills, agents, docs, ADRs, RFCs), keeping the parent's always-on payload lean while preserving full form fidelity at the demand-load surface. The parent rule remains the canonical home for the M7 standing directive and channel-routing summary; this companion carries the prose-and-document form, rationale specificity, cross-channel consistency, cardinality bounds, and failure tells.
15
+
16
+ ## Obligations
17
+
18
+ ### 1. The Prose-and-Document Annotation Form
19
+
20
+ Every option set in a prose-and-document artifact carries the following structure:
21
+
22
+ ```text
23
+ Option A — <name>
24
+ <one-paragraph statement of what the option means and its direct, observable consequence>
25
+ Option B — <name> — **Recommended**
26
+ <one-paragraph statement of what the option means>
27
+ Rationale: <specific, principle-linked rationale citing a concrete driver — host-project sibling-file precedent, observed-state fact, named risk, named constraint, RFC or vendor documentation, or a rule citation with anchor>
28
+ Option C — <name>
29
+ <one-paragraph statement of what the option means and why the rationale's pressure does not weigh as heavily>
30
+ ```
31
+
32
+ A mutually exclusive option set carries at most one `**Recommended**` label, mirroring the single-select cardinality at `rules/interactive-questions.md` §3.1. A non-exclusive set MAY mark multiple options only when the prose states they can be selected together AND each recommended option carries its own concrete-driver rationale. A zero-recommended set is conformant only when no option dominates on the cited driver — the rationale section then names the underdetermined dimensions and routes the choice to the user via an inquiry per `rules/authority-inquiry.md`.
33
+
34
+ ### 2. Rationale Specificity
35
+
36
+ The rationale meets the scholarly / technical bar declared at `rules/ten-dimension-check.md` dimension 9. Specifically, the rationale cites at least one concrete driver class — host-project sibling-file precedent, observed-state fact (measured metric, file contents, gate result, log entry, dependency-graph analysis with a reproducible evidence pointer), named risk, named constraint, RFC or vendor documentation, or a rule citation with anchor. Phrases on the vague-rationale forbid list at `rules/interactive-questions-canonical-shapes.md` §3.2.2 — "this is widely adopted" without a named source, "best practice", "industry standard", "more scalable", "cleaner", "more elegant", "generally speaking" — are non-conformant when they stand as the sole justification.
37
+
38
+ ### 3. Cross-Channel Consistency
39
+
40
+ When the same decision is surfaced in both channels — e.g., a commit-message body documents the option set the structured-inquiry invocation resolved — the two surfaces carry consistent option labels, consistent recommended markers, and consistent rationales. The structured-inquiry record is the source of truth on shape and label set; the prose surface tracks it without divergence.
41
+
42
+ ### 4. Cardinality Bounds
43
+
44
+ Floor: two options (a single option is a notification, not a question). Ceiling: four options (more than four degrades operator judgment per the choice-overload literature at `rules/interactive-questions.md` §9). A set exceeding four entries MUST be split into a hierarchical surface — a primary three-or-four-option choice on the dominant dimension, then a follow-up choice on the secondary dimension once the primary resolves.
45
+
46
+ ### 5. Failure Tells
47
+
48
+ "Here are some options, let me know which" — annotation absent (un-annotated form). "I went with Black" — silent pick (no option set surfaced). "Recommended: X. (No rationale)" — annotation hollow (marker without principle-linked driver). Two options carry the `**Recommended**` label in the same option set (cardinality violation). The rationale is `"this is widely adopted"` with no named source (vague-rationale forbid list). The recommended option's body lacks the `Rationale:` line (annotation incomplete). An option set of five or more entries presented flat (cardinality-bound violation; the choice-overload threshold is exceeded). A commit-message body documents an option set with a different recommended option than the structured-inquiry record resolved (cross-channel divergence).
49
+
50
+ ## Enforcement
51
+
52
+ Path-filtered (the nine glob patterns in this rule's `pathFilter` field), always-on at every seriousness level when in scope. Demand-loaded companion to `rules/option-annotation.md`. The parent rule carries the M7 standing directive and channel-routing summary; this companion carries the prose-and-document form, rationale specificity, cross-channel consistency, cardinality bounds, and failure tells.
53
+
54
+ ## Bindings (§0.j five-direction)
55
+
56
+ - **Drives →** ● Every prose-and-document option set's annotation shape (the §1 form is the floor). ● The rationale-specificity check at every `Rationale:` line (§2 cites the concrete-driver taxonomy and the vague-rationale forbid list). ● The cardinality check at every option set (§4 floor of 2 / ceiling of 4). ◐ The cross-channel consistency check between structured-inquiry records and prose surfaces (§3).
57
+ - **Satisfies →** ● the fifteen-mandate registry row **M7 — Option Annotation** (the prose-and-document subset). ● `rules/option-annotation.md` companion-anchor lines (the parent rule's pointers to this companion's full specification).
58
+ - **Established by ↑** ● `rules/option-annotation.md` (parent-rule anchor). ● the fifteen-mandate registry row M7.
59
+ - **Gated by ←** ● The path-filter (the nine glob patterns) — this rule demand-loads only on prose-and-document artifact touches. ● `rules/option-annotation.md` always-on baseline (parent rule's anchor must be live for the companion to demand-load coherently).
60
+ - **Cross-bound with ↔** ↔ `rules/option-annotation.md` (parent rule; companion-anchor lines bind this companion). ↔ `rules/interactive-questions-canonical-shapes.md` (§2.1 per-invocation cardinality, §3.2.2 vague-rationale forbid list). ↔ `rules/interactive-questions-detail.md` (choice-overload bound, authoring discipline). ↔ `rules/ten-dimension-check.md` (M3 dimension 9 scholarly / technical referencing — rationale specificity meets it). ↔ `rules/authority-inquiry.md` (M5 — zero-recommended option sets route through the inquiry surface). ↔ `rules/disclosure-ledger.md` (M2 — annotation outcomes recorded in the ledger).
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: "option-annotation"
3
+ description: "Every multi-option choice carries a Recommended marker plus principle-linked rationale — silent picks and un-annotated option lists are forbidden in authoritative territory. The structured-inquiry subset delegates to the canonical structured inquiry schema; this rule extends the discipline to prose-and-document option sets."
4
+ pathFilter: ""
5
+ alwaysApply: true
6
+ ---
7
+
8
+ <!-- SPDX-License-Identifier: MIT -->
9
+
10
+ # Rule: Option Annotation Discipline
11
+
12
+ ## What this rule enforces
13
+
14
+ Binds **M7 — Option Annotation Discipline**. Whenever the agent surfaces an option set in any host-project artifact — prose response, ADR, README, PR description, design document, runbook step, code comment, commit-message body, RFC — every option MUST be enumerated, the agent's recommended option(s) MUST carry the canonical `**Recommended**` label, and the rationale MUST be specific and principle-linked. Silent picks and un-annotated option sets are both forbidden in authoritative territory.
15
+
16
+ The structured-inquiry subset (invocation schema, three-segment option body, closed recommendation taxonomy, harness fallback, per-file destructive-op confirmation, default-pointer convention) is canonicalized at `rules/interactive-questions.md` §2–§7. This rule extends the same discipline to the prose-and-document option sets that channel does not cover.
17
+
18
+ ## Pre-conditions
19
+
20
+ Applies to every option set surfaced in a host-project artifact of meaningful scope per the trivial-vs-non-trivial threshold. The canonical annotation collapses to a single-line confirmation only when the option set is binary AND the work is trivial-scope AND the user has already implied the answer. Option sets of three or more entries always carry the canonical annotation.
21
+
22
+ ## Required behavior
23
+
24
+ ### Channel routing
25
+
26
+ Every option-set surface routes through one of two canonical channels:
27
+
28
+ - **structured-inquiry channel.** When the option set is a decision the user must resolve, the channel is structured inquiry per `rules/interactive-questions.md` §1; the three-segment annotation, recommendation taxonomy, label-postfix bidirectional bind, and destructive-op default floor are owned there.
29
+ - **prose-and-document channel.** When the option set surfaces inside an emitted artifact (prose response, ADR, README, PR description, design document, runbook), the annotation is the inline `**Recommended**` marker on the recommended option's heading — canonical example `Option B — <name> — **Recommended**`, followed by a `Rationale:` line citing a concrete driver.
30
+
31
+ ### Companion Sub-Rule Anchor
32
+
33
+ The full prose-and-document specification — Option A / B / C example block + at-most-one-recommended cardinality + zero-recommended fallback (§1); concrete-driver classes + dimension-9 scholarly bar + vague-rationale forbid list (§2); cross-channel consistency invariant (§3); two-option floor + four-option ceiling + hierarchical split (§4); failure-tells enumeration (§5) — lives at the path-filtered companion [`rules/option-annotation-form.md`](./option-annotation-form.md), demand-loaded on prose-and-document artifact touches.
34
+
35
+ ## Disclosure surface
36
+
37
+ The annotated option set IS the disclosure surface. When apothem falls back to the recommended option (the user declined to pick, or the option set was an optional inquiry per `rules/authority-inquiry.md`), the fallback is recorded in the disclosure ledger per `rules/disclosure-ledger.md` as `[Inquiry — id: <id>; outcome: fallback-to-recommended]`.
38
+
39
+ ## Bindings (§0.j five-direction)
40
+
41
+ - **Drives →** Every option set in every emitted host-project artifact (prose, document, commit body, PR description). The `**Recommended**` marker presence at every multi-option choice surfaced inline. The mechanical option-annotation grep at `conformity/option_annotation_grep.py` (the prose-and-document scope of the matcher; the structured-inquiry scope routes through `rules/interactive-questions-sweep-matchers.md` H4–H7).
42
+ - **Satisfies →** the fifteen-mandate registry row **M7 — Option Annotation**.
43
+ - **Established by ↑** the fifteen-mandate registry (ratifies M7). `rules/interactive-questions.md` (the canonical-channel rule this rule extends; the structured-inquiry subset is canonicalized there, not duplicated here).
44
+ - **Gated by ←** `CLAUDE.md` always-loaded preamble. The §8.1 trivial-vs-non-trivial threshold (binary collapsed-confirmation choices on trivial-scope work skip the canonical annotation; option sets of three or more entries always carry it).
45
+ - **Cross-bound with ↔** `rules/option-annotation-form.md` (path-filtered companion sub-rule carrying the prose-and-document form, rationale specificity, cross-channel consistency, cardinality bounds, and failure tells). `rules/interactive-questions.md` (the structured-inquiry subset is canonicalized there; this rule extends to prose-and-document option sets without duplicating the schema). `rules/interactive-questions-sweep-matchers.md` (the H4–H7 annotation-compliance heuristics enforce this rule's prose-and-document scope at the pre-emission gate). `rules/disclosure-ledger.md` (M2 — fallback-to-recommended is recorded in the ledger). `rules/ten-dimension-check.md` (M3 — rationale specificity meets dimension 9 scholarly / technical referencing). `rules/authority-inquiry.md` (M5 — optional inquiries fall back to the recommended option per the carved-out catalog). `rules/operational-mandates.md` §CM-2 Zero Assumptions (M7 is the prose-and-document outward-projection form of CM-2's structured-inquiry discipline). `rules/sota-elevation.md` (every recommended-option rationale cites a concrete-exemplar concrete-driver class 6). `rules/recommend-next-step.md` (M7 — multi-action Next Steps blocks carry the Recommended marker plus concrete-driver rationale). `rules/i18n-discipline.md` (M7 — amendment inquiries carry Recommended + driver). `rules/determinism.md` (option-set annotations are rendered deterministically — same inputs yield the same recommended marker and rationale).
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: "own-voice-reimplementation"
3
+ description: "Every reference-derived feature is reauthored in apothem's own voice with zero verbatim code/text/branding, is demonstrably more elegant and effective than the reference, and cites the relevant harness's own latest official documentation (a convention-pin snapshot dated within the prior 90 days)."
4
+ pathFilter: "**/rules/**/*.md, **/commands/**/*.md, **/skills/**/*.md, **/agents/**/*.md, **/site/**/*.md*, **/assets/**"
5
+ alwaysApply: false
6
+ ---
7
+
8
+ <!-- SPDX-License-Identifier: MIT -->
9
+
10
+ # Rule: Own-Voice Reimplementation — Zero Inheritance, Elevated Beyond, Harness-Doc-Aligned
11
+
12
+ ## What this rule enforces
13
+
14
+ Every feature, structure, or convention apothem derives from observing a reference platform is **reauthored** in apothem's own voice. Zero verbatim code, text, marketing copy, or branding crosses the boundary — the reimplementation is an independent derivation from understood intent, not a transcription. The reimplementation **MUST** be more elegant, more sophisticated, and more effective than the reference; "as good as" is non-conformant where "better" is reachable. Every reimplemented surface that derives a convention from a harness **MUST** cite that harness's own latest official documentation through its `STANDARD-CONVENTION-PIN.md` — a convention-pin snapshot dated within the prior 90 days.
15
+
16
+ ## Pre-conditions
17
+
18
+ Applies whenever any apothem surface reimplements a feature, structure, layout, naming scheme, design element, or convention observed in a reference platform. Surfaces authored without reference to any external platform carry no reimplementation obligation — only the standing plain-language and code-craft floors.
19
+
20
+ ## Required behavior
21
+
22
+ ### 1. No-Verbatim Rule
23
+
24
+ The reimplementation **MUST NOT** copy any byte of the reference's code, prose, marketing copy, branding, color palette, slug, route name, file name, identifier, or naming convention. Every artifact **MUST** be independently derivable from the feature's understood intent — never from the reference's expression of it. Because nothing is copied, **no attribution is triggered**: no inherited authorship to credit, no license obligation, no origin to cite. A reimplementation that would require an attribution line to be lawful has copied something and **MUST** be reauthored from intent.
25
+
26
+ ### 2. Elevation Requirement
27
+
28
+ The reimplementation **MUST** be demonstrably more elegant, more sophisticated, or more effective than the reference. The author **MUST** name the dimension of improvement — clarity, structural novelty, robustness, performance, accessibility, maintainability, or expressiveness — and state how the apothem surface realizes it. A reimplementation that merely matches the reference on every dimension **SHOULD** be reworked until at least one dimension is elevated; one that paraphrases without elevation is non-conformant.
29
+
30
+ ### 3. Harness-Documentation Pin
31
+
32
+ Every reimplemented surface that derives a convention from a harness **MUST** cite that harness's `STANDARD-CONVENTION-PIN.md` at `src/apothem/harnesses/<name>/STANDARD-CONVENTION-PIN.md`, and the cited pin's `snapshot-date` **MUST** fall within the prior 90 days. The citing surface **MUST** state the verification recipe: compute the day-delta between today and the pin's `snapshot-date`, confirm `delta <= 90`. A pin older than 90 days **MUST** be refreshed against the harness's latest official documentation before the surface ships; a stale pin surfaces as an advisory finding with the refresh as its next step, and the phase's Definition of Done is not met until the pin is refreshed (CI's `--strict` opt-in enforces the freshness floor mechanically, per the agnostic-posture advisory discipline).
33
+
34
+ ### 4. Worked Before/After Example — Own-Voice Reauthoring
35
+
36
+ The transformation below demonstrates own-voice reauthoring on a neutral, invented feature concept — a per-session continuous-learning loop. The "reference" column is a paraphrase of *intent only*, carrying none of any real platform's wording or structure; the "apothem own-voice" column is a structurally novel, elevated reimplementation.
37
+
38
+ | Aspect | Reference (paraphrased intent) | apothem own-voice reimplementation |
39
+ |---|---|---|
40
+ | **Feature concept** | After each session, the tool records what it learned and reuses it next time. | A **convention-promotion ledger**: confirmed patterns graduate from session-local scratch to a durable, indexed memory tier through an explicit four-field promotion record (`source` / `target` / `date` / `rationale`). |
41
+ | **Trigger** | "It learns as you go." | Promotion fires only on a **recurrence threshold** (a pattern observed across distinct sessions), never on a single observation — the threshold is the contract, not an implicit heuristic. |
42
+ | **Structure** | A flat log of notes. | A **two-tier topology** (project-scoped + global) with a directional promotion invariant and an auditable ledger, so the learning surface is itself inspectable and reversible. |
43
+ | **Elevation dimension** | — | **Structural novelty + auditability**: the apothem version replaces an opaque "it learns" black box with an explicit, reviewable promotion contract — a different mechanism, not a rephrasing of the reference's. |
44
+
45
+ The apothem column shares **no wording, no data shape, and no naming** with the reference; it solves the same intent (carry forward what proved useful) through an independently-derived mechanism that is more inspectable than the paraphrased reference. This is reauthoring, not paraphrase.
46
+
47
+ ### 5. Standing Definition-of-Done Gate
48
+
49
+ The mechanical reference-token sweep — gate name **`reference-token-grep`**, anchored at this rule — is a **standing per-phase Definition-of-Done gate**. Every later phase's exit gate **MUST** run it; **zero in-scope hits** is the preserved baseline at every phase boundary. The gate sweeps in-scope authored surfaces (per this rule's `pathFilter`) for any reference brand, slug, author name, or other reference-identifying token. A non-zero in-scope hit count surfaces as an advisory finding with reauthoring as its next step; the phase's Definition of Done is not met until the leaking token is reauthored away, and CI's `--strict` opt-in enforces the zero baseline mechanically. The zero baseline **MUST NOT** be silently relaxed for "just this phase".
50
+
51
+ ### 6. Resolved Placeholders
52
+
53
+ Two former reference-internal placeholders are **RESOLVED as NOT-NEEDED** under the no-copy discipline; neither **MUST** be silently reconstructed:
54
+
55
+ - **Exact reference-site palette / typography / logo.** NOT-NEEDED. The project authors an **original design system** — its own palette, type scale, and mark — from its own brand intent, never sampled from a reference site. Capturing the reference's visual tokens would violate §1.
56
+ - **Reference config-file bodies.** NOT-NEEDED. Apothem **derives config conventions from each harness's own latest official documentation** (per §3's pin discipline), never from a reference platform's config files. The authoritative source is the harness vendor's documentation, not any reference platform.
57
+
58
+ Re-introducing either placeholder under a renamed heading is a §1 violation surfaced at the §5 gate.
59
+
60
+ ## Mechanical enforcement
61
+
62
+ `conformity/reference_token_grep.py` — the reference-token sweep anchored at this rule — enforces the §5 zero-in-scope-hits baseline across this rule's `pathFilter` surfaces. `conformity/plain_language_grep.py` — the sibling user-facing plain-language sweep — enforces the adjacent closed-set forbidden-vocabulary discipline on the same user-facing surfaces. The two matchers run together at every phase exit gate.
63
+
64
+ ## Disclosure surface
65
+
66
+ Every reimplementation outcome is recorded in the disclosure ledger per `rules/disclosure-ledger.md`:
67
+
68
+ - `[Reimplementation — surface: <name>; elevation: <dimension>; harness-pin: <snapshot-date>]` for every reauthored surface, naming the elevated dimension and the cited pin's snapshot date.
69
+ - `[Reimplementation — placeholder-resolved: <palette-typography-logo | config-bodies>; resolution: not-needed]` for each of the two §6 placeholder resolutions.
70
+ - `[Reimplementation — gate: reference-token-grep; in-scope-hits: 0]` for every phase-exit gate run that preserves the baseline.
71
+
72
+ ## Failure tells
73
+
74
+ A block of code or copy carried verbatim from a reference platform. A reimplementation that restates the reference's feature in fresh words but reuses its structure, naming, or data shape (paraphrase, not reauthoring). A reference brand, slug, or author name leaking into a shipped in-scope surface. A harness-documentation pin whose `snapshot-date` exceeds 90 days cited as current. A design token (palette / type / logo) sampled from a reference site rather than authored originally. A config convention reproduced from a reference platform's config file rather than derived from the harness's own documentation. A silently reconstructed §6 placeholder under a renamed heading.
75
+
76
+ ## Bindings (§0.j five-direction)
77
+
78
+ - **Drives →** The per-phase zero-leak Definition-of-Done gate (`reference-token-grep`) that every later phase's exit gate runs. The mechanical matcher at `conformity/reference_token_grep.py`. Every reauthored in-scope authored surface under this rule's `pathFilter`.
79
+ - **Satisfies →** The own-voice reimplementation mandate (zero verbatim inheritance, mandatory elevation, harness-doc alignment). The product-artifact boundary that keeps shipped surfaces free of reference branding.
80
+ - **Established by ↑** The no-copy reimplementation directive. The harness convention-pin discipline at `src/apothem/harnesses/<name>/STANDARD-CONVENTION-PIN.md`.
81
+ - **Gated by ←** The `pathFilter` (in-scope authored surfaces only; non-derived surfaces are exempt). The `reference-token-grep` zero-hit baseline at every phase boundary.
82
+ - **Cross-bound with ↔** `rules/plain-language.md` (sibling user-facing-vocabulary sweep on the same shipped surfaces). `rules/agnostic-posture.md` (host-agnostic posture; reimplementations derive conventions from each harness's own documentation, not from a single reference). `rules/recommend-next-step.md` (terminal-surface forward-move discipline this rule's tail honors).
83
+
84
+ ## Recommended Next Step
85
+
86
+ **Proceed to Phase 00D — the `rules/` → `skills/` investigation** to map which reimplementation disciplines belong in path-filtered rules versus detectable-technique skills, per `rules/recommend-next-step.md`.
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: "performance-discipline"
3
+ description: "Per-class runtime performance budgets with quantitative pass/fail gates — each artifact class (hook handlers, the conformity sweep, the test suite, agent spawn, install resolution) carries a runtime ceiling, a measurement boundary, and a benchmark verifier that exits zero on compliance; budget exceedances surface as findings routed to the expertise-gap log. Closes the Performance axis of the seven-axs-of-breadth taxonomy."
4
+ pathFilter: "**/hooks/**, **/tools/**, **/tests/**, **/agents/**"
5
+ alwaysApply: false
6
+ ---
7
+
8
+ <!-- SPDX-License-Identifier: MIT -->
9
+
10
+ # Rule: Performance Discipline
11
+
12
+ ## Purpose
13
+
14
+ Establish per-class performance budgets and quantitative gates; close the Performance gap of the seven-axs-of-breadth taxonomy at `rules/cognitive-identity.md` §1.
15
+
16
+ ## Obligations
17
+
18
+ ### 1. Per-Class Performance Budgets
19
+
20
+ Per-class runtime budgets; operator-editorial at apply time; baselines align with the hooks pipeline hook-timeout values. Every row's verifier exits 0 on budget compliance.
21
+
22
+ | Class | Budget | Measurement boundary | Verifier |
23
+ |-------|-------:|---------------------|----------|
24
+ | Hook handler — `PreToolUse` / `PostToolUse` / `UserPromptSubmit` / `Notification` | 10s | hook-fire to dispatcher-return | `python src/apothem/benchmarks/bench_hooks.py --event=<name>` |
25
+ | Hook handler — `SessionStart` / `PreCompact` / `PostCompact` | 30s | hook-fire to dispatcher-return | `python src/apothem/benchmarks/bench_hooks.py --event=<name>` |
26
+ | Hook handler — `Stop` | 60s | hook-fire to dispatcher-return | `python src/apothem/benchmarks/bench_hooks.py --event=Stop` |
27
+ | Verify-ecosystem sweep — composite | 30s | tool-invocation to exit | `python src/apothem/benchmarks/bench_validate_ecosystem.py` |
28
+ | Verify-ecosystem sweep — per-check | 5s | per-subcommand invocation to exit | `python src/apothem/benchmarks/bench_validate_ecosystem.py --check=<name>` |
29
+ | Conformity-gate orchestrator — single-file dispatch | 1s | `python -m apothem.conformity.gate <file>` invocation to exit | `time python -m apothem.conformity.gate <file>` |
30
+ | Test-suite — full (post-pytest-xdist) | 60s | `pytest -n auto` start to exit | `time pytest -n auto` |
31
+ | Test-suite — per-test-module | 10s | per-module collection to exit | `python src/apothem/benchmarks/bench_tests.py --module=<path>` |
32
+ | Agent spawn — research / audit / quality / generation | 60s | spawn to result-collection | `python src/apothem/benchmarks/bench_agents.py --pattern=<name>` |
33
+ | Install-all — resolution sweep (manifest rules + capability projection, all adapters) | 0.25s | dry-run install-all rule + capability resolution across every adapter, no filesystem mutation | `python src/apothem/benchmarks/bench_install.py` |
34
+
35
+ ### 1.0.1 Measurement-Gate Outcome (Budget Revision History)
36
+
37
+ The measurement gate (per `rules/planning-techniques.md` §1 Iteration Loop Safety) measured the conformity-gate orchestrator's per-matcher work at **0.67ms mean** (sum across 20 matchers: 13.3ms; slowest `file-header-grep` at 4.70ms) against an interpreter-startup-dominated wall-clock of ~465ms per single-file dispatch. ProcessPoolExecutor spawn overhead on Windows hosts is ~50–300ms per worker; fanning out 20 matchers would add 2–6s of pure overhead — **slowing the gate 150–450×, not speeding it up**. Three revisions resolved: the composite-sweep revision (30s → 10s) was **rejected** by measurement (composite stays 30s; the new 1s per-dispatch rows reflect reality); the test-suite revision (120s → 60s) was **accepted** because pytest-xdist's per-test-file work is substantial and parallel execution wins; multi-agent dispatch budget stays **per-agent** (not per-wave) because agent-spawn cost is fixed regardless of parallelism shape.
38
+
39
+ ### 1.1 Shell-Execution Sub-Budgets
40
+
41
+ Hook bootstrap stubs run synchronously on the critical path between hook-fire and dispatcher-handoff. Their startup cost lives inside the §1 hook-handler budget but is itself bounded so the dispatcher gets its full budget for the actual work. The shell-linter ratification (`shellcheck` + `Invoke-ScriptAnalyzer`) carries the same per-class discipline as `ruff check` for Python artifacts.
42
+
43
+ | Class | Budget | Measurement boundary | Verifier |
44
+ |-------|-------:|---------------------|----------|
45
+ | Bootstrap stub — `hooks/lib/bootstrap.sh` (POSIX bash; Linux / macOS / WSL) | 500ms | stub invocation to `exec` of `dispatch.py` | `time bash hooks/lib/bootstrap.sh SessionStart </dev/null` |
46
+ | Bootstrap stub — `hooks/lib/bootstrap.sh` (Windows Git Bash / mingw64) | 1500ms | stub invocation to `exec` of `dispatch.py` | `time bash hooks/lib/bootstrap.sh SessionStart </dev/null` |
47
+ | Bootstrap stub — `hooks/lib/bootstrap.ps1` | 1500ms | stub invocation to dispatcher exit | `Measure-Command { pwsh -NoProfile -File hooks/lib/bootstrap.ps1 -Event SessionStart }` |
48
+ | Interpreter locator — `find-python.{sh,ps1}` | 200ms | dot-source to first PATH probe success | included in the bootstrap-stub measurements above |
49
+ | Shell linter — `shellcheck` over `hooks/lib/*.sh` | 5s | `shellcheck` invocation to exit | `shellcheck hooks/lib/*.sh` |
50
+ | Shell linter — `Invoke-ScriptAnalyzer` over `hooks/lib/*.ps1` | 10s | analyzer invocation to exit | `pwsh -NoProfile -Command "Invoke-ScriptAnalyzer -Path hooks/lib -Severity Error,Warning"` |
51
+ | Python linter — `ruff check` over the ecosystem | 5s | `ruff` invocation to exit | `ruff check hooks/ tools/ tests/` |
52
+
53
+ The PowerShell budget is wider than POSIX-bash because PowerShell's startup cost dominates on Windows hosts; the dispatcher accommodates this by running its work asynchronously after the stub's `exec` boundary. The Windows Git Bash / mingw64 row carries the same 1500ms budget as PowerShell for the same reason: on Windows, `bash` is the mingw64 port and pays a per-invocation `fork()`-emulation cost that lifts baseline bash startup from ~50ms (POSIX) to ~800ms (mingw64). The POSIX-bash row remains the canonical 500ms budget for Linux / macOS / WSL hosts; the per-platform classification is enforced at audit time by the bench driver's host-detection logic. Empirical evidence: a 5-run mean of 1004ms (min 960ms, max 1042ms) on a Windows Git Bash mingw64 host against the prior 500ms uniform budget.
54
+
55
+ ### 2. Quantitative Gates
56
+
57
+ Every code change touching an artifact class above runs the relevant verifier; exit code 0 attests budget compliance. A budget exceedance surfaces as a high-priority finding under the Performance axis and routes to `memory/expertise-gap-log.md` for closure tracking.
58
+
59
+ ### 3. Benchmark Suite
60
+
61
+ `src/apothem/benchmarks/` carries per-class entry-point scripts. Each script runs the artifact class's representative invocations, measures runtime (optionally peak memory), compares against the §1 budget, and exits 0 on PASS / non-zero on FAIL with a measured-vs-budget delta line.
62
+
63
+ ### 4. Operator Override
64
+
65
+ An operator MAY amend a per-class budget at the §1 table; each amendment cites a concrete-driver class (measured workload increase, infrastructure change, dependency upgrade, or rule citation) per the Proactive Expertise Incorporation discipline's concrete-driver requirement.
66
+
67
+ ## Seriousness Scaling
68
+
69
+ | Level | Performance Discipline |
70
+ |-------|------------------------|
71
+ | Awareness | Measurements logged in `memory/expertise-gap-log.md`; budgets advisory only |
72
+ | Daily use | Per-class budgets enforced at the verifier level; budget exceedances surface as high-priority findings |
73
+ | Release-tier | Full enforcement + benchmark-suite gating in the CI pipeline |
74
+
75
+ ## Anti-Patterns
76
+
77
+ - **DON'T** measure runtime without a budget — **BECAUSE** observation without a gate doesn't prevent regression.
78
+ - **DON'T** set budgets without measurement — **BECAUSE** speculative budgets either over-approve or block valid work.
79
+ - **DON'T** suppress budget exceedances without a recorded rationale — **BECAUSE** silent suppression compounds technical debt invisibly.
80
+
81
+ ## Enforcement
82
+
83
+ Path-filtered (the four glob entries in this rule's `pathFilter` field), scaling per the table above. Canonical specification for per-class performance budgets and quantitative gates across the Performance axis of the seven-axs-of-breadth taxonomy.
84
+
85
+ ## Bindings (§0.j five-direction)
86
+
87
+ - **Drives →** ● Every artifact-class touch under the four path-filter entries (`**/hooks/**`, `**/tools/**`, `**/tests/**`, `**/agents/**`) — the per-class budget table at §1 enforces a quantitative ceiling. ● Every benchmark-suite invocation under `src/apothem/benchmarks/` (the four scripts `bench_hooks.py` + `bench_validate_ecosystem.py` + `bench_tests.py` + `bench_agents.py` realize the §3 verifier specification). ● Every budget-exceedance routing to `memory/expertise-gap-log.md` for closure tracking. ◐ The CI pipeline's release-tier benchmark gating.
88
+ - **Satisfies →** ● the rules registry row "Performance Discipline" (W19-BIS extension). ● The Performance axis declared in `rules/cognitive-identity.md` §1's seven-axs-of-breadth taxonomy. ● the hooks pipeline timeout cliffs (the per-class budgets at §1 align with the canonical hook-event timeout values).
89
+ - **Established by ↑** ● `rules/cognitive-identity.md` §1 (the seven-axs-of-breadth taxonomy declares the Performance axis this rule operationalizes). ● the hooks pipeline (the timeout-value canonical block this rule's §1 budgets align with).
90
+ - **Gated by ←** ● The path-filter (the four glob entries: hooks/, tools/, tests/, agents/) — this rule activates only on matching artifact touches. ● `rules/cognitive-identity.md` Senior Software Architect role declaration.
91
+ - **Cross-bound with ↔** ↔ `rules/cognitive-identity.md` (the seven-axs-of-breadth declaration this rule closes). ↔ `src/apothem/benchmarks/` (the per-class benchmark scripts the §3 verifier specification operationalizes). ↔ `memory/expertise-gap-log.md` (per-axis amendment ledger; budget exceedances route here per §2). ↔ `scripts/dev/validate_ecosystem.py` (the `--check perf-budgets` subcommand operationalizes the §1 budgets).
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: "persistent-conventions-vigilance-checklist"
3
+ description: "Path-filtered companion sub-rule carrying the Convention Awareness checklist (§1) and the Ecosystem Gap Detection artifact-class triggers (§4) for the parent `persistent-conventions-vigilance.md` rule; demand-loaded on touches of governed-core surfaces."
4
+ pathFilter: "**/CLAUDE.md, **/rules/**, **/skills/**, **/commands/**, **/agents/**, **/hooks/**, **/settings.json"
5
+ alwaysApply: false
6
+ ---
7
+
8
+ <!-- SPDX-License-Identifier: MIT -->
9
+
10
+ # Rule: Persistent Conventions Vigilance — Checklist (Companion Sub-Rule)
11
+
12
+ ## Purpose
13
+
14
+ Carry the full Convention Awareness checklist and the full Ecosystem Gap Detection artifact-class trigger catalog that the parent rule `rules/persistent-conventions-vigilance.md` declares at its §1 and §4 anchors. This companion is path-filtered: it loads when the assistant edits any governed-core surface (CLAUDE.md, rules/, skills/, commands/, agents/, hooks/, settings.json) so the parent rule's always-on payload stays lean while preserving full checklist fidelity at the demand-load surface. The parent remains the canonical home for the standing directives, Proactive Evolution, Ecosystem Coherence, Anti-Patterns, and Seriousness Scaling; this companion carries the §1 checklist and the §4 trigger catalog.
15
+
16
+ ## Obligations
17
+
18
+ ### 1. Convention Awareness — Full Checklist
19
+
20
+ Before any non-trivial action, verify alignment with the current harness ecosystem on each artifact class:
21
+
22
+ - **File/folder naming:** kebab-case for rules, skills, commands, plan artifacts. PascalCase or UPPER_SNAKE_CASE only where harness convention requires (e.g., `CLAUDE.md`, `SKILL.md`, `PROGRESS.md`).
23
+ - **Directory structure:** `rules/`, `commands/`, `skills/`, `.apothem/plans/`, `projects/` — each carries a defined purpose; never conflate them.
24
+ - **Skill:** one folder per skill in `skills/`; entry point is always `SKILL.md` with YAML frontmatter.
25
+ - **Rule:** flat `.md` file in `rules/`; self-contained with Purpose, Obligations, Seriousness Scaling, Anti-Patterns, Enforcement.
26
+ - **Command:** flat `.md` file in `commands/`; each defines one slash command (`/command-name`).
27
+ - **Hook:** defined in `settings.json`, triggers prompts on tool events. Timeout values (seconds) bound execution — a hook exceeding its timeout is silently skipped. Per-event timeouts live in the canonical hook-events table at the hooks pipeline; new events take their timeout from that same column.
28
+ - **Agent:** prompts carry mission, deliverable, constraints, context, return contract; deployment patterns per CM-25.
29
+ - **Plan:** suites at `<project-root>/.apothem/plans/[REPO]-[CONTEXT]-[MISSION]/` with preamble, master plan, progress, notes, and a `phases/` directory of per-phase folders (each holding `PHASE.md` and `REPORT.md`).
30
+ - **Other:** `CLAUDE.md` (root config, always-loaded), `settings.json` (hooks, permissions, MCP), memory (per CM-26), MCP tools (`mcp__server__tool` naming), narration (GFM; no emojis unless requested).
31
+
32
+ ### 2. Ecosystem Gap Detection — Artifact-Class Triggers
33
+
34
+ Beyond refining existing artifacts (parent §2 Proactive Evolution), identify when the ecosystem is MISSING an artifact that would add value. **Common trigger:** a pattern recurs 2+ times in-session with similar structure, or is noted in memory as recurring. Route the gap to the matching artifact class:
35
+
36
+ - **Agent:** recurring agent pattern → persistent `agents/{name}.md` with tool restrictions + system prompt.
37
+ - **Hook:** repeatedly violated/forgotten mandate → enforcement hook in `settings.json`.
38
+ - **Rule:** repeatedly corrected behavior uncovered by existing rules → new `.md` rule.
39
+ - **Plugin:** repeatedly referenced missing tool/MCP server → install or create.
40
+ - **Config freshness:** `CLAUDE.md` or `settings.json` references that no longer match ecosystem state → update the stale references.
41
+ - **Skill:** reusable detectable technique (actionable, falsifiable) with no existing skill → `skills/{name}/SKILL.md`. See also `rules/persistent-conventions-vigilance.md`.
42
+ - **Command:** recurring multi-step workflow → `commands/{name}.md` with proper frontmatter.
43
+
44
+ ## Enforcement
45
+
46
+ Path-filtered (the eight glob patterns in this rule's `pathFilter` field), always-on at every seriousness level when in scope. Demand-loaded companion to `rules/persistent-conventions-vigilance.md` §1 and §4. The parent rule carries the standing directive, Proactive Evolution (§2), Ecosystem Coherence (§3), Anti-Patterns, and Seriousness Scaling; this companion carries the §1 Convention Awareness checklist and the §4 Ecosystem Gap Detection trigger catalog.
47
+
48
+ ## Bindings (§0.j five-direction)
49
+
50
+ - **Drives →** ● Every governed-core surface touch's pre-flight convention check (§1 checklist applied per artifact class). ● Every gap-detection sweep's artifact-class routing (§2 trigger catalog maps recurrence patterns to agent / hook / rule / plugin / config / skill / command classes).
51
+ - **Satisfies →** ● CM-22 (rule-delegated companion sub-rule). ● `rules/persistent-conventions-vigilance.md` §1 + §4 anchors (the parent rule's pointers to this companion's full checklist and trigger catalog).
52
+ - **Established by ↑** ● `rules/persistent-conventions-vigilance.md` §1 + §4 (parent-rule anchors). ● CM-22.
53
+ - **Gated by ←** ● The path-filter (the eight glob patterns) — this rule demand-loads only on governed-core surface touches. ● `rules/persistent-conventions-vigilance.md` always-on baseline (parent rule's §1 + §4 anchors must be live for the companion to demand-load coherently).
54
+ - **Cross-bound with ↔** ↔ `rules/persistent-conventions-vigilance.md` (parent rule; §1 + §4 anchors bind this companion). ↔ `rules/auto-memory.md` (memory feeds gap-detection; gap-detection writes to memory per the parent's §2 evolution cycle). ↔ `rules/operational-mandates.md` (CM-6 self-improvement triggers gap-detection routing through §2 here).