-
Notifications
You must be signed in to change notification settings - Fork 4.7k
docs: Add missing prompt commands + existing project walkthrough #937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
0e32149
c69f5d1
75f86ab
83a307a
87b71cd
787340d
2132e7c
0b19492
5a322bc
8202820
c46b0d6
b458ccf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Copilot instructions for automated code reviews 🌱 | ||
|
|
||
| This file provides minimal guidance for Copilot Code Review suggestions on pull requests. Code changes should be judged against the guidelines defined below. | ||
|
|
||
| - Reference [repository-level standards](../AGENTS.md) as the authoritative source for project conventions when reviewing any files changed in this repo. | ||
| - For files under `docs/`, additionally consult the [docs-specific guidance](../docs/AGENTS.md) for additional requirements designed to promote consistency in independent documentation contributions. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # AGENTS.md for Spec Kit documentation | ||
|
|
||
| ## Guidelines for consistent user documentation | ||
|
|
||
| - The correct syntax for this project is "Spec Kit" (two words, capital S and K). Never use any other variation outside of code snippets. | ||
| - Use active voice and present tense where possible. | ||
| - Write for an audience familiar with AI and programming concepts, but new to Spec Kit. | ||
| - Ensure an informal narrative, teaching voice: give a one-line "why" plus a one-line "how" and a minimal, copy‑pastable example/command when helpful. | ||
| - User documentation files are expected to use kebab-case for the `.md` extension, except for special files like `README.md`. | ||
| - Examples should be copy-pastable in fenced code blocks and accurate; if unsure, prefer not to change examples. | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,176 @@ | ||||||||||
| # Using Spec Kit in an Existing Project | ||||||||||
|
|
||||||||||
| > You already have a codebase. You want to try Spec Kit without rearranging the furniture. This is a surgical guide: minimum steps, clear checkpoints, easy rollback. This is a **10-minute guide** — pick a realistic scope and save any grand redesigns for later. | ||||||||||
|
|
||||||||||
| --- | ||||||||||
|
|
||||||||||
| ## 1. Prerequisites | ||||||||||
|
|
||||||||||
| Before starting, you need the Spec Kit CLI tool installed on your machine. | ||||||||||
|
|
||||||||||
| Install the CLI by following the [Installation Guide](installation.md), then jump back here for step 2. | ||||||||||
|
|
||||||||||
| > **Starting a new project?** See the [Quick Start Guide](quickstart.md) instead. | ||||||||||
|
|
||||||||||
| --- | ||||||||||
|
|
||||||||||
| ## 2. Init | ||||||||||
|
|
||||||||||
| > Spec Kit initializes a **workspace** in the current directory and registers **slash commands** with your coding agent. This workspace holds your **specs, plans, and tasks**. | ||||||||||
|
|
||||||||||
| * Substitute any [supported assistant](../README.md#-supported-ai-agents) (`claude`, `gemini`, `copilot`, `cursor-agent`, etc.) for the `--ai` argument in place of `copilot`. | ||||||||||
| * When prompted for script type, **pick your flavor** and continue. | ||||||||||
anchildress1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
|
||||||||||
| ### A) If you installed the CLI globally | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| specify init --here --ai copilot | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ### B) If you used uvx one-shot | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| uvx --from git+https://github.com/github/spec-kit.git specify init --here --ai copilot | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ### Checkpoint | ||||||||||
|
|
||||||||||
| Spec Kit registers these slash commands in your coding agent: | ||||||||||
|
|
||||||||||
| - `/speckit.constitution` | ||||||||||
| - `/speckit.specify` | ||||||||||
| - `/speckit.clarify` | ||||||||||
| - `/speckit.plan` | ||||||||||
| - `/speckit.tasks` | ||||||||||
| - `/speckit.analyze` | ||||||||||
| - `/speckit.implement` | ||||||||||
|
|
||||||||||
| --- | ||||||||||
|
|
||||||||||
| ## 3. Constitution | ||||||||||
|
|
||||||||||
| Use the `/speckit.constitution` command to define the project's non-negotiable rules and constraints that AI must follow. | ||||||||||
|
|
||||||||||
| > You'll want to spend serious time here later, but for now write the **high-priority or high-impact** rules you want AI to always follow in your repo. | ||||||||||
|
|
||||||||||
| ```markdown | ||||||||||
| /speckit.constitution Create principles for: | ||||||||||
| - Quality: tests for all new endpoints; critical-path coverage > 80%. | ||||||||||
| - Performance/UX: totals update within 200 ms of coupon apply. | ||||||||||
| - Security/Compliance: log coupon usage with order ID; no PII in logs. | ||||||||||
anchildress1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| ``` | ||||||||||
|
|
||||||||||
| --- | ||||||||||
|
|
||||||||||
| ## 4. Specify | ||||||||||
|
|
||||||||||
| Use `/speckit.specify` inside your coding agent to create a single, focused story. Keep it high-level—what and why. Don’t worry about technical details yet; those come later. | ||||||||||
|
|
||||||||||
| > 💡 **Model selection matters:** Pick a model capable of handling systems-level reasoning, such as `Claude 4.5`, `GPT-5`, or `Gemini 2.5 Pro`. Avoid smaller, lower-capacity models (like `GPT-5-mini` or similar) for systems-level tasks; they can miss context or produce incomplete plans. Use smaller models for narrow, well-defined edits or straightforward refactors. | ||||||||||
| > | ||||||||||
| > **This is a 10-minute starter**, so pick something achievable — save the joyrides until your constraints file is complete! | ||||||||||
|
|
||||||||||
| ```markdown | ||||||||||
| /speckit.specify Create story “Apply coupon during checkout.” | ||||||||||
| Goal: User can enter a valid coupon and see totals update before payment. | ||||||||||
| Acceptance Criteria: | ||||||||||
| - Valid coupon → discount applied; totals update before payment. | ||||||||||
| - Invalid/expired coupon → show reason; totals unchanged. | ||||||||||
| Constraints: one coupon per order; preserve tax/shipping rules; log coupon usage. | ||||||||||
| Out of scope: stacking, gift cards, loyalty. | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ### Checkpoint | ||||||||||
|
|
||||||||||
| * Spec Kit automatically creates and checks out a **feature branch**, e.g. `001-checkout-apply-coupon`. | ||||||||||
| * It also creates a `./specs/001-checkout-apply-coupon/` folder and a set of `.md` files. | ||||||||||
| * `spec.md` is the specification derived from your prompt — **review it now for accuracy.** | ||||||||||
|
|
||||||||||
| --- | ||||||||||
|
|
||||||||||
| ## 5. Clarify | ||||||||||
|
|
||||||||||
| If you find any mistakes in your `spec.md` or need to tighten constraints, use the `/speckit.clarify` prompt. | ||||||||||
|
|
||||||||||
| ```markdown | ||||||||||
| /speckit.clarify Tighten ACs: add duplicate-apply and expired-coupon edge cases. | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| Repeat until you’re satisfied — this shapes **the plan**. | ||||||||||
|
|
||||||||||
| --- | ||||||||||
|
|
||||||||||
| ## 6. Plan | ||||||||||
|
|
||||||||||
| The plan converts your spec into concrete technical decisions—choosing frameworks, databases, and architecture patterns. | ||||||||||
|
|
||||||||||
| You can leave this step blank, or include a **single tech requirement** if one matters; otherwise, AI will make a reasonable attempt. | ||||||||||
|
|
||||||||||
| ```markdown | ||||||||||
| /speckit.plan Tech requirement: preserve existing checkout API contract and return HTTP 422 for invalid coupons. | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| --- | ||||||||||
|
|
||||||||||
| ## 7. Tasks | ||||||||||
|
|
||||||||||
| This breaks down your plan into a step-by-step checklist of individual coding tasks. | ||||||||||
|
|
||||||||||
| **Taskify** once your plan feels right. | ||||||||||
|
||||||||||
| **Taskify** once your plan feels right. | |
| **Generate tasks** once your plan feels right. |
Copilot
AI
Nov 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Inconsistent command syntax: The implement command shows --dry-run as a flag option, but this doesn't match the established pattern where other commands in the documentation use natural language after the command. For consistency with other commands like /speckit.specify and /speckit.plan, consider documenting this as /speckit.implement 001-checkout-apply-coupon (show changes without executing) or similar natural language, unless the command actually accepts CLI-style flags.
| /speckit.implement 001-checkout-apply-coupon --dry-run # optional: shows planned changes without executing | |
| /speckit.implement 001-checkout-apply-coupon # execute the implementation | |
| /speckit.implement 001-checkout-apply-coupon (show changes without executing) # optional: shows planned changes without executing | |
| /speckit.implement 001-checkout-apply-coupon # execute the implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent punctuation: Line 8 contains an en dash (–) instead of a standard hyphen or em dash. For consistency with standard markdown conventions, consider using either a hyphen (-) or an em dash (—).