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,616 @@
|
|
|
1
|
+
---
|
|
2
|
+
# GENERATION TEMPLATE — Do not edit directly
|
|
3
|
+
# This template is transformed by the derivation engine during /setup.
|
|
4
|
+
# All {vocabulary.*} markers resolve from the preset's vocabulary.yaml.
|
|
5
|
+
# All {config.*} markers resolve from the preset's preset.yaml.
|
|
6
|
+
# All {DOMAIN:*} markers resolve from conversation-derived domain context.
|
|
7
|
+
# All {if ...}{endif} blocks are conditionally included based on config.
|
|
8
|
+
source_skill: ralph
|
|
9
|
+
min_processing_depth: standard
|
|
10
|
+
platform: shared
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
name: ralph
|
|
15
|
+
description: Queue processing with fresh context per phase. Processes N tasks from the queue, spawning isolated subagents to prevent context contamination. Supports serial, parallel, batch filter, and dry run modes. Triggers on "/ralph", "/ralph N", "process queue", "run pipeline tasks".
|
|
16
|
+
version: "1.0"
|
|
17
|
+
generated_from: "arscontexta-{plugin_version}"
|
|
18
|
+
user-invocable: true
|
|
19
|
+
context: fork
|
|
20
|
+
model: opus
|
|
21
|
+
allowed-tools: Read, Write, Edit, Grep, Glob, Bash, Task
|
|
22
|
+
argument-hint: "N [--parallel] [--batch id] [--type extract] [--dry-run] — N = number of tasks to process"
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## EXECUTE NOW
|
|
26
|
+
|
|
27
|
+
**Target: $ARGUMENTS**
|
|
28
|
+
|
|
29
|
+
Parse arguments:
|
|
30
|
+
- N (required unless --dry-run): number of tasks to process
|
|
31
|
+
- --parallel: concurrent claim workers (max 5) + cross-connect validation
|
|
32
|
+
- --batch [id]: process only tasks from specific batch
|
|
33
|
+
- --type [type]: process only tasks at a specific phase (extract, create, {vocabulary.reflect}, {vocabulary.reweave}, {vocabulary.verify}, enrich)
|
|
34
|
+
- --dry-run: show what would execute without running
|
|
35
|
+
- --handoff: output structured RALPH HANDOFF block at end (for pipeline chaining)
|
|
36
|
+
|
|
37
|
+
### Step 0: Read Vocabulary
|
|
38
|
+
|
|
39
|
+
Read `{config.ops_dir}/derivation-manifest.md` (or fall back to `{config.ops_dir}/derivation.md`) for domain vocabulary mapping. All output must use domain-native terms. If neither file exists, use universal terms.
|
|
40
|
+
|
|
41
|
+
**START NOW.** Process queue tasks.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## MANDATORY CONSTRAINT: SUBAGENT SPAWNING IS NOT OPTIONAL
|
|
46
|
+
|
|
47
|
+
**You MUST use the Task tool to spawn a subagent for EVERY task. No exceptions.**
|
|
48
|
+
|
|
49
|
+
This is not a suggestion. This is not an optimization you can skip for "simple" tasks. The entire architecture depends on fresh context isolation per phase. Executing tasks inline in the lead session:
|
|
50
|
+
- Contaminates context (later tasks run on degraded attention)
|
|
51
|
+
- Skips the handoff protocol (learnings are not captured)
|
|
52
|
+
- Violates the ralph pattern (one phase per context window)
|
|
53
|
+
|
|
54
|
+
**If you catch yourself about to execute a task directly instead of spawning a subagent, STOP.** Call the Task tool. Every time. For every task. Including create tasks. Including "simple" tasks.
|
|
55
|
+
|
|
56
|
+
The lead session's ONLY job is: read queue, spawn subagent, evaluate return, update queue, repeat.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Phase Configuration
|
|
61
|
+
|
|
62
|
+
Each phase maps to specific Task tool parameters. Use these EXACTLY when spawning subagents.
|
|
63
|
+
|
|
64
|
+
| Phase | Skill Invoked | Purpose |
|
|
65
|
+
|-------|---------------|---------|
|
|
66
|
+
| extract | /{vocabulary.reduce} | Extract {vocabulary.note_plural} from source material |
|
|
67
|
+
| create | (inline {vocabulary.note} creation) | Write the {vocabulary.note} file |
|
|
68
|
+
| enrich | /enrich | Add content to existing {vocabulary.note} |
|
|
69
|
+
| {vocabulary.reflect} | /{vocabulary.reflect} | Find connections, update {DOMAIN:topic map}s |
|
|
70
|
+
| {vocabulary.reweave} | /{vocabulary.reweave} | Update older {vocabulary.note_plural} with new connections |
|
|
71
|
+
| {vocabulary.verify} | /{vocabulary.verify} | Description quality + schema + health checks |
|
|
72
|
+
|
|
73
|
+
**All phases use the same subagent configuration:**
|
|
74
|
+
- subagent_type: knowledge-worker (if available) or default
|
|
75
|
+
- model: opus
|
|
76
|
+
- mode: dontAsk
|
|
77
|
+
|
|
78
|
+
**Why opus for all phases:** Tokens are free, quality is not. Fresh context per phase already ensures efficiency — every phase gets full capability in the smart zone.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Step 1: Read Queue State
|
|
83
|
+
|
|
84
|
+
Read the queue file. Check these locations in order:
|
|
85
|
+
1. `{config.ops_dir}/queue.yaml`
|
|
86
|
+
2. `{config.ops_dir}/queue/queue.yaml`
|
|
87
|
+
3. `{config.ops_dir}/queue/queue.json`
|
|
88
|
+
|
|
89
|
+
Parse the queue. Identify ALL pending tasks.
|
|
90
|
+
|
|
91
|
+
**Queue structure (v2 schema):**
|
|
92
|
+
|
|
93
|
+
The queue uses `current_phase` and `completed_phases` per task entry:
|
|
94
|
+
|
|
95
|
+
```yaml
|
|
96
|
+
phase_order:
|
|
97
|
+
claim: [create, {vocabulary.reflect}, {vocabulary.reweave}, {vocabulary.verify}]
|
|
98
|
+
enrichment: [enrich, {vocabulary.reflect}, {vocabulary.reweave}, {vocabulary.verify}]
|
|
99
|
+
|
|
100
|
+
tasks:
|
|
101
|
+
- id: source-name
|
|
102
|
+
type: extract
|
|
103
|
+
status: pending
|
|
104
|
+
source: {config.ops_dir}/queue/archive/2026-01-30-source/source.md
|
|
105
|
+
file: source-name.md
|
|
106
|
+
created: "2026-01-30T10:00:00Z"
|
|
107
|
+
|
|
108
|
+
- id: claim-010
|
|
109
|
+
type: claim
|
|
110
|
+
status: pending
|
|
111
|
+
target: "{vocabulary.note} title here"
|
|
112
|
+
batch: source-name
|
|
113
|
+
file: source-name-010.md
|
|
114
|
+
current_phase: {vocabulary.reflect}
|
|
115
|
+
completed_phases: [create]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
If the queue file does not exist or is empty, report: "Queue is empty. Use /seed or /pipeline to add sources."
|
|
119
|
+
|
|
120
|
+
## Step 2: Filter Tasks
|
|
121
|
+
|
|
122
|
+
Build a list of **actionable tasks** — tasks where `status == "pending"`. Order by position in the tasks array (first = highest priority).
|
|
123
|
+
|
|
124
|
+
Apply filters:
|
|
125
|
+
- If `--batch` specified: keep only tasks where `batch` matches
|
|
126
|
+
- If `--type` specified: keep only tasks where `current_phase` matches (e.g., `--type {vocabulary.reflect}` finds tasks whose `current_phase` is "{vocabulary.reflect}")
|
|
127
|
+
|
|
128
|
+
The `phase_order` header defines the phase sequence:
|
|
129
|
+
- `claim`: create -> {vocabulary.reflect} -> {vocabulary.reweave} -> {vocabulary.verify}
|
|
130
|
+
- `enrichment`: enrich -> {vocabulary.reflect} -> {vocabulary.reweave} -> {vocabulary.verify}
|
|
131
|
+
|
|
132
|
+
## Step 3: If --dry-run, Report and Stop
|
|
133
|
+
|
|
134
|
+
Show this and STOP (do not process):
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
--=={ ralph dry-run }==--
|
|
138
|
+
|
|
139
|
+
Queue: X total tasks (Y pending, Z done)
|
|
140
|
+
|
|
141
|
+
Phase distribution:
|
|
142
|
+
Claims: {create: N, {vocabulary.reflect}: N, {vocabulary.reweave}: N, {vocabulary.verify}: N}
|
|
143
|
+
Enrichments: {enrich: N, {vocabulary.reflect}: N, {vocabulary.reweave}: N, {vocabulary.verify}: N}
|
|
144
|
+
|
|
145
|
+
Next tasks to process:
|
|
146
|
+
1. {id} — phase: {current_phase} — {target}
|
|
147
|
+
2. {id} — phase: {current_phase} — {target}
|
|
148
|
+
...
|
|
149
|
+
|
|
150
|
+
Estimated: ~{N} subagent spawns
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Step 4: Process Loop (SERIAL MODE)
|
|
156
|
+
|
|
157
|
+
**If `--parallel` is set, skip to Step 6 instead.**
|
|
158
|
+
|
|
159
|
+
Process up to N tasks (default 1). For each iteration:
|
|
160
|
+
|
|
161
|
+
### 4a. Select Next Task
|
|
162
|
+
|
|
163
|
+
Pick the first pending task from the filtered list. Read its metadata: `id`, `type`, `file`, `target`, `batch`, `current_phase`, `completed_phases`.
|
|
164
|
+
|
|
165
|
+
The `current_phase` determines which skill to invoke.
|
|
166
|
+
|
|
167
|
+
Report:
|
|
168
|
+
```
|
|
169
|
+
=== Processing task {i}/{N}: {id} — phase: {current_phase} ===
|
|
170
|
+
Target: {target}
|
|
171
|
+
File: {file}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### 4b. Build Subagent Prompt
|
|
175
|
+
|
|
176
|
+
Construct a prompt based on `current_phase`. Every prompt MUST include:
|
|
177
|
+
- Reference to the task file path (from queue's `file` field)
|
|
178
|
+
- The task identity (id, current_phase, target)
|
|
179
|
+
- The skill to invoke with `--handoff`
|
|
180
|
+
- `ONE PHASE ONLY` constraint
|
|
181
|
+
- Instruction to output RALPH HANDOFF block
|
|
182
|
+
|
|
183
|
+
**Phase-specific prompts:**
|
|
184
|
+
|
|
185
|
+
For **extract** phase (type=extract tasks only):
|
|
186
|
+
```
|
|
187
|
+
Read the task file at {config.ops_dir}/queue/{FILE} for context.
|
|
188
|
+
|
|
189
|
+
You are processing task {ID} from the work queue.
|
|
190
|
+
Phase: extract | Target: {TARGET}
|
|
191
|
+
|
|
192
|
+
Run /{vocabulary.reduce} --handoff on the source file referenced in the task file.
|
|
193
|
+
After extraction: create per-claim task files, update the queue with new entries
|
|
194
|
+
(1 entry per claim with current_phase/completed_phases), output RALPH HANDOFF.
|
|
195
|
+
ONE PHASE ONLY. Do NOT run {vocabulary.reflect} or other phases.
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
For **create** phase:
|
|
199
|
+
```
|
|
200
|
+
Read the task file at {config.ops_dir}/queue/{FILE} for context.
|
|
201
|
+
|
|
202
|
+
You are processing task {ID} from the work queue.
|
|
203
|
+
Phase: create | Target {vocabulary.note}: {TARGET}
|
|
204
|
+
|
|
205
|
+
Create a {vocabulary.note} for this claim in {config.notes_dir}/[claim as sentence].md
|
|
206
|
+
Follow note design patterns:
|
|
207
|
+
- YAML frontmatter with description (adds info beyond title), topics
|
|
208
|
+
- Body: 150-400 words showing reasoning with connective words
|
|
209
|
+
- Footer: Source (wiki link), Relevant Notes (with context), Topics
|
|
210
|
+
Update the task file's ## Create section.
|
|
211
|
+
ONE PHASE ONLY. Do NOT run {vocabulary.reflect}.
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
For **enrich** phase:
|
|
215
|
+
```
|
|
216
|
+
Read the task file at {config.ops_dir}/queue/{FILE} for context.
|
|
217
|
+
|
|
218
|
+
You are processing task {ID} from the work queue.
|
|
219
|
+
Phase: enrich | Target: {TARGET}
|
|
220
|
+
|
|
221
|
+
Run /enrich --handoff using the task file for context.
|
|
222
|
+
The task file specifies which existing {vocabulary.note} to enrich and what to add.
|
|
223
|
+
ONE PHASE ONLY. Do NOT run {vocabulary.reflect}.
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
For **{vocabulary.reflect}** phase:
|
|
227
|
+
|
|
228
|
+
**Build sibling list:** Query the queue for other claims in the same batch where `completed_phases` includes "create" ({vocabulary.note} already exists). Format as wiki links.
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
Read the task file at {config.ops_dir}/queue/{FILE} for context.
|
|
232
|
+
|
|
233
|
+
You are processing task {ID} from the work queue.
|
|
234
|
+
Phase: {vocabulary.reflect} | Target: {TARGET}
|
|
235
|
+
|
|
236
|
+
OTHER {vocabulary.note_plural_upper} FROM THIS BATCH (check connections to these alongside regular discovery):
|
|
237
|
+
{for each sibling in batch where completed_phases includes "create":}
|
|
238
|
+
- [[{SIBLING_TARGET}]]
|
|
239
|
+
{end for, or "None yet" if this is the first claim}
|
|
240
|
+
|
|
241
|
+
Run /{vocabulary.reflect} --handoff on: {TARGET}
|
|
242
|
+
Use dual discovery: {DOMAIN:topic map} exploration AND semantic search.
|
|
243
|
+
Add inline links where genuine connections exist — including sibling {vocabulary.note_plural} listed above.
|
|
244
|
+
Update relevant {DOMAIN:topic map} with this {vocabulary.note}.
|
|
245
|
+
ONE PHASE ONLY. Do NOT run {vocabulary.reweave}.
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
For **{vocabulary.reweave}** phase:
|
|
249
|
+
|
|
250
|
+
**Same sibling list** as {vocabulary.reflect} (re-query queue for freshest state):
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
Read the task file at {config.ops_dir}/queue/{FILE} for context.
|
|
254
|
+
|
|
255
|
+
You are processing task {ID} from the work queue.
|
|
256
|
+
Phase: {vocabulary.reweave} | Target: {TARGET}
|
|
257
|
+
|
|
258
|
+
OTHER {vocabulary.note_plural_upper} FROM THIS BATCH:
|
|
259
|
+
{for each sibling in batch where completed_phases includes "create":}
|
|
260
|
+
- [[{SIBLING_TARGET}]]
|
|
261
|
+
{end for}
|
|
262
|
+
|
|
263
|
+
Run /{vocabulary.reweave} --handoff for: {TARGET}
|
|
264
|
+
This is the BACKWARD pass. Find OLDER {vocabulary.note_plural} AND sibling {vocabulary.note_plural}
|
|
265
|
+
that should reference this {vocabulary.note} but don't.
|
|
266
|
+
Add inline links FROM older {vocabulary.note_plural} TO this {vocabulary.note}.
|
|
267
|
+
ONE PHASE ONLY. Do NOT run {vocabulary.verify}.
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
For **{vocabulary.verify}** phase:
|
|
271
|
+
```
|
|
272
|
+
Read the task file at {config.ops_dir}/queue/{FILE} for context.
|
|
273
|
+
|
|
274
|
+
You are processing task {ID} from the work queue.
|
|
275
|
+
Phase: {vocabulary.verify} | Target: {TARGET}
|
|
276
|
+
|
|
277
|
+
Run /{vocabulary.verify} --handoff on: {TARGET}
|
|
278
|
+
Combined verification: recite (cold-read prediction test), validate (schema check),
|
|
279
|
+
review (per-note health).
|
|
280
|
+
IMPORTANT: Recite runs FIRST — read only title+description, predict content,
|
|
281
|
+
THEN read full {vocabulary.note}.
|
|
282
|
+
Final phase for this {vocabulary.note}. ONE PHASE ONLY.
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### 4c. Spawn Subagent (MANDATORY — NEVER SKIP)
|
|
286
|
+
|
|
287
|
+
Call the Task tool with the constructed prompt:
|
|
288
|
+
|
|
289
|
+
```
|
|
290
|
+
Task(
|
|
291
|
+
prompt = {the constructed prompt from 4b},
|
|
292
|
+
description = "{current_phase}: {short target}" (5 words max)
|
|
293
|
+
)
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**REPEAT: You MUST call the Task tool here.** Do NOT execute the prompt yourself. Do NOT "optimize" by running the task inline. The Task tool call is the ONLY acceptable action at this step.
|
|
297
|
+
|
|
298
|
+
Wait for the subagent to complete and capture its return value.
|
|
299
|
+
|
|
300
|
+
### 4d. Evaluate Return
|
|
301
|
+
|
|
302
|
+
When the subagent returns:
|
|
303
|
+
|
|
304
|
+
1. **Look for RALPH HANDOFF block** — search for `=== RALPH HANDOFF` and `=== END HANDOFF ===` markers
|
|
305
|
+
2. **If handoff found:** Parse the Work Done, Learnings, and Queue Updates sections
|
|
306
|
+
3. **If handoff missing:** Log a warning but continue — the work was still completed
|
|
307
|
+
4. **Capture learnings:** If Learnings section has non-NONE entries, note them for the final report
|
|
308
|
+
|
|
309
|
+
### 4e. Update Queue (Phase Progression)
|
|
310
|
+
|
|
311
|
+
After evaluating the return, advance the task to the next phase.
|
|
312
|
+
|
|
313
|
+
**Phase progression logic:**
|
|
314
|
+
|
|
315
|
+
Look up `phase_order` from the queue header to determine the next phase. Find `current_phase` in the array. If there is a next phase, advance. If it is the last phase, mark done.
|
|
316
|
+
|
|
317
|
+
**If NOT the last phase** — advance to next:
|
|
318
|
+
- Set `current_phase` to the next phase in the sequence
|
|
319
|
+
- Append the completed phase to `completed_phases`
|
|
320
|
+
|
|
321
|
+
**If the last phase** ({vocabulary.verify}) — mark task done:
|
|
322
|
+
- Set `status: done`
|
|
323
|
+
- Set `completed` to current UTC timestamp
|
|
324
|
+
- Set `current_phase` to null
|
|
325
|
+
- Append the completed phase to `completed_phases`
|
|
326
|
+
|
|
327
|
+
**For extract tasks ONLY:** Re-read the queue after marking done. The /{vocabulary.reduce} skill writes new task entries (1 entry per claim/enrichment with `current_phase`/`completed_phases`) to the queue during execution. The lead must pick these up for subsequent iterations.
|
|
328
|
+
|
|
329
|
+
### 4f. Report Progress
|
|
330
|
+
|
|
331
|
+
```
|
|
332
|
+
=== Task {id} complete ({i}/{N}) ===
|
|
333
|
+
Phase: {current_phase} -> {next_phase or "done"}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
If learnings were captured, show a brief summary.
|
|
337
|
+
If more unblocked tasks exist, show the next one.
|
|
338
|
+
|
|
339
|
+
### 4g. Re-filter Tasks
|
|
340
|
+
|
|
341
|
+
Before the next iteration, re-read the queue and re-filter tasks. Phase advancement may have changed eligibility (e.g., after completing a `create` phase, the task is now at `{vocabulary.reflect}` — if filtering by `--type {vocabulary.reflect}`, it becomes eligible).
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## Step 5: Post-Batch Cross-Connect (Serial Mode)
|
|
346
|
+
|
|
347
|
+
After advancing a task to "done" (Step 4e), check if ALL tasks in that batch now have `status: "done"`. If yes and the batch has 2 or more completed claims:
|
|
348
|
+
|
|
349
|
+
1. **Collect all {vocabulary.note} paths** from completed batch tasks. For each claim task with `status: "done"`, read the task file's `## Create` section to find the created {vocabulary.note} path.
|
|
350
|
+
|
|
351
|
+
2. **Spawn ONE subagent** for cross-connect validation:
|
|
352
|
+
```
|
|
353
|
+
Task(
|
|
354
|
+
prompt = "You are running post-batch cross-connect validation for batch '{BATCH}'.
|
|
355
|
+
|
|
356
|
+
{vocabulary.note_plural_title} created in this batch:
|
|
357
|
+
{list of ALL {vocabulary.note} titles + paths from completed batch tasks}
|
|
358
|
+
|
|
359
|
+
Verify sibling connections exist between batch {vocabulary.note_plural}. Add any that were missed
|
|
360
|
+
because sibling {vocabulary.note_plural} did not exist yet when the earlier {vocabulary.note}'s /{vocabulary.reflect} ran.
|
|
361
|
+
Check backward link gaps. Output RALPH HANDOFF block when done.",
|
|
362
|
+
description = "cross-connect: batch {BATCH}"
|
|
363
|
+
)
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
3. **Parse handoff block**, capture learnings. Include cross-connect results in the final report.
|
|
367
|
+
|
|
368
|
+
**Skip if:** batch has only 1 claim (no siblings) or tasks from the batch are still pending.
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
## Step 6: Parallel Mode (--parallel)
|
|
373
|
+
|
|
374
|
+
**When `--parallel` flag is present, SKIP Step 4 entirely and use this section instead.**
|
|
375
|
+
|
|
376
|
+
**Incompatible flags:** `--parallel` cannot be combined with `--type`. Parallel mode processes claims end-to-end (all phases). If `--type` is also set, report an error:
|
|
377
|
+
```
|
|
378
|
+
ERROR: --parallel and --type are incompatible. Parallel processes full {vocabulary.note} pipelines, not individual phases.
|
|
379
|
+
Use serial mode for per-phase filtering: /ralph N --type {vocabulary.reflect}
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
### Parallel Architecture
|
|
383
|
+
|
|
384
|
+
**Two-phase design:** Workers receive sibling {vocabulary.note} info upfront so they can link proactively. Phase B validates and catches any gaps.
|
|
385
|
+
|
|
386
|
+
```
|
|
387
|
+
Ralph Lead (you) — orchestration only
|
|
388
|
+
|
|
|
389
|
+
+-- PHASE A: PARALLEL {vocabulary.note_plural_upper} PROCESSING (concurrent)
|
|
390
|
+
| +-- worker-001: all 4 phases for {vocabulary.note} 001 (with sibling awareness)
|
|
391
|
+
| +-- worker-002: all 4 phases for {vocabulary.note} 002 (with sibling awareness)
|
|
392
|
+
| +-- worker-003: all 4 phases for {vocabulary.note} 003 (with sibling awareness)
|
|
393
|
+
| +-- ...up to 5 concurrent workers
|
|
394
|
+
|
|
|
395
|
+
+-- [semantic search index sync]
|
|
396
|
+
|
|
|
397
|
+
+-- PHASE B: CROSS-CONNECT VALIDATION (one subagent, one pass)
|
|
398
|
+
| +-- validates sibling links, adds any that workers missed
|
|
399
|
+
|
|
|
400
|
+
+-- CLEANUP + FINAL REPORT
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
**Why two phases?** Workers have sibling awareness ({vocabulary.note} titles in spawn prompt) and link proactively during /{vocabulary.reflect}//{vocabulary.reweave}. But timing means some sibling {vocabulary.note_plural} may not exist yet during a worker's /{vocabulary.reflect} phase. Phase B runs a single cross-connect pass after all {vocabulary.note_plural} exist.
|
|
404
|
+
|
|
405
|
+
### 6a. Identify Parallelizable Claims
|
|
406
|
+
|
|
407
|
+
From the filtered queue, find pending claims. A claim is parallelizable when its `status == "pending"`. Cap at 5 concurrent workers (or N, whichever is smaller).
|
|
408
|
+
|
|
409
|
+
Report:
|
|
410
|
+
```
|
|
411
|
+
=== Parallel Mode ===
|
|
412
|
+
Parallelizable {vocabulary.note_plural}: {count}
|
|
413
|
+
Max concurrent workers: {min(count, N, 5)}
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
### 6b. Spawn Claim Workers
|
|
417
|
+
|
|
418
|
+
For each parallelizable claim (up to N requested, max 5 concurrent):
|
|
419
|
+
|
|
420
|
+
Build the worker prompt with sibling awareness:
|
|
421
|
+
|
|
422
|
+
```
|
|
423
|
+
You are a {vocabulary.note} worker processing {vocabulary.note} "{TARGET}" from batch "{BATCH}".
|
|
424
|
+
|
|
425
|
+
{vocabulary.note_title} ID: {CLAIM_ID}
|
|
426
|
+
Task file: {config.ops_dir}/queue/{FILE}
|
|
427
|
+
Current phase: {CURRENT_PHASE}
|
|
428
|
+
Completed phases: {COMPLETED_PHASES}
|
|
429
|
+
|
|
430
|
+
SIBLING {vocabulary.note_plural_upper} IN THIS BATCH (link to these where genuine connections exist):
|
|
431
|
+
{for each other claim in the batch:}
|
|
432
|
+
- "{SIBLING_TARGET}" (task file: {config.ops_dir}/queue/{SIBLING_FILE})
|
|
433
|
+
{end for}
|
|
434
|
+
|
|
435
|
+
During /{vocabulary.reflect_upper} and /{vocabulary.reweave_upper}, check if your {vocabulary.note} genuinely connects to any sibling.
|
|
436
|
+
If a sibling {vocabulary.note} exists in {config.notes_dir}/, link to it inline where the
|
|
437
|
+
connection is real. If it does not exist yet (still being created), skip —
|
|
438
|
+
cross-connect will catch it after.
|
|
439
|
+
|
|
440
|
+
Read the task file for full context. Execute phases from current_phase onwards.
|
|
441
|
+
If completed_phases is not empty, skip those phases (resumption mode).
|
|
442
|
+
|
|
443
|
+
When complete, update the queue entry to status "done" and report the created
|
|
444
|
+
{vocabulary.note} title, path, and {vocabulary.note} ID. The lead needs this for cross-connect.
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
Spawn via Task tool:
|
|
448
|
+
```
|
|
449
|
+
Task(
|
|
450
|
+
prompt = {the constructed prompt},
|
|
451
|
+
description = "{vocabulary.note}: {short target}" (5 words max)
|
|
452
|
+
)
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
**Spawn workers in PARALLEL** — launch all Task tool calls in a single message, not sequentially.
|
|
456
|
+
|
|
457
|
+
### 6c. Monitor Workers (Phase A)
|
|
458
|
+
|
|
459
|
+
Wait for worker completions. As workers complete:
|
|
460
|
+
|
|
461
|
+
1. **Parse completion message** — extract the created {vocabulary.note} title and path (needed for Phase B)
|
|
462
|
+
2. **Log any learnings** from the worker's report
|
|
463
|
+
3. **Check for issues** — failures, skipped phases, resource conflicts
|
|
464
|
+
|
|
465
|
+
**Collect all created {vocabulary.note_plural}** — maintain a list of `{note_title, note_path}` from worker completion messages. You need this for the cross-connect validation phase.
|
|
466
|
+
|
|
467
|
+
**Completion gate:** Phase B CANNOT start until ALL spawned workers have reported back (either success or error). Track completions:
|
|
468
|
+
|
|
469
|
+
```
|
|
470
|
+
Workers spawned: {total_spawned}
|
|
471
|
+
Workers completed: {completion_count}
|
|
472
|
+
Workers with errors: {error_count}
|
|
473
|
+
|
|
474
|
+
Phase B ready: {completion_count + error_count == total_spawned}
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
Do NOT proceed to Phase B while any worker is still running.
|
|
478
|
+
|
|
479
|
+
### 6d. Cross-Connect Validation (Phase B)
|
|
480
|
+
|
|
481
|
+
**Light validation pass.** Workers had sibling awareness during Phase A and linked proactively. This phase validates their work and catches gaps.
|
|
482
|
+
|
|
483
|
+
**Skip if only 1 {vocabulary.note} was processed** (no siblings to cross-connect).
|
|
484
|
+
|
|
485
|
+
Spawn ONE subagent for cross-connect validation:
|
|
486
|
+
|
|
487
|
+
```
|
|
488
|
+
Task(
|
|
489
|
+
prompt = "You are running post-batch cross-connect validation for batch '{BATCH}'.
|
|
490
|
+
|
|
491
|
+
{vocabulary.note_plural_title} created in this batch:
|
|
492
|
+
{list of ALL newly created {vocabulary.note} titles with paths from Phase A}
|
|
493
|
+
|
|
494
|
+
Verify sibling connections exist between these {vocabulary.note_plural}. Add any connections that
|
|
495
|
+
workers missed because sibling {vocabulary.note_plural} did not exist yet when a worker's /{vocabulary.reflect} ran.
|
|
496
|
+
Check backward link gaps. Output RALPH HANDOFF block when done.",
|
|
497
|
+
description = "cross-connect: batch {BATCH}"
|
|
498
|
+
)
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
Parse the handoff block, capture learnings.
|
|
502
|
+
|
|
503
|
+
Report after Phase B:
|
|
504
|
+
```
|
|
505
|
+
=== Cross-Connect Validation Complete ===
|
|
506
|
+
Sibling connections validated: {count}
|
|
507
|
+
Missing connections added: {count}
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
### 6e. Cleanup
|
|
511
|
+
|
|
512
|
+
After Phase B completes (or after Phase A if cross-connect was skipped):
|
|
513
|
+
|
|
514
|
+
1. Clean any lock files if created
|
|
515
|
+
2. Skip to Step 7 for the final report, noting parallel mode in the output
|
|
516
|
+
|
|
517
|
+
---
|
|
518
|
+
|
|
519
|
+
## Step 7: Final Report
|
|
520
|
+
|
|
521
|
+
After all iterations (or when no unblocked tasks remain):
|
|
522
|
+
|
|
523
|
+
```
|
|
524
|
+
--=={ ralph }==--
|
|
525
|
+
|
|
526
|
+
Processed: {count} tasks
|
|
527
|
+
{breakdown by phase type}
|
|
528
|
+
|
|
529
|
+
Subagents spawned: {count} (MUST equal tasks processed)
|
|
530
|
+
|
|
531
|
+
Learnings captured:
|
|
532
|
+
{list any friction, surprises, methodology insights, or "None"}
|
|
533
|
+
|
|
534
|
+
Queue state:
|
|
535
|
+
Pending: {count}
|
|
536
|
+
Done: {count}
|
|
537
|
+
Phase distribution: {create: N, {vocabulary.reflect}: N, {vocabulary.reweave}: N, {vocabulary.verify}: N}
|
|
538
|
+
|
|
539
|
+
Next steps:
|
|
540
|
+
{if more pending tasks}: Run /ralph {remaining} to continue
|
|
541
|
+
{if batch complete}: Run /archive-batch {batch-id}
|
|
542
|
+
{if queue empty}: All tasks processed
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
**Verification:** The "Subagents spawned" count MUST equal "Tasks processed." If it does not, the lead executed tasks inline — this is a process violation. Report it as an error.
|
|
546
|
+
|
|
547
|
+
If `--handoff` flag was set, also output:
|
|
548
|
+
|
|
549
|
+
```
|
|
550
|
+
=== RALPH HANDOFF: orchestration ===
|
|
551
|
+
Target: queue processing
|
|
552
|
+
|
|
553
|
+
Work Done:
|
|
554
|
+
- Processed {count} tasks: {list of task IDs}
|
|
555
|
+
- Types: {breakdown by type}
|
|
556
|
+
|
|
557
|
+
Learnings:
|
|
558
|
+
- [Friction]: {description} | NONE
|
|
559
|
+
- [Surprise]: {description} | NONE
|
|
560
|
+
- [Methodology]: {description} | NONE
|
|
561
|
+
- [Process gap]: {description} | NONE
|
|
562
|
+
|
|
563
|
+
Queue Updates:
|
|
564
|
+
- Marked done: {list of completed task IDs}
|
|
565
|
+
=== END HANDOFF ===
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
---
|
|
569
|
+
|
|
570
|
+
## Error Recovery
|
|
571
|
+
|
|
572
|
+
**Subagent crash mid-phase:** The queue still shows `current_phase` at the failed phase. The task file confirms the corresponding section is empty. Re-running `/ralph` picks it up automatically — the task is still pending at that phase.
|
|
573
|
+
|
|
574
|
+
**Queue corruption:** If the queue file is malformed, report the error and stop. Do NOT attempt to fix it automatically.
|
|
575
|
+
|
|
576
|
+
**All tasks blocked:** Report which tasks are blocked and why. Suggest remediation.
|
|
577
|
+
|
|
578
|
+
**Empty queue:** Report "Queue is empty. Use /seed or /pipeline to add sources."
|
|
579
|
+
|
|
580
|
+
---
|
|
581
|
+
|
|
582
|
+
## Quality Gates
|
|
583
|
+
|
|
584
|
+
### Gate 1: Subagent Spawned
|
|
585
|
+
Every task MUST be processed via Task tool. If the lead detects it executed a task inline, log this as an error and flag it in the final report.
|
|
586
|
+
|
|
587
|
+
### Gate 2: Handoff Present
|
|
588
|
+
Every subagent SHOULD return a RALPH HANDOFF block. If missing: log warning, mark task done, continue.
|
|
589
|
+
|
|
590
|
+
### Gate 3: Extract Yield
|
|
591
|
+
For extract tasks: if zero {vocabulary.note_plural} extracted, log as an observation. Do NOT retry automatically.
|
|
592
|
+
|
|
593
|
+
### Gate 4: Task File Updated
|
|
594
|
+
After each phase, the task file's corresponding section (Create, {vocabulary.reflect_title}, {vocabulary.reweave_title}, {vocabulary.verify_title}) should be filled. If empty after subagent completes, log warning.
|
|
595
|
+
|
|
596
|
+
---
|
|
597
|
+
|
|
598
|
+
## Critical Constraints
|
|
599
|
+
|
|
600
|
+
**Never:**
|
|
601
|
+
- Execute tasks inline in the lead session (USE THE TASK TOOL)
|
|
602
|
+
- Process more than one phase per subagent (context contamination)
|
|
603
|
+
- Retry failed tasks automatically without human input
|
|
604
|
+
- Skip queue phase advancement (breaks pipeline state)
|
|
605
|
+
- Process tasks that are not in pending status
|
|
606
|
+
- Run if queue file does not exist or is malformed
|
|
607
|
+
- In parallel mode: combine with --type (incompatible)
|
|
608
|
+
|
|
609
|
+
**Always:**
|
|
610
|
+
- Spawn a subagent via Task tool for EVERY task (the lead ONLY orchestrates)
|
|
611
|
+
- Include sibling {vocabulary.note} titles in {vocabulary.reflect} and {vocabulary.reweave} prompts
|
|
612
|
+
- Re-read queue after extract tasks (subagent adds new entries)
|
|
613
|
+
- Re-filter tasks between iterations (phase advancement creates new eligibility)
|
|
614
|
+
- Log learnings from handoff blocks
|
|
615
|
+
- Report failures clearly for human review
|
|
616
|
+
- Verify subagent count equals task count in final report
|