Skip to content

feat(agent-skill-model-effort): model/effort on skill & agent create#24

Merged
protonspy merged 1 commit into
mainfrom
feat/agent-skill-model-effort
Jun 8, 2026
Merged

feat(agent-skill-model-effort): model/effort on skill & agent create#24
protonspy merged 1 commit into
mainfrom
feat/agent-skill-model-effort

Conversation

@protonspy

Copy link
Copy Markdown
Owner

Summary

Lets csdd skill create and csdd agent create optionally pin a model and an effort in the generated frontmatter, validated at the create boundary, with unset keys omitted so the session configuration is inherited. Mirrors the params in the MCP shim and teaches the shipped setup flow to pick model/effort by task complexity.

  • csdd skill create gains --model and --effort; csdd agent create gains --effort (model already existed).
  • effort is validated against the closed, case-sensitive set {low, medium, high, xhigh, max} before any filesystem write — an invalid value exits 1 and leaves no artifact. model is free-form (any non-empty string).
  • Unset keys are omitted entirely (never literal inherit), so output is byte-identical when no flag is given.
  • MCP tools csdd_skill_create (model+effort) and csdd_agent_create (effort) forward the flags via the existing flag() helper — three-surface equivalence preserved (the TUI uses the shared *CreateOptions struct unchanged).
  • Shipped csdd-setup-init / csdd-setup-update now instruct choosing model/effort by complexity, omitting both when neither is warranted.

Spec

specs/agent-skill-model-effort/ — requirements, design, tasks all human-approved (ready_for_implementation = true). Implements tasks 1–7.

Task Boundary What
1 EffortValidation shared validateEffort + closed set
2 Templates conditional model/effort frontmatter lines
3 SkillCLI --model/--effort + validation before mkdirAll
4 AgentCLI --effort + validation before write
5 MCPShim params forwarded in csdd_skill_create/csdd_agent_create
6 SetupGuidance model/effort-by-complexity in setup commands
7 full gate + recorded evidence

Verification

  • csdd spec test-report agent-skill-model-effort --run --lang go ✅ (exit 0, coverage 81.2%, no attentions)
  • make check (gofmt + go vet + go test -race ./...) ✅
  • npm test (mcp-server) ✅ (74/74)
  • go build ./cmd/csdd + real CLI smoke test ✅ (model+effort rendered; omit byte-identical; invalid effort → exit 1, no artifact)
  • pre-push test gate ✅ (green at push time)

Adversarial code-reviewer run: no Blockers (APPROVE WITH NITS); nits resolved (exact frontmatter byte-comparison test, error message derived from the set, explicit exit-code assertions).

Risks

Low. Purely additive — pre-existing agents/skills are untouched, and no key is rewritten when flags are absent. Not security-sensitive (local file generation, closed-set validation, no auth/secrets/network/PII).

🤖 Generated with Claude Code

Implements spec agent-skill-model-effort; tasks 1-7.

Adds optional --model/--effort to `csdd skill create` and --effort to
`csdd agent create` (model already existed). Effort is validated against the
closed set {low,medium,high,xhigh,max} at the create boundary before any
filesystem write, so an invalid value exits 1 and leaves no artifact; unset
keys are omitted from frontmatter so the session config is inherited (output is
byte-identical when no flag is given). Mirrors the params in the MCP shim
(csdd_skill_create gains model+effort, csdd_agent_create gains effort) and adds
model/effort-by-complexity guidance to the shipped setup commands.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@protonspy protonspy merged commit 3218aaf into main Jun 8, 2026
3 checks passed
@protonspy protonspy deleted the feat/agent-skill-model-effort branch June 8, 2026 16:25
protonspy added a commit that referenced this pull request Jun 8, 2026
Surfaces the model/effort frontmatter (added by #24) in the read-only web
dashboard. The session overview now reads `model`/`effort` for agents and
skills into the Artifact metadata, and ResourceView renders them in the header
alongside tools. Follow-up to agent-skill-model-effort.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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