diff --git a/plugins/dev-team/commands/spec.md b/plugins/dev-team/commands/spec.md index 910a131..decb123 100644 --- a/plugins/dev-team/commands/spec.md +++ b/plugins/dev-team/commands/spec.md @@ -2,7 +2,7 @@ description: > Use when writing a complete new spec for a feature or GitHub issue. Guides through context gathering, first draft, iterative refinement, readiness review, and task breakdown. -argument-hint: +argument-hint: [using ] --- Use this skill when: @@ -15,7 +15,13 @@ You are writing a complete new spec, working with the user to refine the spec, b ### 1 — Resolve the feature brief -Use the `identify-project-work-items` skill to resolve the argument to a `work-item-id` and `work-item-type`, then fetch the work item: +Parse `$ARGUMENTS` for a trailing or embedded `using ` — a path or a bare +installed-skill name — and strip it out before resolving the rest; this may also be given +conversationally rather than as a literal `using` clause. If found, carry `` +forward unresolved — `spec-first-draft` resolves it itself in Step 2 below, per +`playbook-contract`'s bare-name resolution order. + +Use the `identify-project-work-items` skill to resolve the remaining argument text to a `work-item-id` and `work-item-type`, then fetch the work item: | `work-item-type` | Action | |---|---| @@ -27,7 +33,10 @@ If the work item does not exist, tell the user and stop. ### 2 — Write the first draft -Use the `spec-first-draft` skill with the feature brief to gather context from docs, source code, and the user, and write the draft spec file. +Use the `spec-first-draft` skill with the feature brief — and the playbook reference from Step 1, +if one was detected — to gather context from docs, source code, and the user, and write the +draft spec file. When a playbook reference is present, `spec-first-draft` drafts in instance +mode instead of its default flow. **PAUSE — wait for the user to review the draft.** diff --git a/plugins/dev-team/skills/spec-first-draft/SKILL.md b/plugins/dev-team/skills/spec-first-draft/SKILL.md index 5f48626..163e018 100644 --- a/plugins/dev-team/skills/spec-first-draft/SKILL.md +++ b/plugins/dev-team/skills/spec-first-draft/SKILL.md @@ -4,11 +4,18 @@ user-invocable: false description: > Use when writing a first draft of a complete new spec or a new part of an existing spec. Gathers context from docs, source code, and the user, then writes the draft to a _spec_*.md file. -argument-hint: + In instance mode (a playbook reference supplied), drafts a thin instance spec from that + playbook's spec-template.md instead of the default template. +argument-hint: [playbook reference] --- Use this skill when: - You are writing a first draft of a complete new spec or a new part of an existing spec +- A playbook reference (a path or bare name) was supplied — draft a thin instance spec from that + playbook's `spec-template.md` instead of the default template (instance mode) + +Use the `playbook-contract` skill for: the playbook directory contract and bare-name playbook +resolution order. This skill cites those definitions — it does not restate them. ## Steps @@ -38,6 +45,15 @@ Determine the spec file location: the `_spec_*.md` lives next to the code it des Name: `_spec_.md` in PascalCase. +**Instance mode.** If a playbook reference (a path or a bare name) was supplied when this skill +was invoked, resolve it per `playbook-contract`'s bare-name resolution order (cite, don't +restate). Once resolved, read the playbook directory's `spec-template.md` and use its own +sections as the draft's body in place of the default `## Overview` through `## Related Docs` +sections below. Keep the header block's `> **Status:**` and `> **Design doc:**` lines unchanged, +and add one more line — `> **Playbook:** ` — stamping the resolved playbook +reference into the header. If no playbook reference was supplied, use the default structure +below unchanged — instance mode is additive, never the default path. + Write the file using this structure: ---