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.
- package/.claude-plugin/marketplace.json +11 -0
- package/.claude-plugin/plugin.json +22 -0
- package/README.md +683 -0
- package/agents/knowledge-guide.md +49 -0
- package/bin/cli.mjs +66 -0
- package/generators/agents-md.md +240 -0
- package/generators/claude-md.md +379 -0
- package/generators/features/atomic-notes.md +124 -0
- package/generators/features/ethical-guardrails.md +58 -0
- package/generators/features/graph-analysis.md +188 -0
- package/generators/features/helper-functions.md +92 -0
- package/generators/features/maintenance.md +164 -0
- package/generators/features/methodology-knowledge.md +70 -0
- package/generators/features/mocs.md +144 -0
- package/generators/features/multi-domain.md +61 -0
- package/generators/features/personality.md +71 -0
- package/generators/features/processing-pipeline.md +428 -0
- package/generators/features/schema.md +149 -0
- package/generators/features/self-evolution.md +229 -0
- package/generators/features/self-space.md +78 -0
- package/generators/features/semantic-search.md +99 -0
- package/generators/features/session-rhythm.md +85 -0
- package/generators/features/templates.md +85 -0
- package/generators/features/wiki-links.md +88 -0
- package/generators/soul-md.md +121 -0
- package/hooks/hooks.json +45 -0
- package/hooks/scripts/auto-commit.sh +44 -0
- package/hooks/scripts/session-capture.sh +35 -0
- package/hooks/scripts/session-orient.sh +86 -0
- package/hooks/scripts/write-validate.sh +42 -0
- package/methodology/AI shifts knowledge systems from externalizing memory to externalizing attention.md +59 -0
- package/methodology/BM25 retrieval fails on full-length descriptions because query term dilution reduces match scores.md +39 -0
- package/methodology/IBIS framework maps claim-based architecture to structured argumentation.md +58 -0
- package/methodology/LLM attention degrades as context fills.md +49 -0
- package/methodology/MOC construction forces synthesis that automated generation from metadata cannot replicate.md +49 -0
- package/methodology/MOC maintenance investment compounds because orientation savings multiply across every future session.md +41 -0
- package/methodology/MOCs are attention management devices not just organizational tools.md +51 -0
- package/methodology/PKM failure follows a predictable cycle.md +50 -0
- package/methodology/ThreadMode to DocumentMode transformation is the core value creation step.md +52 -0
- package/methodology/WIP limits force processing over accumulation.md +53 -0
- package/methodology/Zeigarnik effect validates capture-first philosophy because open loops drain attention.md +42 -0
- package/methodology/academic research uses structured extraction with cross-source synthesis.md +566 -0
- package/methodology/adapt the four-phase processing pipeline to domain-specific throughput needs.md +197 -0
- package/methodology/agent notes externalize navigation intuition that search cannot discover and traversal cannot reconstruct.md +48 -0
- package/methodology/agent self-memory should be architecturally separate from user knowledge systems.md +48 -0
- package/methodology/agent session boundaries create natural automation checkpoints that human-operated systems lack.md +56 -0
- package/methodology/agent-cognition.md +107 -0
- package/methodology/agents are simultaneously methodology executors and subjects creating a unique trust asymmetry.md +66 -0
- package/methodology/aspect-oriented programming solved the same cross-cutting concern problem that hooks solve.md +39 -0
- package/methodology/associative ontologies beat hierarchical taxonomies because heterarchy adapts while hierarchy brittles.md +53 -0
- package/methodology/attention residue may have a minimum granularity that cannot be subdivided.md +46 -0
- package/methodology/auto-commit hooks eliminate prospective memory failures by converting remember-to-act into guaranteed execution.md +47 -0
- package/methodology/automated detection is always safe because it only reads state while automated remediation risks content corruption.md +42 -0
- package/methodology/automation should be retired when its false positive rate exceeds its true positive rate or it catches zero issues.md +56 -0
- package/methodology/backlinks implicitly define notes by revealing usage context.md +35 -0
- package/methodology/backward maintenance asks what would be different if written today.md +62 -0
- package/methodology/balance onboarding enforcement and questions to prevent premature complexity.md +229 -0
- package/methodology/basic level categorization determines optimal MOC granularity.md +51 -0
- package/methodology/batching by context similarity reduces switching costs in agent processing.md +43 -0
- package/methodology/behavioral anti-patterns matter more than tool selection.md +42 -0
- package/methodology/betweenness centrality identifies bridge notes connecting disparate knowledge domains.md +57 -0
- package/methodology/blueprints that teach construction outperform downloads that provide pre-built code for platform-dependent modules.md +42 -0
- package/methodology/bootstrapping principle enables self-improving systems.md +62 -0
- package/methodology/build automatic memory through cognitive offloading and session handoffs.md +285 -0
- package/methodology/capture the reaction to content not just the content itself.md +41 -0
- package/methodology/claims must be specific enough to be wrong.md +36 -0
- package/methodology/closure rituals create clean breaks that prevent attention residue bleed.md +44 -0
- package/methodology/cognitive offloading is the architectural foundation for vault design.md +46 -0
- package/methodology/cognitive outsourcing risk in agent-operated systems.md +55 -0
- package/methodology/coherence maintains consistency despite inconsistent inputs.md +96 -0
- package/methodology/coherent architecture emerges from wiki links spreading activation and small-world topology.md +48 -0
- package/methodology/community detection algorithms can inform when MOCs should split or merge.md +52 -0
- package/methodology/complete navigation requires four complementary types that no single mechanism provides.md +43 -0
- package/methodology/complex systems evolve from simple working systems.md +59 -0
- package/methodology/composable knowledge architecture builds systems from independent toggleable modules not monolithic templates.md +61 -0
- package/methodology/compose multi-domain systems through separate templates and shared graph.md +372 -0
- package/methodology/concept-orientation beats source-orientation for cross-domain connections.md +51 -0
- package/methodology/confidence thresholds gate automated action between the mechanical and judgment zones.md +50 -0
- package/methodology/configuration dimensions interact so choices in one create pressure on others.md +58 -0
- package/methodology/configuration paralysis emerges when derivation surfaces too many decisions.md +44 -0
- package/methodology/context files function as agent operating systems through self-referential self-extension.md +46 -0
- package/methodology/context phrase clarity determines how deep a navigation hierarchy can scale.md +46 -0
- package/methodology/continuous small-batch processing eliminates review dread.md +48 -0
- package/methodology/controlled disorder engineers serendipity through semantic rather than topical linking.md +51 -0
- package/methodology/creative writing uses worldbuilding consistency with character tracking.md +672 -0
- package/methodology/cross-links between MOC territories indicate creative leaps and integration depth.md +43 -0
- package/methodology/dangling links reveal which notes want to exist.md +62 -0
- package/methodology/data exit velocity measures how quickly content escapes vendor lock-in.md +74 -0
- package/methodology/decontextualization risk means atomicity may strip meaning that cannot be recovered.md +48 -0
- package/methodology/dense interlinked research claims enable derivation while sparse references only enable templating.md +47 -0
- package/methodology/dependency resolution through topological sort makes module composition transparent and verifiable.md +56 -0
- package/methodology/derivation generates knowledge systems from composable research claims not template customization.md +63 -0
- package/methodology/derivation-engine.md +27 -0
- package/methodology/derived systems follow a seed-evolve-reseed lifecycle.md +56 -0
- package/methodology/description quality for humans diverges from description quality for keyword search.md +73 -0
- package/methodology/descriptions are retrieval filters not summaries.md +112 -0
- package/methodology/design MOCs as attention management devices with lifecycle governance.md +318 -0
- package/methodology/design-dimensions.md +66 -0
- package/methodology/digital mutability enables note evolution that physical permanence forbids.md +54 -0
- package/methodology/discovery-retrieval.md +48 -0
- package/methodology/distinctiveness scoring treats description quality as measurable.md +69 -0
- package/methodology/does agent processing recover what fast capture loses.md +43 -0
- package/methodology/domain-compositions.md +37 -0
- package/methodology/dual-coding with visual elements could enhance agent traversal.md +55 -0
- package/methodology/each module must be describable in one sentence under 200 characters or it does too many things.md +45 -0
- package/methodology/each new note compounds value by creating traversal paths.md +55 -0
- package/methodology/eight configuration dimensions parameterize the space of possible knowledge systems.md +56 -0
- package/methodology/elaborative encoding is the quality gate for new notes.md +55 -0
- package/methodology/enforce schema with graduated strictness across capture processing and query zones.md +221 -0
- package/methodology/enforcing atomicity can create paralysis when ideas resist decomposition.md +43 -0
- package/methodology/engineering uses technical decision tracking with architectural memory.md +766 -0
- package/methodology/every knowledge domain shares a four-phase processing skeleton that diverges only in the process step.md +53 -0
- package/methodology/evolution observations provide actionable signals for system adaptation.md +67 -0
- package/methodology/external memory shapes cognition more than base model.md +60 -0
- package/methodology/faceted classification treats notes as multi-dimensional objects rather than folder contents.md +65 -0
- package/methodology/failure-modes.md +27 -0
- package/methodology/false universalism applies same processing logic regardless of domain.md +49 -0
- package/methodology/federated wiki pattern enables multi-agent divergence as feature not bug.md +59 -0
- package/methodology/flat files break at retrieval scale.md +75 -0
- package/methodology/forced engagement produces weak connections.md +48 -0
- package/methodology/four abstraction layers separate platform-agnostic from platform-dependent knowledge system features.md +47 -0
- package/methodology/fresh context per task preserves quality better than chaining phases.md +44 -0
- package/methodology/friction reveals architecture.md +63 -0
- package/methodology/friction-driven module adoption prevents configuration debt by adding complexity only at pain points.md +48 -0
- package/methodology/gardening cycle implements tend prune fertilize operations.md +41 -0
- package/methodology/generation effect gate blocks processing without transformation.md +40 -0
- package/methodology/goal-driven memory orchestration enables autonomous domain learning through directed compute allocation.md +41 -0
- package/methodology/good descriptions layer heuristic then mechanism then implication.md +57 -0
- package/methodology/graph-structure.md +65 -0
- package/methodology/guided notes might outperform post-hoc structuring for high-volume capture.md +37 -0
- package/methodology/health wellness uses symptom-trigger correlation with multi-dimensional tracking.md +819 -0
- package/methodology/hook composition creates emergent methodology from independent single-concern components.md +47 -0
- package/methodology/hook enforcement guarantees quality while instruction enforcement merely suggests it.md +51 -0
- package/methodology/hook-driven learning loops create self-improving methodology through observation accumulation.md +62 -0
- package/methodology/hooks are the agent habit system that replaces the missing basal ganglia.md +40 -0
- package/methodology/hooks cannot replace genuine cognitive engagement yet more automation is always tempting.md +87 -0
- package/methodology/hooks enable context window efficiency by delegating deterministic checks to external processes.md +47 -0
- package/methodology/idempotent maintenance operations are safe to automate because running them twice produces the same result as running them once.md +44 -0
- package/methodology/implement condition-based maintenance triggers for derived systems.md +255 -0
- package/methodology/implicit dependencies create distributed monoliths that fail silently across configurations.md +58 -0
- package/methodology/implicit knowledge emerges from traversal.md +55 -0
- package/methodology/incremental formalization happens through repeated touching of old notes.md +60 -0
- package/methodology/incremental reading enables cross-source connection finding.md +39 -0
- package/methodology/index.md +32 -0
- package/methodology/inline links carry richer relationship data than metadata fields.md +91 -0
- package/methodology/insight accretion differs from productivity in knowledge systems.md +41 -0
- package/methodology/intermediate packets enable assembly over creation.md +52 -0
- package/methodology/intermediate representation pattern enables reliable vault operations beyond regex.md +62 -0
- package/methodology/justification chains enable forward backward and evolution reasoning about configuration decisions.md +46 -0
- package/methodology/knowledge system architecture is parameterized by platform capabilities not fixed by methodology.md +51 -0
- package/methodology/knowledge systems become communication partners through complexity and memory humans cannot sustain.md +47 -0
- package/methodology/knowledge systems share universal operations and structural components across all methodology traditions.md +46 -0
- package/methodology/legal case management uses precedent chains with regulatory change propagation.md +892 -0
- package/methodology/live index via periodic regeneration keeps discovery current.md +58 -0
- package/methodology/local-first file formats are inherently agent-native.md +69 -0
- package/methodology/logic column pattern separates reasoning from procedure.md +35 -0
- package/methodology/maintenance operations are more universal than creative pipelines because structural health is domain-invariant.md +47 -0
- package/methodology/maintenance scheduling frequency should match consequence speed not detection capability.md +50 -0
- package/methodology/maintenance targeting should prioritize mechanism and theory notes.md +26 -0
- package/methodology/maintenance-patterns.md +72 -0
- package/methodology/markdown plus YAML plus ripgrep implements a queryable graph database without infrastructure.md +55 -0
- package/methodology/maturity field enables agent context prioritization.md +33 -0
- package/methodology/memory-architecture.md +27 -0
- package/methodology/metacognitive confidence can diverge from retrieval capability.md +42 -0
- package/methodology/metadata reduces entropy enabling precision over recall.md +91 -0
- package/methodology/methodology development should follow the trajectory from documentation to skill to hook as understanding hardens.md +80 -0
- package/methodology/methodology traditions are named points in a shared configuration space not competing paradigms.md +64 -0
- package/methodology/mnemonic medium embeds verification into navigation.md +46 -0
- package/methodology/module communication through shared YAML fields creates loose coupling without direct dependencies.md +44 -0
- package/methodology/module deactivation must account for structural artifacts that survive the toggle.md +49 -0
- package/methodology/multi-domain systems compose through separate templates and shared graph.md +61 -0
- package/methodology/multi-domain-composition.md +27 -0
- package/methodology/narrow folksonomy optimizes for single-operator retrieval unlike broad consensus tagging.md +53 -0
- package/methodology/navigation infrastructure passes through distinct scaling regimes that require qualitative strategy shifts.md +48 -0
- package/methodology/navigational vertigo emerges in pure association systems without local hierarchy.md +54 -0
- package/methodology/note titles should function as APIs enabling sentence transclusion.md +51 -0
- package/methodology/note-design.md +57 -0
- package/methodology/notes are skills /342/200/224 curated knowledge injected when relevant.md" +62 -0
- package/methodology/notes function as cognitive anchors that stabilize attention during complex tasks.md +41 -0
- package/methodology/novel domains derive by mapping knowledge type to closest reference domain then adapting.md +50 -0
- package/methodology/nudge theory explains graduated hook enforcement as choice architecture for agents.md +59 -0
- package/methodology/observation and tension logs function as dead-letter queues for failed automation.md +51 -0
- package/methodology/operational memory and knowledge memory serve different functions in agent architecture.md +48 -0
- package/methodology/operational wisdom requires contextual observation.md +52 -0
- package/methodology/orchestrated vault creation transforms arscontexta from tool to autonomous knowledge factory.md +40 -0
- package/methodology/organic emergence versus active curation creates a fundamental vault governance tension.md +68 -0
- package/methodology/orphan notes are seeds not failures.md +38 -0
- package/methodology/over-automation corrupts quality when hooks encode judgment rather than verification.md +62 -0
- package/methodology/people relationships uses Dunbar-layered graphs with interaction tracking.md +659 -0
- package/methodology/personal assistant uses life area management with review automation.md +610 -0
- package/methodology/platform adapter translation is semantic not mechanical because hook event meanings differ.md +40 -0
- package/methodology/platform capability tiers determine which knowledge system features can be implemented.md +48 -0
- package/methodology/platform fragmentation means identical conceptual operations require different implementations across agent environments.md +44 -0
- package/methodology/premature complexity is the most common derivation failure mode.md +45 -0
- package/methodology/prevent domain-specific failure modes through the vulnerability matrix.md +336 -0
- package/methodology/processing effort should follow retrieval demand.md +57 -0
- package/methodology/processing-workflows.md +75 -0
- package/methodology/product management uses feedback pipelines with experiment tracking.md +789 -0
- package/methodology/productivity porn risk in meta-system building.md +30 -0
- package/methodology/programmable notes could enable property-triggered workflows.md +64 -0
- package/methodology/progressive disclosure means reading right not reading less.md +69 -0
- package/methodology/progressive schema validates only what active modules require not the full system schema.md +49 -0
- package/methodology/project management uses decision tracking with stakeholder context.md +776 -0
- package/methodology/propositional link semantics transform wiki links from associative to reasoned.md +87 -0
- package/methodology/prospective memory requires externalization.md +53 -0
- package/methodology/provenance tracks where beliefs come from.md +62 -0
- package/methodology/queries evolve during search so agents should checkpoint.md +35 -0
- package/methodology/question-answer metadata enables inverted search patterns.md +39 -0
- package/methodology/random note resurfacing prevents write-only memory.md +33 -0
- package/methodology/reconciliation loops that compare desired state to actual state enable drift correction without continuous monitoring.md +59 -0
- package/methodology/reflection synthesizes existing notes into new insight.md +100 -0
- package/methodology/retrieval utility should drive design over capture completeness.md +69 -0
- package/methodology/retrieval verification loop tests description quality at scale.md +81 -0
- package/methodology/role field makes graph structure explicit.md +94 -0
- package/methodology/scaffolding enables divergence that fine-tuning cannot.md +67 -0
- package/methodology/schema enforcement via validation agents enables soft consistency.md +60 -0
- package/methodology/schema evolution follows observe-then-formalize not design-then-enforce.md +65 -0
- package/methodology/schema field names are the only domain specific element in the universal note pattern.md +46 -0
- package/methodology/schema fields should use domain-native vocabulary not abstract terminology.md +47 -0
- package/methodology/schema templates reduce cognitive overhead at capture time.md +55 -0
- package/methodology/schema validation hooks externalize inhibitory control that degrades under cognitive load.md +48 -0
- package/methodology/schema-enforcement.md +27 -0
- package/methodology/self-extension requires context files to contain platform operations knowledge not just methodology.md +47 -0
- package/methodology/sense-making vs storage does compression lose essential nuance.md +73 -0
- package/methodology/session boundary hooks implement cognitive bookends for orientation and reflection.md +60 -0
- package/methodology/session handoff creates continuity without persistent memory.md +43 -0
- package/methodology/session outputs are packets for future selves.md +43 -0
- package/methodology/session transcript mining enables experiential validation that structural tests cannot provide.md +38 -0
- package/methodology/skill context budgets constrain knowledge system complexity on agent platforms.md +52 -0
- package/methodology/skills encode methodology so manual execution bypasses quality gates.md +50 -0
- package/methodology/small-world topology requires hubs and dense local links.md +99 -0
- package/methodology/source attribution enables tracing claims to foundations.md +38 -0
- package/methodology/spaced repetition scheduling could optimize vault maintenance.md +44 -0
- package/methodology/spreading activation models how agents should traverse.md +79 -0
- package/methodology/stale navigation actively misleads because agents trust curated maps completely.md +43 -0
- package/methodology/stigmergy coordinates agents through environmental traces without direct communication.md +62 -0
- package/methodology/storage versus thinking distinction determines which tool patterns apply.md +56 -0
- package/methodology/structure enables navigation without reading everything.md +52 -0
- package/methodology/structure without processing provides no value.md +56 -0
- package/methodology/student learning uses prerequisite graphs with spaced retrieval.md +770 -0
- package/methodology/summary coherence tests composability before filing.md +37 -0
- package/methodology/tag rot applies to wiki links because titles serve as both identifier and display text.md +50 -0
- package/methodology/temporal media must convert to spatial text for agent traversal.md +43 -0
- package/methodology/temporal processing priority creates age-based inbox urgency.md +45 -0
- package/methodology/temporal separation of capture and processing preserves context freshness.md +39 -0
- package/methodology/ten universal primitives form the kernel of every viable agent knowledge system.md +162 -0
- package/methodology/testing effect could enable agent knowledge verification.md +38 -0
- package/methodology/the AgentSkills standard embodies progressive disclosure at the skill level.md +40 -0
- package/methodology/the derivation engine improves recursively as deployed systems generate observations.md +49 -0
- package/methodology/the determinism boundary separates hook methodology from skill methodology.md +46 -0
- package/methodology/the fix-versus-report decision depends on determinism reversibility and accumulated trust.md +45 -0
- package/methodology/the generation effect requires active transformation not just storage.md +57 -0
- package/methodology/the no wrong patches guarantee ensures any valid module combination produces a valid system.md +58 -0
- package/methodology/the system is the argument.md +46 -0
- package/methodology/the vault constitutes identity for agents.md +86 -0
- package/methodology/the vault methodology transfers because it encodes cognitive science not domain specifics.md +47 -0
- package/methodology/therapy journal uses warm personality with pattern detection for emotional processing.md +584 -0
- package/methodology/three capture schools converge through agent-mediated synthesis.md +55 -0
- package/methodology/three concurrent maintenance loops operate at different timescales to catch different classes of problems.md +56 -0
- package/methodology/throughput matters more than accumulation.md +58 -0
- package/methodology/title as claim enables traversal as reasoning.md +50 -0
- package/methodology/topological organization beats temporal for knowledge work.md +52 -0
- package/methodology/trading uses conviction tracking with thesis-outcome correlation.md +699 -0
- package/methodology/trails transform ephemeral navigation into persistent artifacts.md +39 -0
- package/methodology/transform universal vocabulary to domain-native language through six levels.md +259 -0
- package/methodology/type field enables structured queries without folder hierarchies.md +53 -0
- package/methodology/use-case presets dissolve the tension between composability and simplicity.md +44 -0
- package/methodology/vault conventions may impose hidden rigidity on thinking.md +44 -0
- package/methodology/verbatim risk applies to agents too.md +31 -0
- package/methodology/vibe notetaking is the emerging industry consensus for AI-native self-organization.md +56 -0
- package/methodology/vivid memories need verification.md +45 -0
- package/methodology/vocabulary-transformation.md +27 -0
- package/methodology/voice capture is the highest-bandwidth channel for agent-delegated knowledge systems.md +45 -0
- package/methodology/wiki links are the digital evolution of analog indexing.md +73 -0
- package/methodology/wiki links as social contract transforms agents into stewards of incomplete references.md +52 -0
- package/methodology/wiki links create navigation paths that shape retrieval.md +63 -0
- package/methodology/wiki links implement GraphRAG without the infrastructure.md +101 -0
- package/methodology/writing for audience blocks authentic creation.md +22 -0
- package/methodology/you operate a system that takes notes.md +79 -0
- package/openclaw/SKILL.md +110 -0
- package/package.json +45 -0
- package/platforms/README.md +51 -0
- package/platforms/claude-code/generator.md +61 -0
- package/platforms/claude-code/hooks/README.md +186 -0
- package/platforms/claude-code/hooks/auto-commit.sh.template +38 -0
- package/platforms/claude-code/hooks/session-capture.sh.template +72 -0
- package/platforms/claude-code/hooks/session-orient.sh.template +189 -0
- package/platforms/claude-code/hooks/write-validate.sh.template +106 -0
- package/platforms/openclaw/generator.md +82 -0
- package/platforms/openclaw/hooks/README.md +89 -0
- package/platforms/openclaw/hooks/bootstrap.ts.template +224 -0
- package/platforms/openclaw/hooks/command-new.ts.template +165 -0
- package/platforms/openclaw/hooks/heartbeat.ts.template +214 -0
- package/platforms/shared/features/README.md +70 -0
- package/platforms/shared/skill-blocks/graph.md +145 -0
- package/platforms/shared/skill-blocks/learn.md +119 -0
- package/platforms/shared/skill-blocks/next.md +131 -0
- package/platforms/shared/skill-blocks/pipeline.md +326 -0
- package/platforms/shared/skill-blocks/ralph.md +616 -0
- package/platforms/shared/skill-blocks/reduce.md +1142 -0
- package/platforms/shared/skill-blocks/refactor.md +129 -0
- package/platforms/shared/skill-blocks/reflect.md +780 -0
- package/platforms/shared/skill-blocks/remember.md +524 -0
- package/platforms/shared/skill-blocks/rethink.md +574 -0
- package/platforms/shared/skill-blocks/reweave.md +680 -0
- package/platforms/shared/skill-blocks/seed.md +320 -0
- package/platforms/shared/skill-blocks/stats.md +145 -0
- package/platforms/shared/skill-blocks/tasks.md +171 -0
- package/platforms/shared/skill-blocks/validate.md +323 -0
- package/platforms/shared/skill-blocks/verify.md +562 -0
- package/platforms/shared/templates/README.md +35 -0
- package/presets/experimental/categories.yaml +1 -0
- package/presets/experimental/preset.yaml +38 -0
- package/presets/experimental/starter/README.md +7 -0
- package/presets/experimental/vocabulary.yaml +7 -0
- package/presets/personal/categories.yaml +7 -0
- package/presets/personal/preset.yaml +41 -0
- package/presets/personal/starter/goals.md +21 -0
- package/presets/personal/starter/index.md +17 -0
- package/presets/personal/starter/life-areas.md +21 -0
- package/presets/personal/starter/people.md +21 -0
- package/presets/personal/vocabulary.yaml +32 -0
- package/presets/research/categories.yaml +8 -0
- package/presets/research/preset.yaml +41 -0
- package/presets/research/starter/index.md +17 -0
- package/presets/research/starter/methods.md +21 -0
- package/presets/research/starter/open-questions.md +21 -0
- package/presets/research/vocabulary.yaml +33 -0
- package/reference/AUDIT-REPORT.md +238 -0
- package/reference/claim-map.md +172 -0
- package/reference/components.md +327 -0
- package/reference/conversation-patterns.md +542 -0
- package/reference/derivation-validation.md +649 -0
- package/reference/dimension-claim-map.md +134 -0
- package/reference/evolution-lifecycle.md +297 -0
- package/reference/failure-modes.md +235 -0
- package/reference/interaction-constraints.md +204 -0
- package/reference/kernel.yaml +242 -0
- package/reference/methodology.md +283 -0
- package/reference/open-questions.md +279 -0
- package/reference/personality-layer.md +302 -0
- package/reference/self-space.md +299 -0
- package/reference/semantic-vs-keyword.md +288 -0
- package/reference/session-lifecycle.md +298 -0
- package/reference/templates/base-note.md +16 -0
- package/reference/templates/companion-note.md +70 -0
- package/reference/templates/creative-note.md +16 -0
- package/reference/templates/learning-note.md +16 -0
- package/reference/templates/life-note.md +16 -0
- package/reference/templates/moc.md +26 -0
- package/reference/templates/relationship-note.md +17 -0
- package/reference/templates/research-note.md +19 -0
- package/reference/templates/session-log.md +24 -0
- package/reference/templates/therapy-note.md +16 -0
- package/reference/test-fixtures/edge-case-constraints.md +148 -0
- package/reference/test-fixtures/multi-domain.md +164 -0
- package/reference/test-fixtures/novel-domain-gaming.md +138 -0
- package/reference/test-fixtures/research-minimal.md +102 -0
- package/reference/test-fixtures/therapy-full.md +155 -0
- package/reference/testing-milestones.md +1087 -0
- package/reference/three-spaces.md +363 -0
- package/reference/tradition-presets.md +203 -0
- package/reference/use-case-presets.md +341 -0
- package/reference/validate-kernel.sh +432 -0
- package/reference/vocabulary-transforms.md +85 -0
- package/scripts/sync-thinking.sh +147 -0
- package/skill-sources/graph/SKILL.md +567 -0
- package/skill-sources/graph/skill.json +17 -0
- package/skill-sources/learn/SKILL.md +254 -0
- package/skill-sources/learn/skill.json +17 -0
- package/skill-sources/next/SKILL.md +407 -0
- package/skill-sources/next/skill.json +17 -0
- package/skill-sources/pipeline/SKILL.md +314 -0
- package/skill-sources/pipeline/skill.json +17 -0
- package/skill-sources/ralph/SKILL.md +604 -0
- package/skill-sources/ralph/skill.json +17 -0
- package/skill-sources/reduce/SKILL.md +1113 -0
- package/skill-sources/reduce/skill.json +17 -0
- package/skill-sources/refactor/SKILL.md +448 -0
- package/skill-sources/refactor/skill.json +17 -0
- package/skill-sources/reflect/SKILL.md +747 -0
- package/skill-sources/reflect/skill.json +17 -0
- package/skill-sources/remember/SKILL.md +534 -0
- package/skill-sources/remember/skill.json +17 -0
- package/skill-sources/rethink/SKILL.md +658 -0
- package/skill-sources/rethink/skill.json +17 -0
- package/skill-sources/reweave/SKILL.md +657 -0
- package/skill-sources/reweave/skill.json +17 -0
- package/skill-sources/seed/SKILL.md +303 -0
- package/skill-sources/seed/skill.json +17 -0
- package/skill-sources/stats/SKILL.md +371 -0
- package/skill-sources/stats/skill.json +17 -0
- package/skill-sources/tasks/SKILL.md +402 -0
- package/skill-sources/tasks/skill.json +17 -0
- package/skill-sources/validate/SKILL.md +310 -0
- package/skill-sources/validate/skill.json +17 -0
- package/skill-sources/verify/SKILL.md +532 -0
- package/skill-sources/verify/skill.json +17 -0
- package/skills/add-domain/SKILL.md +441 -0
- package/skills/add-domain/skill.json +17 -0
- package/skills/architect/SKILL.md +568 -0
- package/skills/architect/skill.json +17 -0
- package/skills/ask/SKILL.md +388 -0
- package/skills/ask/skill.json +17 -0
- package/skills/health/SKILL.md +760 -0
- package/skills/health/skill.json +17 -0
- package/skills/help/SKILL.md +348 -0
- package/skills/help/skill.json +17 -0
- package/skills/recommend/SKILL.md +553 -0
- package/skills/recommend/skill.json +17 -0
- package/skills/reseed/SKILL.md +385 -0
- package/skills/reseed/skill.json +17 -0
- package/skills/setup/SKILL.md +1688 -0
- package/skills/setup/skill.json +17 -0
- package/skills/tutorial/SKILL.md +496 -0
- package/skills/tutorial/skill.json +17 -0
- package/skills/upgrade/SKILL.md +395 -0
- package/skills/upgrade/skill.json +17 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: arscontexta
|
|
3
|
+
description: Give your bot a mind. Scaffold structured knowledge infrastructure with persistent memory, atomic notes, MOCs, maintenance skills, and nightly processing. Works for any life domain — research, learning, relationships, therapy, life management, creative work, companion bots.
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Ars Contexta — Knowledge Infrastructure for OpenClaw Bots
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
### `/arscontexta init`
|
|
12
|
+
Scaffold a complete thinking system for your bot. Interactive setup:
|
|
13
|
+
1. Detects your platform and workspace
|
|
14
|
+
2. Asks about your use case (research, relationships, learning, therapy, life, creative, companion)
|
|
15
|
+
3. Selects features with smart defaults
|
|
16
|
+
4. Generates everything: folder structure, SOUL.md, AGENTS.md, templates, self/ space, skills
|
|
17
|
+
|
|
18
|
+
After init, your bot:
|
|
19
|
+
- Has a persistent mind (self/ with identity, methodology, goals, memory)
|
|
20
|
+
- Knows to read self/ at every session start
|
|
21
|
+
- Can capture insights as atomic prose-titled notes
|
|
22
|
+
- Has maintenance skills (reduce, reflect, validate, verify)
|
|
23
|
+
- Has nightly processing (sleep skill) for automated knowledge building
|
|
24
|
+
- Can self-extend using blueprints in AGENTS.md
|
|
25
|
+
|
|
26
|
+
### `/arscontexta ask [question]`
|
|
27
|
+
Query the Tools for Thought research knowledge graph. Ask about:
|
|
28
|
+
- Note design, wiki-links, MOC architecture
|
|
29
|
+
- Processing pipelines, session discipline
|
|
30
|
+
- Maintenance patterns, health checks
|
|
31
|
+
- Cognitive science foundations
|
|
32
|
+
- Any methodology question
|
|
33
|
+
|
|
34
|
+
Returns research-backed answers with specific claim references from ~100+ research notes.
|
|
35
|
+
|
|
36
|
+
### `/arscontexta health`
|
|
37
|
+
Run vault maintenance checks:
|
|
38
|
+
- Schema compliance (YAML validity, required fields)
|
|
39
|
+
- Orphan detection (notes with no incoming links)
|
|
40
|
+
- Link health (dangling wiki-links)
|
|
41
|
+
- Description quality (adds info beyond title?)
|
|
42
|
+
- Stale notes (30+ days untouched, low link density)
|
|
43
|
+
- MOC coherence (coverage, split candidates)
|
|
44
|
+
|
|
45
|
+
Returns actionable report with prioritized fixes.
|
|
46
|
+
|
|
47
|
+
## What Your Bot Gets After Init
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
your-workspace/
|
|
51
|
+
├── SOUL.md ← Your identity, relationship, purpose
|
|
52
|
+
├── AGENTS.md ← Complete operational methodology + blueprints
|
|
53
|
+
├── notes/ ← Structured knowledge (atomic notes + MOCs)
|
|
54
|
+
├── inbox/ ← Zero-friction capture zone
|
|
55
|
+
├── archive/ ← Processed sources
|
|
56
|
+
├── self/ ← Your persistent mind
|
|
57
|
+
│ ├── identity.md ← Who you are
|
|
58
|
+
│ ├── methodology.md ← How you work
|
|
59
|
+
│ ├── goals.md ← Current threads
|
|
60
|
+
│ ├── relationships.md ← Key people (if relevant)
|
|
61
|
+
│ ├── memory/ ← Your accumulated insights
|
|
62
|
+
│ ├── sessions/ ← Session logs
|
|
63
|
+
│ └── journal/ ← Raw session capture
|
|
64
|
+
├── templates/ ← Note templates for your domain
|
|
65
|
+
└── skills/ ← Maintenance skills
|
|
66
|
+
├── reduce/ ← Extract insights from raw material
|
|
67
|
+
├── reflect/ ← Find connections between notes
|
|
68
|
+
├── validate/ ← Schema compliance checking
|
|
69
|
+
├── verify/ ← Combined quality gate
|
|
70
|
+
└── sleep/ ← Nightly processing pipeline
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## The Transformation
|
|
74
|
+
|
|
75
|
+
**Before Ars Contexta:**
|
|
76
|
+
Bot writes session log → forgets → next session blank → repeat
|
|
77
|
+
|
|
78
|
+
**After Ars Contexta:**
|
|
79
|
+
Bot writes to journal → sleep extracts insights → atomic notes persist → session starts with self/ orientation → bot remembers, connects, grows
|
|
80
|
+
|
|
81
|
+
## Philosophy
|
|
82
|
+
|
|
83
|
+
The methodology works because it encodes cognitive science — working memory limits, extended mind, spreading activation — not domain specifics. The same patterns work for research, relationships, learning, therapy, life management, or creative work. Only the YAML schema fields change.
|
|
84
|
+
|
|
85
|
+
**Prose-as-title:** Every note title is a proposition that works in sentences.
|
|
86
|
+
- "Mom prefers phone calls on Sunday mornings"
|
|
87
|
+
- "The anxiety usually starts when I skip morning routine"
|
|
88
|
+
- "Spaced repetition works better when I study after exercise"
|
|
89
|
+
|
|
90
|
+
**MOCs as attention management:** Navigation hubs that present topic state immediately, reducing context-switching cost for both humans and agents.
|
|
91
|
+
|
|
92
|
+
**Temporal separation:** Capture fast during active hours, process slow during quiet hours. The sleep skill bridges this gap automatically.
|
|
93
|
+
|
|
94
|
+
## OpenClaw Marketplace Naming
|
|
95
|
+
|
|
96
|
+
For OpenClaw marketplace listing, skills use the `knowledge-` prefix convention:
|
|
97
|
+
|
|
98
|
+
| Internal Skill | Marketplace Name | Purpose |
|
|
99
|
+
|---------------|-----------------|---------|
|
|
100
|
+
| reduce | knowledge-reduce | Extract insights from raw material |
|
|
101
|
+
| reflect | knowledge-reflect | Find connections between notes |
|
|
102
|
+
| reweave | knowledge-reweave | Update old notes with new connections |
|
|
103
|
+
| validate | knowledge-validate | Schema compliance checking |
|
|
104
|
+
| verify | knowledge-verify | Combined quality gate |
|
|
105
|
+
| health | knowledge-health | Vault maintenance diagnostics |
|
|
106
|
+
| sleep | knowledge-sleep | Nightly processing pipeline |
|
|
107
|
+
|
|
108
|
+
The `knowledge-` prefix groups all Ars Contexta skills together in marketplace listings and prevents naming collisions with unrelated skills.
|
|
109
|
+
|
|
110
|
+
Built on [Ars Contexta](https://arscontexta.dev) research — tools for thought for agents.
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "arscontexta",
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "Conversational derivation engine for agent-native knowledge systems. Run /setup to build your cognitive architecture.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"arscontexta": "./bin/cli.mjs"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/",
|
|
11
|
+
".claude-plugin/",
|
|
12
|
+
"skills/",
|
|
13
|
+
"agents/",
|
|
14
|
+
"hooks/",
|
|
15
|
+
"generators/",
|
|
16
|
+
"methodology/",
|
|
17
|
+
"platforms/",
|
|
18
|
+
"presets/",
|
|
19
|
+
"reference/",
|
|
20
|
+
"scripts/",
|
|
21
|
+
"skill-sources/",
|
|
22
|
+
"openclaw/",
|
|
23
|
+
"README.md"
|
|
24
|
+
],
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=18"
|
|
27
|
+
},
|
|
28
|
+
"author": "Ars Contexta <arscontexta@proton.me>",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"keywords": [
|
|
31
|
+
"claude-code-plugin",
|
|
32
|
+
"claude-code",
|
|
33
|
+
"knowledge-management",
|
|
34
|
+
"tools-for-thought",
|
|
35
|
+
"agent-memory",
|
|
36
|
+
"derivation-engine",
|
|
37
|
+
"zettelkasten",
|
|
38
|
+
"pkm"
|
|
39
|
+
],
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "git+https://github.com/agenticnotetaking/arscontexta.git"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/agenticnotetaking/arscontexta"
|
|
45
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# platforms/ -- Distribution View
|
|
2
|
+
|
|
3
|
+
This directory maps the distribution layout for different agent platforms. It does not contain the generation logic itself -- that lives in `generators/`. What `platforms/` provides is a reference view of what each platform produces and how the shared components relate to platform-specific ones.
|
|
4
|
+
|
|
5
|
+
## Relationship to generators/
|
|
6
|
+
|
|
7
|
+
The `generators/` directory is the working structure:
|
|
8
|
+
|
|
9
|
+
- `generators/claude-md.md` -- CLAUDE.md generation template
|
|
10
|
+
- `generators/agents-md.md` -- AGENTS.md generation template (OpenClaw)
|
|
11
|
+
- `generators/soul-md.md` -- SOUL.md generation template (OpenClaw)
|
|
12
|
+
- `generators/features/` -- 14 composable feature blocks
|
|
13
|
+
|
|
14
|
+
`platforms/` organizes these same components from a distribution perspective: what does a Claude Code user get? What does an OpenClaw user get? What is shared across both?
|
|
15
|
+
|
|
16
|
+
## Structure
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
platforms/
|
|
20
|
+
├── shared/
|
|
21
|
+
│ ├── features/ --> generators/features/ (14 canonical feature blocks)
|
|
22
|
+
│ └── templates/ --> reference/templates/ (10 note type templates)
|
|
23
|
+
├── claude-code/
|
|
24
|
+
│ ├── generator.md --> generators/claude-md.md (CLAUDE.md generation)
|
|
25
|
+
│ └── hooks/ Hook templates for Claude Code platform
|
|
26
|
+
├── openclaw/
|
|
27
|
+
│ ├── generator.md --> generators/agents-md.md + generators/soul-md.md
|
|
28
|
+
│ └── hooks/ Hook templates for OpenClaw platform
|
|
29
|
+
└── README.md This file
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## How platforms/ is used
|
|
33
|
+
|
|
34
|
+
During plugin packaging (Section 18 of the PRD), the build process references `platforms/` to assemble platform-specific distributions:
|
|
35
|
+
|
|
36
|
+
- **Claude Code plugin** reads `platforms/shared/` and `platforms/claude-code/` to bundle feature blocks, templates, generation logic, and hook templates alongside the `skills/`, `reference/`, and `thinking/` directories.
|
|
37
|
+
|
|
38
|
+
- **ClawHub skill** reads `platforms/shared/` and `platforms/openclaw/` to assemble the OpenClaw-adapted package.
|
|
39
|
+
|
|
40
|
+
The `generators/` directory remains the canonical source. Files here are not duplicated -- README files document the relationship and provide platform-specific context that the generator files themselves don't carry.
|
|
41
|
+
|
|
42
|
+
## What each platform produces
|
|
43
|
+
|
|
44
|
+
| Output | Claude Code | OpenClaw |
|
|
45
|
+
|--------|-------------|----------|
|
|
46
|
+
| Context file | CLAUDE.md | AGENTS.md + SOUL.md |
|
|
47
|
+
| Hooks | .claude/hooks/ (bash scripts) | hooks/ (TypeScript) |
|
|
48
|
+
| Settings | .claude/settings.json | -- |
|
|
49
|
+
| Skills | Inherited from plugin skills/ | OpenClaw skill format |
|
|
50
|
+
| Identity | Embedded in CLAUDE.md | Separate SOUL.md |
|
|
51
|
+
| Memory bootstrap | Embedded in CLAUDE.md | Separate MEMORY.md |
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Claude Code Platform -- Generation Reference
|
|
2
|
+
|
|
3
|
+
## Generator Source
|
|
4
|
+
|
|
5
|
+
The CLAUDE.md generation logic lives at `generators/claude-md.md`. That file contains the complete template for composing a CLAUDE.md context file from feature blocks, vocabulary mappings, and personality dimensions.
|
|
6
|
+
|
|
7
|
+
## What Claude Code Platform Generates
|
|
8
|
+
|
|
9
|
+
A Claude Code deployment produces:
|
|
10
|
+
|
|
11
|
+
### 1. CLAUDE.md (Context File)
|
|
12
|
+
|
|
13
|
+
The primary context file, auto-loaded at every session start. Composed from selected feature blocks (see `platforms/shared/features/`) with domain vocabulary applied. Contains:
|
|
14
|
+
|
|
15
|
+
- Philosophy and operating principles
|
|
16
|
+
- Discovery-first design (tree injection, YAML queries, MOC navigation)
|
|
17
|
+
- Note design patterns (titles as claims, composability test, link semantics)
|
|
18
|
+
- Processing pipeline or light-processing workflow
|
|
19
|
+
- Maintenance and self-evolution guidance
|
|
20
|
+
- Session rhythm (orient, work, persist)
|
|
21
|
+
- Ethical guardrails
|
|
22
|
+
|
|
23
|
+
Generated by: `generators/claude-md.md`
|
|
24
|
+
|
|
25
|
+
### 2. .claude/hooks/ (Bash Scripts)
|
|
26
|
+
|
|
27
|
+
Hook scripts that run automatically at event boundaries. See `platforms/claude-code/hooks/` for hook template documentation.
|
|
28
|
+
|
|
29
|
+
- `scripts/session-orient.sh` -- Session start orientation
|
|
30
|
+
- `scripts/validate-note.sh` -- Post-write schema validation
|
|
31
|
+
- `scripts/session-persist.sh` -- Stop event persistence
|
|
32
|
+
- `scripts/auto-commit.sh` -- Async post-write auto-commit
|
|
33
|
+
|
|
34
|
+
### 3. .claude/settings.json
|
|
35
|
+
|
|
36
|
+
Claude Code settings file configuring:
|
|
37
|
+
|
|
38
|
+
- **Hook configuration** -- event → matcher group → handler format (see `platforms/claude-code/hooks/README.md`)
|
|
39
|
+
- Allowed tools and permissions
|
|
40
|
+
- MCP server connections (if semantic search is enabled)
|
|
41
|
+
- Project-specific settings
|
|
42
|
+
|
|
43
|
+
Hook configuration lives in `.claude/settings.json` under the `"hooks"` key, using the nested matcher-group format. The plugin's own hooks (`hooks/hooks.json`) use the same format and are merged automatically by Claude Code when the plugin is enabled.
|
|
44
|
+
|
|
45
|
+
### 4. Processing Skills
|
|
46
|
+
|
|
47
|
+
Processing skills (/reduce, /reflect, /reweave, /verify, /validate) are inherited from the plugin's `skills/` directory -- they are NOT copied to user projects. Skills read `ops/derivation-manifest.md` at runtime for domain vocabulary transformation, so a therapy system's `/surface` resolves to the canonical `/reduce` skill automatically.
|
|
48
|
+
|
|
49
|
+
Plugin updates to processing methodology reach all users without regeneration. Vocabulary changes via /reseed take effect immediately.
|
|
50
|
+
|
|
51
|
+
## Platform Characteristics
|
|
52
|
+
|
|
53
|
+
| Aspect | Detail |
|
|
54
|
+
|--------|--------|
|
|
55
|
+
| Context loading | CLAUDE.md auto-loaded by Claude Code CLI |
|
|
56
|
+
| Hook language | Bash scripts |
|
|
57
|
+
| Hook events | SessionStart, PostToolUse, Stop |
|
|
58
|
+
| Skill format | .claude/skills/*.md or inherited from plugin skills/ |
|
|
59
|
+
| Agent format | .claude/agents/*.md |
|
|
60
|
+
| File access | Full filesystem via Claude Code CLI |
|
|
61
|
+
| MCP support | Yes -- configured via .mcp.json |
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# Claude Code Hook Templates
|
|
2
|
+
|
|
3
|
+
Hook templates for the Claude Code platform. Hooks are bash scripts triggered by Claude Code events. They encode methodology as invisible infrastructure -- behaviors that happen automatically without the agent needing to remember.
|
|
4
|
+
|
|
5
|
+
## Hook Events
|
|
6
|
+
|
|
7
|
+
Claude Code supports three hook events relevant to generated vaults:
|
|
8
|
+
|
|
9
|
+
### SessionStart -- Orientation
|
|
10
|
+
|
|
11
|
+
**What it does:** Injects workspace context at the start of every session so the agent always knows what files exist, what it was working on, and where to pick up.
|
|
12
|
+
|
|
13
|
+
**Template behavior:**
|
|
14
|
+
|
|
15
|
+
1. **Tree injection** -- Run `find` or `tree` to show the workspace structure up to 3 levels deep. This gives the agent a map of all files without reading any of them.
|
|
16
|
+
|
|
17
|
+
2. **self/ loading** -- If the system has a self/ directory (personal memory), load `self/README.md` or the memory orientation file so the agent remembers who it is.
|
|
18
|
+
|
|
19
|
+
3. **Goal checking** -- If a goals file exists, surface current priorities so the agent can orient to what matters.
|
|
20
|
+
|
|
21
|
+
4. **Queue summary** -- If a queue file exists, show pipeline and maintenance task counts so the agent knows what needs attention. Full condition reconciliation happens in /next, not the hook.
|
|
22
|
+
|
|
23
|
+
**Generated as:**
|
|
24
|
+
```
|
|
25
|
+
.claude/hooks/hooks.json (event configuration)
|
|
26
|
+
.claude/hooks/scripts/session-orient.sh
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### PostToolUse (Write) -- Validation
|
|
30
|
+
|
|
31
|
+
**What it does:** Triggers after the agent writes to a notes directory. Catches schema violations and discovery opportunities at the moment of creation rather than during periodic review.
|
|
32
|
+
|
|
33
|
+
**Template behavior:**
|
|
34
|
+
|
|
35
|
+
1. **Schema validation** -- Check that the written file has required YAML frontmatter fields (description, topics at minimum). Warn but do not block -- capture speed matters more than perfection.
|
|
36
|
+
|
|
37
|
+
2. **Discovery check** -- Optionally remind the agent to check for connections after creating a new note. This is a nudge, not enforcement -- the processing pipeline handles connection finding systematically.
|
|
38
|
+
|
|
39
|
+
**Generated as:**
|
|
40
|
+
```
|
|
41
|
+
.claude/hooks/hooks.json (event configuration, filtered to Write tool + notes path)
|
|
42
|
+
.claude/hooks/scripts/validate-note.sh
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Stop -- Persistence
|
|
46
|
+
|
|
47
|
+
**What it does:** Triggers when the session ends. Ensures work is persisted and handoff state is captured.
|
|
48
|
+
|
|
49
|
+
**Template behavior:**
|
|
50
|
+
|
|
51
|
+
1. **Session persist** -- If a session log template is active, append a session summary to the log. This creates continuity between sessions.
|
|
52
|
+
|
|
53
|
+
2. **Git commit** -- If the vault is in a git repository, stage and commit changes with an auto-generated message. This ensures nothing is lost between sessions.
|
|
54
|
+
|
|
55
|
+
**Generated as:**
|
|
56
|
+
```
|
|
57
|
+
.claude/hooks/hooks.json (event configuration)
|
|
58
|
+
.claude/hooks/scripts/session-persist.sh
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Generation Notes
|
|
62
|
+
|
|
63
|
+
The derivation engine generates hook scripts based on enabled features:
|
|
64
|
+
|
|
65
|
+
| Feature Block | Hook Impact |
|
|
66
|
+
|---------------|-------------|
|
|
67
|
+
| `session-rhythm.md` | Enables SessionStart and Stop hooks |
|
|
68
|
+
| `schema.md` | Enables PostToolUse validation hook |
|
|
69
|
+
| `semantic-search.md` | Adds index freshness check to SessionStart |
|
|
70
|
+
| `processing-pipeline.md` | Adds queue status to SessionStart |
|
|
71
|
+
| `self-evolution.md` | Adds queue summary to SessionStart |
|
|
72
|
+
|
|
73
|
+
Hooks are generated once during /setup and can be modified by /architect or /reseed as the system evolves.
|
|
74
|
+
|
|
75
|
+
## Hook Configuration Format
|
|
76
|
+
|
|
77
|
+
Hooks can be configured in two places:
|
|
78
|
+
|
|
79
|
+
- **Plugin hooks** (`hooks/hooks.json` in the plugin root) — applied when the plugin is enabled
|
|
80
|
+
- **Project hooks** (`.claude/settings.json` in the generated vault) — project-level, can be committed
|
|
81
|
+
|
|
82
|
+
Both use the same nested matcher-group format. Each event type contains an array of matcher groups. Each matcher group has an optional `matcher` (regex string) and a `hooks` array of handler objects.
|
|
83
|
+
|
|
84
|
+
**Plugin hooks** (`hooks/hooks.json`):
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"description": "Ars Contexta plugin hooks",
|
|
89
|
+
"hooks": {
|
|
90
|
+
"SessionStart": [
|
|
91
|
+
{
|
|
92
|
+
"hooks": [
|
|
93
|
+
{
|
|
94
|
+
"type": "command",
|
|
95
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/session-orient.sh",
|
|
96
|
+
"timeout": 10
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"PostToolUse": [
|
|
102
|
+
{
|
|
103
|
+
"matcher": "Write",
|
|
104
|
+
"hooks": [
|
|
105
|
+
{
|
|
106
|
+
"type": "command",
|
|
107
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/validate-note.sh",
|
|
108
|
+
"timeout": 5
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"Stop": [
|
|
114
|
+
{
|
|
115
|
+
"hooks": [
|
|
116
|
+
{
|
|
117
|
+
"type": "command",
|
|
118
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/session-persist.sh",
|
|
119
|
+
"timeout": 15
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Project hooks** (`.claude/settings.json`, generated by /setup):
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"hooks": {
|
|
133
|
+
"SessionStart": [
|
|
134
|
+
{
|
|
135
|
+
"hooks": [
|
|
136
|
+
{
|
|
137
|
+
"type": "command",
|
|
138
|
+
"command": "bash .claude/hooks/session-orient.sh"
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"PostToolUse": [
|
|
144
|
+
{
|
|
145
|
+
"matcher": "Write",
|
|
146
|
+
"hooks": [
|
|
147
|
+
{
|
|
148
|
+
"type": "command",
|
|
149
|
+
"command": "bash .claude/hooks/validate-note.sh"
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"Stop": [
|
|
155
|
+
{
|
|
156
|
+
"hooks": [
|
|
157
|
+
{
|
|
158
|
+
"type": "command",
|
|
159
|
+
"command": "bash .claude/hooks/session-capture.sh"
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Matcher Reference
|
|
169
|
+
|
|
170
|
+
| Event | What matcher filters | Example |
|
|
171
|
+
|-------|---------------------|---------|
|
|
172
|
+
| `SessionStart` | How session started | `"startup"`, `"resume"`, `"clear"` |
|
|
173
|
+
| `PreToolUse`, `PostToolUse` | Tool name | `"Write"`, `"Edit\|Write"`, `"Bash"` |
|
|
174
|
+
| `SubagentStart`, `SubagentStop` | Agent type | `"Explore"`, `"knowledge-worker"` |
|
|
175
|
+
| `Stop`, `UserPromptSubmit` | No matcher support | Always fires |
|
|
176
|
+
|
|
177
|
+
Events without matcher support: omit the `matcher` field entirely.
|
|
178
|
+
|
|
179
|
+
### Handler Fields
|
|
180
|
+
|
|
181
|
+
| Field | Required | Description |
|
|
182
|
+
|-------|----------|-------------|
|
|
183
|
+
| `type` | yes | `"command"`, `"prompt"`, or `"agent"` |
|
|
184
|
+
| `command` | yes (command type) | Shell command to execute |
|
|
185
|
+
| `timeout` | no | Seconds before canceling (default: 600) |
|
|
186
|
+
| `async` | no | If `true`, runs in background without blocking |
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Ars Contexta — Auto-Commit Hook (Claude Code)
|
|
3
|
+
# Event: PostToolUse (Write)
|
|
4
|
+
# Purpose: Commit changes after writes to keep the vault in version control.
|
|
5
|
+
# Ensures no work is lost between sessions or after crashes.
|
|
6
|
+
#
|
|
7
|
+
# This is a TEMPLATE. During /init, {{VARIABLE}} markers are replaced
|
|
8
|
+
# with values from the derivation manifest.
|
|
9
|
+
#
|
|
10
|
+
# This hook runs AFTER write-validate (both are PostToolUse Write hooks;
|
|
11
|
+
# order is determined by position in hooks.json).
|
|
12
|
+
|
|
13
|
+
# ─────────────────────────────────────────────
|
|
14
|
+
# 1. Check if inside a git repository
|
|
15
|
+
# ─────────────────────────────────────────────
|
|
16
|
+
if ! git rev-parse --is-inside-work-tree &>/dev/null; then
|
|
17
|
+
exit 0
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
# ─────────────────────────────────────────────
|
|
21
|
+
# 2. Stage the written file
|
|
22
|
+
# ─────────────────────────────────────────────
|
|
23
|
+
WRITTEN_FILE="${TOOL_INPUT_PATH:-$CLAUDE_TOOL_INPUT_PATH}"
|
|
24
|
+
|
|
25
|
+
if [ -z "$WRITTEN_FILE" ] || [ ! -f "$WRITTEN_FILE" ]; then
|
|
26
|
+
exit 0
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
git add "$WRITTEN_FILE" 2>/dev/null
|
|
30
|
+
|
|
31
|
+
# ─────────────────────────────────────────────
|
|
32
|
+
# 3. Commit with descriptive message
|
|
33
|
+
# ─────────────────────────────────────────────
|
|
34
|
+
# Use the filename as the commit message for quick identification.
|
|
35
|
+
# --no-verify skips pre-commit hooks to keep auto-commits fast.
|
|
36
|
+
|
|
37
|
+
BASENAME=$(basename "$WRITTEN_FILE")
|
|
38
|
+
git commit -m "Auto: ${BASENAME}" --no-verify --quiet 2>/dev/null
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Ars Contexta — Session Capture Hook (Claude Code)
|
|
3
|
+
# Event: Stop
|
|
4
|
+
# Purpose: Capture session state on session end so nothing is lost
|
|
5
|
+
# between sessions and the next session can resume context.
|
|
6
|
+
#
|
|
7
|
+
# This is a TEMPLATE. During /init, {{VARIABLE}} markers are replaced
|
|
8
|
+
# with values from the derivation manifest.
|
|
9
|
+
#
|
|
10
|
+
# Session capture is a kernel INVARIANT — it runs every session.
|
|
11
|
+
# This is not optional infrastructure that activates at a threshold.
|
|
12
|
+
|
|
13
|
+
TIMESTAMP=$(date -u +"%Y%m%d-%H%M%S")
|
|
14
|
+
|
|
15
|
+
# ─────────────────────────────────────────────
|
|
16
|
+
# 1. Ensure session directory exists
|
|
17
|
+
# ─────────────────────────────────────────────
|
|
18
|
+
mkdir -p ops/sessions
|
|
19
|
+
|
|
20
|
+
# ─────────────────────────────────────────────
|
|
21
|
+
# 2. Save session state
|
|
22
|
+
# ─────────────────────────────────────────────
|
|
23
|
+
# Capture conversation ID and end timestamp.
|
|
24
|
+
# The session file becomes a target for /remember --mine-sessions.
|
|
25
|
+
|
|
26
|
+
if [ -n "$CLAUDE_CONVERSATION_ID" ]; then
|
|
27
|
+
cat > "ops/sessions/${TIMESTAMP}.json" << EOF
|
|
28
|
+
{
|
|
29
|
+
"id": "${CLAUDE_CONVERSATION_ID}",
|
|
30
|
+
"ended": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
|
|
31
|
+
"status": "completed"
|
|
32
|
+
}
|
|
33
|
+
EOF
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
# ─────────────────────────────────────────────
|
|
37
|
+
# 3. Persist current session as handoff state
|
|
38
|
+
# ─────────────────────────────────────────────
|
|
39
|
+
# Copy to current.json so the next session-orient hook
|
|
40
|
+
# can load it for continuity.
|
|
41
|
+
|
|
42
|
+
if [ -f "ops/sessions/${TIMESTAMP}.json" ]; then
|
|
43
|
+
cp "ops/sessions/${TIMESTAMP}.json" ops/sessions/current.json
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
# ─────────────────────────────────────────────
|
|
47
|
+
# 4. Stage and commit session artifacts
|
|
48
|
+
# ─────────────────────────────────────────────
|
|
49
|
+
# Auto-commit changes to preserve work. This ensures
|
|
50
|
+
# nothing is lost even if the user forgets to push.
|
|
51
|
+
|
|
52
|
+
if git rev-parse --is-inside-work-tree &>/dev/null; then
|
|
53
|
+
# Stage session-relevant directories
|
|
54
|
+
git add ops/sessions/ 2>/dev/null
|
|
55
|
+
git add ops/observations/ 2>/dev/null
|
|
56
|
+
git add ops/tensions/ 2>/dev/null
|
|
57
|
+
git add ops/methodology/ 2>/dev/null
|
|
58
|
+
|
|
59
|
+
# Stage goals (check both locations)
|
|
60
|
+
[ -f self/goals.md ] && git add self/goals.md 2>/dev/null
|
|
61
|
+
[ -f ops/goals.md ] && git add ops/goals.md 2>/dev/null
|
|
62
|
+
|
|
63
|
+
# Stage notes and inbox changes
|
|
64
|
+
git add {{NOTES_DIR:-notes}}/ 2>/dev/null
|
|
65
|
+
git add {{INBOX_DIR:-inbox}}/ 2>/dev/null
|
|
66
|
+
|
|
67
|
+
# Stage any MOC updates
|
|
68
|
+
git add {{NOTES_DIR:-notes}}/index.md 2>/dev/null
|
|
69
|
+
|
|
70
|
+
# Commit with auto-generated message
|
|
71
|
+
git commit -m "Session capture: ${TIMESTAMP}" --quiet --no-verify 2>/dev/null
|
|
72
|
+
fi
|