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,254 @@
1
+ ---
2
+ name: learn
3
+ description: Research a topic and grow your knowledge graph. Uses Exa deep researcher, web search, or basic search to investigate topics, files results with full provenance, and chains to processing pipeline. Triggers on "/learn", "/learn [topic]", "research this", "find out about".
4
+ user-invocable: true
5
+ allowed-tools: Read, Write, Edit, Grep, Glob, Bash, mcp__exa__web_search_exa, mcp__exa__deep_researcher_start, mcp__exa__deep_researcher_check, WebSearch
6
+ context: fork
7
+ model: opus
8
+ ---
9
+
10
+ ## EXECUTE NOW
11
+
12
+ **Topic: $ARGUMENTS**
13
+
14
+ Parse immediately:
15
+ - If topic provided: research that topic
16
+ - If topic empty: read `self/goals.md` for highest-priority unexplored direction and propose it
17
+ - If topic includes `--deep`/`--light`/`--moderate`: force that depth, strip flag from topic
18
+ - If no topic and no goals.md: ask "What would you like to research?"
19
+
20
+ **Steps:**
21
+
22
+ 1. **Read config** — tool preferences, depth, domain vocabulary
23
+ 2. **Determine depth** — from flags, config default, or fallback to moderate
24
+ 3. **Research** — tool cascade: primary → fallback → last resort
25
+ 4. **File to inbox** — with full provenance metadata
26
+ 5. **Chain to processing** — next step based on pipeline chaining mode
27
+ 6. **Update goals.md** — append new research directions discovered
28
+
29
+ **START NOW.** Reference below explains methodology.
30
+
31
+ ---
32
+
33
+ ## Step 1: Read Configuration
34
+
35
+ ```
36
+ ops/config.yaml — research tools, depth, pipeline chaining
37
+ ops/derivation-manifest.md — domain vocabulary (inbox folder, reduce skill name)
38
+ ```
39
+
40
+ **From config.yaml** (defaults if missing):
41
+ ```yaml
42
+ research:
43
+ primary: exa-deep-research # exa-deep-research | exa-web-search | web-search
44
+ fallback: exa-web-search
45
+ last_resort: web-search
46
+ default_depth: moderate # light | moderate | deep
47
+ pipeline:
48
+ chaining: suggested # manual | suggested | automatic
49
+ ```
50
+
51
+ **From derivation-manifest.md** (universal defaults if missing):
52
+ - Inbox folder: `inbox/` (could be `journal/`, `encounters/`, etc.)
53
+ - Reduce skill name: `/reduce` (could be `/surface`, `/break-down`, etc.)
54
+ - Domain name and hub MOC name
55
+
56
+ ---
57
+
58
+ ## Step 2: Determine Depth
59
+
60
+ Priority: explicit flag > config default > `moderate`
61
+
62
+ | Depth | Tool | Sources | Duration | Use When |
63
+ |-------|------|---------|----------|----------|
64
+ | light | WebSearch | 2-3 | ~5s | Checking a specific fact |
65
+ | moderate | mcp__exa__web_search_exa | 5-8 | ~10-30s | Exploring a subtopic |
66
+ | deep | mcp__exa__deep_researcher_start | Comprehensive | 15s-3min | Major research direction |
67
+
68
+ ---
69
+
70
+ ## Step 3: Research — Tool Cascade
71
+
72
+ Output header:
73
+ ```
74
+ Researching: [topic]
75
+
76
+ Depth: [depth]
77
+ Using: [tool name]
78
+ ```
79
+
80
+ Try tools in config priority order. If a tool fails (MCP unavailable, error, empty results), fall to next tier. If ALL tiers fail:
81
+ ```
82
+ FAIL: Research failed — no research tools available
83
+
84
+ Tried:
85
+ 1. [primary] — [error]
86
+ 2. [fallback] — [error]
87
+ 3. WebSearch — [error]
88
+
89
+ Try again later or manually add research to [inbox-folder]/
90
+ ```
91
+
92
+ ### Tool Invocation Patterns
93
+
94
+ **exa-deep-research:**
95
+ ```
96
+ mcp__exa__deep_researcher_start
97
+ instructions: "Research comprehensively: [topic]. Focus on practical findings, key patterns, recent developments, and actionable insights."
98
+ model: "exa-research-fast" (moderate) | "exa-research" (deep)
99
+ ```
100
+ Poll with `mcp__exa__deep_researcher_check` until `completed`. Output during wait:
101
+ ```
102
+ Research ID: [id]
103
+ Waiting for results...
104
+ ```
105
+
106
+ **exa-web-search:**
107
+ ```
108
+ mcp__exa__web_search_exa query: "[topic]" numResults: 8
109
+ ```
110
+
111
+ **web-search (last resort, also used for light depth):**
112
+ ```
113
+ WebSearch query: "[topic]"
114
+ ```
115
+
116
+ On completion: `Research complete — [source count] sources analyzed`
117
+
118
+ ---
119
+
120
+ ## Step 4: File Results to Inbox
121
+
122
+ **Filename:** `YYYY-MM-DD-[slugified-topic].md` — lowercase, spaces to hyphens, no special chars.
123
+
124
+ **Write to** the domain inbox folder (from derivation-manifest, default `inbox/`). Create folder if missing.
125
+
126
+ ### Provenance Frontmatter
127
+
128
+ Every field serves the provenance chain. The `exa_prompt` field is most critical — it captures the intellectual context that shaped the research.
129
+
130
+ ```yaml
131
+ ---
132
+ description: [1-2 sentence summary of key findings]
133
+ source_type: exa-deep-research | exa-web-search | web-search
134
+ exa_prompt: "[full query/instruction string sent to the research tool]"
135
+ exa_research_id: "[deep researcher ID, omit for web search]"
136
+ exa_model: "[exa-research-fast | exa-research, omit for web search]"
137
+ exa_tool: "[mcp tool name, omit for deep researcher]"
138
+ generated: [ISO 8601 timestamp — run: date -u +"%Y-%m-%dT%H:%M:%SZ"]
139
+ domain: "[domain name from derivation-manifest]"
140
+ topics: ["[[domain-hub-moc]]"]
141
+ ---
142
+ ```
143
+
144
+ Include only the fields relevant to the tool used:
145
+ - Deep researcher: `source_type`, `exa_prompt`, `exa_research_id`, `exa_model`, `generated`, `domain`, `topics`
146
+ - Exa web search: `source_type`, `exa_prompt`, `exa_tool`, `generated`, `domain`, `topics`
147
+ - WebSearch: `source_type`, `exa_prompt`, `exa_tool`, `generated`, `domain`, `topics`
148
+
149
+ ### Body Structure
150
+
151
+ Format for downstream reduce extraction — findings as clear propositions, not raw dumps:
152
+
153
+ ```markdown
154
+ # [Topic Title]
155
+
156
+ ## Key Findings
157
+
158
+ [Synthesized findings organized by theme, not by source. Each finding
159
+ should be a clear proposition the reduce phase can extract as an atomic insight.]
160
+
161
+ ## Sources
162
+
163
+ [List of sources with titles and URLs]
164
+
165
+ ## Research Directions
166
+
167
+ [New questions, unexplored angles, follow-up topics. These feed goals.md.]
168
+ ```
169
+
170
+ ---
171
+
172
+ ## Step 5: Chain to Processing
173
+
174
+ Read chaining mode from config (default: `suggested`).
175
+
176
+ ```
177
+ Research complete
178
+
179
+ Filed to: [inbox-folder]/[filename]
180
+
181
+ Next: /[reduce-skill-name] [inbox-folder]/[filename]
182
+ ```
183
+
184
+ Append based on mode:
185
+ - **manual:** (nothing extra)
186
+ - **suggested:** `Ready for processing when you are.`
187
+ - **automatic:** Replace "Next" line with `Queued for /[reduce-skill-name] -- processing will begin automatically.`
188
+
189
+ ---
190
+
191
+ ## Step 6: Update goals.md
192
+
193
+ If `self/goals.md` exists AND the research uncovered meaningful new directions:
194
+
195
+ 1. Read goals.md, match existing format
196
+ 2. Append under the appropriate section:
197
+ ```
198
+ - [New direction] (discovered via /learn: [original topic])
199
+ ```
200
+
201
+ Skip silently if goals.md missing or no meaningful directions found. Do not add filler.
202
+
203
+ ---
204
+
205
+ ## Output Summary
206
+
207
+ Clean output wrapping the full flow:
208
+ ```
209
+ ars contexta
210
+
211
+ Researching: [topic]
212
+
213
+ Depth: [depth]
214
+ Using: [tool name]
215
+ [Research ID: abc-123]
216
+
217
+ Research complete -- [N] sources analyzed
218
+
219
+ Filed to: [inbox-folder]/[filename]
220
+
221
+ Next: /[reduce-skill-name] [inbox-folder]/[filename]
222
+ [chaining context]
223
+
224
+ [goals.md updated with N new research directions]
225
+ ```
226
+
227
+ ---
228
+
229
+ ## Error Handling
230
+
231
+ | Error | Behavior |
232
+ |-------|----------|
233
+ | No topic, no goals.md | Ask: "What would you like to research?" |
234
+ | Exa MCP unavailable | Fall through cascade to WebSearch |
235
+ | All tools fail | Report failures with FAIL status, suggest manual inbox filing |
236
+ | Deep researcher timeout (>5 min) | Report timeout, suggest `--moderate` |
237
+ | Empty results | Report "No results found", suggest refining topic |
238
+ | Config files missing | Use defaults silently |
239
+ | Inbox folder missing | Create it before writing |
240
+
241
+ ---
242
+
243
+ ## Skill Selection Routing
244
+
245
+ After /learn, the self-building loop continues:
246
+
247
+ | Phase | Skill | Purpose |
248
+ |-------|-------|---------|
249
+ | Extract insights | /[reduce-name] | Mine research for atomic propositions |
250
+ | Find connections | /[reflect-name] | Link new insights to existing graph |
251
+ | Update old notes | /[reweave-name] | Backward pass on touched notes |
252
+ | Quality check | /[verify-name] | Description quality, schema, links |
253
+
254
+ /learn is the entry point. Each run feeds the graph, and the graph feeds the next direction through goals.md.
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "knowledge-learn",
3
+ "description": "Research a topic and grow your knowledge graph. Uses Exa deep researcher, web search, or basic search to investigate topics, files results with full provenance, and chains to processing pipeline.",
4
+ "version": "0.4.0",
5
+ "author": "arscontexta",
6
+ "tags": ["knowledge-management", "research", "learning"],
7
+ "entry": "SKILL.md",
8
+ "platform_hints": {
9
+ "claude-code": {
10
+ "context": "fork",
11
+ "model": "opus"
12
+ },
13
+ "openclaw": {
14
+ "type": "external"
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,407 @@
1
+ ---
2
+ name: next
3
+ description: Surface the most valuable next action by combining task stack, queue state, inbox pressure, health, and goals. Recommends one specific action with rationale. Triggers on "/next", "what should I do", "what's next".
4
+ version: "1.0"
5
+ generated_from: "arscontexta-v1.6"
6
+ user-invocable: true
7
+ context: fork
8
+ model: opus
9
+ allowed-tools: Read, Grep, Glob, Bash
10
+ ---
11
+
12
+ ## Runtime Configuration (Step 0 — before any processing)
13
+
14
+ Read these files to configure domain-specific behavior:
15
+
16
+ 1. **`ops/derivation-manifest.md`** — vocabulary mapping, domain context
17
+ - Use `vocabulary.notes` for the notes folder name
18
+ - Use `vocabulary.inbox` for the inbox folder name
19
+ - Use `vocabulary.note` for the note type name in output
20
+ - Use `vocabulary.topic_map` for MOC references
21
+ - Use `vocabulary.cmd_reduce` for process/extract command
22
+ - Use `vocabulary.cmd_reflect` for connection-finding command
23
+ - Use `vocabulary.cmd_reweave` for backward-pass command
24
+ - Use `vocabulary.rethink` for rethink command name
25
+
26
+ 2. **`ops/config.yaml`** — thresholds, processing preferences
27
+ - `self_evolution.observation_threshold` (default: 10)
28
+ - `self_evolution.tension_threshold` (default: 5)
29
+
30
+ If these files don't exist, use universal defaults and generic command names.
31
+
32
+ ## EXECUTE NOW
33
+
34
+ **INVARIANT: /next recommends, it does not execute.** Present one recommendation with rationale. The user decides what to do. This prevents cognitive outsourcing where the system makes all work decisions and the user becomes a rubber stamp.
35
+
36
+ **Execute these steps IN ORDER:**
37
+
38
+ ---
39
+
40
+ ### Step 1: Read Vocabulary
41
+
42
+ Read `ops/derivation-manifest.md` (or fall back to `ops/derivation.md`) for domain vocabulary mapping. All output must use domain-native terms. If neither file exists, use universal terms (notes, inbox, topic map, etc).
43
+
44
+ ---
45
+
46
+ ### Step 2: Reconcile Maintenance Queue
47
+
48
+ Before collecting state, evaluate all maintenance conditions and reconcile the queue. This ensures maintenance tasks are current before the recommendation engine runs.
49
+
50
+ **Read queue file** (`ops/queue/queue.json` or `ops/queue.yaml`). If `schema_version` < 3, migrate:
51
+ - Add `maintenance_conditions` section with default thresholds
52
+ - Add `priority` field to existing tasks (default: "pipeline")
53
+ - Set `schema_version: 3`
54
+
55
+ **For each condition in maintenance_conditions:**
56
+
57
+ 1. **Evaluate the condition:**
58
+
59
+ | Condition | Evaluation Method |
60
+ |-----------|------------------|
61
+ | orphan_notes | For each note in {vocabulary.notes}/, count incoming [[links]]. Zero = orphan. |
62
+ | dangling_links | Extract all [[links]], verify targets exist as files. Missing = dangling. |
63
+ | inbox_pressure | Count *.md in {vocabulary.inbox}/. |
64
+ | observation_accumulation | Count status: pending in ops/observations/. |
65
+ | tension_accumulation | Count status: pending or open in ops/tensions/. |
66
+ | pipeline_stalled | Queue tasks with status: pending unchanged across sessions. |
67
+ | unprocessed_sessions | Count files in ops/sessions/ without mined: true. |
68
+ | moc_oversize | For each topic map, count linked notes. |
69
+ | stale_notes | Notes not modified in 30+ days with < 2 links. |
70
+ | low_link_density | Average link count across all notes. |
71
+ | methodology_drift | Compare config.yaml modification time vs newest ops/methodology/ note modification time. If config is newer, methodology may be stale. |
72
+
73
+ 2. **If condition exceeds threshold AND no pending task with this condition_key exists:**
74
+
75
+ Create maintenance task:
76
+ ```bash
77
+ TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
78
+ MAINT_MAX=$(jq '[.tasks[] | select(.id | startswith("maint-")) | .id | ltrimstr("maint-") | tonumber] | max // 0' ops/queue/queue.json)
79
+ NEXT_MAINT=$((MAINT_MAX + 1))
80
+
81
+ jq --arg id "maint-$(printf '%03d' $NEXT_MAINT)" \
82
+ --arg priority "{priority}" \
83
+ --arg key "{condition_key}" \
84
+ --arg target "{description}" \
85
+ --arg action "{recommended command}" \
86
+ --arg ts "$TIMESTAMP" \
87
+ '.tasks += [{"id": $id, "type": "maintenance", "priority": $priority, "status": "pending", "condition_key": $key, "target": $target, "action": $action, "auto_generated": true, "created": $ts}]' \
88
+ ops/queue/queue.json > tmp.json && mv tmp.json ops/queue/queue.json
89
+ ```
90
+
91
+ 3. **If condition is satisfied AND a pending task with this condition_key exists:**
92
+
93
+ Auto-close it:
94
+ ```bash
95
+ TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
96
+ jq --arg key "{condition_key}" --arg ts "$TIMESTAMP" \
97
+ '(.tasks[] | select(.condition_key == $key and .status == "pending")).status = "done" |
98
+ (.tasks[] | select(.condition_key == $key and .status == "pending")).completed = $ts' \
99
+ ops/queue/queue.json > tmp.json && mv tmp.json ops/queue/queue.json
100
+ ```
101
+
102
+ 4. **If condition fires AND a pending task already exists:**
103
+
104
+ Update the target description (specifics may have changed):
105
+ ```bash
106
+ jq --arg key "{condition_key}" --arg target "{new description}" \
107
+ '(.tasks[] | select(.condition_key == $key and .status == "pending")).target = $target' \
108
+ ops/queue/queue.json > tmp.json && mv tmp.json ops/queue/queue.json
109
+ ```
110
+
111
+ ---
112
+
113
+ ### Step 3: Collect Vault State
114
+
115
+ Gather all signals. Run independent checks in parallel where possible. Record each signal even if the check returns zero — absence of signal is itself informative.
116
+
117
+ | Signal | How to Check | What to Record |
118
+ |--------|--------------|----------------|
119
+ | **Task stack** | Read `ops/tasks.md` — current priorities and open items | Top items, open count, any deadlines |
120
+ | **Queue state** | Read `ops/queue.yaml` or `ops/queue/queue.json` — pending pipeline tasks | Total pending, by phase (create, reflect, reweave, verify), blocked phases |
121
+ | **Inbox pressure** | Count `*.md` files in {vocabulary.inbox}/, find oldest by mtime | Count per subdirectory, age of oldest item in days |
122
+ | **Note count** | Count `*.md` in {vocabulary.notes}/ | Total notes for context |
123
+ | **Orphan notes** | For each note, grep for `[[filename]]` across all files — zero hits = orphan | Count, first 5 names |
124
+ | **Dangling links** | Extract all `[[links]]` from notes/, verify each target file exists | Count, first 5 targets |
125
+ | **Stale notes** | Notes not modified recently AND with low link density (< 2 links) | Count |
126
+ | **Goals** | Read `self/goals.md` or `ops/goals.md` — current priorities, active threads | Priority list, active research directions |
127
+ | **Observations** | Count files with `status: pending` in `ops/observations/` | Count |
128
+ | **Tensions** | Count files with `status: pending` or `status: open` in `ops/tensions/` | Count |
129
+ | **Methodology** | Check `ops/methodology/` for recent captures (files modified in last 7 days) | Count of recent, total count |
130
+ | **Health** | Read most recent report in `ops/health/` — note timestamp and issues | Last run date, issue count, any critical issues |
131
+ | **Sessions** | Check `ops/sessions/` for files without `mined: true` in frontmatter | Count of unmined sessions |
132
+ | **Recent /next** | Read `ops/next-log.md` (if exists) — last 3 recommendations | Previous suggestions to avoid repetition |
133
+
134
+ **Adaptation rules:**
135
+ - Directory names adapt to domain vocabulary (e.g., {vocabulary.inbox} instead of hardcoded "inbox")
136
+ - Skip checks silently for directories that do not exist — do not report "ops/sessions/ not found"
137
+ - A missing directory means that feature is not active, which is valid state
138
+
139
+ **Signal collection commands:**
140
+
141
+ ```bash
142
+ # Inbox pressure (adapt path to vocabulary)
143
+ INBOX_COUNT=$(find {vocabulary.inbox}/ -name "*.md" -maxdepth 2 2>/dev/null | wc -l | tr -d ' ')
144
+ OLDEST_INBOX=$(find {vocabulary.inbox}/ -name "*.md" -maxdepth 2 -exec stat -f "%m %N" {} \; 2>/dev/null | sort -n | head -1)
145
+
146
+ # Note count
147
+ NOTE_COUNT=$(ls -1 {vocabulary.notes}/*.md 2>/dev/null | wc -l | tr -d ' ')
148
+
149
+ # Pending observations
150
+ OBS_COUNT=$(grep -rl '^status: pending' ops/observations/ 2>/dev/null | wc -l | tr -d ' ')
151
+
152
+ # Pending tensions
153
+ TENSION_COUNT=$(grep -rl '^status: pending\|^status: open' ops/tensions/ 2>/dev/null | wc -l | tr -d ' ')
154
+
155
+ # Unmined sessions
156
+ SESSION_COUNT=$(grep -rL '^mined: true' ops/sessions/*.md 2>/dev/null | wc -l | tr -d ' ')
157
+ ```
158
+
159
+ ---
160
+
161
+ ### Step 4: Classify by Consequence Speed
162
+
163
+ Evaluate every signal against consequence speed — how fast does inaction degrade the system?
164
+
165
+ | Speed | Signals | Threshold | Why This Priority |
166
+ |-------|---------|-----------|-------------------|
167
+ | **Session** | Inbox > 5 items, orphan notes (any), dangling links (any), 10+ pending observations, 5+ pending tensions, unprocessed sessions > 3 | Immediate — these degrade work quality right now | Orphans are invisible to traversal. Dangling links confuse navigation. Inbox pressure means lost ideas. Observation/tension thresholds mean the system is accumulating unprocessed friction. |
168
+ | **Multi-session** | Pipeline queue backlog > 10, research gaps identified in goals, stale notes > 10, inbox items aging > 7 days, methodology captures > 5 in same category | Soon — these compound over days | Unfinished pipeline batches block downstream connections. Stale notes represent decaying knowledge. Aging inbox means capture is outpacing processing. |
169
+ | **Slow** | Health check not run in 14+ days, {DOMAIN:topic map} oversized (>40 notes), link density below 2.0 average, low note count relative to time | Background — annoying but not blocking | These are maintenance tasks. Important for long-term health but not urgent. |
170
+
171
+ **Threshold rule:** 10+ pending observations OR 5+ pending tensions is ALWAYS session-priority. Recommend {DOMAIN:rethink} in this case.
172
+
173
+ **Signal interaction rules:**
174
+ - Task stack items ALWAYS override automated recommendations (user-set priorities beat system-detected urgency)
175
+ - Multiple session-priority signals: pick the one with highest impact (most items affected)
176
+ - If inbox pressure AND queue backlog: recommend reducing inbox first (pipeline needs input before it can process)
177
+
178
+ ---
179
+
180
+ ### Step 5: Generate Recommendation
181
+
182
+ Select the SINGLE most valuable action. The recommendation must be specific enough to execute immediately — a concrete command invocation, not a vague suggestion.
183
+
184
+ **Priority cascade:**
185
+
186
+ #### 1. Task Stack First
187
+
188
+ If `ops/tasks.md` has open items, recommend from the task stack. User-set priorities override all automated recommendations because:
189
+ - The user has context the system does not
190
+ - Ignoring explicit priorities erodes trust
191
+ - Task stack items represent deliberate decisions, not automated detection
192
+
193
+ Format: Recommend the specific task with context about why it was in the stack.
194
+
195
+ #### 1.5. Session-Priority Maintenance Tasks
196
+
197
+ Read queue for maintenance tasks with `priority: "session"` and `status: "pending"`. These represent vault health conditions that degrade THIS session.
198
+
199
+ Pick the highest-impact one:
200
+ - orphan_notes: "{N} notes invisible to traversal"
201
+ - dangling_links: "{N} broken links confusing navigation"
202
+ - inbox_pressure: "{N} items aging in inbox"
203
+
204
+ Recommend the `action` field from the queue entry.
205
+
206
+ #### 2. Session-Priority Signals
207
+
208
+ If no task stack items, pick the highest-impact session-priority signal:
209
+
210
+ | Signal | Recommendation | Rationale Template |
211
+ |--------|---------------|-------------------|
212
+ | Dangling links / orphans | /health or specific fix command | "You have [N] orphan notes invisible to traversal. Connecting them increases graph density and retrieval quality." |
213
+ | 10+ observations or 5+ tensions | /{DOMAIN:rethink} | "[N] pending observations have accumulated. Pattern detection requires processing this backlog to evolve the system." |
214
+ | Inbox > 5 items | /{DOMAIN:reduce} [specific file] | "Your inbox has [N] items (oldest: [age]). [File X] has the highest connection potential based on [reason]." |
215
+ | Unprocessed sessions > 3 | /remember --mine-sessions | "[N] sessions have uncaptured friction patterns. Mining them prevents methodology regressions." |
216
+
217
+ **When recommending inbox processing:** Choose the specific inbox item that aligns best with current goals or has the most connection potential to existing notes. Recommend a concrete file, not "process some inbox."
218
+
219
+ #### 3. Multi-Session Signals
220
+
221
+ If no session-priority items:
222
+
223
+ | Signal | Recommendation | Rationale Template |
224
+ |--------|---------------|-------------------|
225
+ | Queue backlog > 10 | /ralph [N] | "[N] pipeline tasks are pending. Your newest {DOMAIN:notes} lack connections, which means they can't participate in synthesis." |
226
+ | Stale notes > 10 | /{DOMAIN:reweave} [specific note] | "[N] notes haven't been touched since [date]. [Note X] has the most connections and would benefit most from updating." |
227
+ | Research gaps | /{DOMAIN:reduce} [file aligned with goals] | "Your goals mention [topic] but your graph has few notes there. [Inbox item] addresses this gap." |
228
+ | Methodology convergence | /{DOMAIN:rethink} | "[N] methodology captures in the [category] area suggest a pattern worth elevating." |
229
+
230
+ **When recommending reweaving:** Choose the most-connected stale note (highest link density + oldest modification). Reweaving high-connectivity notes has the highest ripple effect.
231
+
232
+ #### 4. Slow Signals
233
+
234
+ If nothing pressing:
235
+
236
+ | Signal | Recommendation | Rationale Template |
237
+ |--------|---------------|-------------------|
238
+ | No recent health check | /health | "Last health check was [date]. Running one now catches structural issues before they compound." |
239
+ | Topic map oversized | Restructuring suggestion | "[Topic map X] has [N] notes. Splitting into sub-topic-maps improves navigation and reduces cognitive load." |
240
+ | Low link density | /{DOMAIN:reweave} on lowest-density note | "Your graph has an average link density of [N]. Reweaving sparse notes increases traversal paths." |
241
+
242
+ #### 5. Everything Clean
243
+
244
+ If all signals are healthy:
245
+
246
+ ```
247
+ next
248
+
249
+ All signals healthy.
250
+ Inbox: 0 | Queue: 0 pending | Orphans: 0 | Dangling: 0
251
+
252
+ No urgent work detected.
253
+
254
+ Suggested: Explore a new direction from goals.md
255
+ or reweave older {DOMAIN:notes} to deepen the graph.
256
+ ```
257
+
258
+ **Rationale is always mandatory.** Every recommendation must explain:
259
+ 1. WHY this action over alternatives
260
+ 2. What DEGRADES if this action is deferred
261
+ 3. How it connects to goals (if applicable)
262
+
263
+ ---
264
+
265
+ ### Step 6: Deduplicate
266
+
267
+ Read `ops/next-log.md` (if it exists). Check the last 3 entries.
268
+
269
+ **Deduplication rules:**
270
+ - If the same recommendation appeared in the last 2 entries, select the next-best action instead
271
+ - This prevents the system from getting stuck recommending the same thing repeatedly when the user has chosen not to act on it
272
+ - If the same recommendation is genuinely the highest priority (e.g., inbox pressure keeps growing), add an explicit note: "This was recommended previously. The signal has grown stronger since then ([before] → [now])."
273
+
274
+ ---
275
+
276
+ ### Step 7: Output
277
+
278
+ ```
279
+ next
280
+
281
+ State:
282
+ Inbox: [count] items (oldest: [age])
283
+ Queue: [count] pending ([phase breakdown])
284
+ Orphans: [count] | Dangling: [count]
285
+ Observations: [count] | Tensions: [count]
286
+ [any other decision-relevant signals]
287
+
288
+ Recommended: [specific command/action]
289
+
290
+ Rationale: [2-3 sentences — why this action,
291
+ how it connects to goals, what degrades if deferred]
292
+
293
+ After that: [second priority, if relevant]
294
+ [optional: alignment with goals.md priority]
295
+ ```
296
+
297
+ **Command specificity is mandatory.** Recommendations must be concrete invocations:
298
+
299
+ | Good | Bad |
300
+ |------|-----|
301
+ | `/{DOMAIN:reduce} inbox/article-on-spaced-repetition.md` | "process some inbox items" |
302
+ | `/ralph 5` | "work on the queue" |
303
+ | `/{DOMAIN:rethink}` | "review your observations" |
304
+ | `/{DOMAIN:reweave} [[note title here]]` | "update some old notes" |
305
+
306
+ **State display rules:**
307
+ - Show only 2-4 decision-relevant signals — not all 14 checks
308
+ - Zero-count signals that are healthy can be omitted (don't show "Orphans: 0" unless contrasting with a problem)
309
+ - Non-zero signals at session or multi-session priority should always be shown
310
+
311
+ ---
312
+
313
+ ### Step 8: Log the Recommendation
314
+
315
+ Append to `ops/next-log.md` (create if missing):
316
+
317
+ ```markdown
318
+ ## YYYY-MM-DD HH:MM
319
+
320
+ **State:** Inbox: [N] | Notes: [N] | Orphans: [N] | Dangling: [N] | Stale: [N] | Obs: [N] | Tensions: [N] | Queue: [N]
321
+ **Recommended:** [action]
322
+ **Rationale:** [one sentence]
323
+ **Priority:** session | multi-session | slow
324
+ ```
325
+
326
+ **Why log?** The log serves three purposes:
327
+ 1. Deduplication — prevents recommending the same action repeatedly
328
+ 2. Evolution tracking — shows what signals have been persistent vs transient
329
+ 3. /rethink evidence — persistent recommendations that go unacted-on may reveal misalignment between what the system detects and what the user values
330
+
331
+ ---
332
+
333
+ ## Edge Cases
334
+
335
+ ### Empty Vault (0-5 notes)
336
+
337
+ Recommend capturing or reducing content. Maintenance is premature with < 5 notes — the graph does not have enough nodes for meaningful analysis.
338
+
339
+ ```
340
+ next
341
+
342
+ State:
343
+ Notes: [N] — early stage vault
344
+
345
+ Recommended: Capture or /{DOMAIN:reduce} content
346
+ Rationale: Your graph has [N] notes. At this stage, adding
347
+ content matters more than maintaining structure. Health checks,
348
+ reweaving, and rethink become valuable after ~10 notes.
349
+ ```
350
+
351
+ ### Everything Clean
352
+
353
+ Say so explicitly. Recommend exploratory work aligned with goals, or reflective work on older notes:
354
+
355
+ ```
356
+ No urgent work detected. Consider:
357
+ - Exploring a research direction from goals.md
358
+ - Reweaving older {DOMAIN:notes} to deepen connections
359
+ - Reviewing and updating goals.md itself
360
+ ```
361
+
362
+ ### No Goals File
363
+
364
+ Recommend creating `self/goals.md` or `ops/goals.md` first. Without priorities, recommendations lack grounding and the system cannot distinguish between "important to the user" and "detected by automation."
365
+
366
+ ```
367
+ Recommended: Create ops/goals.md
368
+ Rationale: Without goals, /next can only recommend based on
369
+ automated detection. Goals let the system align recommendations
370
+ with what actually matters to you.
371
+ ```
372
+
373
+ ### No ops/derivation-manifest.md
374
+
375
+ Use universal vocabulary. Do not fail — /next should always produce a recommendation regardless of configuration state.
376
+
377
+ ### Queue Not Active
378
+
379
+ Skip queue checks silently. Not all vaults use the pipeline architecture — some rely on manual processing. Do not report "queue not found" as an issue.
380
+
381
+ ### Multiple Session-Priority Signals
382
+
383
+ When several signals are at session priority simultaneously, pick the one that unblocks the most downstream work:
384
+ - Dangling links block graph traversal → fix first
385
+ - Observation threshold → rethink prevents methodology drift
386
+ - Inbox pressure → processing prevents idea loss
387
+
388
+ If genuinely equal priority, pick the one the user has not been recommended recently (check next-log.md).
389
+
390
+ ### Stale /next Log
391
+
392
+ If `ops/next-log.md` has not been updated in 14+ days, the user may not be running /next regularly. Note this but do not make it a recommendation — /next is optional, not mandatory.
393
+
394
+ ---
395
+
396
+ ## Anti-Patterns
397
+
398
+ These are patterns that /next must avoid:
399
+
400
+ | Anti-Pattern | Why It Is Wrong | What to Do Instead |
401
+ |-------------|----------------|-------------------|
402
+ | Recommending everything | Overwhelms the user, defeats the purpose of "single most valuable action" | Pick ONE. Mention a second only as "after that" |
403
+ | Vague recommendations | "Process inbox" gives no actionable starting point | Name the specific file, note, or command |
404
+ | Ignoring task stack | User-set priorities exist for a reason | Always check ops/tasks.md first |
405
+ | Repeating the same rec | If the user did not act on it, recommending it again is nagging | Deduplicate via next-log.md |
406
+ | Recommending maintenance too early | A 5-note vault does not need health checks | Scale recommendations to vault maturity |
407
+ | Cognitive outsourcing | Making all decisions for the user | Recommend and explain — never execute |