Skip to content

feat(core): consolidate skills config, ship JSON schema, simplify gitignore#11

Merged
rgdevme merged 2 commits into
mainfrom
claude/keen-wu-b02dad
May 19, 2026
Merged

feat(core): consolidate skills config, ship JSON schema, simplify gitignore#11
rgdevme merged 2 commits into
mainfrom
claude/keen-wu-b02dad

Conversation

@rgdevme
Copy link
Copy Markdown
Owner

@rgdevme rgdevme commented May 19, 2026

Summary

  • Consolidate skills config under agnos.json#skills. The skills map and paths.skillsDir are now a single block: skills: { route, sources }, mirroring how docs is configured. One top-level key per domain, no more fragmentation.
  • Ship a JSON schema for agnos.json. New packages/core/schema.json (Draft 2020-12) covers the full config surface — agents, rules, skills, mcp, docs. The default $schema (and agnos init backfill on existing projects) points at https://unpkg.com/@luxia/core/schema.json so editors get autocomplete + validation as soon as the next version is published.
  • Simplify the gitignore. agnos init now writes a single .agnos/ line instead of .agnos/cache/ + .agnos/state.json. Everything under .agnos/ is reproducible from agnos.json + agnos.lock.json.

Breaking change

agnos.json shape has changed. Before:

```json
{
"skills": { "pdf": "github:..." },
"paths": { "skillsDir": ".agnos/skills" }
}
```

After:

```json
{
"skills": {
"route": ".agnos/skills",
"sources": { "pdf": "github:..." }
}
}
```

Existing projects will need to move their skills map under skills.sources and (if customized) paths.skillsDir under skills.route manually. No auto-migration is written — flag if you want one added before merge.

Notable code touchpoints

  • Schema/types: `packages/core/src/schema.ts`, `packages/core/src/types/public.ts` (new `SkillsConfig` interface; removed `PathsConfig`).
  • Readers: `paths.ts` reads `config.skills?.route`; `orchestrator.ts`, `skill-prepare.ts`, and `commands/skill.ts` iterate `config.skills?.sources`.
  • Public exports: `SkillsConfig`, `skillSourcesSchema`, `SCHEMA_URL` added; `PathsConfig` / `pathsConfigSchema` removed.
  • `commands/init.ts`: `ensureGitIgnore` writes one line; new `backfillSchemaField` sets `$schema` on existing configs.
  • `packages/core/package.json` `files` includes `schema.json` so it ships in the published tarball.

Test plan

  • `pnpm -r typecheck` clean across all 8 packages
  • `pnpm -r test` — 155/155 passing (17 + 1 + 6 test files in core / domain-skills / domain-docs)
  • Hand-validated example JSON in README parses against the new schema via `ajv-cli` (draft 2020); invalid inputs (non-string agent ids, illegal skill names) correctly rejected
  • Smoke-test `agnos init` against a fresh project once published — confirm `$schema` lands and `.agnos/` gitignore line is correct
  • Confirm IDE schema fetch works once `@luxia/core@0.0.7+` is on npm with `schema.json` in the tarball

rgdevme added 2 commits May 19, 2026 16:46
…ignore

- Merge `agnos.json#skills` map and `agnos.json#paths.skillsDir` into a single
  `skills: { route, sources }` block, mirroring the `docs` config shape so all
  skills configuration lives under one top-level key.
- Add `packages/core/schema.json` (Draft 2020-12) covering the full agnos.json
  surface. Ship it in the published tarball; default `$schema` (and
  `agnos init` backfill on existing configs) points at
  `https://unpkg.com/@luxia/core/schema.json` so editors get
  autocomplete/validation out of the box.
- Reduce the gitignore footprint to a single `.agnos/` entry — everything
  under it (cache, state.json, materialized skills) is reproducible from
  `agnos.json` + `agnos.lock.json`.
Resolves conflicts after main's InitStep feature landed alongside the skills-
config consolidation on this branch.

- .gitignore: main already covers .agnos and .claude under the AGENTS block;
  drop the local additions.
- packages/core/src/commands/init.ts: keep SCHEMA_URL import alongside main's
  new init flow.
- packages/domain-skills/src/index.ts: rewrite the new initSteps callback to
  read and persist `skills.route` (this branch's shape) instead of the
  removed `paths.skillsDir` field.
@rgdevme rgdevme merged commit c11939c into main May 19, 2026
1 check passed
@rgdevme rgdevme deleted the claude/keen-wu-b02dad branch May 19, 2026 15:05
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