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,747 @@
1
+ ---
2
+ name: reflect
3
+ description: Find connections between notes and update MOCs. Requires semantic judgment to identify genuine relationships. Use after /reduce creates notes, when exploring connections, or when a topic needs synthesis. Triggers on "/reflect", "/reflect [note]", "find connections", "update MOCs", "connect these notes".
4
+ user-invocable: true
5
+ allowed-tools: Read, Write, Edit, Grep, Glob, Bash, mcp__qmd__search, mcp__qmd__vsearch, mcp__qmd__query, mcp__qmd__status
6
+ context: fork
7
+ model: opus
8
+ ---
9
+
10
+ ## Runtime Configuration (Step 0 — before any processing)
11
+
12
+ Read these files to configure domain-specific behavior:
13
+
14
+ 1. **`ops/derivation-manifest.md`** — vocabulary mapping, platform hints
15
+ - Use `vocabulary.notes` for the notes folder name
16
+ - Use `vocabulary.note` / `vocabulary.note_plural` for note type references
17
+ - Use `vocabulary.reflect` for the process verb in output
18
+ - Use `vocabulary.topic_map` / `vocabulary.topic_map_plural` for MOC references
19
+ - Use `vocabulary.cmd_reweave` for the next-phase suggestion
20
+ - Use `vocabulary.inbox` for the inbox folder name
21
+
22
+ 2. **`ops/config.yaml`** — processing depth, pipeline chaining
23
+ - `processing.depth`: deep | standard | quick
24
+ - `processing.chaining`: manual | suggested | automatic
25
+
26
+ If these files don't exist, use universal defaults.
27
+
28
+ **Processing depth adaptation:**
29
+
30
+ | Depth | Connection Behavior |
31
+ |-------|-------------------|
32
+ | deep | Full dual discovery (MOC + semantic search). Evaluate every candidate. Multiple passes. Synthesis opportunity detection. Bidirectional link evaluation for all connections. |
33
+ | standard | Dual discovery with top 5-10 candidates. Standard evaluation. Bidirectional check for strong connections only. |
34
+ | quick | Single pass — either MOC or semantic search. Accept obvious connections only. Skip synthesis detection. |
35
+
36
+ ## EXECUTE NOW
37
+
38
+ **Target: $ARGUMENTS**
39
+
40
+ Parse immediately:
41
+ - If target contains `[[note name]]` or note name: find connections for that {vocabulary.note}
42
+ - If target contains `--handoff`: output RALPH HANDOFF block at end
43
+ - If target is empty: check for recently created {vocabulary.note_plural} or ask which {vocabulary.note}
44
+ - If target is "recent" or "new": find connections for all {vocabulary.note_plural} created today
45
+
46
+ **Execute these steps:**
47
+
48
+ 1. Read the target {vocabulary.note} fully — understand its claim and context
49
+ 2. **Throughout discovery:** Capture which {vocabulary.topic_map_plural} you read, which queries you ran (with scores), which candidates you evaluated. This becomes the Discovery Trace — proving methodology was followed, not reconstructed.
50
+ 3. Run Phase 0 (index freshness check)
51
+ 4. Use dual discovery in parallel:
52
+ - Browse relevant {vocabulary.topic_map}(s) for related {vocabulary.note_plural}
53
+ - Run semantic search for conceptually related {vocabulary.note_plural}
54
+ 5. Evaluate each candidate: does a genuine connection exist? Can you articulate WHY?
55
+ 6. Add inline wiki-links where connections pass the articulation test
56
+ 7. Update relevant {vocabulary.topic_map}(s) with this {vocabulary.note}
57
+ 8. If task file in context: update the {vocabulary.reflect} section
58
+ 9. Report what was connected and why
59
+ 10. If `--handoff` in target: output RALPH HANDOFF block
60
+
61
+ **START NOW.** Reference below explains methodology — use to guide, not as output.
62
+
63
+ ---
64
+
65
+ # Reflect
66
+
67
+ Find connections, weave the knowledge graph, update {vocabulary.topic_map_plural}. This is the forward-connection phase of the processing pipeline.
68
+
69
+ ## Philosophy
70
+
71
+ **The network IS the knowledge.**
72
+
73
+ Individual {vocabulary.note_plural} are less valuable than their relationships. A {vocabulary.note} with fifteen incoming links is an intersection of fifteen lines of thought. Connections create compound value as the vault grows.
74
+
75
+ This is not keyword matching. This is semantic judgment — understanding what {vocabulary.note_plural} MEAN to determine how they relate. A {vocabulary.note} about "friction in systems" might deeply connect to "verification approaches" even though they share no words. You are building a traversable knowledge graph, not tagging documents.
76
+
77
+ **Quality over speed. Explicit over vague.**
78
+
79
+ Every connection must pass the articulation test: can you say WHY these {vocabulary.note_plural} connect? "Related" is not a relationship. "Extends X by adding Y" or "contradicts X because Z" is a relationship.
80
+
81
+ Bad connections pollute the graph. They create noise that makes real connections harder to find. When uncertain, do not connect.
82
+
83
+ ## Invocation Patterns
84
+
85
+ ### /reflect (no argument)
86
+
87
+ Check for recent additions:
88
+ 1. Look for {vocabulary.note_plural} modified in the last session
89
+ 2. If none obvious, ask user what {vocabulary.note_plural} to connect
90
+
91
+ ### /reflect [note]
92
+
93
+ Focus on connecting a specific {vocabulary.note}:
94
+ 1. Read the target {vocabulary.note}
95
+ 2. Discover related content
96
+ 3. Add connections and update {vocabulary.topic_map_plural}
97
+
98
+ ### /reflect [topic area]
99
+
100
+ Synthesize an area:
101
+ 1. Read the relevant {vocabulary.topic_map}
102
+ 2. Identify {vocabulary.note_plural} that should connect
103
+ 3. Weave connections, update synthesis
104
+
105
+ ### /reflect --handoff [note]
106
+
107
+ External loop mode for /ralph:
108
+ - Execute full workflow as normal
109
+ - At the end, output structured RALPH HANDOFF block
110
+ - Used when running isolated phases with fresh context per task
111
+
112
+ ## Workflow
113
+
114
+ ### Phase 0: Verify Index Freshness
115
+
116
+ Before using semantic search, verify the index is current. This is self-healing: if {vocabulary.note_plural} were created outside the pipeline (manual edits, other skills), reflect catches the drift before searching.
117
+
118
+ 1. Try `mcp__qmd__status` to get the indexed document count for the target collection
119
+ 2. **If MCP unavailable** (tool fails or returns error): fall back to bash:
120
+ ```bash
121
+ LOCKDIR="ops/queue/.locks/qmd.lock"
122
+ while ! mkdir "$LOCKDIR" 2>/dev/null; do sleep 2; done
123
+ qmd_count=$(qmd status 2>/dev/null | grep -A2 'thinking' | grep 'documents' | grep -oE '[0-9]+' | head -1)
124
+ rm -rf "$LOCKDIR"
125
+ ```
126
+ 3. Count actual files:
127
+ ```bash
128
+ file_count=$(ls -1 {vocabulary.notes}/*.md 2>/dev/null | wc -l | tr -d ' ')
129
+ ```
130
+ 4. If the counts differ, sync the index:
131
+ ```bash
132
+ qmd update && qmd embed
133
+ ```
134
+
135
+ Run this check before proceeding. If stale, sync and continue. If current, proceed immediately.
136
+
137
+ ### Phase 1: Understand What You Are Connecting
138
+
139
+ Before searching for connections, deeply understand the source material.
140
+
141
+ For each {vocabulary.note} you are connecting:
142
+ 1. Read the full {vocabulary.note}, not just title and description
143
+ 2. Identify the core claim and supporting reasoning
144
+ 3. Note key concepts, mechanisms, implications
145
+ 4. Ask: what questions does this answer? What questions does it raise?
146
+
147
+ **What you are looking for:**
148
+ - The central argument (what is being claimed?)
149
+ - The mechanism (why/how does this work?)
150
+ - The implications (what follows from this?)
151
+ - The scope (when does this apply? When not?)
152
+ - The tensions (what might contradict this?)
153
+
154
+ **If a task file exists** (pipeline execution): read the task file to see what the extraction phase discovered. The reduce notes, semantic neighbor field, and classification provide critical context about why this {vocabulary.note} was extracted and what it relates to.
155
+
156
+ ### Phase 2: Discovery (Find Candidates)
157
+
158
+ Use dual discovery: {vocabulary.topic_map} exploration AND semantic search in parallel. These are complementary, not sequential.
159
+
160
+ **Capture discovery trace as you go.** Note which {vocabulary.topic_map_plural} you read, which queries you ran (with scores), which searches you tried. This becomes the Discovery Trace section in output — proving methodology was followed, not reconstructed after the fact.
161
+
162
+ **Primary discovery (run in parallel):**
163
+
164
+ **Path 1: {vocabulary.topic_map} Exploration** — curated navigation
165
+
166
+ If you know the topic (check the {vocabulary.note}'s Topics footer), start with the {vocabulary.topic_map}:
167
+
168
+ - Read the relevant {vocabulary.topic_map}(s)
169
+ - Follow curated links in Core Ideas — these are human/agent-curated connections
170
+ - Note what is already connected to similar concepts
171
+ - Check Tensions and Gaps for context
172
+ - What do agent notes reveal about navigation?
173
+
174
+ {vocabulary.topic_map_plural} tell you what thinking exists and how it is organized. Someone already decided what matters for this topic.
175
+
176
+ **Path 2: Semantic Search** — find what {vocabulary.topic_map_plural} might miss
177
+
178
+ **Three-tier fallback for semantic search:**
179
+
180
+ **Tier 1 — MCP tools (preferred):** Use `mcp__qmd__query` (hybrid search with expansion + reranking):
181
+ - query: "[{vocabulary.note}'s core concepts and mechanisms]"
182
+ - limit: 15
183
+
184
+ **Tier 2 — bash qmd with lock serialization:** If MCP tools fail or are unavailable:
185
+ ```bash
186
+ LOCKDIR="ops/queue/.locks/qmd.lock"
187
+ while ! mkdir "$LOCKDIR" 2>/dev/null; do sleep 2; done
188
+ qmd query "[note's core concepts]" --collection thinking --limit 15 2>/dev/null
189
+ rm -rf "$LOCKDIR"
190
+ ```
191
+
192
+ The lock prevents multiple parallel workers from loading large models simultaneously.
193
+
194
+ **Tier 3 — grep only:** If both MCP and bash fail, log "qmd unavailable, grep-only discovery" and rely on {vocabulary.topic_map} + keyword search only. This degrades quality but does not block work.
195
+
196
+ Evaluate results by relevance — read any result where title or snippet suggests genuine connection. Semantic search finds {vocabulary.note_plural} that share MEANING even when vocabulary differs. A {vocabulary.note} about "iteration cycles" might connect to "learning from friction" despite sharing no words.
197
+
198
+ **Why both paths:**
199
+
200
+ {vocabulary.topic_map} = what is already curated as relevant
201
+ semantic search = neighbors that have not been curated yet
202
+
203
+ Using only search misses curated structure. Using only {vocabulary.topic_map} misses semantic neighbors outside the topic. Both together catch what either alone would miss.
204
+
205
+ **Secondary discovery (after primary):**
206
+
207
+ **Step 3: Keyword Search**
208
+
209
+ For specific terms and exact matches:
210
+ ```bash
211
+ grep -r "term" {vocabulary.notes}/ --include="*.md"
212
+ ```
213
+
214
+ Use grep when:
215
+ - You know the exact words that should appear
216
+ - Searching for specific terminology or phrases
217
+ - Finding all uses of a named concept
218
+ - The vocabulary is stable and predictable
219
+
220
+ **Choosing between semantic and keyword:**
221
+
222
+ | Situation | Better Tool | Why |
223
+ |-----------|-------------|-----|
224
+ | Exploring unfamiliar territory | semantic | vocabulary might not match meaning |
225
+ | Finding synonyms or related framings | semantic | same concept, different words |
226
+ | Known terminology | keyword | exact match, no ambiguity |
227
+ | Verifying coverage | keyword | ensures nothing missed |
228
+ | Cross-domain connections | semantic | concepts bridge domains, words do not |
229
+ | Specific phrase lookup | keyword | faster, more precise |
230
+
231
+ **Step 4: Description Scan**
232
+
233
+ Use ripgrep to scan {vocabulary.note} descriptions for edge cases:
234
+ - Does this extend the source {vocabulary.note}?
235
+ - Does this contradict or create tension?
236
+ - Does this provide evidence or examples?
237
+
238
+ Flag candidates with a reason (not just "related").
239
+
240
+ **Step 5: Link Following**
241
+
242
+ From promising candidates, follow their existing links:
243
+ - What do THEY connect to?
244
+ - Are there clusters of related {vocabulary.note_plural}?
245
+ - Do chains emerge that your source {vocabulary.note} should join?
246
+
247
+ This is graph traversal. You are exploring the neighborhood.
248
+
249
+ ### Phase 3: Evaluate Connections
250
+
251
+ For each candidate connection, apply the articulation test.
252
+
253
+ **The Articulation Test:**
254
+
255
+ Complete this sentence:
256
+ > [[note A]] connects to [[note B]] because [specific reason]
257
+
258
+ If you cannot fill in [specific reason] with something substantive, the connection fails.
259
+
260
+ **Valid Relationship Types:**
261
+
262
+ | Relationship | Signal | Example |
263
+ |-------------|--------|---------|
264
+ | extends | adds dimension | "extends [[X]] by adding temporal aspect" |
265
+ | grounds | provides foundation | "this works because [[Y]] establishes..." |
266
+ | contradicts | creates tension | "conflicts with [[Z]] because..." |
267
+ | exemplifies | concrete instance | "demonstrates [[W]] in practice" |
268
+ | synthesizes | combines insights | "emerges from combining [[A]] and [[B]]" |
269
+ | enables | unlocks possibility | "makes [[C]] actionable by providing..." |
270
+
271
+ **Reject if:**
272
+ - The connection is "related" without specifics
273
+ - You found it through keyword matching alone with no semantic depth
274
+ - Linking would confuse more than clarify
275
+ - The relationship is too obvious to be useful
276
+
277
+ **Agent Traversal Check:**
278
+
279
+ Ask: **"If an agent follows this link, what do they gain?"**
280
+
281
+ | Agent Benefit | Keep Link |
282
+ |---------------|-----------|
283
+ | Provides reasoning foundation (why something works) | YES |
284
+ | Offers implementation pattern (how to do it) | YES |
285
+ | Surfaces tension to consider (trade-off awareness) | YES |
286
+ | Gives concrete example (grounds abstraction) | YES |
287
+ | Just "related topic" with no decision value | NO |
288
+
289
+ The vault is built for agent traversal. Every connection should help an agent DECIDE or UNDERSTAND something. Connections that exist only because they feel "interesting" without operational value are noise.
290
+
291
+ **Synthesis Opportunity Detection:**
292
+
293
+ While evaluating connections, watch for synthesis opportunities — two or more {vocabulary.note_plural} that together imply a higher-order claim not yet captured.
294
+
295
+ Signs of a synthesis opportunity:
296
+ - Two {vocabulary.note_plural} make complementary arguments that combine into something neither says alone
297
+ - A pattern appears across three or more {vocabulary.note_plural} that has not been named
298
+ - A tension between two {vocabulary.note_plural} suggests a resolution claim
299
+
300
+ When you detect a synthesis opportunity:
301
+ 1. Note it in the output report
302
+ 2. Do NOT create the synthesis {vocabulary.note} during reflect — flag it for future work
303
+ 3. Describe what the synthesis would argue and which {vocabulary.note_plural} contribute
304
+
305
+ ### Phase 4: Add Inline Connections
306
+
307
+ Connections live in the prose, not just footers.
308
+
309
+ **Inline Links as Prose:**
310
+
311
+ The wiki link IS the argument. The title works as prose when linked.
312
+
313
+ Good patterns:
314
+ ```markdown
315
+ Since [[other note]], the question becomes how to structure that memory for retrieval.
316
+
317
+ The insight that [[throughput matters more than accumulation]] suggests curation, not creation, is the real work.
318
+
319
+ This works because [[good systems learn from friction]] — each iteration improves the next.
320
+ ```
321
+
322
+ Bad patterns:
323
+ ```markdown
324
+ This relates to [[other note]].
325
+
326
+ See also [[throughput matters more than accumulation]].
327
+
328
+ As discussed in [[good systems learn from friction]], systems improve.
329
+ ```
330
+
331
+ If you catch yourself writing "this relates to" or "see also", STOP. Restructure so the claim does the work.
332
+
333
+ **Where to add links:**
334
+
335
+ 1. Inline in the body where the connection naturally fits the argument
336
+ 2. In the relevant_notes YAML field with context phrase
337
+ 3. BOTH when the connection is strong enough
338
+
339
+ **Relevant Notes Format:**
340
+
341
+ ```yaml
342
+ relevant_notes:
343
+ - "[[note title]] — extends this by adding the temporal dimension"
344
+ - "[[another note]] — provides the mechanism this claim depends on"
345
+ ```
346
+
347
+ Context phrases use standard relationship vocabulary: extends, grounds, contradicts, exemplifies, synthesizes, enables.
348
+
349
+ **Bidirectional Consideration:**
350
+
351
+ When adding [[A]] to [[B]], ask: should [[B]] also link to [[A]]?
352
+
353
+ Not always. Relationships are not always symmetric:
354
+ - "extends" often is not bidirectional
355
+ - "exemplifies" usually goes one direction
356
+ - "contradicts" is often bidirectional
357
+ - "synthesizes" might reference both sources
358
+
359
+ Add the reverse link only if following that path would be useful for agent traversal.
360
+
361
+ **Reweave Task Filtering (when adding bidirectional links):**
362
+
363
+ When you edit an older {vocabulary.note} to add a reverse link, you MAY flag it for full reconsideration via reweave. But SKIP reweave flagging if ANY of these apply:
364
+
365
+ | Skip Condition | Rationale |
366
+ |----------------|-----------|
367
+ | Note has >5 incoming links | Already a hub — one more link does not warrant full reconsideration |
368
+ | Note has `type: tension` in YAML | Structural framework, not content that evolves |
369
+ | Note was reweaved in current batch | Do not re-reweave what was just reweaved |
370
+ | Note is a {vocabulary.topic_map} | {vocabulary.topic_map_plural} are navigation, not claims to reconsider |
371
+
372
+ **Check incoming links:**
373
+ ```bash
374
+ grep -r '\[\[note name\]\]' {vocabulary.notes}/*.md | wc -l
375
+ ```
376
+
377
+ If >= 5, skip reweave flagging.
378
+
379
+ ### Phase 5: Update {vocabulary.topic_map_plural}
380
+
381
+ {vocabulary.topic_map_plural} are synthesis hubs, not just indexes.
382
+
383
+ **When to update a {vocabulary.topic_map}:**
384
+
385
+ - New {vocabulary.note} belongs in Core Ideas
386
+ - New tension discovered
387
+ - Gap has been filled
388
+ - Synthesis insight emerged
389
+ - Navigation path worth documenting
390
+
391
+ **{vocabulary.topic_map} Size Check:**
392
+
393
+ After updating Core Ideas, count the links:
394
+
395
+ ```bash
396
+ grep -c '^\- \[\[' "{vocabulary.notes}/[moc-name].md"
397
+ ```
398
+
399
+ If approaching the split threshold (configurable, default ~40): note in output "{vocabulary.topic_map} approaching split threshold (N links)"
400
+ If exceeding: warn "{vocabulary.topic_map} exceeds recommended size — consider splitting"
401
+
402
+ Splitting is a human decision (architectural judgment required), but /reflect should surface the signal.
403
+
404
+ **{vocabulary.topic_map} Structure:**
405
+
406
+ ```markdown
407
+ # [Topic Name]
408
+
409
+ [Opening synthesis: Claims about the topic. Not "this {vocabulary.topic_map} collects {vocabulary.note_plural}" but "the core insight is Y because Z." This IS thinking, not meta-description.]
410
+
411
+ ## Core Ideas
412
+
413
+ - [[claim note]] — what it contributes to understanding
414
+ - [[another claim]] — how it fits or challenges existing ideas
415
+
416
+ ## Tensions
417
+
418
+ - [[claim A]] and [[claim B]] conflict because... [genuine unresolved tension]
419
+
420
+ ## Gaps
421
+
422
+ - nothing about X aspect yet
423
+ - need concrete examples of Y
424
+ - missing: comparison with Z approach
425
+
426
+ ---
427
+
428
+ Agent Notes:
429
+ - YYYY-MM-DD: [what was explored]. [the insight or dead end].
430
+ ```
431
+
432
+ **Updating Core Ideas:**
433
+
434
+ Add new {vocabulary.note_plural} with context phrase explaining contribution:
435
+ ```markdown
436
+ - [[new note]] — extends the quality argument by showing how friction teaches you what to check
437
+ ```
438
+
439
+ Order matters. Place {vocabulary.note_plural} where they fit the logical flow, not alphabetically.
440
+
441
+ **Updating Tensions:**
442
+
443
+ If the new {vocabulary.note} creates or resolves tension:
444
+ ```markdown
445
+ ## Tensions
446
+
447
+ - [[composability]] demands small notes, but [[context limits]] means traversal has overhead. [[new note]] suggests the tradeoff depends on expected traversal depth.
448
+ ```
449
+
450
+ Document genuine conflicts. Tensions are valuable, not bugs.
451
+
452
+ **Updating Gaps:**
453
+
454
+ Remove gaps that are now filled. Add new gaps discovered during reflection.
455
+
456
+ ### Phase 6: Add Agent Notes
457
+
458
+ Agent notes are breadcrumbs for future navigation.
459
+
460
+ **Add agent notes when:**
461
+ - Non-obvious navigation path discovered
462
+ - Dead end worth documenting
463
+ - Productive {vocabulary.note} combination found
464
+ - Insight about topic cluster emerged
465
+
466
+ **Format:**
467
+ ```markdown
468
+ Agent Notes:
469
+ - YYYY-MM-DD: [what was explored]. [the insight or finding].
470
+ ```
471
+
472
+ **Good agent notes:**
473
+ ```markdown
474
+ - 2026-02-15: tried connecting via "learning" — too generic. better path: friction -> verification -> quality. the mechanism chain is tighter.
475
+ - 2026-02-15: [[claim A]] and [[claim B]] form a tight pair. A sets the standard, B teaches the method.
476
+ ```
477
+
478
+ **Bad agent notes:**
479
+ ```markdown
480
+ - 2026-02-15: read the {vocabulary.topic_map} and added some links.
481
+ - 2026-02-15: connected [[note A]] to [[note B]].
482
+ ```
483
+
484
+ The test: would this help a future agent navigate more effectively?
485
+
486
+ ## Quality Gates
487
+
488
+ ### Gate 1: Articulation Test
489
+
490
+ For every connection added, can you complete:
491
+ > [[A]] connects to [[B]] because [specific reason]
492
+
493
+ If any connection fails this test, remove it.
494
+
495
+ ### Gate 2: Prose Test
496
+
497
+ For every inline link, read the sentence aloud. Does it flow naturally? Would you say this to a friend explaining the idea?
498
+
499
+ Bad: "this is related to [[note]]"
500
+ Good: "since [[note]], the implication is..."
501
+
502
+ ### Gate 3: Bidirectional Check
503
+
504
+ For every A -> B link, explicitly decide: should B -> A exist?
505
+ Document your reasoning if the relationship is asymmetric.
506
+
507
+ ### Gate 4: {vocabulary.topic_map} Coherence
508
+
509
+ After updating a {vocabulary.topic_map}, read the opening synthesis. Does it still hold? Do new {vocabulary.note_plural} extend or challenge it?
510
+
511
+ If the synthesis is now wrong or incomplete, update it.
512
+
513
+ ### Gate 5: Link Verification
514
+
515
+ Verify every wiki link target exists. Never create links to non-existent files.
516
+
517
+ ```bash
518
+ # Check that a link target exists
519
+ ls {vocabulary.notes}/"target name.md" 2>/dev/null
520
+ ```
521
+
522
+ ## Handling Edge Cases
523
+
524
+ ### No Connections Found
525
+
526
+ Sometimes a {vocabulary.note} genuinely does not connect yet. That is fine.
527
+
528
+ 1. Ensure it is linked to at least one {vocabulary.topic_map} via Topics footer
529
+ 2. Note in {vocabulary.topic_map} Gaps that this area needs development
530
+ 3. Do not force connections that are not there
531
+
532
+ ### Too Many Connections (Split Detection)
533
+
534
+ If a {vocabulary.note} connects to 5+ {vocabulary.note_plural} across different domains, it might be too broad.
535
+
536
+ **Split detection criteria:**
537
+
538
+ 1. **Domain spread:** Connections span 3+ distinct {vocabulary.topic_map_plural}/topic areas
539
+ 2. **Multiple claims:** The {vocabulary.note} makes more than one assertion that could stand alone
540
+ 3. **Linking drag:** You would want to link to part of the {vocabulary.note} but not all of it
541
+
542
+ **How to evaluate:**
543
+
544
+ Ask: "If I link to this {vocabulary.note} from context X, does irrelevant content Y come along?"
545
+
546
+ If yes, the {vocabulary.note} bundles multiple ideas that should be separate.
547
+
548
+ **Split detection output:**
549
+
550
+ ```markdown
551
+ ### Split Candidate: [[broad note]]
552
+
553
+ **Indicators:**
554
+ - Connects to 7 {vocabulary.note_plural} across 3 domains
555
+ - Makes distinct claims about: (1) capture workflows, (2) synthesis patterns, (3) tool selection
556
+ - Linking from [[note A]] would drag in unrelated content about tool selection
557
+
558
+ **Proposed split:**
559
+ - [[capture workflows matter less than synthesis]] — the first claim
560
+ - [[tool selection follows from workflow needs]] — the third claim
561
+ - Keep original {vocabulary.note} focused on synthesis patterns
562
+
563
+ **Action:** Flag for human decision, do not auto-split
564
+ ```
565
+
566
+ **When NOT to split:**
567
+ - {vocabulary.note} is genuinely about one thing that touches many areas
568
+ - Connections are all variations of the same relationship
569
+ - Splitting would create {vocabulary.note_plural} too thin to stand alone
570
+
571
+ ### Conflicting Notes
572
+
573
+ When new content contradicts existing {vocabulary.note_plural}:
574
+
575
+ 1. Document the tension in both {vocabulary.note_plural}
576
+ 2. Add to {vocabulary.topic_map} Tensions section
577
+ 3. Do not auto-resolve — flag for judgment
578
+
579
+ ### Orphan Discovery
580
+
581
+ If you find {vocabulary.note_plural} with no connections:
582
+
583
+ 1. Flag them in your output
584
+ 2. Attempt to connect them
585
+ 3. If genuinely orphaned, note in relevant {vocabulary.topic_map} Gaps
586
+
587
+ ## Output Format
588
+
589
+ After reflecting, report:
590
+
591
+ ```markdown
592
+ ## Reflection Complete
593
+
594
+ ### Discovery Trace
595
+
596
+ **Why this matters:** Shows methodology was followed. Blind delegation hides whether dual discovery happened. Trace enables verification.
597
+
598
+ **{vocabulary.topic_map} exploration:**
599
+ - Read [[moc-name]] — found candidates: [[note A]], [[note B]], [[note C]]
600
+ - Followed link from [[note A]] to [[note D]]
601
+
602
+ **Semantic search:** (via MCP | bash fallback | grep-only)
603
+ - query "[core concept from note]" — top hits:
604
+ - [[note E]] (0.74) — evaluated: strong match, mechanism overlap
605
+ - [[note F]] (0.61) — evaluated: weak, only surface vocabulary
606
+ - [[note G]] (0.58) — evaluated: skip, different domain
607
+
608
+ **Keyword search:**
609
+ - grep "specific term" — found [[note H]] (already in {vocabulary.topic_map} candidates)
610
+
611
+ ### Connections Added
612
+
613
+ **[[source note]]**
614
+ - -> [[target]] — [relationship type]: [why]
615
+ - <- [[incoming]] — [relationship type]: [why]
616
+ - inline: added link to [[note]] in paragraph about X
617
+
618
+ ### {vocabulary.topic_map} Updates
619
+
620
+ **[[moc-name]]**
621
+ - Added [[note]] to Core Ideas — [contribution]
622
+ - Updated Tensions: [[A]] vs [[B]] now includes [[C]]
623
+ - Removed from Gaps: [what was filled]
624
+ - Agent note: [what was learned]
625
+
626
+ ### Synthesis Opportunities
627
+
628
+ [{vocabulary.note_plural} that could be combined into higher-order insights, with proposed claim]
629
+
630
+ ### Flagged for Attention
631
+
632
+ - [[orphan note]] — could not find connections
633
+ - [[broad note]] — might benefit from splitting
634
+ - Tension between [[X]] and [[Y]] needs resolution
635
+ ```
636
+
637
+ ## What Success Looks Like
638
+
639
+ Successful reflection:
640
+ - Every connection passes the articulation test
641
+ - Inline links read as natural prose
642
+ - {vocabulary.topic_map_plural} gain synthesis, not just entries
643
+ - Agent notes reveal non-obvious paths
644
+ - The knowledge graph becomes more traversable
645
+ - Future agents will navigate more effectively
646
+
647
+ The test: if someone follows the links you added, do they find genuinely useful context? Does the path illuminate understanding?
648
+
649
+ ## Critical Constraints
650
+
651
+ **Never:**
652
+ - Create wiki links to non-existent files
653
+ - Add "related" connections without specific reasoning
654
+ - Force connections that are not there
655
+ - Auto-generate without semantic judgment
656
+ - Skip the articulation test
657
+
658
+ **Always:**
659
+ - Verify link targets exist
660
+ - Explain WHY connections exist
661
+ - Consider bidirectionality
662
+ - Update relevant {vocabulary.topic_map_plural}
663
+ - Add agent notes when navigation insights emerge
664
+ - Capture discovery trace as you work
665
+
666
+ ## The Network Grows Through Judgment
667
+
668
+ This skill is about building a knowledge graph that compounds in value. Every connection you add is a traversal path that future thinking can follow. Every connection you do not add keeps the graph clean.
669
+
670
+ Quality beats quantity. One genuine connection is worth more than ten vague ones.
671
+
672
+ The graph is not just storage. It is an external thinking structure. Build it with care.
673
+
674
+ ---
675
+
676
+ ## Handoff Mode (--handoff flag)
677
+
678
+ When invoked with `--handoff`, output this structured format at the END of the session. This enables external loops (/ralph) to parse results and update the task queue.
679
+
680
+ **Detection:** Check if `$ARGUMENTS` contains `--handoff`. If yes, append this block after completing normal workflow.
681
+
682
+ **Handoff format:**
683
+
684
+ ```
685
+ === RALPH HANDOFF: {vocabulary.reflect} ===
686
+ Target: [[note name]]
687
+
688
+ Work Done:
689
+ - Discovery: {vocabulary.topic_map} [[moc-name]], query "[query]" (MCP|bash|grep-only), grep "[term]"
690
+ - Connections added: N (articulation test: PASS)
691
+ - {vocabulary.topic_map} updates: [[moc-name]] Core Ideas section
692
+ - Synthesis opportunities: [count or NONE]
693
+
694
+ Files Modified:
695
+ - {vocabulary.notes}/[note name].md (inline links added)
696
+ - {vocabulary.notes}/[moc-name].md (Core Ideas updated)
697
+ - [task file path] ({vocabulary.reflect} section)
698
+
699
+ Learnings:
700
+ - [Friction]: [description] | NONE
701
+ - [Surprise]: [description] | NONE
702
+ - [Methodology]: [description] | NONE
703
+ - [Process gap]: [description] | NONE
704
+
705
+ Queue Updates:
706
+ - Advance phase: {vocabulary.reflect} -> {vocabulary.reweave}
707
+ - Reweave candidates (if any pass filter): [[note]] | NONE (filtered: hub/tension/recent)
708
+ === END HANDOFF ===
709
+ ```
710
+
711
+ ### Task File Update (when invoked via ralph loop)
712
+
713
+ When running in handoff mode via /ralph, the prompt includes the task file path. After completing the workflow, update the `## {vocabulary.reflect}` section of that task file with:
714
+ - Connections added and why
715
+ - {vocabulary.topic_map} updates made
716
+ - Articulation test results
717
+ - Discovery trace summary
718
+
719
+ **Critical:** The handoff block is OUTPUT, not a replacement for the workflow. Do the full reflect workflow first, update task file, then format results as handoff.
720
+
721
+ ### Queue Update (interactive execution)
722
+
723
+ When running interactively (NOT via /ralph), YOU must advance the phase in the queue. /ralph handles this automatically, but interactive sessions do not.
724
+
725
+ **After completing the workflow, advance the phase:**
726
+
727
+ ```bash
728
+ # get timestamp
729
+ TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
730
+
731
+ # advance phase (current_phase -> next, append to completed_phases)
732
+ jq '(.tasks[] | select(.id=="TASK_ID")).current_phase = "{vocabulary.reweave}" |
733
+ (.tasks[] | select(.id=="TASK_ID")).completed_phases += ["{vocabulary.reflect}"]' \
734
+ ops/queue/queue.json > tmp.json && mv tmp.json ops/queue/queue.json
735
+ ```
736
+
737
+ The handoff block's "Queue Updates" section is not just output — it is your own todo list when running interactively.
738
+
739
+ ## Pipeline Chaining
740
+
741
+ After connection finding completes, output the next step based on `ops/config.yaml` pipeline.chaining mode:
742
+
743
+ - **manual:** Output "Next: {vocabulary.cmd_reweave} [note]" — user decides when to proceed
744
+ - **suggested:** Output next step AND advance task queue entry to `current_phase: "{vocabulary.reweave}"`
745
+ - **automatic:** Queue entry advanced and backward pass proceeds immediately
746
+
747
+ The chaining output uses domain-native command names from the derivation manifest.