-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Open
anchildress1
wants to merge
11
commits into
github:main
Choose a base branch
from
anchildress1:update-user-guide-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+507
−25
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0e32149
docs: Add guide for using Spec-Kit in existing projects
anchildress1 c69f5d1
docs: Enhance quickstart guide with clarifications and examples
anchildress1 75f86ab
docs(spec-driven): add detailed /speckit command reference
anchildress1 83a307a
Merge branch 'github:main' into update-user-guide-docs
anchildress1 87b71cd
docs(existing-project-guide): normalize hyphen usage
anchildress1 787340d
docs(existing-project-guide): normalize hyphenation and punctuation
anchildress1 2132e7c
Merge branch 'github:main' into update-user-guide-docs
anchildress1 0b19492
docs: normalize "Spec Kit" naming and fix minor formatting
anchildress1 5a322bc
docs: add Copilot instructions shim and docs/AGENTS.md
anchildress1 8202820
docs: clarify existing-project-guide and spec-driven timing
anchildress1 c46b0d6
Merge branch 'main' into update-user-guide-docs
localden File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | ||
|
|
||
| ### 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. | ||
|
|
||
| ```markdown | ||
| /speckit.tasks | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 8. Analyze (Optional) | ||
|
|
||
| Analyze cross-checks your spec, plan, and tasks for consistency issues before implementation begins. | ||
|
|
||
| Run analyze as a safety check before touching code: | ||
|
|
||
| ```markdown | ||
| /speckit.analyze | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 9. Implement | ||
|
|
||
| This executes all the tasks from step 7, writing the actual code to implement your feature. | ||
|
|
||
| The last step is implementation with the name of your spec. You can include `--dry-run` to see what would be changed without writing any files, or run without it to have AI implement the changes. | ||
|
|
||
| ```markdown | ||
| /speckit.implement 001-checkout-apply-coupon --dry-run # optional: shows planned changes without executing | ||
| /speckit.implement 001-checkout-apply-coupon # execute the implementation | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Commit strategy | ||
|
|
||
| Decide how to organize your git commits—either all-in-one or separating planning from code. | ||
|
|
||
| Use **one commit** for the full spike — specs → plan → tasks → code. | ||
| If your org enforces separation, use **two commits:** (1) specs + plan + tasks, (2) code changes. | ||
|
|
||
| --- | ||
|
|
||
| ## Troubleshooting (quick) | ||
|
|
||
| | Symptom | Likely Cause | Fix | | ||
| | - | - | - | | ||
| | Slash commands not recognized | Init not executed or failed | Re-run init with `--ai copilot` in repo root; restart agent | | ||
| | “No such option: --ai” | Missing assistant name | Use `--ai copilot` (or another supported value) | | ||
| | Nothing generated after `/speckit.specify` | Missing model creds / provider blocked / init incomplete | Fix credentials; verify init output; retry with a smaller story | | ||
| | Implement touches unrelated files | Spec / plan too vague | Tighten scope; add explicit constraints / out-of-scope; re-run plan / tasks | | ||
|
|
||
| --- | ||
|
|
||
| ## Next Steps | ||
|
|
||
| - **Learn more:** Read the [complete Spec-Driven Development methodology](../spec-driven.md) | ||
| - **New projects:** See the [Quick Start Guide](quickstart.md) for greenfield workflows | ||
| - **Troubleshooting:** Check the main [README troubleshooting section](../README.md#-troubleshooting) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.