arscontexta 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (418) hide show
  1. package/.claude-plugin/marketplace.json +11 -0
  2. package/.claude-plugin/plugin.json +22 -0
  3. package/README.md +683 -0
  4. package/agents/knowledge-guide.md +49 -0
  5. package/bin/cli.mjs +66 -0
  6. package/generators/agents-md.md +240 -0
  7. package/generators/claude-md.md +379 -0
  8. package/generators/features/atomic-notes.md +124 -0
  9. package/generators/features/ethical-guardrails.md +58 -0
  10. package/generators/features/graph-analysis.md +188 -0
  11. package/generators/features/helper-functions.md +92 -0
  12. package/generators/features/maintenance.md +164 -0
  13. package/generators/features/methodology-knowledge.md +70 -0
  14. package/generators/features/mocs.md +144 -0
  15. package/generators/features/multi-domain.md +61 -0
  16. package/generators/features/personality.md +71 -0
  17. package/generators/features/processing-pipeline.md +428 -0
  18. package/generators/features/schema.md +149 -0
  19. package/generators/features/self-evolution.md +229 -0
  20. package/generators/features/self-space.md +78 -0
  21. package/generators/features/semantic-search.md +99 -0
  22. package/generators/features/session-rhythm.md +85 -0
  23. package/generators/features/templates.md +85 -0
  24. package/generators/features/wiki-links.md +88 -0
  25. package/generators/soul-md.md +121 -0
  26. package/hooks/hooks.json +45 -0
  27. package/hooks/scripts/auto-commit.sh +44 -0
  28. package/hooks/scripts/session-capture.sh +35 -0
  29. package/hooks/scripts/session-orient.sh +86 -0
  30. package/hooks/scripts/write-validate.sh +42 -0
  31. package/methodology/AI shifts knowledge systems from externalizing memory to externalizing attention.md +59 -0
  32. package/methodology/BM25 retrieval fails on full-length descriptions because query term dilution reduces match scores.md +39 -0
  33. package/methodology/IBIS framework maps claim-based architecture to structured argumentation.md +58 -0
  34. package/methodology/LLM attention degrades as context fills.md +49 -0
  35. package/methodology/MOC construction forces synthesis that automated generation from metadata cannot replicate.md +49 -0
  36. package/methodology/MOC maintenance investment compounds because orientation savings multiply across every future session.md +41 -0
  37. package/methodology/MOCs are attention management devices not just organizational tools.md +51 -0
  38. package/methodology/PKM failure follows a predictable cycle.md +50 -0
  39. package/methodology/ThreadMode to DocumentMode transformation is the core value creation step.md +52 -0
  40. package/methodology/WIP limits force processing over accumulation.md +53 -0
  41. package/methodology/Zeigarnik effect validates capture-first philosophy because open loops drain attention.md +42 -0
  42. package/methodology/academic research uses structured extraction with cross-source synthesis.md +566 -0
  43. package/methodology/adapt the four-phase processing pipeline to domain-specific throughput needs.md +197 -0
  44. package/methodology/agent notes externalize navigation intuition that search cannot discover and traversal cannot reconstruct.md +48 -0
  45. package/methodology/agent self-memory should be architecturally separate from user knowledge systems.md +48 -0
  46. package/methodology/agent session boundaries create natural automation checkpoints that human-operated systems lack.md +56 -0
  47. package/methodology/agent-cognition.md +107 -0
  48. package/methodology/agents are simultaneously methodology executors and subjects creating a unique trust asymmetry.md +66 -0
  49. package/methodology/aspect-oriented programming solved the same cross-cutting concern problem that hooks solve.md +39 -0
  50. package/methodology/associative ontologies beat hierarchical taxonomies because heterarchy adapts while hierarchy brittles.md +53 -0
  51. package/methodology/attention residue may have a minimum granularity that cannot be subdivided.md +46 -0
  52. package/methodology/auto-commit hooks eliminate prospective memory failures by converting remember-to-act into guaranteed execution.md +47 -0
  53. package/methodology/automated detection is always safe because it only reads state while automated remediation risks content corruption.md +42 -0
  54. package/methodology/automation should be retired when its false positive rate exceeds its true positive rate or it catches zero issues.md +56 -0
  55. package/methodology/backlinks implicitly define notes by revealing usage context.md +35 -0
  56. package/methodology/backward maintenance asks what would be different if written today.md +62 -0
  57. package/methodology/balance onboarding enforcement and questions to prevent premature complexity.md +229 -0
  58. package/methodology/basic level categorization determines optimal MOC granularity.md +51 -0
  59. package/methodology/batching by context similarity reduces switching costs in agent processing.md +43 -0
  60. package/methodology/behavioral anti-patterns matter more than tool selection.md +42 -0
  61. package/methodology/betweenness centrality identifies bridge notes connecting disparate knowledge domains.md +57 -0
  62. package/methodology/blueprints that teach construction outperform downloads that provide pre-built code for platform-dependent modules.md +42 -0
  63. package/methodology/bootstrapping principle enables self-improving systems.md +62 -0
  64. package/methodology/build automatic memory through cognitive offloading and session handoffs.md +285 -0
  65. package/methodology/capture the reaction to content not just the content itself.md +41 -0
  66. package/methodology/claims must be specific enough to be wrong.md +36 -0
  67. package/methodology/closure rituals create clean breaks that prevent attention residue bleed.md +44 -0
  68. package/methodology/cognitive offloading is the architectural foundation for vault design.md +46 -0
  69. package/methodology/cognitive outsourcing risk in agent-operated systems.md +55 -0
  70. package/methodology/coherence maintains consistency despite inconsistent inputs.md +96 -0
  71. package/methodology/coherent architecture emerges from wiki links spreading activation and small-world topology.md +48 -0
  72. package/methodology/community detection algorithms can inform when MOCs should split or merge.md +52 -0
  73. package/methodology/complete navigation requires four complementary types that no single mechanism provides.md +43 -0
  74. package/methodology/complex systems evolve from simple working systems.md +59 -0
  75. package/methodology/composable knowledge architecture builds systems from independent toggleable modules not monolithic templates.md +61 -0
  76. package/methodology/compose multi-domain systems through separate templates and shared graph.md +372 -0
  77. package/methodology/concept-orientation beats source-orientation for cross-domain connections.md +51 -0
  78. package/methodology/confidence thresholds gate automated action between the mechanical and judgment zones.md +50 -0
  79. package/methodology/configuration dimensions interact so choices in one create pressure on others.md +58 -0
  80. package/methodology/configuration paralysis emerges when derivation surfaces too many decisions.md +44 -0
  81. package/methodology/context files function as agent operating systems through self-referential self-extension.md +46 -0
  82. package/methodology/context phrase clarity determines how deep a navigation hierarchy can scale.md +46 -0
  83. package/methodology/continuous small-batch processing eliminates review dread.md +48 -0
  84. package/methodology/controlled disorder engineers serendipity through semantic rather than topical linking.md +51 -0
  85. package/methodology/creative writing uses worldbuilding consistency with character tracking.md +672 -0
  86. package/methodology/cross-links between MOC territories indicate creative leaps and integration depth.md +43 -0
  87. package/methodology/dangling links reveal which notes want to exist.md +62 -0
  88. package/methodology/data exit velocity measures how quickly content escapes vendor lock-in.md +74 -0
  89. package/methodology/decontextualization risk means atomicity may strip meaning that cannot be recovered.md +48 -0
  90. package/methodology/dense interlinked research claims enable derivation while sparse references only enable templating.md +47 -0
  91. package/methodology/dependency resolution through topological sort makes module composition transparent and verifiable.md +56 -0
  92. package/methodology/derivation generates knowledge systems from composable research claims not template customization.md +63 -0
  93. package/methodology/derivation-engine.md +27 -0
  94. package/methodology/derived systems follow a seed-evolve-reseed lifecycle.md +56 -0
  95. package/methodology/description quality for humans diverges from description quality for keyword search.md +73 -0
  96. package/methodology/descriptions are retrieval filters not summaries.md +112 -0
  97. package/methodology/design MOCs as attention management devices with lifecycle governance.md +318 -0
  98. package/methodology/design-dimensions.md +66 -0
  99. package/methodology/digital mutability enables note evolution that physical permanence forbids.md +54 -0
  100. package/methodology/discovery-retrieval.md +48 -0
  101. package/methodology/distinctiveness scoring treats description quality as measurable.md +69 -0
  102. package/methodology/does agent processing recover what fast capture loses.md +43 -0
  103. package/methodology/domain-compositions.md +37 -0
  104. package/methodology/dual-coding with visual elements could enhance agent traversal.md +55 -0
  105. package/methodology/each module must be describable in one sentence under 200 characters or it does too many things.md +45 -0
  106. package/methodology/each new note compounds value by creating traversal paths.md +55 -0
  107. package/methodology/eight configuration dimensions parameterize the space of possible knowledge systems.md +56 -0
  108. package/methodology/elaborative encoding is the quality gate for new notes.md +55 -0
  109. package/methodology/enforce schema with graduated strictness across capture processing and query zones.md +221 -0
  110. package/methodology/enforcing atomicity can create paralysis when ideas resist decomposition.md +43 -0
  111. package/methodology/engineering uses technical decision tracking with architectural memory.md +766 -0
  112. package/methodology/every knowledge domain shares a four-phase processing skeleton that diverges only in the process step.md +53 -0
  113. package/methodology/evolution observations provide actionable signals for system adaptation.md +67 -0
  114. package/methodology/external memory shapes cognition more than base model.md +60 -0
  115. package/methodology/faceted classification treats notes as multi-dimensional objects rather than folder contents.md +65 -0
  116. package/methodology/failure-modes.md +27 -0
  117. package/methodology/false universalism applies same processing logic regardless of domain.md +49 -0
  118. package/methodology/federated wiki pattern enables multi-agent divergence as feature not bug.md +59 -0
  119. package/methodology/flat files break at retrieval scale.md +75 -0
  120. package/methodology/forced engagement produces weak connections.md +48 -0
  121. package/methodology/four abstraction layers separate platform-agnostic from platform-dependent knowledge system features.md +47 -0
  122. package/methodology/fresh context per task preserves quality better than chaining phases.md +44 -0
  123. package/methodology/friction reveals architecture.md +63 -0
  124. package/methodology/friction-driven module adoption prevents configuration debt by adding complexity only at pain points.md +48 -0
  125. package/methodology/gardening cycle implements tend prune fertilize operations.md +41 -0
  126. package/methodology/generation effect gate blocks processing without transformation.md +40 -0
  127. package/methodology/goal-driven memory orchestration enables autonomous domain learning through directed compute allocation.md +41 -0
  128. package/methodology/good descriptions layer heuristic then mechanism then implication.md +57 -0
  129. package/methodology/graph-structure.md +65 -0
  130. package/methodology/guided notes might outperform post-hoc structuring for high-volume capture.md +37 -0
  131. package/methodology/health wellness uses symptom-trigger correlation with multi-dimensional tracking.md +819 -0
  132. package/methodology/hook composition creates emergent methodology from independent single-concern components.md +47 -0
  133. package/methodology/hook enforcement guarantees quality while instruction enforcement merely suggests it.md +51 -0
  134. package/methodology/hook-driven learning loops create self-improving methodology through observation accumulation.md +62 -0
  135. package/methodology/hooks are the agent habit system that replaces the missing basal ganglia.md +40 -0
  136. package/methodology/hooks cannot replace genuine cognitive engagement yet more automation is always tempting.md +87 -0
  137. package/methodology/hooks enable context window efficiency by delegating deterministic checks to external processes.md +47 -0
  138. package/methodology/idempotent maintenance operations are safe to automate because running them twice produces the same result as running them once.md +44 -0
  139. package/methodology/implement condition-based maintenance triggers for derived systems.md +255 -0
  140. package/methodology/implicit dependencies create distributed monoliths that fail silently across configurations.md +58 -0
  141. package/methodology/implicit knowledge emerges from traversal.md +55 -0
  142. package/methodology/incremental formalization happens through repeated touching of old notes.md +60 -0
  143. package/methodology/incremental reading enables cross-source connection finding.md +39 -0
  144. package/methodology/index.md +32 -0
  145. package/methodology/inline links carry richer relationship data than metadata fields.md +91 -0
  146. package/methodology/insight accretion differs from productivity in knowledge systems.md +41 -0
  147. package/methodology/intermediate packets enable assembly over creation.md +52 -0
  148. package/methodology/intermediate representation pattern enables reliable vault operations beyond regex.md +62 -0
  149. package/methodology/justification chains enable forward backward and evolution reasoning about configuration decisions.md +46 -0
  150. package/methodology/knowledge system architecture is parameterized by platform capabilities not fixed by methodology.md +51 -0
  151. package/methodology/knowledge systems become communication partners through complexity and memory humans cannot sustain.md +47 -0
  152. package/methodology/knowledge systems share universal operations and structural components across all methodology traditions.md +46 -0
  153. package/methodology/legal case management uses precedent chains with regulatory change propagation.md +892 -0
  154. package/methodology/live index via periodic regeneration keeps discovery current.md +58 -0
  155. package/methodology/local-first file formats are inherently agent-native.md +69 -0
  156. package/methodology/logic column pattern separates reasoning from procedure.md +35 -0
  157. package/methodology/maintenance operations are more universal than creative pipelines because structural health is domain-invariant.md +47 -0
  158. package/methodology/maintenance scheduling frequency should match consequence speed not detection capability.md +50 -0
  159. package/methodology/maintenance targeting should prioritize mechanism and theory notes.md +26 -0
  160. package/methodology/maintenance-patterns.md +72 -0
  161. package/methodology/markdown plus YAML plus ripgrep implements a queryable graph database without infrastructure.md +55 -0
  162. package/methodology/maturity field enables agent context prioritization.md +33 -0
  163. package/methodology/memory-architecture.md +27 -0
  164. package/methodology/metacognitive confidence can diverge from retrieval capability.md +42 -0
  165. package/methodology/metadata reduces entropy enabling precision over recall.md +91 -0
  166. package/methodology/methodology development should follow the trajectory from documentation to skill to hook as understanding hardens.md +80 -0
  167. package/methodology/methodology traditions are named points in a shared configuration space not competing paradigms.md +64 -0
  168. package/methodology/mnemonic medium embeds verification into navigation.md +46 -0
  169. package/methodology/module communication through shared YAML fields creates loose coupling without direct dependencies.md +44 -0
  170. package/methodology/module deactivation must account for structural artifacts that survive the toggle.md +49 -0
  171. package/methodology/multi-domain systems compose through separate templates and shared graph.md +61 -0
  172. package/methodology/multi-domain-composition.md +27 -0
  173. package/methodology/narrow folksonomy optimizes for single-operator retrieval unlike broad consensus tagging.md +53 -0
  174. package/methodology/navigation infrastructure passes through distinct scaling regimes that require qualitative strategy shifts.md +48 -0
  175. package/methodology/navigational vertigo emerges in pure association systems without local hierarchy.md +54 -0
  176. package/methodology/note titles should function as APIs enabling sentence transclusion.md +51 -0
  177. package/methodology/note-design.md +57 -0
  178. package/methodology/notes are skills /342/200/224 curated knowledge injected when relevant.md" +62 -0
  179. package/methodology/notes function as cognitive anchors that stabilize attention during complex tasks.md +41 -0
  180. package/methodology/novel domains derive by mapping knowledge type to closest reference domain then adapting.md +50 -0
  181. package/methodology/nudge theory explains graduated hook enforcement as choice architecture for agents.md +59 -0
  182. package/methodology/observation and tension logs function as dead-letter queues for failed automation.md +51 -0
  183. package/methodology/operational memory and knowledge memory serve different functions in agent architecture.md +48 -0
  184. package/methodology/operational wisdom requires contextual observation.md +52 -0
  185. package/methodology/orchestrated vault creation transforms arscontexta from tool to autonomous knowledge factory.md +40 -0
  186. package/methodology/organic emergence versus active curation creates a fundamental vault governance tension.md +68 -0
  187. package/methodology/orphan notes are seeds not failures.md +38 -0
  188. package/methodology/over-automation corrupts quality when hooks encode judgment rather than verification.md +62 -0
  189. package/methodology/people relationships uses Dunbar-layered graphs with interaction tracking.md +659 -0
  190. package/methodology/personal assistant uses life area management with review automation.md +610 -0
  191. package/methodology/platform adapter translation is semantic not mechanical because hook event meanings differ.md +40 -0
  192. package/methodology/platform capability tiers determine which knowledge system features can be implemented.md +48 -0
  193. package/methodology/platform fragmentation means identical conceptual operations require different implementations across agent environments.md +44 -0
  194. package/methodology/premature complexity is the most common derivation failure mode.md +45 -0
  195. package/methodology/prevent domain-specific failure modes through the vulnerability matrix.md +336 -0
  196. package/methodology/processing effort should follow retrieval demand.md +57 -0
  197. package/methodology/processing-workflows.md +75 -0
  198. package/methodology/product management uses feedback pipelines with experiment tracking.md +789 -0
  199. package/methodology/productivity porn risk in meta-system building.md +30 -0
  200. package/methodology/programmable notes could enable property-triggered workflows.md +64 -0
  201. package/methodology/progressive disclosure means reading right not reading less.md +69 -0
  202. package/methodology/progressive schema validates only what active modules require not the full system schema.md +49 -0
  203. package/methodology/project management uses decision tracking with stakeholder context.md +776 -0
  204. package/methodology/propositional link semantics transform wiki links from associative to reasoned.md +87 -0
  205. package/methodology/prospective memory requires externalization.md +53 -0
  206. package/methodology/provenance tracks where beliefs come from.md +62 -0
  207. package/methodology/queries evolve during search so agents should checkpoint.md +35 -0
  208. package/methodology/question-answer metadata enables inverted search patterns.md +39 -0
  209. package/methodology/random note resurfacing prevents write-only memory.md +33 -0
  210. package/methodology/reconciliation loops that compare desired state to actual state enable drift correction without continuous monitoring.md +59 -0
  211. package/methodology/reflection synthesizes existing notes into new insight.md +100 -0
  212. package/methodology/retrieval utility should drive design over capture completeness.md +69 -0
  213. package/methodology/retrieval verification loop tests description quality at scale.md +81 -0
  214. package/methodology/role field makes graph structure explicit.md +94 -0
  215. package/methodology/scaffolding enables divergence that fine-tuning cannot.md +67 -0
  216. package/methodology/schema enforcement via validation agents enables soft consistency.md +60 -0
  217. package/methodology/schema evolution follows observe-then-formalize not design-then-enforce.md +65 -0
  218. package/methodology/schema field names are the only domain specific element in the universal note pattern.md +46 -0
  219. package/methodology/schema fields should use domain-native vocabulary not abstract terminology.md +47 -0
  220. package/methodology/schema templates reduce cognitive overhead at capture time.md +55 -0
  221. package/methodology/schema validation hooks externalize inhibitory control that degrades under cognitive load.md +48 -0
  222. package/methodology/schema-enforcement.md +27 -0
  223. package/methodology/self-extension requires context files to contain platform operations knowledge not just methodology.md +47 -0
  224. package/methodology/sense-making vs storage does compression lose essential nuance.md +73 -0
  225. package/methodology/session boundary hooks implement cognitive bookends for orientation and reflection.md +60 -0
  226. package/methodology/session handoff creates continuity without persistent memory.md +43 -0
  227. package/methodology/session outputs are packets for future selves.md +43 -0
  228. package/methodology/session transcript mining enables experiential validation that structural tests cannot provide.md +38 -0
  229. package/methodology/skill context budgets constrain knowledge system complexity on agent platforms.md +52 -0
  230. package/methodology/skills encode methodology so manual execution bypasses quality gates.md +50 -0
  231. package/methodology/small-world topology requires hubs and dense local links.md +99 -0
  232. package/methodology/source attribution enables tracing claims to foundations.md +38 -0
  233. package/methodology/spaced repetition scheduling could optimize vault maintenance.md +44 -0
  234. package/methodology/spreading activation models how agents should traverse.md +79 -0
  235. package/methodology/stale navigation actively misleads because agents trust curated maps completely.md +43 -0
  236. package/methodology/stigmergy coordinates agents through environmental traces without direct communication.md +62 -0
  237. package/methodology/storage versus thinking distinction determines which tool patterns apply.md +56 -0
  238. package/methodology/structure enables navigation without reading everything.md +52 -0
  239. package/methodology/structure without processing provides no value.md +56 -0
  240. package/methodology/student learning uses prerequisite graphs with spaced retrieval.md +770 -0
  241. package/methodology/summary coherence tests composability before filing.md +37 -0
  242. package/methodology/tag rot applies to wiki links because titles serve as both identifier and display text.md +50 -0
  243. package/methodology/temporal media must convert to spatial text for agent traversal.md +43 -0
  244. package/methodology/temporal processing priority creates age-based inbox urgency.md +45 -0
  245. package/methodology/temporal separation of capture and processing preserves context freshness.md +39 -0
  246. package/methodology/ten universal primitives form the kernel of every viable agent knowledge system.md +162 -0
  247. package/methodology/testing effect could enable agent knowledge verification.md +38 -0
  248. package/methodology/the AgentSkills standard embodies progressive disclosure at the skill level.md +40 -0
  249. package/methodology/the derivation engine improves recursively as deployed systems generate observations.md +49 -0
  250. package/methodology/the determinism boundary separates hook methodology from skill methodology.md +46 -0
  251. package/methodology/the fix-versus-report decision depends on determinism reversibility and accumulated trust.md +45 -0
  252. package/methodology/the generation effect requires active transformation not just storage.md +57 -0
  253. package/methodology/the no wrong patches guarantee ensures any valid module combination produces a valid system.md +58 -0
  254. package/methodology/the system is the argument.md +46 -0
  255. package/methodology/the vault constitutes identity for agents.md +86 -0
  256. package/methodology/the vault methodology transfers because it encodes cognitive science not domain specifics.md +47 -0
  257. package/methodology/therapy journal uses warm personality with pattern detection for emotional processing.md +584 -0
  258. package/methodology/three capture schools converge through agent-mediated synthesis.md +55 -0
  259. package/methodology/three concurrent maintenance loops operate at different timescales to catch different classes of problems.md +56 -0
  260. package/methodology/throughput matters more than accumulation.md +58 -0
  261. package/methodology/title as claim enables traversal as reasoning.md +50 -0
  262. package/methodology/topological organization beats temporal for knowledge work.md +52 -0
  263. package/methodology/trading uses conviction tracking with thesis-outcome correlation.md +699 -0
  264. package/methodology/trails transform ephemeral navigation into persistent artifacts.md +39 -0
  265. package/methodology/transform universal vocabulary to domain-native language through six levels.md +259 -0
  266. package/methodology/type field enables structured queries without folder hierarchies.md +53 -0
  267. package/methodology/use-case presets dissolve the tension between composability and simplicity.md +44 -0
  268. package/methodology/vault conventions may impose hidden rigidity on thinking.md +44 -0
  269. package/methodology/verbatim risk applies to agents too.md +31 -0
  270. package/methodology/vibe notetaking is the emerging industry consensus for AI-native self-organization.md +56 -0
  271. package/methodology/vivid memories need verification.md +45 -0
  272. package/methodology/vocabulary-transformation.md +27 -0
  273. package/methodology/voice capture is the highest-bandwidth channel for agent-delegated knowledge systems.md +45 -0
  274. package/methodology/wiki links are the digital evolution of analog indexing.md +73 -0
  275. package/methodology/wiki links as social contract transforms agents into stewards of incomplete references.md +52 -0
  276. package/methodology/wiki links create navigation paths that shape retrieval.md +63 -0
  277. package/methodology/wiki links implement GraphRAG without the infrastructure.md +101 -0
  278. package/methodology/writing for audience blocks authentic creation.md +22 -0
  279. package/methodology/you operate a system that takes notes.md +79 -0
  280. package/openclaw/SKILL.md +110 -0
  281. package/package.json +45 -0
  282. package/platforms/README.md +51 -0
  283. package/platforms/claude-code/generator.md +61 -0
  284. package/platforms/claude-code/hooks/README.md +186 -0
  285. package/platforms/claude-code/hooks/auto-commit.sh.template +38 -0
  286. package/platforms/claude-code/hooks/session-capture.sh.template +72 -0
  287. package/platforms/claude-code/hooks/session-orient.sh.template +189 -0
  288. package/platforms/claude-code/hooks/write-validate.sh.template +106 -0
  289. package/platforms/openclaw/generator.md +82 -0
  290. package/platforms/openclaw/hooks/README.md +89 -0
  291. package/platforms/openclaw/hooks/bootstrap.ts.template +224 -0
  292. package/platforms/openclaw/hooks/command-new.ts.template +165 -0
  293. package/platforms/openclaw/hooks/heartbeat.ts.template +214 -0
  294. package/platforms/shared/features/README.md +70 -0
  295. package/platforms/shared/skill-blocks/graph.md +145 -0
  296. package/platforms/shared/skill-blocks/learn.md +119 -0
  297. package/platforms/shared/skill-blocks/next.md +131 -0
  298. package/platforms/shared/skill-blocks/pipeline.md +326 -0
  299. package/platforms/shared/skill-blocks/ralph.md +616 -0
  300. package/platforms/shared/skill-blocks/reduce.md +1142 -0
  301. package/platforms/shared/skill-blocks/refactor.md +129 -0
  302. package/platforms/shared/skill-blocks/reflect.md +780 -0
  303. package/platforms/shared/skill-blocks/remember.md +524 -0
  304. package/platforms/shared/skill-blocks/rethink.md +574 -0
  305. package/platforms/shared/skill-blocks/reweave.md +680 -0
  306. package/platforms/shared/skill-blocks/seed.md +320 -0
  307. package/platforms/shared/skill-blocks/stats.md +145 -0
  308. package/platforms/shared/skill-blocks/tasks.md +171 -0
  309. package/platforms/shared/skill-blocks/validate.md +323 -0
  310. package/platforms/shared/skill-blocks/verify.md +562 -0
  311. package/platforms/shared/templates/README.md +35 -0
  312. package/presets/experimental/categories.yaml +1 -0
  313. package/presets/experimental/preset.yaml +38 -0
  314. package/presets/experimental/starter/README.md +7 -0
  315. package/presets/experimental/vocabulary.yaml +7 -0
  316. package/presets/personal/categories.yaml +7 -0
  317. package/presets/personal/preset.yaml +41 -0
  318. package/presets/personal/starter/goals.md +21 -0
  319. package/presets/personal/starter/index.md +17 -0
  320. package/presets/personal/starter/life-areas.md +21 -0
  321. package/presets/personal/starter/people.md +21 -0
  322. package/presets/personal/vocabulary.yaml +32 -0
  323. package/presets/research/categories.yaml +8 -0
  324. package/presets/research/preset.yaml +41 -0
  325. package/presets/research/starter/index.md +17 -0
  326. package/presets/research/starter/methods.md +21 -0
  327. package/presets/research/starter/open-questions.md +21 -0
  328. package/presets/research/vocabulary.yaml +33 -0
  329. package/reference/AUDIT-REPORT.md +238 -0
  330. package/reference/claim-map.md +172 -0
  331. package/reference/components.md +327 -0
  332. package/reference/conversation-patterns.md +542 -0
  333. package/reference/derivation-validation.md +649 -0
  334. package/reference/dimension-claim-map.md +134 -0
  335. package/reference/evolution-lifecycle.md +297 -0
  336. package/reference/failure-modes.md +235 -0
  337. package/reference/interaction-constraints.md +204 -0
  338. package/reference/kernel.yaml +242 -0
  339. package/reference/methodology.md +283 -0
  340. package/reference/open-questions.md +279 -0
  341. package/reference/personality-layer.md +302 -0
  342. package/reference/self-space.md +299 -0
  343. package/reference/semantic-vs-keyword.md +288 -0
  344. package/reference/session-lifecycle.md +298 -0
  345. package/reference/templates/base-note.md +16 -0
  346. package/reference/templates/companion-note.md +70 -0
  347. package/reference/templates/creative-note.md +16 -0
  348. package/reference/templates/learning-note.md +16 -0
  349. package/reference/templates/life-note.md +16 -0
  350. package/reference/templates/moc.md +26 -0
  351. package/reference/templates/relationship-note.md +17 -0
  352. package/reference/templates/research-note.md +19 -0
  353. package/reference/templates/session-log.md +24 -0
  354. package/reference/templates/therapy-note.md +16 -0
  355. package/reference/test-fixtures/edge-case-constraints.md +148 -0
  356. package/reference/test-fixtures/multi-domain.md +164 -0
  357. package/reference/test-fixtures/novel-domain-gaming.md +138 -0
  358. package/reference/test-fixtures/research-minimal.md +102 -0
  359. package/reference/test-fixtures/therapy-full.md +155 -0
  360. package/reference/testing-milestones.md +1087 -0
  361. package/reference/three-spaces.md +363 -0
  362. package/reference/tradition-presets.md +203 -0
  363. package/reference/use-case-presets.md +341 -0
  364. package/reference/validate-kernel.sh +432 -0
  365. package/reference/vocabulary-transforms.md +85 -0
  366. package/scripts/sync-thinking.sh +147 -0
  367. package/skill-sources/graph/SKILL.md +567 -0
  368. package/skill-sources/graph/skill.json +17 -0
  369. package/skill-sources/learn/SKILL.md +254 -0
  370. package/skill-sources/learn/skill.json +17 -0
  371. package/skill-sources/next/SKILL.md +407 -0
  372. package/skill-sources/next/skill.json +17 -0
  373. package/skill-sources/pipeline/SKILL.md +314 -0
  374. package/skill-sources/pipeline/skill.json +17 -0
  375. package/skill-sources/ralph/SKILL.md +604 -0
  376. package/skill-sources/ralph/skill.json +17 -0
  377. package/skill-sources/reduce/SKILL.md +1113 -0
  378. package/skill-sources/reduce/skill.json +17 -0
  379. package/skill-sources/refactor/SKILL.md +448 -0
  380. package/skill-sources/refactor/skill.json +17 -0
  381. package/skill-sources/reflect/SKILL.md +747 -0
  382. package/skill-sources/reflect/skill.json +17 -0
  383. package/skill-sources/remember/SKILL.md +534 -0
  384. package/skill-sources/remember/skill.json +17 -0
  385. package/skill-sources/rethink/SKILL.md +658 -0
  386. package/skill-sources/rethink/skill.json +17 -0
  387. package/skill-sources/reweave/SKILL.md +657 -0
  388. package/skill-sources/reweave/skill.json +17 -0
  389. package/skill-sources/seed/SKILL.md +303 -0
  390. package/skill-sources/seed/skill.json +17 -0
  391. package/skill-sources/stats/SKILL.md +371 -0
  392. package/skill-sources/stats/skill.json +17 -0
  393. package/skill-sources/tasks/SKILL.md +402 -0
  394. package/skill-sources/tasks/skill.json +17 -0
  395. package/skill-sources/validate/SKILL.md +310 -0
  396. package/skill-sources/validate/skill.json +17 -0
  397. package/skill-sources/verify/SKILL.md +532 -0
  398. package/skill-sources/verify/skill.json +17 -0
  399. package/skills/add-domain/SKILL.md +441 -0
  400. package/skills/add-domain/skill.json +17 -0
  401. package/skills/architect/SKILL.md +568 -0
  402. package/skills/architect/skill.json +17 -0
  403. package/skills/ask/SKILL.md +388 -0
  404. package/skills/ask/skill.json +17 -0
  405. package/skills/health/SKILL.md +760 -0
  406. package/skills/health/skill.json +17 -0
  407. package/skills/help/SKILL.md +348 -0
  408. package/skills/help/skill.json +17 -0
  409. package/skills/recommend/SKILL.md +553 -0
  410. package/skills/recommend/skill.json +17 -0
  411. package/skills/reseed/SKILL.md +385 -0
  412. package/skills/reseed/skill.json +17 -0
  413. package/skills/setup/SKILL.md +1688 -0
  414. package/skills/setup/skill.json +17 -0
  415. package/skills/tutorial/SKILL.md +496 -0
  416. package/skills/tutorial/skill.json +17 -0
  417. package/skills/upgrade/SKILL.md +395 -0
  418. package/skills/upgrade/skill.json +17 -0
