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
5 changes: 3 additions & 2 deletions spec-kit-presets/copilot-extension-hooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ hooks could not be checked, then the workflow continues, as in core.
An unavailable, denied, or failed mandatory invocation instead stops the
invocation and reports failure. Completion post-hooks do not run after a
baseline prerequisite/gate/validation stop. The wrapper preserves each command's
checkpoint, including a completed Lean convergence assessment that leaves
checkpoint, including a completed Lean or Full convergence assessment that leaves
existing open tasks unchanged: its reported remaining work is not convergence,
but it still reaches `after_converge`. Blocked assessments do not.
It keeps an invocation-local dispatch record to avoid
Expand Down Expand Up @@ -155,7 +155,8 @@ command, and also checks that baseline execution was not attempted.
Reporting checks inspect final assistant responses for mandatory-hook failures
and assistant-authored warnings for malformed YAML, not matching tool output.
Negative transcript cases reject tool-only evidence and contradictory success.
Separate Lean convergence cases cover existing open work and blocked assessment.
Separate Lean and Full convergence cases cover existing open work and blocked
assessment. The Full case also covers a mixed set of findings and a repeat run.
The marker-hook cases seed registrations and command skills directly; they do
not exercise extension installation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Apply these checkpoints exactly once per invocation:
its summary.
- For `analyze`, after the analysis report and remediation offer.
- For `converge`, after producing and reporting `converged` or `tasks_appended`
in-session, before listing hooks. A completed Lean assessment that reports
in-session, before listing hooks. A completed Lean or Full assessment that reports
remaining work already covered by existing open tasks also reaches this
checkpoint, even when nothing is appended. This is not convergence and must
not be reported as such. Blocked or unverified assessments do not reach it.
Expand Down
23 changes: 15 additions & 8 deletions spec-kit-presets/copilot-full-sdd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ at revision `27d14e20c187c1f2916540ea201ecbdc9f8ed588`.
Copyright GitHub, Inc.; [MIT licensed](LICENSE).

The upstream commands omit extension lifecycle-hook dispatch,
its separators, and dependent branch/report/checklist references. The only other
deviation is in `specify`: it rejects missing or whitespace-only descriptions
its separators, and dependent branch/report/checklist references. The `specify`
command also rejects missing or whitespace-only descriptions
before writing files, uses the resolved template only for new specs, preserves
unrelated content in an explicitly selected existing spec, and sets the active
feature only after saving the spec. Its quality checklist and validation flow
remain unchanged. Script metadata and portable command references remain for
Specify to render for the project.
remain unchanged. The `converge` command also avoids appending work already
covered by unchecked tasks. Script metadata and portable command references
remain for Specify to render for the project.
This is a Specify preset, not a `copilot plugin` package.

## Installation and prerequisites
Expand Down Expand Up @@ -59,7 +60,12 @@ prerequisites. They are supplied by `specify init`, not bundled again here.
| `analyze` | `spec.md`, `plan.md`, complete `tasks.md`, constitution | Read-only consistency/coverage report; constitution violations are CRITICAL; edits require separate approval |
| `checklist` | Active feature, `spec.md`, nonempty `plan.md`, resolved checklist template; `tasks.md` if present | Append-only `checklists/<domain>.md`; requirements-quality questions, not implementation tests; new items unchecked and reviewer-owned |
| `implement` | `plan.md`, complete `tasks.md`, existing checklists and available design artifacts | Code, validation and task progress; checklist approval gate, phase/dependency ordering, failure reporting and completion checks |
| `converge` | `spec.md`, `plan.md`, complete `tasks.md`, implementation already attempted; constitution | Only append traceable remediation tasks; no code/spec/plan edits, no existing-task rewriting; leave tasks byte-identical when converged |
| `converge` | `spec.md`, `plan.md`, complete `tasks.md`, implementation already attempted; constitution | Report open tasks that already cover findings; append only uncovered remediation; leave tasks byte-identical when nothing is appended; no code/spec/plan edits or existing-task rewrites |

`converge` checks actual behavior even for checked tasks. An unmet finding
covered only by checked tasks can still get a new task. Work already tracked
by an unchecked task in any phase, including a prior Convergence phase, is
reported with its task ID and does not count as convergence.

