v6.1.2
v6.1.2 — 2026-06-11
The self-improvement-substrate release: a persistent tool toolkit so a session never forgets a capability, a standardized + back-compatible workdir layout, per-flock-role loop templates, discovery waves on Dynamic Workflows, and a flock-profile polish pass.
Toolkit — persistent tool memory (operator request)
The flagship of this version. A mutable registry (toolkit.json) of commonly-used tools — MCP servers, skills, plugins, CLIs, ssh targets — so a Claude Code session never forgets a capability exists and the operator never has to re-explain it (e.g. ssh pzzld@laptop for a self-hosted dev surface, the context7 MCP). It is the tool-memory sibling of the adaptation loop's lesson-memory (doctrines/self-improvement.md).
- Two tiers, merged at read time. Project-local
<namespace>/toolkit.json(tracked) ⊕ user-global$XDG_CONFIG_HOME/shepherd/toolkit.json; thescopefield routes each entry, and local overrides global on name collision — so cross-project tools live once, globally. - Entry schema. Required
{ name, scope (local|global), type (mcp|skill|plugin|cli), capabilities[], description }plus optionalinvocation,when,tags,pinned. JSON Schema atskills/context/references/toolkit.schema.json; the validator warns (never fails) on a non-canonicaltypeso ssh/service targets are permitted. - CLI. New
skills/context/scripts/cmd_toolkit.sh(registered inshctx):toolkit list|add|rm|pin|unpin|show|md|init|validate. Lazily creates the file on firstadd;mdemits compact markdown (graceful-empty — nothing on an empty registry, exactly likeshctx adapt priors). - Three surfaces keep it in front of the model. (1) A SessionStart hook
hooks/scripts/toolkit_surface.shinjects a compact, ≤12-entry, pinned-first roster every session (fail-open; suppressed by[hooks].quiet_warnings); (2) theshctx toolkitCLI; (3) a[TOOLKIT]block injected into engineer/coder/planter briefs viacmd_inject.sh(variable-tail, cache-discipline-preserving). - Doctrine + command + examples.
skills/shepherd/doctrines/toolkit.md(bounded / graceful-empty / never-store-secrets),commands/toolkit.md(/shepherd:toolkit),examples/{axiom,minimal}/toolkit.json, and the five tool-using agents (engineer, coder, worker, discovery, planter) gained a one-line toolkit-awareness nudge. Test:skills/context/tests/test_toolkit.sh.
Standardized workdir layout — one consistent tree, totally back-compatible (operator request)
The per-project workdir now follows a standardized internal tree — docs/{plans,reports,diagrams,handoffs,specs,journal}/, logs/, archive/, cache/, scripts/, templates/, tmp/, types/, plus toolkit.json (tracked) and shepherd.db (gitignored). Adopted additively per the #121 "never mass-rename" invariant.
root.db→shepherd.db, with auto-detection.shctx_db_path()prefersshepherd.db, falls back to legacyroot.db, defaults toshepherd.dbfor new projects — mirroring the existing.shepherd/↔.artifacts/resolution. Zero change for legacy trees.plans/+reports/now nest underdocs/.[paths]defaults updated;scaffold.shscaffolds the full tree with.gitkeepfor tracked-but-empty dirs.- Opt-in migration.
shctx migrate --layout v2git mvsplans/→docs/plans/,reports/→docs/reports/, renamesroot.db→shepherd.db, and creates the new dirs — idempotent, no-clobber. *.{group}.{ext}naming, formalized.references/naming-conventions.mddocuments the uniform<slug>.<group>.<ext>rule and adds log patterns{date}.log.md(human) +{ts}.log.jsonl(machine);cmd_lint.shaccepts both the legacy and new locations + log groups..gitignorecoversshepherd.db*under both namespaces and keepstoolkit.jsontracked.
Per-role loop templates — bounded, role-shaped Loop-Until-Done (operator request)
/shepherd:loop (Pattern 6) gains a per-flock-role catalog so the loop primitive is reusable per agent. New skills/shepherd/references/loop-templates.md defines seven templates — CODER-CONVERGENCE (fix-until-green), DISCOVERY-EXHAUST (research-until-comprehensive), WORKER-WATCH / WORKER-CONVERGENCE, AUDITOR-REFINE, ENGINEER-PLAN-REFINE, and the orchestrator's FOCUS-LOOP — each specializing an existing composite, each with a hard --max cap and a measurable terminate-on predicate. New binding doctrine skills/shepherd/doctrines/loop-templates.md; commands/loop.md points operators at the catalog. No new halt codes (reuses the v6.0.9 circuit-breaker set).
Discovery waves compile to Dynamic Workflows (operator request)
All discovery fan-out now compiles like coder/audit fan-out instead of dispatching as inline Agent batches. doctrines/workflow-compile-down.md §V documents INTRO-COMBO-WAVE and DISCOVERY-COMBO-WAVE as compile targets (gate-free, parallel-safe → one Promise.all of discovery + auditor [+ worker] spawns); intro-combo-wave.md and discovery-combo-wave.md adopt the compile framing; pipeline.md gains the missing DISCOVERY-COMBO-WAVE taxonomy row. The compiler cmd_graph.sh was already role-agnostic (spawns_for_node expands any role mix) and verified end-to-end — the change is a clarifying comment plus a fixed latent bug where a node typed dynamic_workflow would not have matched the compiler's literal node-type key.
Spawn flow — per-sprint context certification, teammate Dynamic Workflows, default FOCUS-LOOP (operator request)
Four coordinated /shepherd:spawn fixes so the team substrate behaves as designed:
- Per-sprint context-certification wave. The spawn-flow walkthrough now makes the root's INTRO-COMBO-WAVE explicit (it was mandated in
agents/shepherd.mdbut omitted fromcommands/spawn.md's flow):@discovery× N gather ground-truth, intro-mode@auditor× 2 certify it (regression / carry-forward / freshness) — the sprint's own certifiable current context. Always-on under spawn (every T-shirt) and fresh per sprint — each--scope patch/--autosprint and each--parallelsibling certifies its own; a prior sprint's context is never inherited.intro-combo-wave.mdgains the spawn framing. - Teammate-conductors compile their lane fan-out. The contract required it (
dispatch-cascade.md §IV-bis,conductor.md) but no operational instruction existed, so teammates dispatched in-context. Added the explicitshctx graph compile --segment=<entry> --verify→ run →shctx graph marksequence (in-context fallback only on confirmed runtime failure) to thecommands/spawn.mdteammate boot prompt andagents/conductor.mdStep 2 + hard-prohibition #22; hand-rolled in-context step fan-out is aPRIMITIVE-INVERSIONoff-substrate violation. Reconciled the self-contradictorySKILL.md §X: under spawn, both root and each teammate compile their respective fan-out (mode-agnostic). - Root adopts the FOCUS-LOOP by default on team init. Coordinate mode is reframed as operating the Pattern-6 FOCUS-LOOP (wake → act → probe, opened at SEED-VERIFY), entered the instant teammates spawn — the active engine, not a passive focus-record write backstopped only by
coordinate_drive_guard.sh. The root stays engaged and drives until CLOSE-FINALIZE. - Long-running conductors adopt their own FOCUS-LOOP. A teammate-conductor opens a lane-keyed focus loop at Step 0 (lane start, before any node — so a teammate that skips INTRO still gets one) and runs wake → act → probe over its lane micro-Stage-Graph, refreshing at each wave so a long lane doesn't drift.
All four default-on, config-gatable via the new [focus].loop_default key; doctrine framing in coordinate-active-drive.md.
Flock profile polish
Description-field shrink for the two genuinely bloated meta profiles — conductor (198→157 chars) and shepherd (195→152) — moving mode/tier detail into the body; planter/auditor tightened further. Frontmatter already consistent across all nine (name → color → model → thinking → description → tools); no value changes.
Foundation
- Version moved to 6.1.2 across the six sources of truth (
plugin.json,marketplace.json×2 keys, bothSKILL.mdfrontmatters,README.md, this file). - Removed a stray tracked
err.txtand the dogfood repo's.artifacts/tree reorganized onto the standard layout (plans/+reports/→docs/). - All new bash honors house style —
set -uo pipefail, source_lib.sh || exit 0, exit-0-always hooks,resolve_namespace/resolve_workdir(never hardcoding.artifacts/.shepherd), and graceful-empty reads. New test auto-discovered byskills/context/tests/run.sh.