Dogfooding Findings
Using moss on itself. Patterns and observations from both CLI usage and agent runs.
Agent Dogfooding
What Works
- Ephemeral context model: 1-turn output visibility forces explicit memory curation via
$(keep)/$(note) - State machine (explorer/evaluator): Prevents pre-answering; evaluator curates, explorer acts
- Session logging: JSONL logs in
.moss/agent/logs/enable post-hoc analysis moss sessions --format moss: List/grep agent sessions for debugging- Working memory: Synthesized notes (
$(note)) survive longer than raw outputs
Friction Points Discovered
- View loops: Agent can view same files repeatedly without extracting info (7× same file, 15 turns, incomplete)
- Cause:
viewoutput doesn't contain needed info directly - Pattern: succeeds when tool output = answer, struggles when output requires interpretation
- Cause:
- Text-search syntax confusion: Agent used grep syntax (
\|) with text-search despite tool being renamed- Shows agents don't understand tool semantics, just syntax
- Large file edits: Edit tool match failures on large deletions
- Context compaction: Claude Code's auto-compaction lost in-progress work (moss's dynamic reshaping avoids this)
Key Insights
- Role framing beats instructions: "You are an EVALUATOR" + banned phrases + examples beats instruction-only
- Concrete examples prevent defaults: Example in prompt prevents LLM defaulting to XML function calls
- Context uniqueness: Identical context between any two LLM calls risks loops
- Cross-project parallelization: Running separate Claude Code sessions per project avoids within-project coordination costs
Session Analysis Workflow
bash
moss sessions --format moss # list recent agent sessions
moss sessions --format moss --grep "benchmark" # filter by content
moss sessions <id> --analyze # full analysisView Primitive
What Works:
- Fuzzy path resolution:
view skeleton.rsfindscrates/moss/src/skeleton.rs - Symbol paths:
view skeleton.rs/SkeletonExtractor - Underscore/hyphen equivalence:
moss-apimatchesmoss_api --depthcontrols expansion level--jsonfor structured output
Gaps:
- No
--types-onlyfilter (would show only structs/enums/traits) - No
--fisheyemode (show imported module signatures)
Analyze Primitive
What Works:
--health: codebase metrics (files, lines, complexity summary, grade)--complexity: per-function cyclomatic complexity with risk levels- Threshold filter:
-t 10shows only functions above threshold - Works without index (filesystem fallback)
Gaps:
- Security scanning not integrated (bandit, semgrep, cargo-audit)
Investigation Flow
Effective pattern for understanding unfamiliar code:
moss view .- get tree structuremoss view <file>- file skeleton with symbolsmoss analyze --complexity- find complex areasmoss view <file>/<symbol>- drill into specific symbol
Token Efficiency
- Use shallow depth (
--depth 1) for overview - Symbol paths (
file/Symbol) avoid loading entire file --json | jqfor extracting specific fields- Health check before diving into specifics
CLI Conventions
Global flags:
--jsonfor structured output--prettyfor human-friendly display (tables, colors, alignment)- Default is token-efficient (minimal decoration)
- All commands work with fuzzy paths
Future Improvements
--types-onlyfilter for architectural overview--fisheyeto show imported dependencies inline--visibility public|allfilter- Cross-language import resolution (Rust
use, TypeScriptimport)