`clarify` normally runs after specify and before plan. `analyze` requires tasks;
`checklist` requires a nonempty `plan.md` through the Spec Kit 1.2.3 setup script;
Expand Down Expand Up @@ -94,10 +100,11 @@ each preset with its own compatible CLI. Leaving `FULL_SPECIFY_BIN` unset skips
only Full's real-CLI checks, even when `SPECIFY_BIN` is set for Lean.
Set `FULL_PRESET_ARCHIVE` to a local release zip for archive verification.
Set `FULL_CORE_SOURCE` to a checkout of the pinned Spec Kit source for
source comparison against pinned Git blob IDs. Eight commands must exactly match
source comparison against pinned Git blob IDs. Seven commands must exactly match
core with only the enumerated hook-related deletions and no added bytes. For
`specify`, the tests verify both the hook-stripped upstream baseline and the
reviewed downstream version, including an exact match for the quality workflow.
`specify` and `converge`, the tests verify both the hook-stripped upstream
baseline and the reviewed downstream version. The `specify` quality workflow
must still match core exactly.
Digest, source, and archive comparisons use the same CRLF-to-LF
normalization so checkout line-ending conversion does not change their results.
These checks cover package and instruction contracts, not model compliance or
Expand Down
64 changes: 44 additions & 20 deletions spec-kit-presets/copilot-full-sdd/commands/speckit.converge.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
description: Assess the current codebase against the feature's spec, plan, and tasks, then append only remaining work not already covered by open tasks.
scripts:
sh: scripts/bash/check-prerequisites.sh --json --require-spec --require-tasks --include-tasks
ps: scripts/powershell/check-prerequisites.ps1 -Json -RequireSpec -RequireTasks -IncludeTasks
Expand All @@ -20,17 +20,20 @@ Close the gap between what a feature's specification, plan, and tasks call for a
codebase currently implements. Read `spec.md`, `plan.md`, and `tasks.md` as the **sole
source of intent** (with the constitution as governing constraints), assess the current
state of the code, determine which requirements, acceptance criteria, plan decisions, and
existing tasks are unmet, incomplete, or only partially satisfied, and **append each piece
of remaining work as a new, traceable task** at the bottom of `tasks.md` so that
existing tasks are unmet, incomplete, or only partially satisfied, and **append only
remaining work not already covered by open tasks** at the bottom of `tasks.md` so that
`__SPECKIT_COMMAND_IMPLEMENT__` can complete it. This command MUST run only after
`__SPECKIT_COMMAND_IMPLEMENT__` has run on the current `tasks.md`, and after `__SPECKIT_COMMAND_TASKS__` has produced a complete `tasks.md`.
`__SPECKIT_COMMAND_TASKS__` has produced a complete `tasks.md` and
`__SPECKIT_COMMAND_IMPLEMENT__` has attempted implementation for the feature.
A repeat assessment does not require another implementation pass on tasks appended
by an earlier Convergence run.

This is **not** a diff tool and does **not** track changes. It assesses the present state
of the code relative to the feature's artifacts — no git, no branch comparison, no history.

## Operating Constraints

**APPEND-ONLY, NEVER REWRITE**: The command's **only** write is appending a new
**APPEND-ONLY, NEVER REWRITE**: The command's **only permitted write** is appending a new
`## Phase N: Convergence` section to `tasks.md`. It MUST NOT:

- modify `spec.md` or `plan.md` in any way;
Expand All @@ -39,13 +42,14 @@ of the code relative to the feature's artifacts — no git, no branch comparison
- modify, create, or delete any application code — completing the appended tasks is the
job of `__SPECKIT_COMMAND_IMPLEMENT__`.

When the codebase already satisfies everything, the command MUST leave `tasks.md`
**byte-for-byte unchanged** (no empty Convergence header) and report a clean result.
When no new tasks are needed, the command MUST leave `tasks.md`
**byte-for-byte unchanged** (no empty Convergence header). Report a clean result only
when the assessment finds no remaining work.

**Constitution Authority**: The project constitution (`/memory/constitution.md`) is
**non-negotiable**. Code that violates a MUST principle is the highest-severity finding and
produces a corresponding remediation task. If the constitution is an unfilled template,
skip constitution checks gracefully rather than failing.
requires a corresponding remediation task unless already covered by an open task. If the
constitution is an unfilled template, skip constitution checks gracefully rather than failing.

## Execution Steps

Expand Down Expand Up @@ -84,7 +88,7 @@ Load only the minimal necessary context from each artifact:
**From tasks.md:**

- Task IDs (to compute the next ID and next phase number)
- Descriptions, phase grouping, and referenced file paths
- Checkbox states, descriptions, phase grouping, source references, and referenced file paths

