Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/rules/devspec-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Follow these rules:
- Preserve the original intent of the canonical Copilot prompt and agent files named in the registry.
- Use Git-tracked `devspec/` artifacts for recovery before relying on chat history, Antigravity artifacts, memory, or task lists.
- Preserve required inputs, output artifacts, status values, gates, handoff order, and recovery behavior.
- Preserve structured question behavior from `.github/prompts/PATTERNS.md#interactive-question-pattern`; if clickable options are unavailable, render the same option labels as text and preserve the recommended option.
- Preserve structured question behavior from `.github/prompts/PATTERNS.md#interactive-question-pattern`: show interactive multiple-choice options when Antigravity can render them, otherwise render the identical options as text; include an example for every option and `Custom Answer`; ask one question at a time; and preserve the recommendation with its justification.
- Use `devspec/glossary.md` for status values.
- Use `devspec/foundation/codebase-structure.md` for repository access requirements.
- Keep product context in `devspec/foundation/project-context.md`, durable principles in `devspec/constitution.md`, and operational governance, compliance rules, enforcement details, and delivery gates in `devspec/foundation/rules.md`.
Expand Down
13 changes: 13 additions & 0 deletions .agents/skills/devspec-changerequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: devspec-changerequest
description: Run /devspec.changerequest using the canonical devspec command registry and Copilot reference contract.
---

Execute canonical command `/devspec.changerequest`.

- Read `devspec/adapters/command-registry.md` for the command contract.
- Read `.github/prompts/devspec.changerequest.prompt.md` and `.github/agents/devspec.changerequest.agent.md` as the source of intent.
- Preserve required inputs, artifact outputs, status values, gates, handoff order, and recovery behavior.
- Use Git-tracked `devspec/` artifacts for recovery before relying on chat history or Antigravity artifacts.
- Append accepted `CR-###` scope to existing work-item artifacts; do not create a CR-specific Markdown file or rewrite baseline history.
- Treat unsupported Antigravity behavior as an adapter limitation, not a workflow change.
14 changes: 14 additions & 0 deletions .claude/skills/devspec-changerequest/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: devspec-changerequest
description: Run /devspec.changerequest using the canonical devspec command registry. Records one missed related requirement for a finalized work item without rewriting baseline history.
---

Execute canonical command `/devspec.changerequest`.

1. Read `AGENTS.md` for canonical workflow, no-intent-drift, cross-tool recovery, and structured question rules.
2. Read `devspec/adapters/command-registry.md` for this command's required input, outputs, mutation level, and next handoff.
3. Read `.github/prompts/devspec.changerequest.prompt.md` and `.github/agents/devspec.changerequest.agent.md` as the authoritative source of command intent and behavior.
4. Apply `.github/prompts/PATTERNS.md` for shared behavior: interactive questions, prerequisite validation, session recovery, and output closure.
5. Preserve baseline rows and prior evidence; append accepted `CR-###` scope only to existing work-item artifacts.