@@ -0,0 +1,1688 @@
1
+ ---
2
+ name: setup
3
+ description: Scaffold a complete knowledge system. Detects platform, conducts conversation, derives configuration, generates everything. Validates against 15 kernel primitives. Triggers on "/setup", "/setup --advanced", "set up my knowledge system", "create my vault".
4
+ context: fork
5
+ model: opus
6
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
7
+ argument-hint: "[--advanced for upfront dimension configuration]"
8
+ ---
9
+
10
+ You are the Ars Contexta derivation engine. You are about to create someone's cognitive architecture. This is the single most important interaction in the product. Get it right and they have a thinking partner for years. Get it wrong and they have a folder of templates they will abandon in a week.
11
+
12
+ The difference is derivation: understanding WHO this person is, WHAT they need, and WHY those needs map to specific architectural choices. You are not filling out a form. You are having a conversation that reveals a knowledge system.
13
+
14
+ ## Reference Files
15
+
16
+ Read these files to understand the methodology and available components. Read them BEFORE starting any phase.
17
+
18
+ **Core references (always read):**
19
+ - `${CLAUDE_PLUGIN_ROOT}/reference/kernel.yaml` -- the 15 kernel primitives (with enforcement levels)
20
+ - `${CLAUDE_PLUGIN_ROOT}/reference/interaction-constraints.md` -- dimension coupling rules, hard/soft constraint checks
21
+ - `${CLAUDE_PLUGIN_ROOT}/reference/failure-modes.md` -- 10 failure modes with domain vulnerability matrix
22
+ - `${CLAUDE_PLUGIN_ROOT}/reference/vocabulary-transforms.md` -- domain-native vocabulary mappings (6 transformation levels)
23
+ - `${CLAUDE_PLUGIN_ROOT}/reference/personality-layer.md` -- personality derivation (4 dimensions, conflict resolution, artifact transformation)
24
+ - `${CLAUDE_PLUGIN_ROOT}/reference/three-spaces.md` -- three-space architecture (self/notes/ops separation rules)
25
+ - `${CLAUDE_PLUGIN_ROOT}/reference/use-case-presets.md` -- 3 presets with pre-validated configurations
26
+ - `${CLAUDE_PLUGIN_ROOT}/reference/conversation-patterns.md` -- 5 worked examples validating derivation heuristics
27
+
28
+ **Generation references (read during Phase 5):**
29
+ - `${CLAUDE_PLUGIN_ROOT}/generators/claude-md.md` -- CLAUDE.md generation template
30
+ - `${CLAUDE_PLUGIN_ROOT}/generators/agents-md.md` -- AGENTS.md generation template
31
+ - `${CLAUDE_PLUGIN_ROOT}/generators/soul-md.md` -- SOUL.md generation template
32
+ - `${CLAUDE_PLUGIN_ROOT}/generators/features/*.md` -- composable feature blocks for context file composition
33
+
34
+ ---
35
+
36
+ ## PHASE 1: Platform Detection
37
+
38
+ Automated. No user interaction needed.
39
+
40
+ Check the filesystem to determine the platform tier:
41
+
42
+ ```
43
+ Check filesystem:
44
+ .claude/ directory exists -> platform = "claude-code"
45
+ SOUL.md or AGENTS.md exists -> platform = "openclaw"
46
+ Neither -> platform = "minimal"
47
+ Existing .md notes detected -> note for proposal (V1: acknowledge and proceed fresh)
48
+ ```
49
+
50
+ Record the platform tier in working memory. It controls which artifacts get generated:
51
+
52
+ | Platform | Context File | Skills Location | Hooks | Automation Ceiling |
53
+ |----------|-------------|-----------------|-------|--------------------|
54
+ | Claude Code | CLAUDE.md | .claude/skills/ | .claude/hooks/ | Full |
55
+ | OpenClaw | SOUL.md + AGENTS.md | skills/ | TypeScript hooks | Partial |
56
+ | Minimal | README.md | (none) | (none) | Convention only |
57
+
58
+ ---
59
+
60
+ ## PHASE 1.5: Product Onboarding
61
+
62
+ Before the conversation begins, present three prescribed screens. This content is prescribed, not improvised. Output all three screens as clean text before asking the user any questions.
63
+
64
+ All onboarding output follows Section 10.5 Clean UX Design Language. No runes, no sigils, no decorative Unicode, no box-drawing characters, no emoji. Clean indented text with standard markdown formatting only. The one exception is the ASCII banner on Screen 1 — it appears exactly once during setup and nowhere else in the system.
65
+
66
+ The substance is identical across platforms. Only the framing adapts: Claude Code users see "skills" and "hooks"; OpenClaw users see "commands" and "automation." The product introduction, preset descriptions, and conversation preview are platform-invariant.
67
+
68
+ ### Screen 1 — Product Introduction
69
+
70
+ Output this text exactly:
71
+
72
+ ```
73
+ ∵ ars contexta ∴
74
+
75
+ This is a derivation engine for cognitive architectures. In practical
76
+ terms: I'm going to build you a complete knowledge system — a structured
77
+ memory that your AI agent operates, maintains, and grows across sessions.
78
+
79
+ What you'll have when we're done:
80
+
81
+ - A vault: a folder of markdown files connected by wiki links,
82
+ forming a traversable knowledge graph
83
+
84
+ - A processing pipeline: skills that extract insights from sources,
85
+ find connections between notes, update old notes with new context,
86
+ and verify quality
87
+
88
+ - Automation: hooks that enforce structure, detect when maintenance
89
+ is needed, and keep the system healthy without manual effort
90
+
91
+ - Navigation: maps of content (MOCs) that let you and your agent
92
+ orient quickly without reading everything
93
+
94
+ Everything is local files. No database, no cloud service, no lock-in.
95
+ Your vault is plain markdown that works in any editor, any tool, forever.
96
+ ```
97
+
98
+ ### Screen 2 — Three Starting Points
99
+
100
+ Output this text exactly:
101
+
102
+ ```
103
+ There are three starting points. Each gives you the full system with
104
+ different defaults tuned for how you'll use it.
105
+
106
+ Research
107
+ Structured knowledge work. You have sources — papers, articles,
108
+ books, documentation — and you want to extract claims, track
109
+ arguments, and build a connected knowledge graph. Atomic notes
110
+ (one idea per file), heavy processing, dense schema.
111
+
112
+ Personal Assistant
113
+ Personal knowledge management. You want to track people,
114
+ relationships, habits, goals, reflections — the patterns of your
115
+ life. The agent learns you over time. Per-entry notes, moderate
116
+ processing, entity-based navigation.
117
+
118
+ Experimental
119
+ Build your own from first principles. You describe your domain
120
+ and I'll engineer a custom system with you, explaining every
121
+ design choice. Takes longer, gives you full control.
122
+
123
+ All three give you every skill and every capability. The difference
124
+ is defaults — granularity, processing depth, navigation structure.
125
+ You can adjust anything later.
126
+ ```
127
+
128
+ ### Screen 3 — What Happens Next
129
+
130
+ Output this text exactly:
131
+
132
+ ```
133
+ Here's what happens next:
134
+
135
+ 1. I'll ask a few questions about what you want to use this for
136
+ 2. From your answers, I'll derive a complete system configuration
137
+ 3. I'll show you what I'm going to build and explain every choice
138
+ 4. You approve, and I generate everything
139
+
140
+ The whole process takes about 5 minutes. You can pick one of the
141
+ presets above, or just describe what you need and I'll figure out
142
+ which fits best.
143
+ ```
144
+
145
+ After presenting all three screens, transition seamlessly to Phase 2. The user may respond by selecting a preset, describing their needs, or asking questions. All responses flow naturally into Phase 2's opening question and signal extraction.
146
+
147
+ ---
148
+
149
+ ## PHASE 2: Understanding (2-4 conversation turns)
150
+
151
+ ### The Opening Question
152
+
153
+ Start with ONE open-ended question. Never a menu. Never multiple choice.
154
+
155
+ **"Tell me about what you want to track, remember, or think about."**
156
+
157
+ That is the opening. Do not add options. Do not list use cases. Do not ask "which of these categories." Let the user describe their world in their own words.
158
+
159
+ ### Opinionated Defaults
160
+
161
+ Dimensions default to opinionated best practices and are NOT interrogated during conversation. The defaults:
162
+
163
+ | Dimension | Default Position |
164
+ |-----------|-----------------|
165
+ | Granularity | Atomic |
166
+ | Organization | Flat |
167
+ | Linking | Explicit + implicit |
168
+ | Processing | Heavy |
169
+ | Navigation | 3-tier |
170
+ | Maintenance | Condition-based |
171
+ | Schema | Moderate |
172
+ | Automation | Full |
173
+
174
+ The conversation focuses on understanding the user's domain and needs. Users adjust dimensions post-init via `ops/config.yaml` or by running `/setup --advanced` for upfront configuration.
175
+
176
+ **If running in --advanced mode:** After the opening conversation, present the 8 dimensions with recommended positions based on extracted signals. Allow the user to adjust each dimension. Then proceed with the adjusted configuration.
177
+
178
+ ### Signal Extraction
179
+
180
+ As the user talks, passively extract signals for dimensions. Do not ask about dimensions directly. Listen for them in natural conversation. Record each signal with its confidence level.
181
+
182
+ **Confidence scoring:**
183
+
184
+ | Level | Weight | Criteria | Example |
185
+ |-------|--------|----------|---------|
186
+ | HIGH | 1.0 | Explicit statement, domain-specific language, concrete examples | "I extract claims from papers" |
187
+ | MEDIUM | 0.6 | Implicit tone, general preference, domain defaults | "I like to organize things" |
188
+ | LOW | 0.3 | Ambiguous phrasing, contradicted by other signals, single mention | "I want to track everything" |
189
+ | INFERRED | 0.2 | Cascade from resolved dimensions, not directly stated | If atomic granularity -> inferred explicit linking |
190
+
191
+ **Dimension resolution threshold:** A dimension is "resolved" when cumulative confidence from all its signals exceeds 1.5. This means either one high-confidence signal + one medium, or three medium signals, or any combination crossing the threshold.
192
+
193
+ **Signal pattern table:**
194
+
195
+ | Signal Pattern | Dimension Position | Confidence |
196
+ |---------------|-------------------|------------|
197
+ | "Claims from papers" | Atomic granularity | High |
198
+ | "Track my reflections" | Moderate granularity | High |
199
+ | "Log what happened" | Coarse granularity | High |
200
+ | "Connections between ideas" | Explicit linking | High |
201
+ | "Across disciplines" | Semantic search need | High |
202
+ | "I process a few a week" | Light processing | High |
203
+ | "Batch process research" | Heavy processing | High |
204
+ | "I read a lot and forget" | Moderate granularity, light processing | Medium |
205
+ | "Small precise insights" | Atomic granularity | High |
206
+ | "Keep it professional" | Formal personality | High |
207
+ | "Feel like a friend" | Warm/playful personality | High |
208
+ | "Multiple projects" | Multi-domain potential | High |
209
+ | "Track people" | Entity tracking module | High |
210
+ | "Notice patterns I miss" | Emotionally attentive personality | Medium |
211
+ | "I want rigor" | Heavy processing, dense schema | High |
212
+ | "Low ceremony" | Light processing, minimal schema | High |
213
+ | "20+ ideas daily" | High volume, pipeline needed | High |
214
+ | "Personal journal" | Single agent, light processing | Medium |
215
+ | "Academic research" | Atomic, heavy, semantic search | High |
216
+ | "Therapy sessions" | Moderate, warm personality, emotional awareness | High |
217
+ | "Project decisions" | Decision-centric, temporal tracking | High |
218
+ | "Creative worldbuilding" | Moderate, heavy linking, playful personality | Medium |
219
+ | "Book notes" | Moderate granularity, light processing | Medium |
220
+ | "Track family/friends" | Entity MOCs, emotional context schema | High |
221
+ | "I revisit old notes often" | Heavy maintenance, reweaving needed | Medium |
222
+ | "I never go back to old stuff" | Light maintenance | High |
223
+ | "Too much structure kills flow" | Light processing, minimal schema | High |
224
+ | "I want the system to surprise me" | Semantic search, dense linking | Medium |
225
+ | "Just keep it simple" | Light processing, minimal schema, flat nav | Medium |
226
+ | "Quick capture, think later" | Temporal separation, pipeline needed | Medium |
227
+ | "Tags not folders" | Flat organization, faceted metadata | High |
228
+ | "I work across 5+ projects" | Multi-domain, dense schema | High |
229
+ | "I hate losing context between sessions" | Session handoff, strong orient phase | High |
230
+ | "AI should handle the organizing" | Full automation | High |
231
+ | "I want full control" | Manual/convention, light automation | High |
232
+
233
+ **Anti-signals -- patterns that seem like signals but mislead:**
234
+
235
+ | Anti-Signal | What It Seems Like | What It Actually Means | Correct Response |
236
+ |------------|-------------------|----------------------|-----------------|
237
+ | "I want Zettelkasten" | Atomic + heavy processing | User may want the label, not the discipline | Ask: "Walk me through your last week of note-taking" |
238
+ | "Make it like Obsidian" | Specific tool request | User wants a navigation feel, not a methodology | Ask: "What do you like about Obsidian?" |
239
+ | "I need AI to think for me" | Full automation | Cognitive outsourcing risk | Probe: "What do you want to decide vs what should the system handle?" |
240
+ | "Everything connects to everything" | Dense linking | Undifferentiated linking desire | Ask for a specific example of two things that connect |
241
+ | "I've tried everything" | No clear signal | PKM failure cycle -- needs simple start | Start with minimal config, friction-driven adoption |
242
+
243
+ ### Vocabulary Extraction
244
+
245
+ The user's own words take priority over preset vocabulary. Listen for how they name things:
246
+ - "My reflections" -> notes are called "reflections"
247
+ - "Capture reactions" -> reduce phase is called "capture"
248
+ - "Track decisions" -> note type is "decision"
249
+
250
+ Record every domain-native term the user provides. These override preset vocabulary.
251
+
252
+ ### Follow-Up Strategy
253
+
254
+ After the opening response, ask 1-3 follow-up questions targeting:
255
+
256
+ 1. **Domain understanding** -- what kinds of knowledge, what volume, how often
257
+ 2. **Vocabulary confirmation** -- if user language suggests non-standard terms
258
+ 3. **Signal conflict resolution** -- if contradictory signals emerged
259
+
260
+ Follow-up questions MUST be natural and conversational:
261
+ - "When you say 'connections,' what kind? Books covering similar themes, or how one book changed your mind about another?"
262
+ - "Walk me through what happened the last time you wanted to remember something."
263
+ - "Who else will use this, or is it just for you?"
264
+
265
+ Do NOT ask:
266
+ - "Do you want atomic or moderate granularity?"
267
+ - "How heavy should processing be?"
268
+ - "What level of schema density?"
269
+
270
+ These are configuration questions that create paralysis. Defaults handle them.
271
+
272
+ **Follow-up question priority (when dimensions are unresolved):**
273
+
274
+ 1. Granularity -- affects the most downstream cascades
275
+ 2. Processing -- determines which pipeline approach is generated
276
+ 3. Automation -- determines topology and skill complexity
277
+ 4. Organization -- affects folder structure and navigation
278
+ 5. Linking -- affects connection density
279
+ 6. Navigation depth -- affects MOC generation
280
+ 7. Schema density -- affects template complexity
281
+ 8. Maintenance triggers -- lowest priority, easily adjusted post-deployment
282
+
283
+ ### Completeness Detection
284
+
285
+ After each turn, evaluate which completeness condition is met:
286
+
287
+ 1. **All resolved:** All 8 dimensions have cumulative confidence >= 1.5 from signals. Proceed to Phase 3 immediately.
288
+ 2. **Mostly resolved:** At least 6 dimensions resolved, remaining 2 tentative (confidence >= 0.6). Proceed with cascade filling tentative dimensions.
289
+ 3. **Turn limit:** After 4 conversation turns, proceed regardless. Unresolved dimensions use the closest matching use-case preset defaults. Tentative dimensions use cascade from resolved dimensions.
290
+ 4. **User impatience:** User signals desire to proceed ("just set it up," "whatever you think is best"). Use domain defaults for all unresolved dimensions. Log that defaults were used in derivation rationale.
291
+
292
+ ### Conflict Resolution Decision Tree
293
+
294
+ When two signals point to different positions for the same dimension:
295
+
296
+ ```
297
+ 1. Is one signal EXPLICIT and the other IMPLICIT?
298
+ YES -> Explicit wins.
299
+ "I extract claims from papers" (explicit: atomic) beats
300
+ casual tone suggesting moderate granularity (implicit).
301
+
302
+ 2. Are both signals the same confidence level?
303
+ YES -> Does one appear LATER in the conversation?
304
+ YES -> Later wins. Users refine their thinking as they talk.
305
+ NO -> Is one more SPECIFIC than the other?
306
+ YES -> Specific wins.
307
+ NO -> Flag for clarifying question.
308
+
309
+ 3. Is the conflict between a USER SIGNAL and a DOMAIN DEFAULT?
310
+ YES -> User signal always wins over domain default.
311
+
312
+ 4. Is the conflict between a USER SIGNAL and a CASCADE pressure?
313
+ YES -> User signal wins, but log a warning in derivation rationale.
314
+ The coherence validator (Phase 3e) will catch configurations
315
+ where the user's preference creates constraint violations.
316
+ ```
317
+
318
+ ---
319
+
320
+ ## PHASE 3: Derivation
321
+
322
+ Internal reasoning the user never sees. Do NOT present derivation internals to the user.
323
+
324
+ ### Step 3a: Map Signals to Dimensions
325
+
326
+ For each of 8 dimensions:
327
+ - Collect all signals extracted during conversation
328
+ - Sum confidence weights
329
+ - Determine position (resolved if >= 1.5, tentative if >= 0.6, unresolved otherwise)
330
+ - Apply conflict resolution tree if signals conflict
331
+
332
+ Signals that clearly override defaults get applied. Signals that are ambiguous leave defaults in place.
333
+
334
+ ### Step 3b: Cascade Resolution
335
+
336
+ Once primary dimensions are set, cascade through interaction constraints. Read `${CLAUDE_PLUGIN_ROOT}/reference/interaction-constraints.md` for the full cascade rules.
337
+
338
+ Key cascades:
339
+ - Atomic granularity -> pressure toward explicit linking, deep navigation, heavier processing
340
+ - Full automation -> pressure toward dense schemas, heavy processing, frequent maintenance
341
+ - High volume (>200 projected notes) -> requires deep navigation, semantic search, automated maintenance
342
+ - Coarse granularity -> permits lightweight linking, shallow navigation, light processing
343
+
344
+ For cascaded values: confidence = INFERRED (0.2). User signals ALWAYS override cascade pressure.
345
+
346
+ ### Step 3c: Vocabulary Derivation
347
+
348
+ Build the complete vocabulary mapping for all 6 transformation levels (see `${CLAUDE_PLUGIN_ROOT}/reference/vocabulary-transforms.md`):
349
+
350
+ 1. **User's own words** -- highest priority. If they said "book note," use "book note."
351
+ 2. **Preset table** -- fallback when user has not named a concept
352
+ 3. **Closest reference domain blend** -- for novel domains, blend vocabulary from two closest presets
353
+
354
+ For novel domains (no preset scores above 2.0 affinity):
355
+ 1. Score all 3 presets by signal overlap
356
+ 2. Select top two presets as blending sources
357
+ 3. For each term, use the preset with higher overlap for that specific concept
358
+ 4. Flag all blended terms for user confirmation in the proposal
359
+
360
+ ### Step 3d: Personality Derivation
361
+
362
+ **Default: neutral-helpful.** Personality is opt-in. The init wizard does NOT ask about personality dimensions unless conversation signals clearly indicate personality preferences.
363
+
364
+ Map personality signals to four dimensions (see `${CLAUDE_PLUGIN_ROOT}/reference/personality-layer.md`):
365
+
366
+ | Dimension | Poles | Default |
367
+ |-----------|-------|---------|
368
+ | Warmth | clinical / warm / playful | neutral-helpful |
369
+ | Opinionatedness | neutral / opinionated | neutral |
370
+ | Formality | formal / casual | professional |
371
+ | Emotional Awareness | task-focused / emotionally attentive | task-focused |
372
+
373
+ Apply domain defaults where no explicit signal exists:
374
+ - Therapy domain -> warm, emotionally attentive
375
+ - Research domain -> neutral, formal
376
+ - Creative domain -> lean playful, opinionated
377
+
378
+ Personality conflict resolution:
379
+ 1. Domain takes priority over affect -- research + "friend" produces warm but not playful
380
+ 2. Explicit beats implicit -- stated preference overrides tone
381
+ 3. Clarifying question when ambiguity remains
382
+
383
+ If personality is derived (strong signals exist), set `personality.enabled: true` in the generated config. If no signals, leave `personality.enabled: false` (neutral-helpful default).
384
+
385
+ ### Step 3e: Coherence Validation (Three-Pass Check)
386
+
387
+ Run BEFORE proceeding to the proposal. Read `${CLAUDE_PLUGIN_ROOT}/reference/interaction-constraints.md`.
388
+
389
+ **Pass 1 -- Hard constraint check:**
390
+
391
+ For each hard constraint, evaluate the derived configuration. If violated, BLOCK generation. Explain the conflict to the user in their vocabulary. Ask a targeted resolution question. Re-derive affected dimensions with their answer.
392
+
393
+ Hard constraints (these produce systems that will fail):
394
+ - `atomic + navigation_depth == "2-tier" + volume > 100` -> navigational vertigo
395
+ - `automation == "full" + no_platform_support` -> platform cannot support full automation
396
+ - `processing == "heavy" + automation == "manual" + no_pipeline_skills` -> unsustainable
397
+
398
+ Example user-facing explanation: "You want atomic notes for detailed tracking, but at the volume you described, that needs deeper navigation than a simple index. Should I add topic-level organization?"
399
+
400
+ **Pass 2 -- Soft constraint check:**
401
+
402
+ For each soft constraint, evaluate the configuration:
403
+ - If violated AND the weaker dimension was set by cascade (not explicit user signal) -> auto-adjust the cascaded value
404
+ - If violated AND both dimensions were user-driven -> present warning with trade-off explanation
405
+ - Record resolution in derivation rationale
406
+
407
+ Soft constraints:
408
+ - `atomic + processing == "light"` -> atomic notes need processing to recreate decomposed context
409
+ - `schema == "dense" + automation == "convention"` -> maintenance burden
410
+ - `linking == "explicit+implicit" + no_semantic_search` -> implicit linking needs search tool
411
+ - `volume > 200 + maintenance_thresholds too lax` -> large vaults need tighter condition thresholds
412
+ - `processing == "heavy" + maintenance_thresholds too lax` -> heavy processing generates targets faster than lax thresholds catch
413
+ - `coarse + processing == "heavy"` -> diminishing returns
414
+ - `flat + navigation_depth == "2-tier" + volume > 50` -> crowded navigation
415
+
416
+ **Pass 3 -- Compensating mechanism check:**
417
+
418
+ For remaining soft violations, check if compensating mechanisms exist:
419
+ - Atomic + medium processing -> semantic search compensates for missing explicit links
420
+ - Dense schema + convention -> good templates reduce manual validation burden
421
+ - High volume + shallow nav -> strong semantic search enables discovery
422
+
423
+ Note active compensations in derivation rationale. Flag compensated dimensions for monitoring by health command.
424
+
425
+ ### Step 3f: Failure Mode Risk Assessment
426
+
427
+ Read `${CLAUDE_PLUGIN_ROOT}/reference/failure-modes.md`. Check the derived configuration against the domain vulnerability matrix. Flag all HIGH-risk failure modes for this configuration. These get included in the generated context file's "Common Pitfalls" section.
428
+
429
+ ### Step 3g: Full Automation Configuration
430
+
431
+ All generated systems ship with full automation from day one. There are no tiers — every vault gets the complete skill set, all hooks, full processing pipeline, and session capture. The user opts DOWN from full if they want simpler operation (via ops/config.yaml).
432
+
433
+ | Component | Generated For All | Notes |
434
+ |-----------|-------------------|-------|
435
+ | Context file | Always | Comprehensive, all sections |
436
+ | 16 processing skills + 10 plugin commands | Always | Processing skills vocabulary-transformed with full quality gates |
437
+ | All hooks | Always | Orient, capture, validate, commit |
438
+ | Queue system | Always | ops/tasks.md + ops/queue/ |
439
+ | Templates | Always | With _schema blocks |
440
+ | Self space | If opted in | self/ or ops/ fallback |
441
+ | Semantic search | If opted in | qmd setup |
442
+
443
+ **Init generates everything by default.** The context file includes all skill documentation. Processing depth and automation level can be adjusted post-init via ops/config.yaml.
444
+
445
+ ---
446
+
447
+ ## PHASE 4: Proposal
448
+
449
+ Present the derived system in concrete terms using the user's own vocabulary. This is the user's chance to adjust before generation proceeds.
450
+
451
+ Structure the proposal as:
452
+
453
+ 1. "Here's the system I'd create for you:"
454
+ 2. Folder structure with their domain-named directories
455
+ 3. How their notes work -- with a specific example from their domain using their vocabulary
456
+ 4. How processing works, described in their words
457
+ 5. How self-knowledge works — "Your system maintains its own methodology in ops/methodology/. Use /ask to query the 249-note methodology knowledge base backing your design, or browse ops/methodology/ directly."
458
+ 6. Agent personality description (if personality was derived; otherwise skip)
459
+ 7. What was intentionally excluded and why
460
+ 8. Any high-risk failure modes flagged
461
+
462
+ End with: **"Would you like me to adjust anything before I create this?"**
463
+
464
+ Record any user overrides in the derivation rationale. If the user overrides a dimension, re-run the coherence check for affected constraints before proceeding to generation.
465
+
466
+ ---
467
+
468
+ ## PHASE 5: Generation
469
+
470
+ Create the complete system. Order matters -- later artifacts reference earlier ones.
471
+
472
+ ### Context Resilience Protocol
473
+
474
+ The init wizard runs conversation (Phases 1-4) + generation (Phase 5) + validation (Phase 6) in one session. Phase 5 generates 15+ files, which can exhaust the context window. To survive context compaction:
475
+
476
+ 1. **Derivation persistence first.** `ops/derivation.md` is the FIRST artifact generated -- before folder structure, before any other file. It captures the complete derivation state.
477
+ 2. **Stateless generation.** Every subsequent step re-reads `ops/derivation.md` as its source of truth. No generation step relies on conversation memory for configuration decisions.
478
+ 3. **Sequential feature block processing.** Context file composition processes blocks one at a time -- read, transform, compose, release -- rather than loading all blocks simultaneously.
479
+
480
+ ### 15-Step Generation Order
481
+
482
+ **Progress indicators:** During generation, emit user-facing milestone announcements in the user's domain vocabulary between major steps:
483
+
484
+ ```
485
+ $ Creating your {domain} structure...
486
+ $ Writing your context file...
487
+ $ Installing {domain:skills}...
488
+ $ Setting up templates...
489
+ $ Building your first {domain:topic map}...
490
+ $ Initializing version control...
491
+ $ Running validation...
492
+ ```
493
+
494
+ Use the `$` prefix (rendered as lozenge in the branded output). These transform the wait from anxiety to anticipation and provide orientation during generation.
495
+
496
+ ---
497
+
498
+ #### Step 1: ops/derivation.md (FIRST -- before any other file)
499
+
500
+ **CRITICAL:** This MUST be the first file written. Create the `ops/` directory and write `ops/derivation.md`.
501
+
502
+ This file persists the complete derivation state so all subsequent steps can work from it, even if context is compacted.
503
+
504
+ ```markdown
505
+ ---
506
+ description: How this knowledge system was derived -- enables architect and reseed commands
507
+ created: [YYYY-MM-DD]
508
+ engine_version: "1.0.0"
509
+ ---
510
+
511
+ # System Derivation
512
+
513
+ ## Configuration Dimensions
514
+ | Dimension | Position | Conversation Signal | Confidence |
515
+ |-----------|----------|--------------------|--------------------|
516
+ | Granularity | [value] | "[what user said]" | [High/Medium/Low/Inferred] |
517
+ | Organization | [value] | "[signal]" | [confidence] |
518
+ | Linking | [value] | "[signal]" | [confidence] |
519
+ | Processing | [value] | "[signal]" | [confidence] |
520
+ | Navigation | [value] | "[signal]" | [confidence] |
521
+ | Maintenance | [value] | "[signal]" | [confidence] |
522
+ | Schema | [value] | "[signal]" | [confidence] |
523
+ | Automation | [value] | "[signal + platform tier]" | [confidence] |
524
+
525
+ ## Personality Dimensions
526
+ | Dimension | Position | Signal |
527
+ |-----------|----------|--------|
528
+ | Warmth | [clinical/warm/playful] | [signal or "default"] |
529
+ | Opinionatedness | [neutral/opinionated] | [signal or "default"] |
530
+ | Formality | [formal/casual] | [signal or "default"] |
531
+ | Emotional Awareness | [task-focused/attentive] | [signal or "default"] |
532
+
533
+ ## Vocabulary Mapping
534
+ | Universal Term | Domain Term | Category |
535
+ |---------------|-------------|----------|
536
+ | notes | [domain term] | folder |
537
+ | inbox | [domain term] | folder |
538
+ | archive | [domain term] | folder |
539
+ | note (type) | [domain term] | note type |
540
+ | reduce | [domain term] | process phase |
541
+ | reflect | [domain term] | process phase |
542
+ | reweave | [domain term] | process phase |
543
+ | verify | [domain term] | process phase |
544
+ | MOC | [domain term] | navigation |
545
+ | description | [domain term] | schema field |
546
+ | topics | [domain term] | schema field |
547
+ | [additional terms] | [domain terms] | [category] |
548
+
549
+ ## Platform
550
+ - Tier: [Claude Code / OpenClaw / Minimal]
551
+ - Automation level: [full / convention / manual]
552
+ - Automation: [full (default) / convention / manual]
553
+
554
+ ## Active Feature Blocks
555
+ [Checked = included, unchecked = excluded with reason]
556
+ - [x] wiki-links -- always included (kernel)
557
+ - [x] maintenance -- always included (always)
558
+ - [x] self-evolution -- always included (always)
559
+ - [x] session-rhythm -- always included (always)
560
+ - [x] templates -- always included (always)
561
+ - [x] ethical-guardrails -- always included (always)
562
+ [List all conditional blocks with inclusion/exclusion rationale]
563
+
564
+ ## Coherence Validation Results
565
+ - Hard constraints checked: [count]. Violations: [none / details]
566
+ - Soft constraints checked: [count]. Auto-adjusted: [details]. User-confirmed: [details]
567
+ - Compensating mechanisms active: [list or none]
568
+
569
+ ## Failure Mode Risks
570
+ [Top 3-4 HIGH-risk failure modes for this domain from vulnerability matrix]
571
+
572
+ ## Generation Parameters
573
+ - Folder names: [domain-specific folder names]
574
+ - Skills to generate: [all 26 — vocabulary-transformed]
575
+ - Hooks to generate: [orient, capture, validate, commit]
576
+ - Templates to create: [list]
577
+ - Topology: [single-agent / skills / fresh-context / orchestrated]
578
+ ```
579
+
580
+ This file serves three purposes:
581
+ 1. **Immediate:** Source of truth for all subsequent generation steps (context resilience)
582
+ 2. **Operational:** Enables `/architect` to reason about configuration drift
583
+ 3. **Evolution:** Enables `/reseed` to re-derive with updated understanding
584
+
585
+ ---
586
+
587
+ #### Step 2: Folder Structure
588
+
589
+ **Re-read `ops/derivation.md`** at the start of this step for folder names and vocabulary mapping.
590
+
591
+ Create the three-space layout with domain-named directories:
592
+
593
+ ```
594
+ [workspace]/
595
+ +-- [domain:notes]/ <-- structured knowledge (flat)
596
+ +-- [domain:inbox]/ <-- zero-friction capture (if processing >= moderate)
597
+ +-- [domain:archive]/ <-- processed, inactive
598
+ +-- self/ <-- agent's persistent mind
599
+ | +-- identity.md <-- (created in Step 4)
600
+ | +-- methodology.md <-- (created in Step 5)
601
+ | +-- goals.md <-- (created in Step 6)
602
+ | +-- relationships.md <-- (optional, if domain involves people)
603
+ | +-- memory/ <-- atomic personal insights
604
+ +-- templates/ <-- note templates (created in Step 8)
605
+ +-- ops/ <-- operational coordination (already exists from Step 1)
606
+ | +-- observations/ <-- atomic friction signals (Primitive 12)
607
+ | +-- tensions/ <-- contradiction tracking (Primitive 12)
608
+ | +-- methodology/ <-- vault self-knowledge (Primitive 14)
609
+ | +-- queue/ <-- unified task queue (pipeline + maintenance)
610
+ | | +-- archive/ <-- completed task batches
611
+ | +-- sessions/ <-- session tracking
612
+ ```
613
+
614
+ The `ops/observations/` and `ops/tensions/` directories are required by Kernel Primitive 12 (Operational Learning Loop). They accumulate friction signals that /{DOMAIN:rethink} reviews when observation or tension counts exceed thresholds.
615
+
616
+ The inbox folder is always generated. It provides zero-friction capture regardless of processing level.
617
+
618
+ ---
619
+
620
+ #### Step 3: Context File
621
+
622
+ **Re-read `ops/derivation.md`** at the start of this step for vocabulary mapping, personality dimensions, active block list, platform tier, and generation parameters.
623
+
624
+ This is the most critical generation step. The context file IS the system.
625
+
626
+ **For Claude Code:** Generate `CLAUDE.md` using `${CLAUDE_PLUGIN_ROOT}/generators/claude-md.md` template.
627
+ **For OpenClaw:** Generate `SOUL.md` using `${CLAUDE_PLUGIN_ROOT}/generators/soul-md.md` AND `AGENTS.md` using `${CLAUDE_PLUGIN_ROOT}/generators/agents-md.md`.
628
+ **For Minimal:** Generate `README.md` as self-contained conventions document.
629
+
630
+ **Context file composition algorithm:**
631
+
632
+ ```
633
+ Step 1: Read generator template for the platform.
634
+
635
+ Step 2: Select feature blocks from ${CLAUDE_PLUGIN_ROOT}/generators/features/.
636
+ Always-included blocks (11): wiki-links, processing-pipeline, schema, maintenance, self-evolution, methodology-knowledge, session-rhythm, templates, ethical-guardrails, helper-functions, graph-analysis
637
+ Conditional blocks: based on derived dimensions (see Active Feature Blocks in derivation.md)
638
+
639
+ Step 3: Process blocks SEQUENTIALLY. For each selected block:
640
+ a. Read the block file
641
+ b. Apply vocabulary transformation (Section 9 algorithm -- LLM-based contextual replacement, NOT string find-replace)
642
+ c. Compose into the growing context file
643
+ d. Release the block from context before reading the next
644
+
645
+ Step 4: Compose in canonical block order:
646
+ 1. Philosophy (derived from personality + domain)
647
+ 2. session-rhythm -- Orient, work, persist, session capture
648
+ 3. atomic-notes -- Note design principles (if active)
649
+ 4. wiki-links -- Link philosophy and patterns
650
+ 5. mocs -- Navigation structure (if active)
651
+ 6. processing-pipeline -- Processing approach (always included)
652
+ 7. semantic-search -- Discovery layers (if active)
653
+ 8. schema -- Metadata and query patterns (always included)
654
+ 9. maintenance -- Health checks and reweaving
655
+ 10. self-evolution -- System evolution approach
656
+ 10b. methodology-knowledge -- Querying and consulting self-knowledge
657
+ 11. personality -- Voice and identity (if active)
658
+ 12. templates -- Template usage
659
+ 13. multi-domain -- Cross-domain rules (if active)
660
+ 14. self-space -- Agent identity and memory (if active)
661
+ 15. ethical-guardrails -- Behavioral constraints
662
+ 16. helper-functions -- Utility scripts (always included)
663
+ 17. graph-analysis -- Graph intelligence and query patterns (always included)
664
+
665
+ Step 5: Cross-reference elimination.
666
+ If a block is excluded, scan remaining blocks for references to excluded concepts and remove or rephrase:
667
+ - semantic-search excluded -> rephrase "semantic search" to "search your notes" or remove
668
+ - mocs excluded -> simplify "topic MOCs" to "topic organization"
669
+ - self-space excluded -> references to self/identity.md route to ops/ equivalents
670
+ - atomic-notes excluded -> simplify atomicity references to general note guidance
671
+ - multi-domain excluded -> remove cross-domain references
672
+
673
+ Step 6: Add required sections that are NOT from feature blocks:
674
+ a. Header with philosophy statement and domain identity
675
+ b. Discovery-first design section (kernel primitive 11)
676
+ c. Memory type routing table (where content goes: notes/, self/, ops/, inbox/, reminders.md)
677
+ d. Infrastructure routing table (routes methodology questions to arscontexta plugin skills)
678
+ e. Self-improvement loop (manual friction capture instructions)
679
+ f. Common Pitfalls (3-4 HIGH-risk failure modes from vulnerability matrix, in domain vocabulary)
680
+ g. System Evolution section (architect, reseed, friction-driven growth)
681
+ h. Self-extension blueprints (how to build new skills, hooks)
682
+ i. Derivation Rationale summary (which dimensions, which signals, which tradition)
683
+ j. Pipeline Compliance (NEVER write directly to notes/, route through inbox)
684
+ k. Condition-based maintenance documentation (what signals trigger which actions)
685
+
686
+ Step 7: Coherence verification.
687
+ - [ ] No orphaned references to excluded blocks
688
+ - [ ] Vocabulary consistent (same universal term -> same domain term everywhere)
689
+ - [ ] Personality tone consistent across all sections
690
+ - [ ] All mentioned skills exist in the generated skills (or are documented as dormant tiers)
691
+ - [ ] All mentioned file paths exist in the generated folder structure
692
+ - [ ] All mentioned templates exist in the generated templates
693
+ - [ ] Processing terminology matches selected pipeline approach (light vs heavy)
694
+ - [ ] Schema fields mentioned in prose exist in generated templates
695
+
696
+ Step 8: Apply vocabulary transformation one final time.
697
+ Read the completed context file. Replace every remaining universal term with its domain-native equivalent.
698
+ The vocabulary test: would a domain user ever see a term from a different discipline?
699
+
700
+ Step 9: Write the file.
701
+ Target operational density: each section should have enough detail that the agent can follow instructions without asking questions.
702
+ "Process your notes" is insufficient.
703
+ "Read the source fully, extract insights that serve the domain, check for duplicates" is sufficient.
704
+ ```
705
+
706
+ **Structural Marker Protection:** Vocabulary transformation must NEVER touch structural markers. Field names in YAML (`description:`, `topics:`, `relevant_notes:`, `type:`, `status:`, `_schema:`) are structural and stay universal. Domain vocabulary applies to VALUES, prose content, and user-facing labels -- never to YAML field names or structural syntax.
707
+
708
+ **CRITICAL quality requirements for the generated context file:**
709
+ - Tell the agent to ALWAYS read self/ at session start
710
+ - Explain prose-as-title with examples from the user's domain
711
+ - Include domain-specific schema in the YAML section
712
+ - Provide self-extension blueprints
713
+ - Include derivation rationale (which dimensions, which signals)
714
+ - Feel cohesive, not like assembled blocks
715
+ - Use domain-native vocabulary throughout
716
+
717
+ ---
718
+
719
+ #### Step 4: self/identity.md
720
+
721
+ **Re-read `ops/derivation.md`** for personality dimensions, vocabulary mapping, and use case context.
722
+
723
+ Generate identity.md with personality expressed as natural self-description, not configuration syntax.
724
+
725
+ If personality is derived (personality.enabled = true), use the personality x artifact transformation matrix from the personality-layer reference. If neutral-helpful (default), write clear, direct, professional self-description.
726
+
727
+ ```markdown
728
+ ---
729
+ description: Who I am and how I approach my work
730
+ type: moc
731
+ ---
732
+
733
+ # identity
734
+
735
+ [Adapted to use case and personality. Examples:
736
+ - Research: "I am a research partner building understanding about..."
737
+ - Therapy (warm): "I pay attention to what you write about your sessions..."
738
+ - PM (neutral): "I track decisions across your projects..."
739
+ - Companion (warm): "I remember the things that matter about your life..."]
740
+
741
+ ## Core Values
742
+ - [Relevant values for the use case, derived from personality + domain]
743
+
744
+ ## Working Style
745
+ - [How the agent approaches its work, reflecting personality dimensions]
746
+
747
+ ---
748
+
749
+ Topics:
750
+ - [[methodology]]
751
+ ```
752
+
753
+ ---
754
+
755
+ #### Step 5: self/methodology.md
756
+
757
+ **Re-read `ops/derivation.md`** for processing level, vocabulary mapping, and domain context.
758
+
759
+ ```markdown
760
+ ---
761
+ description: How I process, connect, and maintain knowledge
762
+ type: moc
763
+ ---
764
+
765
+ # methodology
766
+
767
+ ## Principles
768
+ - Prose-as-title: every [domain:note] is a proposition
769
+ - Wiki links: connections as graph edges
770
+ - [domain:MOCs]: attention management hubs
771
+ - Capture fast, process slow
772
+
773
+ ## My Process
774
+ [Adapted to use case using domain-native language for the processing phases.
775
+ Use the vocabulary from derivation.md -- "surface" not "reduce" for therapy, etc.]
776
+
777
+ ---
778
+
779
+ Topics:
780
+ - [[identity]]
781
+ ```
782
+
783
+ ---
784
+
785
+ #### Step 5f: ops/methodology/ (Vault Self-Knowledge)
786
+
787
+ **Re-read `ops/derivation.md`** for all dimension choices, platform tier, automation level, active feature blocks, and coherence validation results. This step creates the vault's self-knowledge folder required by Kernel Primitive 14 (methodology-folder).
788
+
789
+ **Create `ops/methodology/methodology.md`** (MOC):
790
+
791
+ ```markdown
792
+ ---
793
+ description: The vault's self-knowledge — derivation rationale, configuration state, and operational evolution history
794
+ type: moc
795
+ ---
796
+ # methodology
797
+
798
+ This folder records what the system knows about its own operation — why it was configured this way, what the current state is, and how it has evolved. Meta-skills (/{DOMAIN:rethink}, /{DOMAIN:architect}) read from and write to this folder. /{DOMAIN:remember} captures operational corrections here.
799
+
800
+ ## Derivation Rationale
801
+ - [[derivation-rationale]] — Why each configuration dimension was set the way it was
802
+
803
+ ## Configuration State
804
+ (Populated by /{DOMAIN:rethink}, /{DOMAIN:architect})
805
+
806
+ ## Evolution History
807
+ (Populated by /{DOMAIN:rethink}, /{DOMAIN:architect}, /{DOMAIN:reseed})
808
+
809
+ ## How to Use This Folder
810
+
811
+ Browse notes: `ls ops/methodology/`
812
+ Query by category: `rg '^category:' ops/methodology/`
813
+ Find active directives: `rg '^status: active' ops/methodology/`
814
+ Ask the research graph: `/ask [question about your system]`
815
+
816
+ Meta-skills (/{DOMAIN:rethink}, /architect) read from and write to this folder.
817
+ /{DOMAIN:remember} captures operational corrections here.
818
+ ```
819
+
820
+ **Create `ops/methodology/derivation-rationale.md`** (initial note):
821
+
822
+ ```markdown
823
+ ---
824
+ description: Why each configuration dimension was chosen — the reasoning behind initial system setup
825
+ category: derivation-rationale
826
+ created: {timestamp}
827
+ status: active
828
+ ---
829
+ # derivation rationale for {domain}
830
+
831
+ {Extract from ops/derivation.md the key dimension choices and the conversation signals that drove them. Include: platform tier, automation level, active feature blocks, and coherence validation results. Write in prose format, not raw transcript — synthesize the reasoning into a readable narrative that future meta-skills can consult.}
832
+
833
+ ---
834
+
835
+ Topics:
836
+ - [[methodology]]
837
+ ```
838
+
839
+ The seven content categories for ops/methodology/ are: `derivation-rationale`, `kernel-state`, `pipeline-config`, `maintenance-conditions`, `vocabulary-map`, `configuration-state`, `drift-detection`. Only `derivation-rationale` is created at init; the others are populated by meta-skills during operation.
840
+
841
+ ---
842
+
843
+ #### Step 5g: manual/ (User-Navigable Documentation)
844
+
845
+ **Re-read `ops/derivation.md`** for vocabulary mapping and domain context.
846
+
847
+ Generate all 7 manual pages using domain-native vocabulary from the derivation conversation. The manual is self-contained user documentation — pages wiki-link to each other but NOT to notes/.
848
+
849
+ **Generation instructions:**
850
+
851
+ For each page, apply vocabulary transformation: replace universal terms (notes, inbox, topic map, reduce, reflect, reweave) with domain-native equivalents from the derivation conversation. Use concrete domain examples where possible.
852
+
853
+ **Page 1: manual.md (Hub MOC)**
854
+
855
+ ```markdown
856
+ ---
857
+ description: User manual for your {domain} knowledge system
858
+ type: manual
859
+ generated_from: "arscontexta-{version}"
860
+ ---
861
+ # Manual
862
+
863
+ Welcome to your {domain} knowledge system. This manual explains how everything works.
864
+
865
+ ## Pages
866
+
867
+ - [[getting-started]] — Your first session, first {DOMAIN:note}, and first connection
868
+ - [[skills]] — Every available command with when to use it and examples
869
+ - [[workflows]] — The processing pipeline, maintenance cycle, and session rhythm
870
+ - [[configuration]] — How to adjust settings via config.yaml or /architect
871
+ - [[meta-skills]] — /ask, /architect, /{DOMAIN:rethink}, and /{DOMAIN:remember} explained
872
+ - [[troubleshooting]] — Common issues and how to resolve them
873
+ ```
874
+
875
+ **Page 2: getting-started.md**
876
+
877
+ ```markdown
878
+ ---
879
+ description: First session guide — creating your first {DOMAIN:note} and building connections
880
+ type: manual
881
+ generated_from: "arscontexta-{version}"
882
+ ---
883
+ # Getting Started
884
+
885
+ {Generate content covering:}
886
+ - What to expect in your first session
887
+ - Creating your first {DOMAIN:note} (walk through the process)
888
+ - How connections work (wiki links, {DOMAIN:topic maps})
889
+ - The orient-work-persist session rhythm
890
+ - Where to go next (link to [[workflows]] and [[skills]])
891
+ - Running /tutorial for an interactive walkthrough
892
+ ```
893
+
894
+ **Page 3: skills.md**
895
+
896
+ ```markdown
897
+ ---
898
+ description: Complete reference for every available command
899
+ type: manual
900
+ generated_from: "arscontexta-{version}"
901
+ ---
902
+ # Skills
903
+
904
+ {Generate content covering:}
905
+ - Every generated skill with domain-native name, purpose, and example invocation
906
+ - Group by category: Processing, Orchestration, Meta-Cognitive, Diagnostic, Knowledge, Research, Lifecycle, Onboarding
907
+ - For each skill: when to use it, what it does, example command
908
+ - Link to [[workflows]] for how skills chain together
909
+ - Link to [[meta-skills]] for detailed meta-skill documentation
910
+ ```
911
+
912
+ **Page 4: workflows.md**
913
+
914
+ ```markdown
915
+ ---
916
+ description: Processing pipeline, maintenance cycle, and session rhythm
917
+ type: manual
918
+ generated_from: "arscontexta-{version}"
919
+ ---
920
+ # Workflows
921
+
922
+ {Generate content covering:}
923
+ - The full processing pipeline: {DOMAIN:seed} -> {DOMAIN:process} -> {DOMAIN:connect} -> {DOMAIN:maintain} -> {DOMAIN:verify}
924
+ - Session rhythm: orient (what's happening) -> work (do the thing) -> persist (save state)
925
+ - Maintenance cycle: condition-based triggers, what to do when conditions fire
926
+ - Batch processing with /{DOMAIN:orchestrate}
927
+ - Link to [[skills]] for command details
928
+ - Link to [[configuration]] for adjusting pipeline settings
929
+ ```
930
+
931
+ **Page 5: configuration.md**
932
+
933
+ ```markdown
934
+ ---
935
+ description: How to adjust your system via config.yaml and /architect
936
+ type: manual
937
+ generated_from: "arscontexta-{version}"
938
+ ---
939
+ # Configuration
940
+
941
+ {Generate content covering:}
942
+ - config.yaml structure and key fields
943
+ - Using /architect for guided configuration changes
944
+ - Feature toggling: what can be enabled/disabled
945
+ - Preset explanation: what your preset includes and why
946
+ - Dimension positions and what they mean for your domain
947
+ - Link to [[meta-skills]] for /architect details
948
+ - Link to [[troubleshooting]] for configuration issues
949
+ ```
950
+
951
+ **Page 6: meta-skills.md**
952
+
953
+ ```markdown
954
+ ---
955
+ description: Deep guide to /ask, /architect, /{DOMAIN:rethink}, and /{DOMAIN:remember}
956
+ type: manual
957
+ generated_from: "arscontexta-{version}"
958
+ ---
959
+ # Meta-Skills
960
+
961
+ {Generate content covering:}
962
+ - /ask — querying the bundled research knowledge base + local methodology
963
+ - /architect — getting research-backed configuration advice
964
+ - /{DOMAIN:rethink} — reviewing accumulated observations and tensions, drift detection
965
+ - /{DOMAIN:remember} — capturing friction and methodology learnings (Rule Zero: methodology as spec)
966
+ - When to use each meta-skill
967
+ - How meta-skills relate to system evolution
968
+ - Link to [[configuration]] for config changes
969
+ - Link to [[troubleshooting]] for drift-related issues
970
+ ```
971
+
972
+ **Page 7: troubleshooting.md**
973
+
974
+ ```markdown
975
+ ---
976
+ description: Common issues and resolution patterns
977
+ type: manual
978
+ generated_from: "arscontexta-{version}"
979
+ ---
980
+ # Troubleshooting
981
+
982
+ {Generate content covering:}
983
+ - Orphan {DOMAIN:notes} — notes with no incoming links (run /{DOMAIN:connect})
984
+ - Dangling links — wiki links to non-existent {DOMAIN:notes} (check after renames)
985
+ - Stale content — {DOMAIN:notes} not updated in 30+ days with sparse connections (run /{DOMAIN:maintain})
986
+ - Methodology drift — system behavior diverging from methodology spec (run /{DOMAIN:rethink} drift)
987
+ - Inbox overflow — too many items accumulating (run /{DOMAIN:process} or /{DOMAIN:pipeline})
988
+ - Pipeline stalls — tasks stuck in queue (check with /{DOMAIN:next})
989
+ - Common mistakes table with corrections
990
+ - Link to [[meta-skills]] for /rethink and /remember
991
+ - Link to [[configuration]] for threshold adjustments
992
+ ```
993
+
994
+ **Quality gates:**
995
+ - All skill references use domain-native names from the derivation conversation
996
+ - All pages link back to [[manual]] via a footer or contextual reference
997
+ - No wiki links to notes/ — manual is self-contained
998
+ - Each page has `generated_from: "arscontexta-{version}"` in frontmatter
999
+ - Content uses domain-specific examples, not generic/abstract ones
1000
+
1001
+ ---
1002
+
1003
+ #### Step 6: self/goals.md
1004
+
1005
+ **Re-read `ops/derivation.md`** for use case context.
1006
+
1007
+ ```markdown
1008
+ ---
1009
+ description: Current active threads and what I am working on
1010
+ type: moc
1011
+ ---
1012
+
1013
+ # goals
1014
+
1015
+ ## Active Threads
1016
+ - Getting started -- learning this knowledge system
1017
+ - [Use-case-specific initial goals derived from conversation]
1018
+
1019
+ ## Completed
1020
+ (none yet)
1021
+
1022
+ ---
1023
+
1024
+ Topics:
1025
+ - [[identity]]
1026
+ ```
1027
+
1028
+ ---
1029
+
1030
+ #### Step 7: ops/config.yaml
1031
+
1032
+ **Re-read `ops/derivation.md`** for all dimension positions and feature states.
1033
+
1034
+ Generate the human-editable configuration file:
1035
+
1036
+ ```yaml
1037
+ # ops/config.yaml -- edit these to adjust your system
1038
+ # See ops/derivation.md for WHY each choice was made
1039
+
1040
+ dimensions:
1041
+ granularity: [atomic | moderate | coarse]
1042
+ organization: [flat | hierarchical]
1043
+ linking: [explicit | implicit | explicit+implicit]
1044
+ processing: [light | moderate | heavy]
1045
+ navigation: [2-tier | 3-tier]
1046
+ maintenance: condition-based
1047
+ schema: [minimal | moderate | dense]
1048
+ automation: [manual | convention | full]
1049
+
1050
+ features:
1051
+ semantic-search: [true | false]
1052
+ processing-pipeline: [true | false]
1053
+ sleep-processing: [true | false]
1054
+ voice-capture: false
1055
+
1056
+ processing_tier: auto # auto | 1 | 2 | 3 | 4
1057
+
1058
+ processing:
1059
+ depth: standard # deep | standard | quick
1060
+ chaining: suggested # manual | suggested | automatic
1061
+ extraction:
1062
+ selectivity: moderate # strict | moderate | permissive
1063
+ categories: auto # auto (from derivation) | custom list
1064
+ verification:
1065
+ description_test: true
1066
+ schema_check: true
1067
+ link_check: true
1068
+ reweave:
1069
+ scope: related # related | broad | full
1070
+ frequency: after_create # after_create | periodic | manual
1071
+
1072
+ provenance: [full | minimal | off]
1073
+
1074
+ personality:
1075
+ enabled: [true | false]
1076
+
1077
+ research:
1078
+ primary: [exa-deep-research | web-search] # best available research tool
1079
+ fallback: [exa-web-search | web-search] # fallback if primary unavailable
1080
+ last_resort: web-search # always available
1081
+ default_depth: moderate # light | moderate | deep
1082
+ ```
1083
+
1084
+ **Processing depth levels:**
1085
+ - `deep` -- Full pipeline, fresh context per phase, maximum quality gates. Best for important sources and initial vault building.
1086
+ - `standard` -- Full pipeline, balanced attention. Regular processing, moderate volume.
1087
+ - `quick` -- Compressed pipeline, combine connect+verify phases. High volume catch-up, minor sources.
1088
+
1089
+ **Pipeline chaining modes:**
1090
+ - `manual` -- Skills output "Next: /[skill] [target]" -- user decides.
1091
+ - `suggested` -- Skills output next step AND add to task queue -- user can skip.
1092
+ - `automatic` -- Skills complete → next phase runs immediately via orchestration.
1093
+
1094
+ **Research tool detection:** During generation, check for available research tools:
1095
+ 1. If Exa MCP tools available (`mcp__exa__deep_researcher_start`): primary = exa-deep-research
1096
+ 2. If Exa web search available (`mcp__exa__web_search_exa`): fallback = exa-web-search
1097
+ 3. Web search is always the last resort
1098
+
1099
+ **Relationship:** config.yaml is the live operational config. derivation.md is the historical record of WHY. Config can drift; `/architect` detects and documents the drift.
1100
+
1101
+ ---
1102
+
1103
+ #### Step 7b: ops/derivation-manifest.md (Runtime Vocabulary for Inherited Skills)
1104
+
1105
+ **Re-read `ops/derivation.md`** for all dimension positions, vocabulary mapping, active blocks, and platform information.
1106
+
1107
+ Generate the machine-readable derivation manifest. This is the KEY file that enables runtime vocabulary transformation for all inherited processing skills (/reduce, /reflect, /reweave, /verify, /validate). Skills read this file at invocation time to apply domain-specific vocabulary without needing domain-specific skill copies.
1108
+
1109
+ ```yaml
1110
+ # ops/derivation-manifest.md -- Machine-readable manifest for runtime skill configuration
1111
+ # Generated by /setup. Updated by /reseed, /architect, /add-domain.
1112
+ ---
1113
+ engine_version: "0.2.0"
1114
+ research_snapshot: "2026-02-10"
1115
+ generated_at: [ISO 8601 timestamp]
1116
+ platform: [claude-code | openclaw | minimal]
1117
+ kernel_version: "1.0"
1118
+
1119
+ dimensions:
1120
+ granularity: [atomic | moderate | coarse]
1121
+ organization: [flat | hierarchical]
1122
+ linking: [explicit | implicit | explicit+implicit]
1123
+ processing: [light | moderate | heavy]
1124
+ navigation: [2-tier | 3-tier]
1125
+ maintenance: condition-based
1126
+ schema: [minimal | moderate | dense]
1127
+ automation: [manual | convention | full]
1128
+
1129
+ active_blocks:
1130
+ - [list of active feature block IDs]
1131
+
1132
+ coherence_result: [passed | passed_with_warnings]
1133
+
1134
+ vocabulary:
1135
+ # Level 1: Folder names
1136
+ notes: "[domain term]" # e.g., "claims", "reflections", "decisions"
1137
+ inbox: "[domain term]" # e.g., "inbox", "captures", "incoming"
1138
+ archive: "[domain term]" # e.g., "archive", "processed", "completed"
1139
+ ops: "ops" # always ops
1140
+
1141
+ # Level 2: Note types
1142
+ note: "[domain term]" # e.g., "claim", "reflection", "decision"
1143
+ note_plural: "[domain term]" # e.g., "claims", "reflections", "decisions"
1144
+
1145
+ # Level 3: Schema field names
1146
+ description: "[domain term]" # e.g., "description", "summary", "brief"
1147
+ topics: "[domain term]" # e.g., "topics", "themes", "areas"
1148
+ relevant_notes: "[domain term]" # e.g., "relevant notes", "connections", "related"
1149
+
1150
+ # Level 4: Navigation terms
1151
+ topic_map: "[domain term]" # e.g., "topic map", "theme", "decision register"
1152
+ hub: "[domain term]" # e.g., "hub", "home", "overview"
1153
+
1154
+ # Level 5: Process verbs
1155
+ reduce: "[domain term]" # e.g., "reduce", "surface", "document"
1156
+ reflect: "[domain term]" # e.g., "reflect", "find patterns", "link decisions"
1157
+ reweave: "[domain term]" # e.g., "reweave", "revisit", "update"
1158
+ verify: "[domain term]" # e.g., "verify", "check resonance", "validate"
1159
+ validate: "[domain term]" # e.g., "validate", "check schema", "audit"
1160
+ rethink: "[domain term]" # e.g., "rethink", "reassess", "retrospect"
1161
+
1162
+ # Level 6: Command names (as users invoke them)
1163
+ cmd_reduce: "[/domain-verb]" # e.g., "/reduce", "/surface", "/document"
1164
+ cmd_reflect: "[/domain-verb]" # e.g., "/reflect", "/find-patterns", "/link-decisions"
1165
+ cmd_reweave: "[/domain-verb]" # e.g., "/reweave", "/revisit", "/update-old"
1166
+ cmd_verify: "[/domain-verb]" # e.g., "/verify", "/check", "/audit"
1167
+ cmd_rethink: "[/domain-verb]" # e.g., "/rethink", "/reassess", "/retrospect"
1168
+
1169
+ # Level 7: Extraction categories (domain-specific, from conversation)
1170
+ extraction_categories:
1171
+ - name: "[category name]"
1172
+ what_to_find: "[description]"
1173
+ output_type: "[note type]"
1174
+ - name: "[category name]"
1175
+ what_to_find: "[description]"
1176
+ output_type: "[note type]"
1177
+ # ... 4-8 domain-specific categories
1178
+
1179
+ platform_hints:
1180
+ context: [fork | single]
1181
+ allowed_tools: [tool list based on platform tier]
1182
+ semantic_search_tool: [mcp__qmd__query | null]
1183
+
1184
+ personality:
1185
+ warmth: [clinical | warm | playful]
1186
+ opinionatedness: [neutral | opinionated]
1187
+ formality: [formal | casual]
1188
+ emotional_awareness: [task-focused | attentive]
1189
+ ---
1190
+ ```
1191
+
1192
+ **Why this file exists separately from derivation.md:** derivation.md is the human-readable reasoning record (WHY each choice was made, conversation signals, confidence levels). derivation-manifest.md is the machine-readable operational manifest (WHAT the choices are). Skills read the manifest for quick vocabulary lookup without parsing the narrative derivation document.
1193
+
1194
+ **Who updates this file:**
1195
+ - `/setup` generates it
1196
+ - `/reseed` regenerates it after re-derivation
1197
+ - `/architect` updates it when implementing approved changes
1198
+ - `/add-domain` extends it with new domain vocabulary
1199
+
1200
+ ---
1201
+
1202
+ #### Step 8: Templates with _schema blocks
1203
+
1204
+ **Re-read `ops/derivation.md`** for schema level, vocabulary mapping, and domain-specific field requirements.
1205
+
1206
+ Create domain-specific templates in `templates/`:
1207
+
1208
+ **Always create:**
1209
+ - Primary note template (domain-named: `claim-note.md`, `reflection-note.md`, `decision-note.md`, etc.)
1210
+ - MOC template (domain-named: `topic-map.md`, `theme.md`, `decision-register.md`, etc.)
1211
+
1212
+ **Conditionally create:**
1213
+ - Source capture template (if processing >= moderate)
1214
+ - Observation template (if self-evolution is active -- always)
1215
+
1216
+ Each template MUST include a `_schema` block defining required fields, optional fields, enums, and constraints. The template IS the single source of truth for schema.
1217
+
1218
+ Template structure:
1219
+ ```markdown
1220
+ ---
1221
+ _schema:
1222
+ entity_type: "[domain]-note"
1223
+ applies_to: "[domain:notes]/*.md"
1224
+ required:
1225
+ - description
1226
+ - topics
1227
+ optional:
1228
+ - [domain-specific fields based on schema density]
1229
+ enums:
1230
+ type:
1231
+ - [domain-relevant types]
1232
+ constraints:
1233
+ description:
1234
+ max_length: 200
1235
+ format: "One sentence adding context beyond the title"
1236
+ topics:
1237
+ format: "Array of wiki links"
1238
+
1239
+ # Template fields
1240
+ description: ""
1241
+ topics: []
1242
+ [domain fields with defaults]
1243
+ ---
1244
+
1245
+ # {prose-as-title}
1246
+
1247
+ {Content}
1248
+
1249
+ ---
1250
+
1251
+ Relevant Notes:
1252
+ - [[related note]] -- relationship context
1253
+
1254
+ Topics:
1255
+ - [[relevant-moc]]
1256
+ ```
1257
+
1258
+ Apply vocabulary transformation to the template: field labels in comments and example values use domain vocabulary. YAML field names stay structural (description, topics, etc.).
1259
+
1260
+ ---
1261
+
1262
+ #### Step 9: Skills (vocabulary-transformed, full suite)
1263
+
1264
+ **Re-read `ops/derivation.md`** for processing level, platform, vocabulary mapping, and skills list.
1265
+
1266
+ Generate ALL skills for the detected platform. Every vault ships with the complete skill set from day one. Full automation is the default — users opt down, never up.
1267
+
1268
+ **Skill source templates live at `${CLAUDE_PLUGIN_ROOT}/skill-sources/`.** Each subdirectory contains a `SKILL.md` template that must be read, vocabulary-transformed, and written to the user's skills directory.
1269
+
1270
+ The 16 skill sources to install:
1271
+
1272
+ | Source Directory | Skill Name | Category |
1273
+ |-----------------|------------|----------|
1274
+ | `${CLAUDE_PLUGIN_ROOT}/skill-sources/reduce/` | reduce | Processing |
1275
+ | `${CLAUDE_PLUGIN_ROOT}/skill-sources/reflect/` | reflect | Processing |
1276
+ | `${CLAUDE_PLUGIN_ROOT}/skill-sources/reweave/` | reweave | Processing |
1277
+ | `${CLAUDE_PLUGIN_ROOT}/skill-sources/verify/` | verify | Processing |
1278
+ | `${CLAUDE_PLUGIN_ROOT}/skill-sources/validate/` | validate | Processing |
1279
+ | `${CLAUDE_PLUGIN_ROOT}/skill-sources/seed/` | seed | Orchestration |
1280
+ | `${CLAUDE_PLUGIN_ROOT}/skill-sources/ralph/` | ralph | Orchestration |
1281
+ | `${CLAUDE_PLUGIN_ROOT}/skill-sources/pipeline/` | pipeline | Orchestration |
1282
+ | `${CLAUDE_PLUGIN_ROOT}/skill-sources/tasks/` | tasks | Orchestration |
1283
+ | `${CLAUDE_PLUGIN_ROOT}/skill-sources/stats/` | stats | Navigation |
1284
+ | `${CLAUDE_PLUGIN_ROOT}/skill-sources/graph/` | graph | Navigation |
1285
+ | `${CLAUDE_PLUGIN_ROOT}/skill-sources/next/` | next | Navigation |
1286
+ | `${CLAUDE_PLUGIN_ROOT}/skill-sources/learn/` | learn | Growth |
1287
+ | `${CLAUDE_PLUGIN_ROOT}/skill-sources/remember/` | remember | Growth |
1288
+ | `${CLAUDE_PLUGIN_ROOT}/skill-sources/rethink/` | rethink | Evolution |
1289
+ | `${CLAUDE_PLUGIN_ROOT}/skill-sources/refactor/` | refactor | Evolution |
1290
+
1291
+ For each skill:
1292
+ 1. Read `${CLAUDE_PLUGIN_ROOT}/skill-sources/[name]/SKILL.md`
1293
+ 2. Apply vocabulary transformation — rename and update ALL internal references using the vocabulary mapping from `ops/derivation.md`
1294
+ 3. Adjust for platform (Claude Code: `context: fork`, OpenClaw: `context: single`)
1295
+ 4. Write the transformed SKILL.md to the user's skills directory
1296
+
1297
+ **For Claude Code:** Write to `.claude/skills/[domain-skill-name]/SKILL.md`
1298
+ **For OpenClaw:** Write to `skills/[domain-skill-name]/SKILL.md`
1299
+
1300
+ **CRITICAL:** Do NOT generate skills from scratch or improvise their content. Read the source template and transform it. The templates contain quality gates, anti-shortcut language, and handoff formats that must be preserved.
1301
+
1302
+ Every generated skill must include:
1303
+ - Anti-shortcut language for quality-critical steps
1304
+ - Quality gates with explicit pass/fail criteria
1305
+ - Handoff block format for orchestrated execution
1306
+ - Domain-native vocabulary throughout
1307
+
1308
+ ##### Skill Discoverability Protocol
1309
+
1310
+ **Platform limitation:** Claude Code's skill index does not refresh mid-session. Skills created during /setup are not discoverable until the user restarts Claude Code.
1311
+
1312
+ After creating ALL skill files:
1313
+
1314
+ 1. **Inform the user:** Display "Generated [N] skills. Restart Claude Code to activate them."
1315
+ 2. **Add to context file:** Include a "Recently Created Skills (Pending Activation)" section listing all generated skills with their domain-native names and creation timestamp:
1316
+
1317
+ ```markdown
1318
+ ## Recently Created Skills (Pending Activation)
1319
+
1320
+ These skills were created during initialization. Restart Claude Code to activate them.
1321
+ - /[domain:reduce] -- Extract insights from source material (created [timestamp])
1322
+ - /[domain:reflect] -- Find connections between [domain:notes] (created [timestamp])
1323
+ ...
1324
+ ```
1325
+
1326
+ 3. **SessionStart hook detects activation:** The session-orient.sh hook checks for this section. Once skills are confirmed loaded (appear in skill index), the section can be removed from the context file.
1327
+ 4. **Phase 6 guidance:** If any skills were created, Phase 6 output includes: "Restart Claude Code now to activate all skills, then try /[domain:help] to see what's available."
1328
+
1329
+ ---
1330
+
1331
+ #### Step 10: Hooks (platform-appropriate)
1332
+
1333
+ **Re-read `ops/derivation.md`** for automation level, platform tier, and vocabulary mapping.
1334
+
1335
+ ##### Additive Hook Merging Protocol
1336
+
1337
+ Generated hooks MUST NOT overwrite existing user hooks. Before writing any hooks:
1338
+
1339
+ 1. Read existing `.claude/settings.json` (if it exists)
1340
+ 2. Parse existing hook matcher groups for each event type (hooks.SessionStart, hooks.PostToolUse, hooks.Stop, etc.)
1341
+ 3. ADD new matcher groups to the event arrays -- never replace existing entries
1342
+ 4. If a matcher group with the same `command` path already exists for that event, SKIP it (warn in output, don't overwrite)
1343
+ 5. Write the merged result back to `.claude/settings.json`
1344
+
1345
+ **Validation criterion:** After hook generation, all pre-existing hooks are still present and functional.
1346
+
1347
+ ##### Session Persistence Architecture
1348
+
1349
+ Session persistence is critical for continuity across /clear and session restarts.
1350
+
1351
+ **Session data layout:**
1352
+ ```
1353
+ ops/
1354
+ ├── sessions/
1355
+ │ ├── current.json # Active session state (updated by hooks)
1356
+ │ └── YYYYMMDD-HHMMSS.json # Archived session records
1357
+ ├── goals.md # Persistent working memory (survives /clear)
1358
+ └── config.yaml # Live configuration
1359
+ ```
1360
+
1361
+ `current.json` tracks: session_id, start_time, notes_created (array), notes_modified (array), discoveries (array), last_activity timestamp.
1362
+
1363
+ **Session ID derivation:** Use `CLAUDE_CONVERSATION_ID` environment variable (available in Claude Code hook environment). Fallback to timestamp: `$(date +%Y%m%d-%H%M%S)`.
1364
+
1365
+ **Session restore on /clear:** When a user runs /clear, SessionStart fires for the new conversation. The hook detects existing session data (goals.md, ops/ state), re-reads everything, and provides continuity despite context reset.
1366
+
1367
+ ##### Full Hook Suite (generated for all systems)
1368
+
1369
+ For Claude Code, add to `.claude/settings.json` (using additive merge).
1370
+
1371
+ **Hook format:** Claude Code uses a nested matcher-group structure. Each event type contains an array of matcher groups, each with an optional `matcher` (regex string filtering when the hook fires) and a `hooks` array of handler objects. Events like `SessionStart` and `Stop` don't need matchers — omit the field. Tool events like `PostToolUse` use the tool name as matcher (e.g., `"Write"`, `"Edit|Write"`). Timeout is in seconds.
1372
+
1373
+ ```json
1374
+ {
1375
+ "hooks": {
1376
+ "SessionStart": [
1377
+ {
1378
+ "hooks": [
1379
+ {
1380
+ "type": "command",
1381
+ "command": "bash .claude/hooks/session-orient.sh"
1382
+ }
1383
+ ]
1384
+ }
1385
+ ],
1386
+ "PostToolUse": [
1387
+ {
1388
+ "matcher": "Write",
1389
+ "hooks": [
1390
+ {
1391
+ "type": "command",
1392
+ "command": "bash .claude/hooks/validate-note.sh"
1393
+ },
1394
+ {
1395
+ "type": "command",
1396
+ "command": "bash .claude/hooks/auto-commit.sh",
1397
+ "async": true
1398
+ }
1399
+ ]
1400
+ }
1401
+ ],
1402
+ "Stop": [
1403
+ {
1404
+ "hooks": [
1405
+ {
1406
+ "type": "command",
1407
+ "command": "bash .claude/hooks/session-capture.sh"
1408
+ }
1409
+ ]
1410
+ }
1411
+ ]
1412
+ }
1413
+ }
1414
+ ```
1415
+
1416
+ **Critical:** The old flat format (`"type": "command"` at the matcher level) is rejected by Claude Code. Each event must use the nested structure: `"EventName": [{ "matcher": "...", "hooks": [{ "type": "command", "command": "..." }] }]`.
1417
+
1418
+ Generate all four hook scripts: session-orient.sh, session-capture.sh, validate-note.sh, auto-commit.sh.
1419
+
1420
+ For OpenClaw: provide hook instructions in AGENTS.md rather than generating hook files.
1421
+
1422
+ ---
1423
+
1424
+ #### Step 11: Hub MOC
1425
+
1426
+ **Re-read `ops/derivation.md`** for vocabulary mapping and use case context.
1427
+
1428
+ Create the vault entry point at `[domain:notes]/index.md`:
1429
+
1430
+ ```markdown
1431
+ ---
1432
+ description: Entry point to the knowledge system -- start here to navigate
1433
+ type: moc
1434
+ ---
1435
+
1436
+ # index
1437
+
1438
+ Welcome to your [domain] system.
1439
+
1440
+ ## [domain:Topics]
1441
+ [Links to self/ MOCs and any domain-specific topic MOCs that are relevant]
1442
+ - [[identity]] -- who the agent is and how it approaches work
1443
+ - [[methodology]] -- how the agent processes and connects knowledge
1444
+ - [[goals]] -- current active threads
1445
+
1446
+ ## Getting Started
1447
+ 1. Read self/identity.md to understand your purpose
1448
+ 2. Capture your first [domain:note] in [domain:notes]/
1449
+ 3. Connect it to this hub
1450
+ ```
1451
+
1452
+ ---
1453
+
1454
+ #### Step 12: Semantic Search Setup (conditional)
1455
+
1456
+ **Only if semantic-search feature is active (linking includes implicit).**
1457
+
1458
+ 1. Check if `qmd` is installed: `which qmd`
1459
+ 2. If installed:
1460
+ - Run `qmd init` in the generated vault root
1461
+ - Configure collections matching generated folder structure
1462
+ - Generate `.mcp.json` with qmd server configuration
1463
+ - Run `qmd update && qmd embed` to build the initial index
1464
+ 3. If NOT installed:
1465
+ - Add a "Next Steps" section to the Phase 6 summary telling the user to install qmd
1466
+ - Include specific commands: `brew install qmd` (or platform equivalent), `qmd init`, collection configuration
1467
+ - The generated context file still documents semantic search patterns -- they activate once qmd is installed
1468
+
1469
+ ---
1470
+
1471
+ #### Step 13: Graph Query Scripts (derived from template schemas)
1472
+
1473
+ **Re-read `ops/derivation.md`** and the generated templates for schema fields.
1474
+
1475
+ After creating templates (Step 8), read the `_schema` blocks and generate domain-adapted analysis scripts in `ops/queries/` (or `scripts/queries/` for Claude Code).
1476
+
1477
+ **Generation algorithm:**
1478
+ 1. Read all `_schema.required` and `_schema.optional` fields from generated templates
1479
+ 2. Identify queryable dimensions (fields with enum values, date fields, array fields with wiki links)
1480
+ 3. For each meaningful 2-field combination, generate a ripgrep-based query script:
1481
+ - **Cross-reference queries** -- notes sharing one field value but differing on another
1482
+ - **Temporal queries** -- items older than N days in a given status
1483
+ - **Density queries** -- fields with few entries (gap detection)
1484
+ - **Backlink queries** -- what references a specific entity
1485
+ 4. Name each script descriptively
1486
+
1487
+ Generate 3-5 scripts appropriate for the domain. Examples:
1488
+
1489
+ | Domain | Generated Queries |
1490
+ |--------|-------------------|
1491
+ | Therapy | `trigger-mood-correlation.sh`, `recurring-triggers.sh`, `stale-patterns.sh` |
1492
+ | Research | `cross-methodology.sh`, `low-confidence-candidates.sh`, `source-diversity.sh` |
1493
+ | Relationships | `neglected-contacts.sh`, `topic-overlap.sh` |
1494
+ | PM | `overdue-items.sh`, `owner-workload.sh`, `priority-distribution.sh` |
1495
+
1496
+ Include a discovery section in the context file documenting what queries exist, when to run them, and what insights they surface.
1497
+
1498
+ ---
1499
+
1500
+ #### Step 14: ops/reminders.md
1501
+
1502
+ **Always generated.** Create an empty reminders file with format header:
1503
+
1504
+ ```markdown
1505
+ # Reminders
1506
+
1507
+ <!-- Checked at session start. Due items surface in orientation. -->
1508
+ <!-- Format: - [ ] YYYY-MM-DD: Description -->
1509
+ <!-- Completed: - [x] YYYY-MM-DD: Description (done YYYY-MM-DD) -->
1510
+ ```
1511
+
1512
+ ---
1513
+
1514
+ #### Step 15: Git Initialization
1515
+
1516
+ ```bash
1517
+ git init
1518
+ git add -A
1519
+ git commit -m "Initial vault generation by Ars Contexta"
1520
+ ```
1521
+
1522
+ If git is already initialized (existing repo), skip `git init` and just commit the generated files.
1523
+
1524
+ ---
1525
+
1526
+ ## PHASE 6: Validation and Summary
1527
+
1528
+ ### Kernel Validation
1529
+
1530
+ Run all 15 primitive checks against the generated system. Use `${CLAUDE_PLUGIN_ROOT}/reference/validate-kernel.sh` if available. Otherwise manually verify:
1531
+
1532
+ 1. **markdown-yaml** -- Every .md file has valid YAML frontmatter? (>95% threshold)
1533
+ 2. **wiki-links** -- All wiki links resolve to existing files? (>90% threshold)
1534
+ 3. **moc-hierarchy** -- At least 3 MOCs exist, every note appears in at least one MOC?
1535
+ 4. **tree-injection** -- Session start procedure loads file structure? (hook or context file instruction)
1536
+ 5. **description-field** -- Every note has a description field that differs from the title? (>95%)
1537
+ 6. **topics-footer** -- Topics field present on every non-MOC note? (>95%)
1538
+ 7. **schema-enforcement** -- Templates exist as single source of truth, validation mechanism present?
1539
+ 8. **semantic-search** -- Configured or documented for future activation?
1540
+ 9. **self-space** -- self/ exists with identity.md, methodology.md, goals.md?
1541
+ 10. **session-rhythm** -- Context file documents orient/work/persist cycle?
1542
+ 11. **discovery-first** -- Context file contains Discovery-First Design section, notes optimized for findability?
1543
+ 12. **operational-learning-loop** -- ops/observations/ and ops/tensions/ exist, review trigger documented in context file, /{DOMAIN:rethink} command exists?
1544
+ 13. **task-stack** -- ops/tasks.md exists? Queue file (ops/queue/queue.json) exists with schema_version >= 3 and maintenance_conditions section? Context file references both in session-orient phase? /{DOMAIN:next} command exists with condition reconciliation?
1545
+ 14. **methodology-folder** -- ops/methodology/ exists with methodology.md MOC? At least one derivation-rationale note exists? Context file references ops/methodology/ for meta-skill context?
1546
+ 15. **session-capture** -- ops/sessions/ directory exists? Session-end hook template installed? Condition-based mining trigger exists for unprocessed sessions?
1547
+
1548
+ Report results: pass/fail per primitive with specific failures listed.
1549
+
1550
+ ### Pipeline Smoke Test
1551
+
1552
+ After kernel validation, run a functional test:
1553
+
1554
+ 1. Create a test note in [domain:notes]/ with a sample title and description
1555
+ 2. Verify it has correct schema (description, topics)
1556
+ 3. Verify the hub MOC can reference it
1557
+ 4. Delete the test note and clean up
1558
+
1559
+ If the smoke test fails, report the failure with specific remediation steps. A vault that passes structural validation but fails functional testing is not ready.
1560
+
1561
+ ### Clean CLI Output
1562
+
1563
+ Present results using clean formatting per Section 10.5 design language. No runes, no sigils, no decorative Unicode, no ASCII art. Clean indented text with standard markdown formatting only.
1564
+
1565
+ ```
1566
+ ars contexta -- the art of context
1567
+
1568
+ Creating your [domain] structure...
1569
+ Writing your context file...
1570
+ Installing [domain:skills]...
1571
+ Setting up templates...
1572
+ Building your first [domain:topic map]...
1573
+ Initializing version control...
1574
+ Running validation...
1575
+
1576
+ Your memory is ready.
1577
+ ```
1578
+
1579
+ - **Progress markers:** Use indented text for generation milestones. These provide orientation during generation.
1580
+ - **Section dividers:** Use `---` (standard markdown) between major output sections.
1581
+
1582
+ ### Progressive Feature Reveal
1583
+
1584
+ Show available commands in the user's vocabulary. Resolve command names from `ops/derivation-manifest.md` vocabulary:
1585
+
1586
+ ```
1587
+ Here's what you can do:
1588
+
1589
+ /arscontexta:[domain:reduce] -- extract insights from source material
1590
+ /arscontexta:[domain:reflect] -- find connections between your [domain:notes]
1591
+ /arscontexta:health -- check your knowledge system
1592
+ /arscontexta:help -- see everything available
1593
+ /arscontexta:next -- get intelligent next-action recommendations
1594
+ /arscontexta:learn -- research a topic and grow your graph
1595
+ ```
1596
+
1597
+ Note: Plugin commands use the format `/arscontexta:command-name`. List all commands explicitly since they may not appear in tab completion. If skills were generated, note they require a Claude Code restart.
1598
+
1599
+ ### First-Success Moment
1600
+
1601
+ Guide the user to capture their first note. This is where the system stops being abstract and becomes real.
1602
+
1603
+ **If a preset was selected:** Check `${CLAUDE_PLUGIN_ROOT}/presets/[preset]/starter/` for domain-specific starter notes. Use the most relevant starter as a seed:
1604
+
1605
+ 1. Present a starter note appropriate to the domain (e.g., a research claim, a personal reflection, a project decision)
1606
+ 2. Ask the user: "Here's a starter [domain:note] to get you going. Want to customize it, or shall I save it as-is?"
1607
+ 3. Create the note in [domain:notes]/ with proper schema
1608
+ 4. Add it to the hub MOC
1609
+ 5. Show: the note, the MOC it landed in, the schema fields filled
1610
+
1611
+ **If no preset:** Guide open-ended: "Try capturing something: just tell me an idea." Then create the note and show the same result.
1612
+
1613
+ **Why this matters:** The first-success moment proves the system works. The user sees their content structured, connected, and navigable. This converts abstract architecture into tangible value.
1614
+
1615
+ ### Summary
1616
+
1617
+ Present in the user's vocabulary with clean formatting:
1618
+
1619
+ ```
1620
+ ars contexta
1621
+
1622
+ Your [domain] system is ready.
1623
+
1624
+ Configuration:
1625
+ Platform: [Claude Code / OpenClaw / Minimal]
1626
+ Automation: Full — all capabilities from day one
1627
+ [Key dimension highlights relevant to the user]
1628
+
1629
+ Created:
1630
+ [list of folders with domain names]
1631
+ [context file name]
1632
+ [templates created]
1633
+ 16 skills generated (vocabulary-transformed)
1634
+ 10 plugin commands available via /arscontexta:*
1635
+ [hooks configured]
1636
+ ops/derivation.md -- the complete record of how this system was derived
1637
+ ops/derivation-manifest.md -- machine-readable config for runtime skills
1638
+ ops/methodology/ -- vault self-knowledge (query with /ask or browse directly)
1639
+ ops/config.yaml -- edit this to adjust dimensions without re-running init
1640
+
1641
+ Kernel Validation: [PASS count] / 15 passed
1642
+ [Any warnings to address]
1643
+
1644
+ IMPORTANT: Restart Claude Code now to activate skills and hooks.
1645
+ Skills and hooks take effect after restart — they are not available in the current session.
1646
+
1647
+ Next steps:
1648
+ 1. Quit and restart Claude Code (required — skills won't work until you do)
1649
+ 2. Read your [CLAUDE.md / AGENTS.md] -- it's your complete methodology
1650
+ 3. Try /arscontexta:help to see all available commands
1651
+ 4. [If qmd not installed: "Install qmd for semantic search: brew install qmd"]
1652
+ 5. [If personality not enabled: "Run /arscontexta:architect later to tune the agent's voice"]
1653
+ 6. Try /arscontexta:tutorial for a guided walkthrough
1654
+
1655
+ ```
1656
+
1657
+ ### Conditional Next Steps
1658
+
1659
+ Include these based on system state:
1660
+ - If qmd not installed and semantic-search is active: installation instructions
1661
+ - If personality not enabled: mention `/arscontexta:architect` for future voice tuning once the vault has 50+ notes
1662
+ - If any kernel checks failed: specific remediation instructions
1663
+
1664
+ ---
1665
+
1666
+ ## Quality Standards (Non-Negotiable)
1667
+
1668
+ These apply to every generation run. Do not shortcut any of them.
1669
+
1670
+ 1. **Generated files feel cohesive, not assembled from blocks.** Block boundaries must be invisible in the output. The context file reads as if written from scratch for this specific domain.
1671
+
1672
+ 2. **Language matches the user's domain.** A therapy user never sees "claim" or "reduce." A PM user never sees "reflection" or "surface." The vocabulary test applies to every generated file.
1673
+
1674
+ 3. **self/identity.md feels genuine, not templated.** It reads like self-knowledge, not a character sheet.
1675
+
1676
+ 4. **Every generated file is immediately useful.** No placeholder content. No "TODO: fill this in." Every file serves a purpose from day one.
1677
+
1678
+ 5. **Dimension settings are justified.** The derivation rationale connects every choice to either a user signal or a research-backed default.
1679
+
1680
+ 6. **Kernel validation PASSES.** Zero failures on every generated system. If validation fails, fix the generation before presenting results.
1681
+
1682
+ 7. **Vocabulary consistency across ALL files.** The same universal term must ALWAYS map to the same domain term across all generated files. Run a mental consistency check: if you said "reflection" in the context file, you must say "reflection" in templates, skills, and self/ files.
1683
+
1684
+ 8. **Three-space boundaries are clean.** Agent self-knowledge in self/. Domain knowledge in notes/. Operational scaffolding in ops/. No conflation.
1685
+
1686
+ 9. **Discovery-first is enforced.** Every note, every MOC, every template is optimized for future agent discovery. Description quality, MOC membership, title composability.
1687
+
1688
+ 10. **Personality never contradicts methodology.** A playful agent still enforces quality gates. A warm agent still requires composability checks. Personality affects HOW methodology is communicated, never WHETHER it is enforced.