**From constitution (if not an unfilled template):**

Expand Down Expand Up @@ -125,6 +129,14 @@ For each item in the intent inventory, inspect the current code in scope and pro
Each `Finding` records: a stable id, the `source-ref` it traces to, the `gap-type`, a
severity, and a short human-readable description with the evidence (the file/area observed).

For every actionable finding, compare the concrete remaining work with unchecked
tasks (`- [ ]`) across all phases, including prior Convergence phases. If open tasks
already cover the work, mark the finding **already tracked** and record the covering
task IDs. Match by the work those tasks would complete, not by exact wording or a
shared source reference alone. If open tasks cover only part of the work, report
the tracked portion and append only the uncovered remainder. A checked task alone
does not cover a still-unmet finding; that finding remains eligible for a new task.

**Edge cases:**

- **Little or no code yet**: treat the entire specified scope as `missing` remaining work
Expand All @@ -147,9 +159,12 @@ Before appending anything, output a compact, severity-graded summary (no file wr

## Convergence Findings

| ID | Gap Type | Severity | Source | Evidence | Remaining Work |
|----|----------|----------|--------|----------|----------------|
| F1 | missing | HIGH | FR-008 | Example: no append-only guard detected in path/to/module.py when writing tasks.md | Add append-only enforcement |
| ID | Gap Type | Severity | Source | Evidence | Remaining Work | Tracking |
|----|----------|----------|--------|----------|----------------|----------|
| F1 | missing | HIGH | FR-008 | Example: no append-only guard detected in path/to/module.py when writing tasks.md | Add append-only enforcement | Already tracked by T041 |

Report already-tracked findings alongside uncovered findings. Cite the open task IDs
for tracked work and distinguish any uncovered remainder that needs a new task.

**Summary metrics:**

Expand All @@ -159,17 +174,18 @@ Before appending anything, output a compact, severity-graded summary (no file wr
- Findings by gap type (missing / partial / contradicts / unrequested)
- Findings by severity

### 7. Append Convergence Tasks (or report converged)
### 7. Append Convergence Tasks (or report without changes)

**If there are one or more actionable findings** (`tasks_appended` outcome):
**If there is any uncovered actionable work** (`tasks_appended` outcome):

Append to the **end** of `tasks.md`, per the append contract:

1. Scan all existing task IDs; let `M` be the maximum. Determine the next phase number `N`
(highest existing phase + 1).
2. Write a single new section header `## Phase N: Convergence`.
3. Emit one checklist item per actionable finding, ordered CRITICAL/HIGH first, assigning
zero-padded IDs `T{M+1:03d}, T{M+2:03d}, …`:
3. Emit one checklist item per actionable finding with uncovered work, describing only
that uncovered work. Order CRITICAL/HIGH first, assigning zero-padded IDs
`T{M+1:03d}, T{M+2:03d}, …`:

```markdown
- [ ] T042 <imperative description> per <source-ref> (<gap-type>)
Expand All @@ -185,7 +201,13 @@ Append to the **end** of `tasks.md`, per the append contract:
4. Never reuse or renumber existing IDs. If a prior Convergence phase exists, add a new,
separately-numbered one below it — do not touch the old one.

**If there are no actionable findings** (`converged` outcome):
**If all remaining work is already tracked by open tasks**:

- Do **not** modify `tasks.md` at all.
- Report that work remains, cite the covering task IDs, and state that no new tasks
were appended. Do not report `converged` or `tasks_appended`.

**If a completed assessment finds no remaining work** (`converged` outcome):

- Do **not** modify `tasks.md` at all — no empty phase header.
- Report: **"✅ Converged — the implementation satisfies the spec, plan, and tasks."**
Expand All @@ -194,7 +216,9 @@ Append to the **end** of `tasks.md`, per the append contract:
### 8. Provide Next Actions (Handoff)

- On `tasks_appended`: state how many tasks were appended under which phase, and recommend
running `__SPECKIT_COMMAND_IMPLEMENT__` to complete them; note that a follow-up converge
run will find fewer or no remaining items.
running `__SPECKIT_COMMAND_IMPLEMENT__` to complete them and any already-tracked work
identified above.
- When remaining work is already tracked and nothing was appended, recommend running
`__SPECKIT_COMMAND_IMPLEMENT__` on the cited open tasks before assessing again.
- On `converged`: recommend proceeding to review / opening a PR. No further implement pass
is needed for this feature's specified scope.
Loading