Skip to content

feat: Phases 8-9 + catalog pipeline refactor#831

Merged
aRustyDev merged 17 commits into
mainfrom
pr/2-phases-8-9-catalog
Mar 28, 2026
Merged

feat: Phases 8-9 + catalog pipeline refactor#831
aRustyDev merged 17 commits into
mainfrom
pr/2-phases-8-9-catalog

Conversation

@aRustyDev
Copy link
Copy Markdown
Owner

Summary

  • Phase 8: agents config command (get/set/list/edit/path), scaffold templates for persona/hook types, shell completions (bash/zsh/fish), fix 42 stale path references across docs
  • Phase 9: agents doctor (environment health checks) + agents serve (graph-viewer web + API endpoints)
  • Catalog refactor: Per-repo discovery replaces per-skill download; discoverAllRepos() as primary entry point; --apply flag for auto-reconciliation

Test plan

  • agents config set general.debug true + agents config get general.debug round-trips
  • agents completions bash outputs valid completion script
  • agents doctor shows runtime/project/config/component checks
  • agents catalog discover --apply applies reconciliation

🤖 Generated with Claude Code

aRustyDev and others added 17 commits March 24, 2026 22:16
…lict

The Component interface in registry.ts (crawled catalog entries) conflicted
with the main Component interface in component/types.ts. Renamed to
CatalogRecord with a distinguishing doc comment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds toEntityType() and toComponentType() bridge functions to convert
between CLI kebab-case ComponentType and KG snake_case EntityType,
enabling consistent type mapping across the codebase.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
readConfigFile() now validates parsed TOML against a valibot schema
before transforming keys. Invalid configs warn but still work (lenient
mode). Exports AgentsConfigTomlSchema for future `agents config validate`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract Plugin class, validation functions, and display helpers from
commands/plugin.ts into lib/plugin-ops.ts for reuse from lint.ts.
Wire up plugin linting in lint.ts via dynamic import of plugin-ops.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ai-txa: Rename registry.ts Component → CatalogRecord to disambiguate
- ai-567: Add toEntityType() / toComponentType() bridge functions
- ai-a4s: Add valibot schema validation to TOML config reader
- ai-78a: Extract Plugin class to lib/plugin-ops.ts (plugin.ts 1354→658),
  wire lint.ts for plugin validation

9 new tests, zero regressions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… subcommands

Implements CLI configuration management on top of the existing config.ts
foundation. Supports dotted-path key access, auto type coercion, layered
source attribution, and $EDITOR integration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add generic initComponent() that copies template dirs with {{name}}
replacement. Wire into `agents init` for types with templateDir.
Templates: content/personas/_template, content/hooks/_template.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ling

Replace components/skills -> content/skills, context/* -> content/*,
cli/ -> packages/cli/ in CLAUDE.md, README.md, content files, justfiles,
and Python embed scripts. Update CLAUDE.md directory structure to reflect
current layout (packages/cli/src/, hooks/, package.json, bun.lock).
Update CLI grammar references from noun-first to verb-first.
Fix ruff.toml exclude/ignore paths for content/ directory rename.
Add missing words to cspell dictionary. Fix pre-existing markdown lint.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove unnecessary escape sequences in bash/zsh completion generators.
The \$ escapes before non-brace characters are redundant in JS template
literals and flagged by biome's noUselessEscapeInString rule.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…fixes

- ai-zgs: `agents config get/set/list/edit/path` with TOML storage
- ai-9ev: Scaffold templates for persona and hook types + generic
  initComponent() for template-based scaffolding
- ai-m44: `agents completions bash/zsh/fish` shell completion generator
- ai-6d6: Fix 42 files with stale path references (components/→content/,
  context/→content/, cli/→packages/cli/src/), update CLAUDE.md + README

28 new tests, zero regressions

Closes: ai-zgs, ai-9ev, ai-m44, ai-6d6, ai-kh8

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Checks runtime (Bun, Node, Git), project structure, config validity,
and installed component counts. Supports --json output mode.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Serve supports --web (graph viewer, default) and --api (minimal REST
endpoints: /api/health, /api/components, /api/components/:type).
Wires both doctor and serve into the agents CLI entrypoint.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- `agents doctor`: Runtime, project, config, and component health checks
  with structured output (human/JSON)
- `agents serve --web`: Delegates to existing graph-viewer
- `agents serve --api`: Minimal Bun HTTP server with /api/health,
  /api/components, /api/components/:type endpoints

22 new tests, zero regressions

Closes: ai-62i

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…wnloadBatch

Replace per-skill downloadBatch() with per-repo discoverAllRepos() in the
analyze subcommand. Repos with multiple skills are now cloned once during a
single discovery phase, then looked up from a map during batch processing.

- Add content field to DiscoveredSkillResult so SKILL.md text survives cleanup
- Store content in computeAllMechanicalFields() during discovery
- Analyze now runs discovery once upfront, builds source:skill lookup maps
- processBatch resolves skills from discovery map instead of cloning
- Propagate all mechanical fields from discovery (including ComponentMetadata)
- Remove unused downloadBatch and cpSync imports from catalog.ts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… (ai-1f1)

The discover subcommand now runs reconcile() + detectMoveRenames() on
discovery results and prints a reconciliation summary. When --apply is
passed, applyReconciliation() writes changes back to the catalog NDJSON:
adds new entries, marks removals, refreshes mechanical fields on
updated/moved entries, and handles renames preserving analysis data.
Writes are atomic (tmp + rename).

Also adds --full flag to force re-cloning all repos (bypass cache).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add clarifying comments to downloadSkill(), downloadBatch(), and
backfillEntries() in catalog-download.ts noting they serve the
`agents add skill` use case, not catalog analysis (which now uses
discoverAllRepos from catalog-discover.ts). Notes backfillEntries as
a future candidate for discovery-based refactoring.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Refactor analyze to use discoverAllRepos() instead of downloadBatch(),
  cloning each unique repo exactly once instead of per-skill
- Store SKILL.md content in DiscoveredSkillResult for manifest building
- Add applyReconciliation() + --apply flag to discover subcommand
- Add --full flag to bypass incremental discovery cache
- Document download vs discovery code path separation
- Incremental HEAD SHA checking was already wired (pre-existing)

Zero test regressions, same NDJSON output format

Closes: ai-hns, ai-1f1, ai-n1k, ai-o8m, ai-f3u

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Base automatically changed from pr/1-phases-6-7 to main March 28, 2026 02:31
@aRustyDev aRustyDev merged commit 0c1fc82 into main Mar 28, 2026
4 checks passed
@aRustyDev aRustyDev deleted the pr/2-phases-8-9-catalog branch March 28, 2026 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant