fix(agents): wire flat-file YAML loader into AgentRegistry (v0.1.11) - #8
Merged
Merged
Conversation
v0.1.10 added flat-file YAML-frontmatter agent discovery to LocalDiscoverySource (the DiscoveryCatalog code path used by the CLI subcommand `archon agent list`). The TUI surface (/agent list, /run-agent, AgentTool spawning, all session paths) reads from a DIFFERENT system — `AgentRegistry::load_with_user_home()` — which v0.1.10 did not touch. Result: /agent list in the TUI showed 13 agents — only the .archon/agents/custom/<name>/ 6-file dirs. The 305 flat-file .md agents in .archon/agents/ (claude-flow shape: over-engineering- therapist.md, coding-pipeline/*.md, github/*.md, analysis/*.md, etc.) were silently dropped by the registry loader. Root cause: AgentRegistry::load_with_user_home only walked five sources (built-ins, project plugins, user plugins, project custom 6-file, user custom 6-file). No flat-file path existed. Fix: - New load_flat_file_agents(dir, source) in loader.rs. Walks .archon/agents/ recursively, skips custom/ (6-file path) and dotted/underscored dirs, parses YAML frontmatter via serde_yml, maps to CustomAgentDefinition. Handles tools as CSV string or YAML array. Falls back to filename stem when name: key absent. - Wired as tiers 4/6 (flat-file) and 5/7 (6-file) in the registry loader. 6-file loads AFTER flat-file at each scope so the more explicit 6-file shape wins on key collision. User scope wins over project scope (existing convention). - 9 loader tests + 5 registry tests (including lockstep fixture). - Version 0.1.10 → 0.1.11. Observations: - cargo test -p archon-core: 435 passed, 0 failed - cargo fmt --check: clean - cargo build --release --bin archon: PASS - 305 flat-file .md agents on disk, 0 name collisions with custom/ - 2 workspace snapshot failures pre-existing in archon-tui (splash)
ste-bah
added a commit
that referenced
this pull request
May 4, 2026
…re isolation Phase 4 ships routing engine, DAG wave grouping, conditional specialist selection from .archon/specs/gametheory.yaml, and final-stage assembly (scanner/mapper/writer/combiner/style_applier). Tier 1 classification and specialist execution remain stubs in Phase 4: - generate_synthetic_fingerprint uses keyword regex matching - execute_specialist_stub returns templated placeholder text per agent - CLI prints a NOTE banner on every run/replay flagging stub mode Phase 5 wires real LLM agent execution while retaining keyword fallback. Cold-read audit fixes from #8 + #9: - resolve_spec_path search ladder: --spec-path flag, $ARCHON_SPEC_PATH env, upward walk 5 levels, ~/.archon/specs/, /etc/archon/specs/. GameTheoryError::SpecNotFound enumerates all searched paths on miss. - Failure isolation design + test hook (-FORCE-FAIL-FOR-TEST agent_key suffix). failed_specialists Vec<(key, msg)> in FullPipelineResult. Run status "partial" when mixed success/fail, "completed" otherwise. [FAILED] placeholder section in combiner output. - shadow_games_count condition removed from spec (Option B). Agent is mandatory so condition never evaluated. - CLI NOTE banner in run + replay output until real agents wired. 7 new Cozo relations (gt_routing_decisions, gt_enabled_specialists, gt_skipped_specialists, gt_specialist_outputs, gt_sections, gt_final_reports, gt_provenance_edges) all use key=>values syntax. Idempotent via existing run_create + COZO_RELATION_ALREADY_EXISTS const. CLI: archon gametheory {run, list-runs, show, inspect-routing, replay} [--spec-path PATH] [--classify-only]. Tests: gametheory 14 -> 49 (+35 new). Phase 1+2 sealed at 62/62 archon-docs.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v0.1.10 wired the flat-file YAML-frontmatter loader into the wrong agent system.
There are two parallel agent systems in this repo:
LocalDiscoverySource::load_all()archon agent list/search/infoAgentRegistry::load_with_user_home()/agent list,/run-agent, AgentTool spawning, all session pathsv0.1.10 added flat-file parsing to
LocalDiscoverySource(DiscoveryCatalog). The TUI surface — which is what Steven actually uses — reads fromAgentRegistry, which only walked.archon/agents/custom/<name>/6-file dirs. Result: 333+ flat-file YAML agents in.archon/agents/*.mdinvisible to the TUI.Fix
load_flat_file_agents(dir, source) -> Vec<CustomAgentDefinition>incrates/archon-core/src/agents/loader.rs.archon/agents/, skipscustom/(handled by 6-file path) and dot/underscore-prefixed dirsname/description/tools/model/color/tagstoCustomAgentDefinitionsystem_promptAgentRegistry::load_with_user_homeTest plan
/agent listreturns >200 (was 13),/run-agent over-engineering-therapist "say hi"dispatches in default mode