Skip to content

feat(core): M4 — skills + sub-agents + output styles loaders#5

Merged
oratis merged 1 commit into
mainfrom
feat/m4-skills-agents-styles
May 27, 2026
Merged

feat(core): M4 — skills + sub-agents + output styles loaders#5
oratis merged 1 commit into
mainfrom
feat/m4-skills-agents-styles

Conversation

@oratis

@oratis oratis commented May 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Shipped: zero-dep YAML frontmatter parser; skills loader with 4-layer resolution; sub-agents loader; output styles loader with 4 built-ins.
  • 240 tests passing / 0 failed (was 206).
  • 15 built-in skill markdown files (init/verify/run/etc.) deferred as content work — the loader picks them up when authored.
  • Skill tool for invocation in M5.

Release notes

  • release-notes:feature

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

Implements docs/DEVELOPMENT_PLAN.md §3.13 / §3.13a / §3.13b loaders.

Shipped
-------
- skills/frontmatter.ts (115 lines)
  Zero-dep YAML frontmatter parser supporting the subset SKILL.md / sub-agent /
  output-style files actually use: strings (quoted or bare), numbers, booleans,
  flow-style arrays ["a","b"], block-style arrays, simple block objects.

- skills/loader.ts (110 lines)
  4-layer loader: builtin (compiled-in dir) / user (~/.deepcode/skills/) /
  project (<cwd>/.deepcode/skills/) / plugin (<plugin>/skills/, name prefixed
  with `<plugin>:`). Honors `disabled: true` in frontmatter + settings.json
  `skillOverrides[name].disabled`. `buildSkillsDescriptionBlock()` produces
  the system-prompt fragment listing name+description (body loaded on invoke).

- sub-agents/loader.ts (75 lines)
  Loads .deepcode/agents/*.md. Frontmatter spec: name / description / tools[] /
  model / isolation (subprocess|worktree|none) / maxTurns. Supports CLI
  --agents <dir> override via projectDirOverride option. findSubAgent() helper.

- output-styles/loader.ts (105 lines)
  4 built-in styles (default / explanatory / learning / proactive) from
  §3.13b. User → project layer replacement semantics. applyStyle(base, style)
  appends body to system prompt; respects keep-coding-instructions frontmatter.

Top-level @deepcode/core re-exports all M4 surfaces.

Tests
-----
- frontmatter.test.ts  (10) — quoted strings, booleans, numbers, both array
                              styles, block objects, comments, malformed
- loader.test.ts       ( 9) — user/project sources, plugin qualification,
                              tools/effort/model frontmatter, disabled filter,
                              malformed skip, override gate
- sub-agents/loader.test.ts  ( 6) — all frontmatter fields, layer ordering,
                                     projectDirOverride, findSubAgent
- output-styles/loader.test.ts (9) — 4 builtins, user override displaces
                                     builtin, project displaces user,
                                     applyStyle composition

Total: 240 passed / 4 skipped / 0 failed (was 206).

Deferred
--------
- 15 built-in skill markdown FILES (loader finds whatever's on disk; content
  authoring is out-of-band, not engineering work).
- `Skill` tool for invocation (M5 — will inject skill body into next turn's
  system messages).
- REPL plumbing for skill-frontmatter effort overrides (paired with Skill tool).
- `auto` classifier mode (M3c).

Verified
--------
  pnpm typecheck    → green
  pnpm test         → 240 passed / 4 skipped
  pnpm format:check → conformant

Docs
----
- docs/milestones/M4.md — delivery report + deferred items

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@oratis oratis merged commit 46208ec into main May 27, 2026
@oratis oratis deleted the feat/m4-skills-agents-styles branch May 27, 2026 16:37
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