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,1113 @@
1
+ ---
2
+ name: reduce
3
+ description: Extract structured knowledge from source material. Comprehensive extraction is the default — every insight that serves the domain gets extracted. For domain-relevant sources, skip rate must be below 10%. Zero extraction from a domain-relevant source is a BUG. Triggers on "/reduce", "/reduce [file]", "extract insights", "mine this", "process this".
4
+ version: "1.0"
5
+ generated_from: "arscontexta-v1.6"
6
+ user-invocable: true
7
+ allowed-tools: Read, Write, Grep, Glob, mcp__qmd__vsearch
8
+ context: fork
9
+ model: opus
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, extraction categories, platform hints
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.note_plural` for the plural form
21
+ - Use `vocabulary.reduce` for the process verb in output
22
+ - Use `vocabulary.cmd_reflect` for the next-phase command name
23
+ - Use `vocabulary.cmd_reweave` for the backward-pass command name
24
+ - Use `vocabulary.cmd_verify` for the verification command name
25
+ - Use `vocabulary.extraction_categories` for domain-specific extraction table
26
+ - Use `vocabulary.topic_map` for MOC/topic map references
27
+ - Use `vocabulary.topic_maps` for plural form
28
+
29
+ 2. **`ops/config.yaml`** — processing depth, pipeline chaining, selectivity
30
+ - `processing.depth`: deep | standard | quick
31
+ - `processing.chaining`: manual | suggested | automatic
32
+ - `processing.extraction.selectivity`: strict | moderate | permissive
33
+
34
+ 3. **`ops/queue/queue.json`** — current task queue (for handoff mode)
35
+
36
+ If these files don't exist (pre-init invocation or standalone use), use universal defaults:
37
+ - depth: standard
38
+ - chaining: suggested
39
+ - selectivity: moderate
40
+ - notes folder: `notes/`
41
+ - inbox folder: `inbox/`
42
+
43
+ ---
44
+
45
+ ## THE MISSION (READ THIS OR YOU WILL FAIL)
46
+
47
+ You are the extraction engine. Raw source material enters. Structured, atomic {vocabulary.note_plural} exit. Everything between is your judgment — and that judgment must err toward extraction, not rejection.
48
+
49
+ ### The Core Distinction
50
+
51
+ | Concept | What It Means | Example |
52
+ |---------|---------------|---------|
53
+ | **Having knowledge** | The vault contains information | "We store notes in folders" |
54
+ | **Articulated reasoning** | The vault explains WHY something works as a traversable {vocabulary.note} | "folder structure mirrors cognitive chunking because..." |
55
+
56
+ **Having knowledge is not the same as articulating it.** Even if information is embedded in the system, the vault may lack the externalized reasoning explaining WHY it works. That reasoning is what you extract.
57
+
58
+ ### The Comprehensive Extraction Principle
59
+
60
+ **For domain-relevant sources, COMPREHENSIVE EXTRACTION is the default.** This means:
61
+
62
+ 1. **Extract ALL core {vocabulary.note_plural}** — direct assertions about the domain that can stand alone as atomic propositions.
63
+
64
+ 2. **Extract ALL evidence and validations** — if source confirms an approach, that confirmation IS the {vocabulary.note}. Evidence is extractable even when the conclusion is already known, because the reasoning path matters.
65
+
66
+ 3. **Extract ALL patterns and methods** — techniques, workflows, practices. Named patterns are referenceable. Unnamed intuitions are not.
67
+
68
+ 4. **Extract ALL tensions** — contradictions, trade-offs, conflicts. These are wisdom, not problems.
69
+
70
+ 5. **Extract ALL enrichments** — if source adds detail to existing {vocabulary.note_plural}, create enrichment tasks. Near-duplicates almost always add value.
71
+
72
+ **"We already know this" means we NEED the articulation, not that we should skip it.**
73
+
74
+ ### The Extraction Question (ask for EVERY candidate)
75
+
76
+ **"Would a future session benefit from this reasoning being a retrievable {vocabulary.note}?"**
77
+
78
+ If YES -> extract to appropriate category
79
+ If NO -> verify it is truly off-topic before skipping
80
+
81
+ ### INVALID Skip Reasons (these are BUGS)
82
+
83
+ - "validates existing approach" — validations ARE the evidence. Extract them.
84
+ - "already captured in system config" — config is implementation, not articulation. The WHY needs a {vocabulary.note}.
85
+ - "we already do this" — DOING is not EXPLAINING. The explanation needs externalization.
86
+ - "obvious" — obvious to whom? Future sessions need explicit reasoning.
87
+ - "near-duplicate" — near-duplicates almost always add detail. Create enrichment task.
88
+ - "not a claim" — is it an implementation idea? tension? validation? Those ARE extractable.
89
+
90
+ ### VALID Skip Reasons (rare)
91
+
92
+ - Completely off-topic (unrelated to {vocabulary.domain})
93
+ - Too vague to act on (applies to everything, disagrees with nothing)
94
+ - Pure summary with zero extractable insight
95
+ - LITERALLY identical text already exists (not "same topic" — IDENTICAL)
96
+
97
+ **For domain-relevant sources: skip rate < 10%. Zero extraction = BUG.**
98
+
99
+ ---
100
+
101
+ ## EXECUTE NOW
102
+
103
+ **Target: $ARGUMENTS**
104
+
105
+ Parse immediately:
106
+ - If target contains a file path: extract insights from that file
107
+ - If target contains `--handoff`: output RALPH HANDOFF block + task entries at end
108
+ - If target is empty: scan {vocabulary.inbox}/ for unprocessed items, pick one
109
+ - If target is "inbox" or "all": process all inbox items sequentially
110
+
111
+ **Execute these steps:**
112
+
113
+ 1. Read the source file fully — understand what it contains
114
+ 2. **Source size check:** If source exceeds 2500 lines, STOP. Plan chunks of 350-1200 lines. Process each chunk with fresh context. See "Large Source Handling" section below.
115
+ 3. Hunt for insights that serve the domain (see extraction categories below)
116
+ 4. For each candidate:
117
+ - Use `mcp__qmd__vsearch` with query "[claim as sentence]", collection="{vocabulary.notes_collection}", limit=5 to check for duplicates
118
+ - If duplicate exists: evaluate for enrichment or skip
119
+ - Classify as OPEN (needs more investigation) or CLOSED (standalone, ready)
120
+ 5. Output extraction report with titles, classifications, extraction rationale
121
+ 6. Wait for user approval before creating files
122
+ 7. If `--handoff` in target: create per-claim task files, update queue, output RALPH HANDOFF block
123
+
124
+ **START NOW.** Reference below explains methodology — use to guide, not as output.
125
+
126
+ ### Observation Capture (during work, not at end)
127
+
128
+ When you encounter friction, surprises, methodology insights, process gaps, or contradictions — capture IMMEDIATELY:
129
+
130
+ | Observation | Action |
131
+ |-------------|--------|
132
+ | Any observation | Create atomic note in `ops/observations/` with prose-sentence title |
133
+ | Tension: content contradicts existing {vocabulary.note} | Create atomic note in `ops/tensions/` with prose-sentence title |
134
+
135
+ The handoff Learnings section summarizes what you ALREADY logged during processing.
136
+
137
+ ---
138
+
139
+ # Reduce
140
+
141
+ Extract composable {vocabulary.note_plural} from source material into {vocabulary.notes}/.
142
+
143
+ ## Philosophy
144
+
145
+ **Extract the REASONING behind what works, not just observations about what works.**
146
+
147
+ This is the extraction phase of the pipeline. You receive raw content and extract insights that serve the vault's domain. The mission is building **externalized, retrievable reasoning** — a graph of atomic propositions that can be traversed, connected, and built upon.
148
+
149
+ **THE CORE DISTINCTION:**
150
+
151
+ | Concept | Example | What to Extract |
152
+ |---------|---------|-----------------|
153
+ | **We DO this** | "We tag notes with topics" | — (not sufficient) |
154
+ | **We explain WHY** | "topic tagging enables cross-domain navigation because..." | This |
155
+
156
+ The vault is not just an implementation. It is **the articulated argument for WHY the implementation works.**
157
+
158
+ **THE EXTRACTION QUESTION:**
159
+
160
+ - BASIC thinking: "Is this a standalone composable claim?"
161
+ - BETTER thinking: "Does this serve {vocabulary.domain}?"
162
+ - BEST thinking: **"Would a future session benefit from this reasoning being a retrievable {vocabulary.note}?"**
163
+
164
+ If YES -> extract to appropriate category (even if "we already know this")
165
+ If NO -> skip (RARE for domain-relevant sources — verify it is truly off-topic)
166
+
167
+ **THE RULE:** Implementation without articulation is incomplete. If we DO something but lack a {vocabulary.note} explaining WHY it works, that articulation needs extraction.
168
+
169
+ ---
170
+
171
+ ## Extraction Categories
172
+
173
+ ### What To Extract
174
+
175
+ {DOMAIN:extraction_categories}
176
+
177
+ **The structural invariant:** Every domain's extraction has these universal categories regardless of domain:
178
+
179
+ | Category | What to Find | Output Type | Gate Required? |
180
+ |----------|--------------|-------------|----------------|
181
+ | Core domain {vocabulary.note_plural} | Direct assertions about {vocabulary.domain} | {vocabulary.note} | NO |
182
+ | Patterns | Recurring structures across sources | {vocabulary.note} | NO |
183
+ | Comparisons | How different approaches compare, X vs Y, trade-offs | {vocabulary.note} | NO |
184
+ | Tensions | Contradictions, conflicts, unresolved trade-offs | tension note | NO |
185
+ | Anti-patterns | What breaks, what to avoid, failure modes | problem note | NO |
186
+ | Enrichments | Content that adds detail to existing {vocabulary.note_plural} | enrichment task | NO |
187
+ | Open questions | Unresolved questions worth tracking | {vocabulary.note} (open) | NO |
188
+ | Implementation ideas | Techniques, workflows, features to build | methodology note | NO |
189
+ | Validations | Evidence confirming an approach works | {vocabulary.note} | NO |
190
+ | Off-topic general content | Insight unrelated to {vocabulary.domain} | apply selectivity gate | YES |
191
+
192
+ **IMPORTANT:** Categories 1-9 bypass the selectivity gate. They extract directly to the appropriate output type. The selectivity gate exists ONLY for filtering off-topic content from general sources.
193
+
194
+ ### Category Detection Signals
195
+
196
+ Hunt for these signals in every source:
197
+
198
+ **Core domain signals:**
199
+ - Direct assertions: "the key insight is...", "this means that...", "the pattern is..."
200
+ - Evidence: "research shows...", "data indicates...", "studies confirm..."
201
+ - Named methods: any named system, technique, or framework relevant to {vocabulary.domain}
202
+
203
+ **Comparison signals:**
204
+ - "X vs Y", "trade-off between...", "prefer X when...", "unlike Y, this..."
205
+ - "choose X when...", "depends on whether..."
206
+
207
+ **Tension signals:**
208
+ - "contrary to...", "however...", "the problem with...", "fails when..."
209
+ - "on the other hand...", "but this conflicts with..."
210
+
211
+ **Anti-pattern signals:**
212
+ - "systems fail when...", "the anti-pattern is...", "avoid this because..."
213
+ - Warnings, cautionary examples, failure postmortems
214
+
215
+ **Enrichment signals:**
216
+ - Content covering ground similar to an existing {vocabulary.note}
217
+ - New examples, evidence, or framing for an established claim
218
+ - Deeper explanation of something already captured shallowly
219
+
220
+ **Implementation signals:**
221
+ - "we could build...", "would enable...", "a tool that...", "pattern for..."
222
+ - Actionable techniques, concrete workflows
223
+
224
+ **Validation signals:**
225
+ - "this supports...", "evidence shows...", "validates...", "confirms..."
226
+ - Research that grounds existing practice in theory
227
+
228
+ ### The Mission Lens (REQUIRED)
229
+
230
+ For EVERY candidate, ask: **"Does this serve {vocabulary.domain}?"**
231
+
232
+ - YES -> **extract to appropriate category** (gate does NOT apply)
233
+ - NO -> apply selectivity gate (for off-topic filtering only)
234
+
235
+ **For domain-relevant sources:** almost everything is YES. The gate barely applies. Skip rate < 10%.
236
+
237
+ ---
238
+
239
+ ## The Selectivity Gate (for OFF-TOPIC content filtering)
240
+
241
+ **CRITICAL:** This gate exists to filter OUT content that does not serve {vocabulary.domain}. It applies ONLY to standard claims from GENERAL (off-topic) sources.
242
+
243
+ **Do NOT use gate to reject:**
244
+ - Implementation ideas ("not a claim" is WRONG — it is roadmap)
245
+ - Tensions ("not a claim" is WRONG — it is wisdom)
246
+ - Enrichments ("duplicate" is WRONG — it adds detail)
247
+ - Validations ("already known" is WRONG — it is evidence)
248
+ - Open questions ("not testable" is WRONG — it is direction)
249
+
250
+ For STANDARD claims from general sources, verify all four criteria pass:
251
+
252
+ ### 1. Standalone
253
+
254
+ The claim is understandable without source context. Someone reading this {vocabulary.note} cold can grasp what it argues without needing to know where it came from.
255
+
256
+ Fail: "the author's third point about methodology"
257
+ Pass: "explicit structure beats implicit convention"
258
+
259
+ ### 2. Composable
260
+
261
+ This {vocabulary.note} would be linked FROM elsewhere. {vocabulary.note_plural} function as APIs. If you cannot imagine writing `since [[this claim]]...` in another {vocabulary.note}, it is not composable.
262
+
263
+ Fail: a summary of someone's argument
264
+ Pass: a claim you could invoke while building your own argument
265
+
266
+ ### 3. Novel
267
+
268
+ Not already captured in the vault. Semantic duplicate check AND existing {vocabulary.note_plural} scan both clear.
269
+
270
+ Fail: semantically equivalent to an existing {vocabulary.note}
271
+ Pass: genuinely new angle not yet articulated
272
+
273
+ ### 4. Connected
274
+
275
+ Relates to existing thinking in the vault. Isolated insights that do not connect to anything are orphans. They rot.
276
+
277
+ Fail: interesting observation about unrelated domain
278
+ Pass: extends, contradicts, or deepens existing {vocabulary.note_plural}
279
+
280
+ **If ANY criterion fails: do not extract.**
281
+
282
+ ---
283
+
284
+ ## Workflow
285
+
286
+ ### 1. Orient
287
+
288
+ Before reading the source, understand what already exists:
289
+
290
+ ```bash
291
+ # Get descriptions from existing notes
292
+ for f in {vocabulary.notes}/*.md; do
293
+ [[ -f "$f" ]] && echo "=== $(basename "$f" .md) ===" && rg "^description:" "$f" -A 0
294
+ done
295
+ ```
296
+
297
+ Scan descriptions to understand current {vocabulary.note_plural}. This prevents duplicate extraction and helps identify connection points and enrichment opportunities.
298
+
299
+ ### 2. Read Source Fully
300
+
301
+ Read the ENTIRE source. Understand what it contains, what it argues, what domain it serves.
302
+
303
+ **Planning the extraction:**
304
+ - How many {vocabulary.note_plural} do you expect from this source?
305
+ - What categories will be represented?
306
+ - Is this domain-relevant (comprehensive extraction) or general (gate applies)?
307
+
308
+ **Explicit signal phrases to hunt:**
309
+ - "the key insight is..."
310
+ - "this means that..."
311
+ - "the pattern is..."
312
+ - "contrary to..."
313
+ - "the implication..."
314
+ - "what matters here is..."
315
+ - "the real issue is..."
316
+ - "this suggests..."
317
+
318
+ **Implicit signals (the best insights often hide in):**
319
+ - Problems that imply solutions
320
+ - Constraints that reveal what works
321
+ - Failures that suggest approaches
322
+ - Asides that contain principles
323
+ - Tangents that reveal mental models
324
+
325
+ **What you are hunting:**
326
+ - Assertions that could be argued for or against
327
+ - Patterns that apply beyond this specific source
328
+ - Insights that change how you think about something
329
+ - Claims that would be useful to invoke elsewhere
330
+
331
+ ### 3. Categorize FIRST, Then Route (MANDATORY)
332
+
333
+ **STOP. Before ANY filtering, determine the category of each candidate.**
334
+
335
+ This is the critical step that prevents over-rejection. Categorize FIRST, then route to the appropriate extraction path.
336
+
337
+ | Category | How to Identify | Route To |
338
+ |----------|-----------------|----------|
339
+ | Core domain {vocabulary.note} | Direct assertion about {vocabulary.domain} | -> {vocabulary.note} (SKIP selectivity gate) |
340
+ | Implementation idea | Describes a feature, tool, system, or workflow to build | -> methodology note (SKIP selectivity gate) |
341
+ | Tension/challenge | Describes a conflict, risk, or trade-off | -> tension note (SKIP selectivity gate) |
342
+ | Validation | Evidence confirming an approach works | -> {vocabulary.note} (SKIP selectivity gate) |
343
+ | Near-duplicate | Semantic search finds related vault {vocabulary.note} | -> evaluate for enrichment task |
344
+ | Off-topic claim | General insight not about {vocabulary.domain} | -> apply selectivity gate |
345
+
346
+ **CRITICAL:** Implementation ideas, tensions, validations, and domain {vocabulary.note_plural} do NOT need to pass the 4-criterion selectivity gate. The gate is for off-topic filtering ONLY.
347
+
348
+ **Why this matters:** The selectivity gate was designed for filtering general insights. But implementation ideas ("build a trails feature"), tensions ("optimization vs readability trade-off"), and validations ("research confirms our approach") are DIFFERENT output types that serve different purposes. Applying the selectivity gate to them is a category error.
349
+
350
+ ### 4. Semantic Search for Duplicates and Enrichment
351
+
352
+ For each candidate, run duplicate detection:
353
+
354
+ ```
355
+ mcp__qmd__vsearch query="[proposed claim as sentence]" collection="{vocabulary.notes_collection}" limit=5
356
+ ```
357
+
358
+ **Why `vsearch` (vector semantic) instead of keyword search:** Duplicate detection is where keyword search fails hardest. A claim about "friction in systems" will not find "resistance to change" via keyword matching even though they may be semantic duplicates. Vector search (~5s) catches same-concept-different-words duplicates that keyword search misses entirely. For a batch of 30-50 candidates, this adds ~3 minutes total — worth it to catch duplicates early rather than discovering them during {vocabulary.cmd_reflect}.
359
+
360
+ **Scores are signals, not decisions.** For ANY result with a relevant title or snippet:
361
+
362
+ 1. **READ the full {vocabulary.note}**
363
+ 2. Compare: is this the SAME claim in different words?
364
+ 3. Ask: **"What does source add that existing {vocabulary.note} lacks?"**
365
+
366
+ **The Enrichment Judgment (DEFAULT TO ENRICHMENT):**
367
+
368
+ | Situation | Action |
369
+ |-----------|--------|
370
+ | Exact text already exists | SKIP (truly identical — RARE) |
371
+ | Same claim, different words, source adds nothing | SKIP (verify by re-reading existing {vocabulary.note}) |
372
+ | Same claim, source has MORE detail/examples/framing | -> ENRICHMENT TASK (update existing {vocabulary.note}) |
373
+ | Same topic, DIFFERENT claim | -> EXTRACT as new {vocabulary.note}, flag for cross-linking |
374
+ | Related mechanism, different scope | -> EXTRACT as new {vocabulary.note}, flag for cross-linking |
375
+
376
+ **DEFAULT TO ENRICHMENT.** If source mentions the same topic, it almost certainly adds something. Truly identical content is RARE.
377
+
378
+ **MANDATORY protocol when semantic search finds overlap:**
379
+
380
+ 1. **READ the existing {vocabulary.note} fully** (not just title/description)
381
+ 2. Ask: "What does source ADD that existing {vocabulary.note} LACKS?"
382
+ - New examples -> ENRICHMENT
383
+ - Deeper framing -> ENRICHMENT
384
+ - Citations/evidence -> ENRICHMENT
385
+ - Different angle -> ENRICHMENT
386
+ - Concrete implementation -> ENRICHMENT
387
+ - Literally identical -> skip (RARE)
388
+ 3. If source adds ANYTHING: **CREATE ENRICHMENT TASK**
389
+ 4. Only skip if source adds literally NOTHING new (verify this claim)
390
+
391
+ **Near-duplicates are opportunities, not rejections.** Creating enrichment tasks is CORRECT behavior. If you are skipping near-duplicates without enrichment tasks, you are probably wrong.
392
+
393
+ ### 5. Classify Each Extraction
394
+
395
+ Every extracted candidate gets classified:
396
+
397
+ - **CLOSED** — standalone claim, design decision, ready for processing as-is
398
+ - **OPEN** — needs more investigation, testable hypothesis, requires evidence
399
+
400
+ Classification affects downstream handling but does NOT affect whether to extract. Both open and closed candidates get extracted.
401
+
402
+ ### 6. Present Findings
403
+
404
+ Report what you found by category. **Include counts:**
405
+
406
+ ```
407
+ Extraction scan complete.
408
+
409
+ SUMMARY:
410
+ - {vocabulary.note_plural}: N
411
+ - implementation ideas: N
412
+ - tensions: N
413
+ - enrichment tasks: N
414
+ - validations: N
415
+ - open questions: N
416
+ - skipped: N
417
+ - TOTAL OUTPUTS: N
418
+
419
+ ---
420
+
421
+ CLAIMS ({vocabulary.note_plural}):
422
+ 1. [claim as sentence] — connects to [[existing note]]
423
+ 2. [claim as sentence] — extends [[existing note]]
424
+ ...
425
+
426
+ IMPLEMENTATION IDEAS (methodology notes):
427
+ 1. [feature/pattern] — what it enables, why it matters
428
+ ...
429
+
430
+ TENSIONS (tension notes):
431
+ 1. [X vs Y] — the conflict, why it matters
432
+ ...
433
+
434
+ ENRICHMENT TASKS (update existing {vocabulary.note_plural}):
435
+ 1. [[existing note]] — source adds [what is missing]
436
+ ...
437
+
438
+ SKIPPED (truly nothing to add):
439
+ - [description] — why nothing extractable
440
+ ```
441
+
442
+ **Wait for user approval before creating files.** Never auto-extract.
443
+
444
+ ### 7. Extract (With User Approval)
445
+
446
+ For each approved {vocabulary.note}:
447
+
448
+ **a. Craft the title**
449
+
450
+ The title IS the claim. Express the concept in exactly the words that capture it.
451
+
452
+ Test: "this {vocabulary.note} argues that [title]"
453
+ - Must make grammatical sense
454
+ - Must be something you could agree or disagree with
455
+ - Composability over brevity — a full sentence is fine if the concept requires it
456
+ - Lowercase with spaces
457
+ - No punctuation that breaks filesystems: . * ? + [ ] ( ) { } | \ ^
458
+
459
+ Good: "explicit structure beats implicit convention for agent navigation"
460
+ Good: "small differences compound through repeated selection"
461
+ Bad: "context management strategies" (topic label, not a claim)
462
+
463
+ **b. Write the {vocabulary.note}**
464
+
465
+ ```markdown
466
+ ---
467
+ description: [~150 chars elaborating the claim, adds info beyond title]
468
+ type: [claim | methodology | problem | learning | tension]
469
+ created: YYYY-MM-DD
470
+ [domain-specific fields from derivation-manifest]
471
+ ---
472
+
473
+ # [prose-as-title proposition]
474
+
475
+ [Body: 150-400 words showing reasoning]
476
+
477
+ Use connective words: because, but, therefore, which means, however.
478
+ Acknowledge uncertainty where appropriate.
479
+ Consider the strongest counterargument.
480
+ Show the path to the conclusion, not just the conclusion.
481
+
482
+ ---
483
+
484
+ Source: [[source filename]]
485
+
486
+ Relevant Notes:
487
+ - [[related claim]] — [why it relates: extends, contradicts, builds on]
488
+
489
+ Topics:
490
+ - [[relevant {vocabulary.topic_map}]]
491
+ ```
492
+
493
+ **c. Verify before writing**
494
+
495
+ - Title passes the claim test ("this {vocabulary.note} argues that [title]")
496
+ - Description adds information beyond the title (not a restatement)
497
+ - Body shows reasoning, not just assertion
498
+ - At least one relevant {vocabulary.note} connection identified
499
+ - At least one {vocabulary.topic_map} link
500
+ - Source attribution present
501
+
502
+ **d. Create the file**
503
+
504
+ Write to: `{vocabulary.notes}/[title].md`
505
+
506
+ ---
507
+
508
+ ## Large Source Handling
509
+
510
+ **For sources exceeding 2500 lines: chunk processing is MANDATORY.**
511
+
512
+ Context degrades as it fills. A single-pass extraction of a 3000-line source will miss insights in the later sections because your attention has degraded by the time you reach them. Chunking ensures each section gets fresh attention.
513
+
514
+ ### Chunking Strategy
515
+
516
+ | Source Size | Chunk Count | Chunk Size | Rationale |
517
+ |-------------|------------|------------|-----------|
518
+ | 2500-4000 lines | 3-4 chunks | 700-1200 lines | Standard chunking |
519
+ | 4000-6000 lines | 4-5 chunks | 800-1200 lines | Balanced attention |
520
+ | 6000+ lines | 5+ chunks | 1000-1500 lines | Prevent context overflow |
521
+
522
+ **Chunk boundaries:** Split at natural section breaks (headings, topic transitions). Never split mid-paragraph or mid-argument. A chunk should be a coherent unit of content.
523
+
524
+ ### Processing Depth Adaptation
525
+
526
+ | Depth (from config) | Chunking Behavior |
527
+ |---------------------|-------------------|
528
+ | deep | Fresh context per chunk (spawn subagent per chunk if platform supports). Maximum quality. |
529
+ | standard | Process chunks sequentially in current session. Reset orientation between chunks. |
530
+ | quick | Larger chunks (1500-2000 lines). Fewer, faster passes. |
531
+
532
+ ### Cross-Chunk Coordination
533
+
534
+ When processing in chunks:
535
+ 1. Keep a running list of extracted {vocabulary.note_plural} across chunks
536
+ 2. Later chunks check against earlier chunks' extractions (not just existing vault {vocabulary.note_plural})
537
+ 3. Cross-chunk connections get flagged for {vocabulary.cmd_reflect}
538
+ 4. The final extraction report covers ALL chunks combined
539
+
540
+ **The anti-pattern:** Processing chunk 3 and extracting a duplicate of something already extracted in chunk 1 because you lost track. Maintain the running list.
541
+
542
+ ---
543
+
544
+ ## Enrichment Detection
545
+
546
+ When source content adds value to an EXISTING {vocabulary.note} rather than creating a new one, create an enrichment task instead.
547
+
548
+ ### When to Create Enrichment Tasks
549
+
550
+ | Signal | Action |
551
+ |--------|--------|
552
+ | Source has better examples for an existing {vocabulary.note} | Enrichment: add examples |
553
+ | Source has deeper framing or context | Enrichment: strengthen reasoning |
554
+ | Source has citations or evidence | Enrichment: add evidence base |
555
+ | Source has a different angle on the same claim | Enrichment: add perspective |
556
+ | Source has concrete implementation details | Enrichment: add actionable specifics |
557
+
558
+ ### Enrichment Task Format
559
+
560
+ Each enrichment task specifies:
561
+ - **Target:** Which existing {vocabulary.note} to enrich (by title)
562
+ - **What to add:** Specific content from the source
563
+ - **Why:** What the existing {vocabulary.note} lacks that this adds
564
+ - **Source lines:** Where in the source the enrichment content is found
565
+
566
+ **The enrichment default:** When in doubt between "new {vocabulary.note}" and "enrichment to existing {vocabulary.note}", lean toward enrichment. The existing {vocabulary.note} already has connections, {vocabulary.topic_map} placement, and integration. Adding to it compounds existing value.
567
+
568
+ ---
569
+
570
+ ## Quality Gates
571
+
572
+ ### Red Flags: Extraction Too Tight (THE COMMON FAILURE MODE)
573
+
574
+ **If you catch yourself doing ANY of these, STOP IMMEDIATELY and recalibrate:**
575
+
576
+ #### The Cardinal Sins (NEVER do these)
577
+
578
+ 1. **"validates existing approach" as skip reason**
579
+ - WRONG: "This just confirms what we do, skip"
580
+ - RIGHT: Validations ARE valuable. Extract as {vocabulary.note} with evidence framing.
581
+ - WHY: Future sessions need to see WHY an approach is validated, not just that it works.
582
+
583
+ 2. **"already captured in system config" as skip reason**
584
+ - WRONG: "We already have this in our config, skip"
585
+ - RIGHT: Extract "session handoff creates continuity without persistent memory"
586
+ - WHY: Config is implementation. {vocabulary.note_plural} explain WHY it works.
587
+
588
+ 3. **"we already do this" as skip reason**
589
+ - WRONG: "We use wiki links, this is obvious, skip"
590
+ - RIGHT: Extract the reasoning that explains WHY it works
591
+ - WHY: DOING is not EXPLAINING. The reasoning needs externalization.
592
+
593
+ 4. **"obvious" or "well known" as skip reason**
594
+ - WRONG: "Everyone knows structure helps, skip"
595
+ - RIGHT: Extract the specific, named, referenceable claim
596
+ - WHY: Named patterns are referenceable. Unnamed intuitions are not.
597
+
598
+ 5. **Treating near-duplicates as skips instead of enrichments**
599
+ - WRONG: "Similar to existing note, skip"
600
+ - RIGHT: Create enrichment task to add source's details to existing {vocabulary.note}
601
+ - WHY: Near-duplicates almost always add framing, examples, or evidence.
602
+
603
+ #### Other Red Flags
604
+
605
+ - Rejecting implementation ideas as "not claims" (they ARE extractable as methodology notes)
606
+ - Rejecting tensions as "not claims" (they become tension notes)
607
+ - Zero extraction from a domain-relevant source (the source IS about your domain)
608
+ - Rejecting open questions as "not testable" (directions guide future work)
609
+ - Applying the 4-criterion gate to non-standard-claim categories (gate is for off-topic filtering)
610
+ - Skip rate > 10% on domain-relevant sources (most domain content should extract to SOME category)
611
+
612
+ #### The Test
613
+
614
+ Before skipping ANYTHING, ask: **"Would a future session benefit from this being a retrievable {vocabulary.note}?"**
615
+
616
+ If YES -> extract (even if "we already know this")
617
+ If NO -> verify it is truly off-topic or literally identical to existing content
618
+
619
+ ### Red Flags: Extraction Too Loose
620
+
621
+ - Extracting vague observations with no actionable content
622
+ - Creating {vocabulary.note_plural} without articulating vault connection
623
+ - Titles that are topics, not claims ("knowledge management" instead of "knowledge management fails without active maintenance")
624
+ - Body text that is pure summary without reasoning
625
+
626
+ ### Calibration Check (REQUIRED Before Finishing)
627
+
628
+ **STOP before outputting results.** Count your outputs by category:
629
+
630
+ ```
631
+ {vocabulary.note_plural} extracted: ?
632
+ implementation ideas: ?
633
+ tensions: ?
634
+ enrichment tasks: ?
635
+ validations: ?
636
+ open questions: ?
637
+ truly skipped: ?
638
+ TOTAL: ?
639
+ ```
640
+
641
+ **Expected yields by source size:**
642
+
643
+ | Source Size | Expected Outputs | Skip Rate |
644
+ |-------------|------------------|-----------|
645
+ | ~100 lines | 5-10 outputs | varies by relevance |
646
+ | ~350 lines | 15-30 outputs | < 10% for domain-relevant |
647
+ | ~500+ lines | 25-50+ outputs | < 10% for domain-relevant |
648
+ | ~1000+ lines | 40-70 outputs | < 5% for domain-relevant |
649
+
650
+ **Zero extraction from a domain-relevant source is a BUG.**
651
+
652
+ **If your total outputs are significantly below these ranges, you are over-filtering.**
653
+
654
+ ### Selectivity Adaptation
655
+
656
+ Processing selectivity adapts based on `ops/config.yaml`:
657
+
658
+ | Selectivity (config) | Gate Behavior | Skip Rate Target |
659
+ |----------------------|---------------|-----------------|
660
+ | strict | 4-criterion gate applies to ALL claims including domain-relevant | Higher skip rate acceptable |
661
+ | moderate (default) | Gate applies only to off-topic content. Domain-relevant bypasses gate | < 10% for domain sources |
662
+ | permissive | Gate barely applies. Extract nearly everything, heavy enrichment | < 5% overall |
663
+
664
+ **Strict mode** is for mature vaults where noise reduction matters more than coverage.
665
+ **Permissive mode** is for new vaults building initial density.
666
+ **Moderate** is the default — comprehensive extraction for domain content, selective for off-topic.
667
+
668
+ ### Mandatory Review If Low Yield
669
+
670
+ Go back through candidates you marked as "duplicate" or "rejected":
671
+
672
+ 1. **Did any "duplicates" have source content that enriches existing {vocabulary.note_plural}?**
673
+ - YES -> convert to enrichment task (DEFAULT TO ENRICHMENT)
674
+ - NO -> verify by re-reading existing {vocabulary.note} FULLY
675
+
676
+ 2. **Did any "rejected" items describe features to build?**
677
+ - YES -> extract as implementation idea
678
+ - NO -> verify it is truly unactionable
679
+
680
+ 3. **Did any "rejected" items describe conflicts or challenges?**
681
+ - YES -> extract as tension note
682
+ - NO -> verify it is truly vague
683
+
684
+ 4. **Did any "rejected" items provide evidence for existing approaches?**
685
+ - YES -> extract as validation claim
686
+ - NO -> verify it does not support existing methodology
687
+
688
+ 5. **Did any "rejected" items suggest questions worth investigating?**
689
+ - YES -> extract as open question {vocabulary.note}
690
+ - NO -> verify it is not worth tracking
691
+
692
+ **Do not proceed with handoff until low yield is investigated.**
693
+
694
+ ---
695
+
696
+ ## Note Design Reference
697
+
698
+ ### Titles
699
+
700
+ Titles are claims that work as prose when linked:
701
+
702
+ ```
703
+ since [[explicit structure beats implicit convention]], the question becomes...
704
+ the insight is that [[small differences compound through repeated selection]]
705
+ because [[capture speed beats filing precision]], we separate the two...
706
+ ```
707
+
708
+ The claim test: "this {vocabulary.note} argues that [title]"
709
+
710
+ | Example | Passes? |
711
+ |---------|---------|
712
+ | quality requires active judgment | yes: "argues that quality requires active judgment" |
713
+ | knowledge management | no: "argues that knowledge management" (incomplete) |
714
+ | small differences compound through selection | yes: "argues that small differences compound through selection" |
715
+ | tools for thought | no: "argues that tools for thought" (incomplete) |
716
+
717
+ ### Description
718
+
719
+ One field. ~150 characters. Must add NEW information beyond the title — scope, mechanism, or implication.
720
+
721
+ Bad (restates title): "quality is important in knowledge work"
722
+ Good (adds mechanism + implication): "when creation becomes trivial, maintaining signal-to-noise becomes the primary challenge — selection IS the work"
723
+
724
+ The description is progressive disclosure: title says WHAT the claim is, description says WHY it matters or HOW it works. If the description just rephrases the title, it wastes context and provides no filter value.
725
+
726
+ ### Body
727
+
728
+ Show reasoning. Use connective words. Acknowledge uncertainty.
729
+
730
+ Bad:
731
+ > Quality matters. When creation is easy, curation becomes the work.
732
+
733
+ Good:
734
+ > The easy part is capture. We bookmark things, save screenshots, clip articles we never open again. The hard part is doing something with it all. Automation makes this worse because generation is now trivial — anyone can produce endless content. So the constraint shifts from production to selection. Since [[structure without processing provides no value]], the question becomes: who does the selecting?
735
+
736
+ Characteristics:
737
+ - Conversational flow (because, but, therefore)
738
+ - Shows path to conclusion
739
+ - Acknowledges where thinking might be wrong
740
+ - Considers strongest objection
741
+ - Invokes other {vocabulary.note_plural} as prose
742
+
743
+ ### Section Headings
744
+
745
+ Headings serve navigation, not decoration. Use when agents would benefit from grepping the outline.
746
+
747
+ **Always use headings for:**
748
+ - Tension notes (sections: Quick Test, When Each Pole Wins, Dissolution Attempts, Practical Applications)
749
+ - {vocabulary.topic_map} notes (sections: Synthesis, Core Ideas, Tensions, Explorations Needed, Agent Notes)
750
+ - Implementation patterns with discrete steps
751
+ - Notes exploring multiple facets of a concept (>1000 words AND distinct sub-topics)
752
+
753
+ **Use prose without headings for:**
754
+ - Single flowing arguments under ~1000 words
755
+ - Notes where transitions like "since [[X]]..." already carry structure
756
+
757
+ ### Footer
758
+
759
+ ```markdown
760
+ ---
761
+
762
+ Source: [[source filename]]
763
+
764
+ Relevant Notes:
765
+ - [[related claim]] — extends this by adding the temporal dimension
766
+
767
+ Topics:
768
+ - [[relevant {vocabulary.topic_map}]]
769
+ ```
770
+
771
+ The relationship context explains WHY to follow the link:
772
+ - Bad: "-- related"
773
+ - Good: "-- contradicts by arguing for explicit structure"
774
+ - Good: "-- provides the foundation this challenges"
775
+
776
+ ---
777
+
778
+ ## The Composability Test
779
+
780
+ Before finalizing ANY {vocabulary.note}, verify:
781
+
782
+ **1. Standalone Sense**
783
+ If you link to this {vocabulary.note} from another context, will it make sense without reading three other {vocabulary.note_plural} first?
784
+
785
+ **2. Specificity**
786
+ Could someone disagree with this claim? Vague {vocabulary.note_plural} cannot be built on.
787
+
788
+ **3. Clean Linking**
789
+ Would linking to this {vocabulary.note} drag unrelated content along? If yes, the {vocabulary.note} covers too much.
790
+
791
+ **When to skip:** content does not pass all four selectivity criteria (off-topic content only)
792
+ **When to split:** multiple distinct claims in one extraction
793
+ **When to sharpen:** claim too vague, title is label not statement
794
+
795
+ ---
796
+
797
+ ## Research Provenance
798
+
799
+ When the source file contains provenance metadata (source_type, research_prompt, research_server, generated), preserve the chain:
800
+
801
+ - Each created {vocabulary.note}'s Source footer links to the source file
802
+ - The source file's YAML contains the research prompt
803
+ - The chain: research query -> inbox file -> /{vocabulary.reduce} -> {vocabulary.notes}
804
+
805
+ If source has `source_type` in frontmatter, this is research-generated content — handle with extra care for attribution.
806
+
807
+ **Provenance fields to preserve:**
808
+
809
+ | Field | Purpose |
810
+ |-------|---------|
811
+ | source_type | How this content was generated |
812
+ | research_prompt | The query or directive that produced this content |
813
+ | research_server | Which research tool was used |
814
+ | generated | When the research was produced |
815
+
816
+ The research_prompt is the most critical field — it captures the intellectual context that shaped what was returned. Knowing "I searched for X because I was exploring Y" is part of the knowledge graph.
817
+
818
+ ---
819
+
820
+ ## Example: What Good Extraction Looks Like
821
+
822
+ ### Example 1: 300-line domain-relevant source
823
+
824
+ **Source:** 300-line research document directly relevant to {vocabulary.domain}
825
+
826
+ **Scan found:** ~45 items across sections
827
+
828
+ **Extraction results:**
829
+ - 12 core {vocabulary.note_plural}
830
+ - 6 implementation ideas -> methodology notes
831
+ - 4 tensions -> tension notes
832
+ - 5 enrichment tasks -> update existing {vocabulary.note_plural}
833
+ - 3 validations -> {vocabulary.note_plural}
834
+ - 3 skipped (too vague to act on)
835
+
836
+ **Total: 30 outputs, 3 skipped (~9% skip rate)**
837
+
838
+ ### Example 2: 100-line general article
839
+
840
+ **Source:** 100-line article with partial relevance to {vocabulary.domain}
841
+
842
+ **Extraction results:**
843
+ - 4 core {vocabulary.note_plural}
844
+ - 1 enrichment task
845
+ - 2 skipped (off-topic)
846
+ - 3 skipped (too vague)
847
+
848
+ **Total: 5 outputs, 5 skipped (50% skip rate — acceptable for general source)**
849
+
850
+ ### Contrast: WRONG Behavior
851
+
852
+ - 45 candidates -> 0 outputs (everything "rejected as duplicate or not a claim")
853
+ - Treating implementation ideas as "not claims" and skipping
854
+ - Treating tensions as "not claims" and skipping
855
+ - Treating near-duplicates as skips instead of enrichment tasks
856
+ - Skip rate > 10% on a domain-relevant source
857
+
858
+ ---
859
+
860
+ ## Critical
861
+
862
+ Never auto-extract. Always present findings and wait for user approval.
863
+
864
+ **When in doubt, extract.** For domain-relevant sources, err toward capturing. Implementation ideas, tensions, validations, open questions, and near-duplicates all have value — they become different output types, not rejections.
865
+
866
+ **The principle:** the goal is to capture everything relevant to {vocabulary.domain}. For domain-relevant sources, that is MOST of the content. The selectivity gate exists for OFF-TOPIC filtering, not for rejecting on-mission content that happens to have a different form.
867
+
868
+ **Remember:**
869
+ - Implementation ideas are NOT "not claims" — they are roadmap
870
+ - Tensions are NOT "not claims" — they are wisdom
871
+ - Enrichments are NOT "duplicates" — they add detail
872
+ - Validations are NOT "already known" — they are evidence
873
+ - Open questions are NOT "not testable" — they are guidance
874
+
875
+ **For domain-relevant sources: skip rate < 10%. Zero extraction = BUG.**
876
+
877
+ ---
878
+
879
+ ## Handoff Mode (--handoff flag)
880
+
881
+ When invoked with `--handoff`, this skill handles queue management for orchestrated execution. This includes creating per-claim task files and updating the task queue.
882
+
883
+ **Detection:** Check if `$ARGUMENTS` contains `--handoff`.
884
+
885
+ ### Per-Claim Task Files (REQUIRED in handoff mode)
886
+
887
+ After extraction, for EACH claim, create a task file in `ops/queue/`:
888
+
889
+ **Filename:** `{source}-NNN.md` where:
890
+ - {source} is the source basename (from the extract task)
891
+ - NNN is the claim number, starting from `next_claim_start` in the extract task file
892
+
893
+ **Example:** If `article-name.md` task has `next_claim_start: 010`, claims are:
894
+ - `article-name-010.md`, `article-name-011.md`, etc.
895
+
896
+ **Why unique names:** Claim filenames must be unique across the entire vault. Claim numbers are global and never reused across batches. The pattern `{source}-NNN.md` ensures every claim file is uniquely identifiable even after archiving.
897
+
898
+ **Structure:**
899
+
900
+ ```markdown
901
+ ---
902
+ claim: "[the claim as a sentence]"
903
+ classification: closed | open
904
+ source_task: [source-basename]
905
+ semantic_neighbor: "[related note title]" | null
906
+ ---
907
+
908
+ # Claim NNN: [claim title]
909
+
910
+ Source: [[source filename]] (lines NNN-NNN)
911
+
912
+ ## Reduce Notes
913
+
914
+ Extracted from [source_task]. This is a [CLOSED/OPEN] claim.
915
+
916
+ Rationale: [why this claim was extracted, what it contributes]
917
+
918
+ Semantic neighbor: [if found, explain why DISTINCT not DUPLICATE]
919
+
920
+ ---
921
+
922
+ ## Create
923
+ (to be filled by create phase)
924
+
925
+ ## {vocabulary.cmd_reflect}
926
+ (to be filled by {vocabulary.cmd_reflect} phase)
927
+
928
+ ## {vocabulary.cmd_reweave}
929
+ (to be filled by {vocabulary.cmd_reweave} phase)
930
+
931
+ ## {vocabulary.cmd_verify}
932
+ (to be filled by {vocabulary.cmd_verify} phase)
933
+ ```
934
+
935
+ ### Enrichment Task Files (REQUIRED in handoff mode)
936
+
937
+ For each ENRICHMENT detected, create a task file in `ops/queue/`:
938
+
939
+ **Filename:** `{source}-EEE.md` where:
940
+ - {source} is the source basename (same as claims)
941
+ - EEE is the enrichment number, continuing from where claims left off
942
+
943
+ **Example:** If claims are 010-015, enrichments start at 016.
944
+
945
+ **Why unique names:** Enrichments share the numbering system with claims. Both use the global `next_claim_start` counter. This ensures every task file is uniquely identifiable across the entire vault.
946
+
947
+ **Structure:**
948
+
949
+ ```markdown
950
+ ---
951
+ type: enrichment
952
+ target_note: "[[existing note title]]"
953
+ source_task: [source-basename]
954
+ addition: "what to add from source"
955
+ source_lines: "NNN-NNN"
956
+ ---
957
+
958
+ # Enrichment EEE: [[existing note title]]
959
+
960
+ Source: [[source filename]] (lines NNN-NNN)
961
+
962
+ ## Reduce Notes
963
+
964
+ Enrichment for [[existing note title]]. Source adds [what it adds].
965
+
966
+ Rationale: [why this enriches rather than duplicates]
967
+
968
+ ---
969
+
970
+ ## Enrich
971
+ (to be filled by enrich phase)
972
+
973
+ ## {vocabulary.cmd_reflect}
974
+ (to be filled by {vocabulary.cmd_reflect} phase)
975
+
976
+ ## {vocabulary.cmd_reweave}
977
+ (to be filled by {vocabulary.cmd_reweave} phase)
978
+
979
+ ## {vocabulary.cmd_verify}
980
+ (to be filled by {vocabulary.cmd_verify} phase)
981
+ ```
982
+
983
+ ### Queue Updates (REQUIRED in handoff mode)
984
+
985
+ After creating task files, update `ops/queue/queue.json`:
986
+
987
+ 1. Mark the extract task as `"status": "done"` with completion timestamp
988
+ 2. For EACH claim, add ONE queue entry:
989
+
990
+ ```json
991
+ {
992
+ "id": "claim-NNN",
993
+ "type": "claim",
994
+ "status": "pending",
995
+ "target": "[claim title]",
996
+ "classification": "closed|open",
997
+ "batch": "[source-basename]",
998
+ "file": "[source-basename]-NNN.md",
999
+ "created": "[ISO timestamp]",
1000
+ "current_phase": "create",
1001
+ "completed_phases": []
1002
+ }
1003
+ ```
1004
+
1005
+ 3. For EACH enrichment, add ONE queue entry:
1006
+
1007
+ ```json
1008
+ {
1009
+ "id": "enrich-EEE",
1010
+ "type": "enrichment",
1011
+ "status": "pending",
1012
+ "target": "[existing note title]",
1013
+ "source_detail": "[what to add]",
1014
+ "batch": "[source-basename]",
1015
+ "file": "[source-basename]-EEE.md",
1016
+ "created": "[ISO timestamp]",
1017
+ "current_phase": "enrich",
1018
+ "completed_phases": []
1019
+ }
1020
+ ```
1021
+
1022
+ **Critical queue rules:**
1023
+ - ONE entry per claim (NOT one per phase) — phase progression is tracked via `current_phase` and `completed_phases`
1024
+ - `type` is `"claim"` or `"enrichment"` — these are the task's single queue entries
1025
+ - Every task MUST have `"file"` pointing to its uniquely-named task file
1026
+ - Every task MUST have `"batch"` identifying which source batch it belongs to
1027
+ - Task IDs use `claim-NNN` or `enrich-EEE` format with the global claim number
1028
+ - Claim numbers are global and never reused across batches
1029
+ - `current_phase` starts at `"create"` for claims, `"enrich"` for enrichments
1030
+ - The orchestrator advances phases through the configured phase_order sequence
1031
+
1032
+ ### Claim Numbering
1033
+
1034
+ - Start from `next_claim_start` value in the extract task file (set by /seed)
1035
+ - /seed calculated this by checking the queue and archive for the highest existing claim number
1036
+ - Example: if highest claim in vault is 009, next_claim_start will be 010
1037
+ - Claim numbers are GLOBAL and never reused across batches
1038
+ - Enrichments continue the same numbering sequence after claims
1039
+
1040
+ ### Handoff Output Format
1041
+
1042
+ After creating files and updating queue, output:
1043
+
1044
+ ```
1045
+ === RALPH HANDOFF: reduce ===
1046
+ Target: [source file]
1047
+
1048
+ Work Done:
1049
+ - Extracted N claims from [source]
1050
+ - Created claim files: {source}-NNN.md through {source}-NNN.md
1051
+ - Created M enrichment files: {source}-EEE.md through {source}-EEE.md (if any)
1052
+ - Duplicates skipped: [list or "none"]
1053
+ - Semantic neighbors flagged for cross-linking: [list or "none"]
1054
+
1055
+ Files Modified:
1056
+ - ops/queue/{source}-NNN.md (claim files)
1057
+ - ops/queue/{source}-EEE.md (enrichment files, if any)
1058
+ - ops/queue/queue.json (N claim tasks + M enrichment tasks, 1 entry each)
1059
+
1060
+ Learnings:
1061
+ - [Friction]: [description] | NONE
1062
+ - [Surprise]: [description] | NONE
1063
+ - [Methodology]: [description] | NONE
1064
+ - [Process gap]: [description] | NONE
1065
+
1066
+ Queue Updates:
1067
+ - Mark: {source} done
1068
+ - Create: claim-NNN entries (1 per claim, current_phase: "create")
1069
+ - Create: enrich-EEE entries (1 per enrichment, current_phase: "enrich", if any)
1070
+ === END HANDOFF ===
1071
+ ```
1072
+
1073
+ **Critical:** The handoff mode adds queue management ON TOP of the standard reduce workflow. Do the full extraction workflow first, then create task files, update queue, and output handoff.
1074
+
1075
+ ### Queue Update (Interactive Execution)
1076
+
1077
+ When running interactively (NOT via orchestrator), YOU must execute the queue updates. The orchestrator parses the handoff block and handles this automatically, but interactive sessions do not.
1078
+
1079
+ **After completing extraction, update the queue:**
1080
+
1081
+ ```bash
1082
+ # Get timestamp
1083
+ TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
1084
+
1085
+ # Mark extract task done (replace TASK_ID with actual task ID)
1086
+ jq '(.tasks[] | select(.id=="TASK_ID")).status = "done" | (.tasks[] | select(.id=="TASK_ID")).completed = "'"$TIMESTAMP"'"' ops/queue/queue.json > tmp.json && mv tmp.json ops/queue/queue.json
1087
+ ```
1088
+
1089
+ The handoff block's "Queue Updates" section is not just output — it is your own todo list when running interactively.
1090
+
1091
+ ---
1092
+
1093
+ ## Skill Selection Routing
1094
+
1095
+ When processing content, route to the correct skill:
1096
+
1097
+ | Task Type | Required Skill | Why |
1098
+ |-----------|---------------|-----|
1099
+ | New content to process | /{vocabulary.reduce} | Extraction requires quality gates |
1100
+ | {vocabulary.note} just created | /{vocabulary.cmd_reflect} | New {vocabulary.note_plural} need connections |
1101
+ | After connecting | /{vocabulary.cmd_reweave} | Old {vocabulary.note_plural} need updating |
1102
+ | Quality check | /{vocabulary.cmd_verify} | Combined verification gate |
1103
+ | System health | /health | Systematic diagnostics |
1104
+
1105
+ ## Pipeline Chaining
1106
+
1107
+ After extraction completes, output the next step based on `ops/config.yaml` pipeline chaining mode:
1108
+
1109
+ - **manual:** Output "Next: {vocabulary.cmd_reflect} [created notes]" — user decides when to proceed
1110
+ - **suggested:** Output next step AND add each created {vocabulary.note} to `ops/queue/queue.json` with `current_phase: "create"` and `completed_phases: []`
1111
+ - **automatic:** Queue entries created and processing continues immediately via orchestration
1112
+
1113
+ The chaining output uses domain-native command names from the derivation manifest.