Use this guide when you are maintaining AgentSync's spec-kit setup itself. It covers where the repo-local workflow assets live, how active feature detection works, how timestamp branches map to feature directories, and what must change when workflow rules drift.
| Path | Owns | Why it matters |
|---|---|---|
.github/prompts/ |
GitHub Copilot slash-command prompt files such as speckit.plan.prompt.md |
This is the user-facing command surface for speckit commands in this repo |
.github/agents/ |
Agent descriptors such as speckit.plan.agent.md |
These pair with the prompt files and keep command naming consistent |
.specify/init-options.json |
Local initialization defaults | Confirms timestamp branch numbering, current-directory init, integration target, and spec-kit version |
.specify/integration.json |
Integration-specific hooks | Shows which script updates agent context after planning |
.specify/memory/constitution.md |
Repo principles and governance rules | This is the local source of truth for workflow gates and documentation rules |
.specify/scripts/bash/ |
Shell workflow helpers such as check-prerequisites.sh and create-new-feature.sh |
These scripts implement branch validation, feature-path resolution, and task prerequisites |
.vscode/settings.json |
Editor recommendations and terminal auto-approval | Shows which speckit prompts are recommended and which scripts are auto-approved in the terminal |
specs/ |
Feature directories and planning artifacts | Each active feature lives under specs/<feature-branch>/ |
The bash helpers under .specify/scripts/bash/ resolve the active feature in this order:
- If
SPECIFY_FEATUREis set, that value wins. - Otherwise the scripts use the current git branch from the repo root.
- If git is unavailable, they fall back to the newest
specs/directory by timestamp, with a numeric-prefix fallback for older layouts. - The branch or override is mapped to a feature directory by shared prefix, not only exact name.
A branch like
20260405-195011-speckit-dev-docsresolves tospecs/20260405-195011-speckit-dev-docs/. - If multiple feature directories share the same prefix, the scripts stop with an error instead of guessing.
Use these commands when you need to inspect the current context:
.specify/scripts/bash/check-prerequisites.sh --paths-only
.specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasksUse --paths-only when you want the resolved branch and feature paths quickly.
Use --json --require-tasks --include-tasks when you are about to analyze or implement and want
to confirm that the planning artifacts exist.
AgentSync uses timestamp branches for new feature work.
- Required format:
YYYYMMDD-HHMMSS-slug - Example:
20260405-195011-speckit-dev-docs - The repo default is recorded in
.specify/init-options.json - The branch rule is enforced by
.specify/memory/constitution.md
This differs from many upstream examples that still show sequential prefixes. The local rule here is more important than the example style in upstream screenshots.
When creating a fresh feature through the shell helpers, use the timestamp option:
.specify/scripts/bash/create-new-feature.sh --timestamp "Improve documentation to guide speckit development"Sequential prefixes still appear in compatibility logic, but new AgentSync work should use the timestamp format.
- Resolve the active feature paths:
.specify/scripts/bash/check-prerequisites.sh --paths-only- Open the current artifact set in this order:
spec.mdplan.mdtasks.md
- Choose the next command based on what already exists:
- Spec exists, but no plan:
/speckit.plan - Plan exists, but no tasks:
/speckit.tasks - Tasks exist, but the artifacts feel inconsistent:
/speckit.analyze - Tasks are approved and implementation should start:
/speckit.implement
- If your shell is not on the matching feature branch, switch branches before running the next
command. Use
SPECIFY_FEATUREonly when you need an explicit override for tooling or editor context.
Use these sources as the order of truth:
- Official spec-kit docs and repository:
- installation
- quickstart
- local development
github/spec-kitandspec-driven.md
- AgentSync-local workflow surfaces:
.specify/.github/prompts/.github/agents/.vscode/settings.json
Before merge:
- Re-check the local statement against the upstream source.
- Validate any Mermaid changes.
- Run
bun run check. - Re-run the manual walkthroughs captured in the active feature quickstart when the change is documentation-only.
The contributor who changes the workflow surface owns the documentation updates in the same change. Reviewers use maintenance.md to enforce that rule.
Update the speckit docs when you change any of the following:
| Change type | Update at least | Why |
|---|---|---|
Prompt or agent command surface in .github/ |
docs/speckit.md, this guide |
Command names and examples must stay real |
Workflow scripts or active-feature resolution in .specify/scripts/ |
this guide | Resume and recovery guidance depends on script behavior |
| Constitution or governance rules | docs/speckit.md, docs/maintenance.md, this guide |
Readers need the updated gates and ownership rules |
| Workflow order or artifact expectations | docs/speckit.md, Mermaid diagram, docs/maintenance.md |
The canonical guide must stay aligned with the real process |
| Repeated contributor confusion around feature recovery | this guide and, if useful, docs/troubleshooting.md |
Recovery steps should not stay tribal knowledge |
Run:
.specify/scripts/bash/check-prerequisites.sh --paths-onlyIf the branch prefix does not resolve to the right specs/ directory, switch to the correct
feature branch first. If the branch context cannot be used, set SPECIFY_FEATURE deliberately
for the session instead of editing scripts.
- Re-running
/speckit.clarify,/speckit.plan,/speckit.tasks, or/speckit.analyzeis fine when the current artifacts are the right input and you want a better output. - Re-check the affected artifacts after each rerun instead of assuming earlier conclusions still hold.
- If the rerun changes workflow meaning, update the documentation in the same change.
That is the normal AgentSync state today. Do not invent extension-specific steps in the default workflow docs. Treat extensions and presets as advanced layers that need their own explicit docs once they exist.
Prefer the official workflow order first, then layer AgentSync-specific notes on top. If the repo intentionally diverges, document the local reason and point to the exact repo file that now owns the difference.