Command input comes from the user's current message.
13 changes: 13 additions & 0 deletions .gemini/commands/devspec/changerequest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description = "Run canonical /devspec.changerequest from Gemini CLI."
prompt = """
Execute canonical command `/devspec.changerequest`.

Before acting:
1. Read `devspec/adapters/command-registry.md` and use the `/devspec.changerequest` row as the command contract.
2. Read `.github/prompts/devspec.changerequest.prompt.md` and `.github/agents/devspec.changerequest.agent.md` as the protected source of intent.
3. Follow `.github/prompts/PATTERNS.md` for shared workflow, recovery, output, and recommendation behavior.
4. Recover from existing Git-tracked `devspec/` artifacts before relying on Gemini session memory.
5. Preserve baseline history and append accepted `CR-###` scope only to existing work-item artifacts.
6. Treat Gemini-specific command syntax as platform mechanics, not a workflow change.

The user's raw command input, if any, is appended below these instructions by Gemini CLI.
34 changes: 34 additions & 0 deletions .github/agents/devspec.changerequest.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: "devspec.changerequest"
description: "Use to append one missed related requirement to a finalized-or-later work item as an immutable change request."
tools: [read, edit, search, vscode/askQuestions]
model: ["GPT-5.4 (copilot)", "GPT-5.3-Codex (copilot)", "Claude Sonnet 4.6 (copilot)", "Claude Haiku 4.5 (copilot)"]
user-invocable: true
agents: []
handoffs:
- label: Continue to Finalize
agent: devspec.finalize
prompt: Create or update the readiness brief for the active change request.
- label: Create Linked Work Item
agent: devspec.story
prompt: Create the independently scoped linked work item selected during change-request intake.
---
You append one missed, related completeness addition to an existing work item without rewriting baseline history.

## Constraints
- Follow the [Work-Item Target Pattern](../prompts/PATTERNS.md#work-item-target-pattern), [Work-Item Change Request Pattern](../prompts/PATTERNS.md#work-item-change-request-pattern), [Session Recovery Pattern](../prompts/PATTERNS.md#session-recovery-pattern), [Prerequisite Validation Pattern](../prompts/PATTERNS.md#prerequisite-validation-pattern), [Interactive Question Pattern](../prompts/PATTERNS.md#interactive-question-pattern), [Question Basis Pattern](../prompts/PATTERNS.md#question-basis-pattern), and [Output Closure Pattern](../prompts/PATTERNS.md#output-closure-pattern).
- `meta.md` and `story.md` must exist, and the work-item status must be `finalized`, `tasks-planned`, `implementing`, `implemented`, `reviewing`, or `reviewed`.
- If the baseline is not finalized, do not create a change request; route missing baseline information to `/devspec.story`, or `/devspec.clarify` when an active blocker already records the question.
- Handle exactly one related completeness addition per run: missing description, acceptance criterion, functional requirement, nonfunctional requirement, or edge case for the same intended outcome.
- Append the next `CR-###` to `story.md#change-requests` and append CR-scoped rows such as `CR-001-AC-001`, `CR-001-FR-001`, `CR-001-NFR-001`, or `CR-001-EDGE-001` to the existing story tables.
- Do not create a dedicated change-request Markdown file. Use existing `meta.md`, `story.md`, and `decisions.md`; later lifecycle stages append their CR-scoped rows to existing `finalize.md`, `tasks.md`, `implement.md`, and `review.md`.
- Do not rewrite baseline `Summary`, `Description`, `AC-*`, `FR-*`, `NFR-*`, `EDGE-*`, planning signals, completed tasks, implementation evidence, or review evidence.
- If the request appears independent or unrelated, ask one structured `selection` question with `Append to the current work item` (example: add a missing invalid-input rule for an existing form), `Create a new linked work item` (example: add notifications to an implemented profile-edit story), and `Custom Answer` (example: explain another relationship). Show exactly one recommendation with its justification. Do not append a `CR-###` when a linked item is selected.
- Update `Workflow State` in `meta.md` and `Resume State` in `story.md` before asking a target, relationship, or requirement question.
- Keep any material change-request decision in `decisions.md`; do not duplicate the intake rows there.
- Ask one structured question at a time and hand off to `/devspec.finalize` after accepting a related change request.

## Approach
1. Locate the existing work item and read `meta.md`, `story.md`, `decisions.md`, and downstream artifacts when present.
2. Reconcile `Resume State` and validate that the baseline is finalized or later.
3. Classify the submitted omission as related completeness scope or potentially independent scope.
9 changes: 6 additions & 3 deletions .github/agents/devspec.clarify.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ handoffs:
- label: Back to Work-Item Intake
agent: devspec.story
prompt: Revise work-item intake from this clarification.
- label: Capture Post-Baseline Change Request
agent: devspec.changerequest
prompt: Record the missed related requirement without rewriting baseline history.
- label: Continue to Finalize
agent: devspec.finalize
prompt: Create or update the implementation readiness brief.
Expand All @@ -21,9 +24,9 @@ You create or update `devspec/work-items/<work-item-folder>/clarify.md`.
- Update `Workflow State` in `meta.md` and `Resume State` in `clarify.md` before asking or resolving a blocking question.
- Handle one independent blocker at a time.
- Resolve the active blocker recorded in `story.md`, `finalize.md`, user input, or existing `clarify.md`; do not run the full Readiness Gap Scan in this command.
- Do not use clarification to introduce post-baseline scope. If user input for a work item in `finalized`, `tasks-planned`, `implementing`, `implemented`, `reviewing`, or `reviewed` status changes scope instead of resolving the active blocker, record the routing reason in `clarify.md`, leave baseline intake unchanged, and hand off to `/devspec.story`.
- Do not use clarification to introduce post-baseline scope. If user input for a work item in `finalized`, `tasks-planned`, `implementing`, `implemented`, `reviewing`, or `reviewed` status changes scope instead of resolving the active blocker, record the routing reason in `clarify.md`, leave baseline intake unchanged, and hand off to `/devspec.changerequest`.
- Preserve and apply the Question Basis Pattern for the active blocker.
- For structured clarification questions, provide 2-5 meaningful and mutually exclusive options when possible, exactly one recommended option with a short reason, and `Custom Answer`.
- For structured clarification questions, show interactive multiple-choice options or the identical text fallback; provide 2-5 meaningful and mutually exclusive context-specific options plus `Custom Answer`; when no two meaningful alternatives exist, offer `Provide the missing detail` plus `Custom Answer`; give every option a brief non-binding example; and identify exactly one recommended option with a clear justification.
- Keep active and resolved blocker records only in `Clarification Log`; at most one row may be `open`.
- Keep handoff and next-action state in `Resume State`, not in a separate outcome section.
- When a resolved clarification changes intake, update the matching current `story.md` section (`Summary`, `Description`, `Acceptance Criteria`, `Functional Requirements`, `Nonfunctional Requirements`, `Edge Cases`, or `Planning Signals`) and reference that section in `Clarification Log`; do not recreate retired story sections or duplicate full intake content.
Expand All @@ -33,7 +36,7 @@ You create or update `devspec/work-items/<work-item-folder>/clarify.md`.
1. Locate the target work item.
2. Read `meta.md` when present, `story.md`, `finalize.md` when present, and existing `clarify.md`.
3. Reconcile `Resume State`; keep any pending user question active and preserve the source artifact for the active blocker.
4. Classify user input against the active blocker; if it introduces post-baseline scope, route to `/devspec.story`, otherwise ask or resolve the active structured `clarification` question and update `clarify.md` with `Resume State` and `Clarification Log`.
4. Classify user input against the active blocker; if it introduces post-baseline scope, route to `/devspec.changerequest`, otherwise ask or resolve the active structured `clarification` question and update `clarify.md` with `Resume State` and `Clarification Log`.
5. When a blocker is answered, update its `Clarification Log` row to `resolved`, `superseded`, or `withdrawn`, record the answer and impacted artifacts, and update any impacted upstream artifact by reference instead of duplicating full intake or finalization content.
6. When no blocker remains open, update next action toward `/devspec.finalize` unless the recorded source artifact requires returning to `/devspec.story`.
7. Report per Output Format.
Expand Down
10 changes: 5 additions & 5 deletions .github/agents/devspec.extract.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ You create or refresh devspec extraction artifacts from supported repository sou
## Constraints
- Follow the [Prerequisite Validation Pattern](../prompts/PATTERNS.md#prerequisite-validation-pattern), [Session Recovery Pattern](../prompts/PATTERNS.md#session-recovery-pattern), [Interactive Question Pattern](../prompts/PATTERNS.md#interactive-question-pattern), [Next Action Selection Pattern](../prompts/PATTERNS.md#next-action-selection-pattern), [Extraction State Pattern](../prompts/PATTERNS.md#extraction-state-pattern), [Explore and Memory Pattern](../prompts/PATTERNS.md#explore-and-memory-pattern), [Token Stewardship Pattern](../prompts/PATTERNS.md#token-stewardship-pattern), [Artifact Content Pattern](../prompts/PATTERNS.md#artifact-content-pattern), [Discovery Exclusion Pattern](../prompts/PATTERNS.md#discovery-exclusion-pattern), [Diagram Extraction Consistency Pattern](../prompts/PATTERNS.md#diagram-extraction-consistency-pattern), [SVG Output Pattern](../prompts/PATTERNS.md#svg-output-pattern), [Mermaid Internal Naming and Readability Pattern](../prompts/PATTERNS.md#mermaid-internal-naming-and-readability-pattern), [Mermaid Visual Quality Pattern](../prompts/PATTERNS.md#mermaid-visual-quality-pattern), [Process Flow Extraction Pattern](../prompts/PATTERNS.md#process-flow-extraction-pattern), [Exploration Recovery Pattern](../prompts/PATTERNS.md#exploration-recovery-pattern), and [Output Closure Pattern](../prompts/PATTERNS.md#output-closure-pattern).
- Source input is optional. When source input is omitted or blank, ask one structured `selection` question before extraction using these options:
- `Use current project root`: extract from the active VS Code workspace or project root where the devspec command is being run. Recommend this when the user appears to be running devspec in the target repository.
- `Enter repo paths`: ask for one repository URL or local path, or named multi-repo paths such as `UI - D:\repo-ui, API - D:\repo-api`.
- `Cancel extraction`: stop extraction and record no artifact changes.
- `Custom Answer`: handle through the Interactive Question Pattern.
- `Use current project root`: extract from the active VS Code workspace or project root where the devspec command is being run. Example: use `D:\code\my-app` when it is the opened target repository. Recommend this when the user appears to be running devspec in the target repository.
- `Enter repo paths`: ask for one repository URL or local path, or named multi-repo paths. Example: `UI - D:\repo-ui, API - D:\repo-api`.
- `Cancel extraction`: stop extraction and record no artifact changes. Example: the user wants to gather repository paths before starting extraction.
- `Custom Answer`: accept another source instruction. Example: `Use only D:\code\api and skip the UI repository`.
- Accept only the confirmed current project root, GitHub, Azure DevOps, or GitLab repository URLs, or local repository folder paths.
- Treat remote inputs as repository URLs only; reject issue, pull request, merge request, work item, wiki, release, and pipeline URLs.
- Support a single repository, a monorepo root, or multiple named related repositories.
Expand All @@ -35,7 +35,7 @@ You create or refresh devspec extraction artifacts from supported repository sou
- Before writing a confirmed constitution change, run a lightweight impact check against `devspec/foundation/project-context.md`, `devspec/foundation/rules.md`, affected prompts, agents, templates, adapter guidance, and validation docs; record unresolved follow-ups explicitly.
- Maintain a single active confirmation gate; do not ask constitution, process-flow candidate, diagram candidate, diagram generation, coding-standards conflict, or repository-access confirmations in the same response.
- Confirmation priority is: source or access questions, conflicting extracted evidence, constitution principle changes, process-flow candidate approval, diagram candidate approval, then continuation or handoff.
- Use `Proceed`, `Skip`, and `Custom Answer` for queue, generated artifact, retry, and workflow-continuation decisions; use `Yes`, `No`, and `Custom Answer` for binary confirmations.
- Use `Proceed`, `Skip`, and `Custom Answer` for queue, generated artifact, retry, and workflow-continuation decisions; use `Yes`, `No`, and `Custom Answer` for binary confirmations. Present every option interactively when supported, attach a contextual example including one for `Custom Answer`, and show exactly one recommendation with its justification.
- Create or update `devspec/foundation/extraction-state.md` from `devspec/foundation/_template/extraction-state.md` when extraction starts and is not canceled.
- Process `devspec/foundation/extraction-state.md#extraction-queue` one row at a time in ID order. Keep exactly one row `active`, and update `Resume State`, the active row, and `Blockers and Confirmations` before asking, pausing, blocking, or handing off.
- Use `devspec/foundation/extraction-state.md` only for the extraction queue, resume state, blockers, and confirmations. Keep extracted facts in target artifacts, reusable discovery methods in `devspec/foundation/exploration-state.md`, and diagram queue state in `devspec/architecture/artifact-queue.md`.
Expand Down
Loading
Loading