Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
82bc9be
docs(sdd): specify issue contract in specs/pre-branch-sdd-diff.md
vypbot Oct 11, 2026
80b5317
Merge develop into feature/464-dogfooding-compare-verified-first-and-…
vypbot Oct 11, 2026
ad27952
Merge develop into feature/464-dogfooding-compare-verified-first-and-…
vypbot Oct 12, 2026
0f01627
Merge develop into feature/464-dogfooding-compare-verified-first-and-…
vypbot Oct 12, 2026
86db9b1
Merge develop into feature/464-dogfooding-compare-verified-first-and-…
vypbot Oct 12, 2026
cb6b369
feature/464: compare verified immutable SDD publications
efraespada Oct 12, 2026
ed02437
feature-464-dogfooding-compare-verified-first-and-current-sdd-revisio…
efraespada Oct 12, 2026
139955e
Merge develop into feature/464-dogfooding-compare-verified-first-and-…
vypbot Oct 12, 2026
635e8bc
feature-464-dogfooding-compare-verified-first-and-current-sdd-revisio…
efraespada Oct 12, 2026
551b4f1
Merge develop into feature/464-dogfooding-compare-verified-first-and-…
vypbot Oct 13, 2026
7b0f766
feature-464-dogfooding-compare-verified-first-and-current-sdd-revisio…
efraespada Oct 13, 2026
2192924
feature-464-dogfooding-compare-verified-first-and-current-sdd-revisio…
efraespada Oct 13, 2026
94653aa
Merge bugfix/474-dogfooding-fixer-scratch-cache-rejection-and-stale-p…
vypbot Oct 13, 2026
f13f3b1
feature-464-dogfooding-compare-verified-first-and-current-sdd-revisio…
efraespada Oct 13, 2026
20e817b
Merge develop into feature/464-dogfooding-compare-verified-first-and-…
vypbot Oct 13, 2026
4cafaf8
feature-464-dogfooding-compare-verified-first-and-current-sdd-revisio…
efraespada Oct 13, 2026
c04bf45
feature-464-dogfooding-compare-verified-first-and-current-sdd-revisio…
efraespada Oct 13, 2026
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
727 changes: 711 additions & 16 deletions build/cli/index.js

Large diffs are not rendered by default.

715 changes: 706 additions & 9 deletions build/github_action/index.js

Large diffs are not rendered by default.

50 changes: 48 additions & 2 deletions docs/issues/comment-commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ Commands are recognized at the beginning of a comment, case-insensitively. The c
| `/copilot review` | Run the read-only review flow. | No |
| `/copilot findings` | Reconcile and publish current findings. | No |
| `/copilot recheck` | Re-run the review against the current branch. | No |
| `/copilot sdd-diff` | Compare verified first/current SDD publications without an agent. | No |
| `/copilot status` | Show the current Copilot status. | No |
| `/copilot doctor` | Check runtime prerequisites using bounded read-only evidence. | No |
| `/copilot history` | Show supported requests and verified receipts in the main conversation. | No |
| `/copilot description` | Refresh the PR description when that action is configured. | No |
| `/copilot fix <finding-id> [finding-id ...]` | Fix one or more existing Bugbot findings. | Yes, if authorized |
| `/copilot dismiss <finding-id> [finding-id ...]` | Dismiss one or more findings. | No file changes |
Expand All @@ -61,8 +63,8 @@ whitespace-separated, and commands are limited to 2,000 characters and 20
arguments. Missing or malformed required arguments produce a validation reply;
they never mean “all” or authorize a broad change.

`help`, `status`, `doctor`, `dismiss`, `remember` and rejected commands do not run a
model or change the temporary agent activity label. `sync-branch --dry-run`
`help`, `status`, `sdd-diff`, `doctor`, `history`, `dismiss`, `remember` and
rejected commands do not run a model or change the temporary agent activity label. `sync-branch --dry-run`
and `--no-agent` also avoid model activity. Ordinary sync may use the conflict
fixer, and `findings` runs a fresh review. These distinctions preserve each
command's existing authorization and repository effects.
Expand Down Expand Up @@ -427,6 +429,34 @@ SDD status keeps an unknown requirement visible when the issue has no admitted
workflow kind. Evidence links use the configured GitHub server origin and the
same issue identity; an untrusted or mismatched URL is shown without navigation.

## Compare SDD publications

Run `/copilot sdd-diff` without arguments in an eligible issue. The reply links
verified immutable first/current SDD publications and their commits, and compares
added/removed lines and up to eight changed section titles. The commit comparison
link can include other files changed between those commits; the reported counts
cover only the owning SDD. This is a structural comparison, without an assessment
of semantic requirements or document excerpts.

A first publication without a revision reports `initial-only`. Pending answers
and a changed issue withhold current counts and link the existing clarification
card when verified. Missing, invalid or unavailable evidence is explicit. The
command reads current issue, record and branch facts again before claiming a
current comparison. It does not run an agent, change activity labels or edit files.

On a PR, exactly one SDD-eligible issue among the native same-repository closing
links is required, and its current linked branch must match the PR head. Copilot
checks at most 100 native candidates and reports ambiguity for multiple eligible
issues; the command never guesses from issue numbers in text. Use the intended
issue conversation to resolve ambiguity. The same eligibility selection is rechecked before returning counts. A replay of the same source comment
refreshes its existing owned reply; a new comment gets a separate reply.

Comparison limits are fixed: 70,000 characters, 280,000 UTF-8 bytes and 2,000
content lines per document, and 2,000,000 line-comparison steps. Over-limit
results retain safe verified links and withhold exact counts. English and Spanish
are bundled; other locales receive a complete English fallback without a model.
Paths, refs, URLs and configurable limits are not accepted as command arguments.

Doctor treats a valid native issue with no description as an empty body, so
independent checks can still complete. Unknown evidence groups are rejected;
installed workflow activity filters must contain a non-empty array of text
Expand All @@ -440,6 +470,13 @@ When the detected request language and writing script already match the target,
Copilot keeps the original wording and omits a redundant translation disclosure.
Mixed-language requests and different writing scripts can still be translated.


On a PR, `/copilot sdd-diff` verifies the native closing-issue association again
before returning every result, including pending or missing publication. If the
association changes, retry the command: the stale reply withholds links belonging
to the previous issue. An unreadable final association remains unavailable.

An exempt or ambiguous PR comparison rechecks linked issue eligibility before returning. Stale and pending replies preserve both verified publications as explicitly historical when their commits differ; they keep current comparison links and change counts unavailable.
Check-mode PR readiness reports the configured coverage check independently of
other CI checks. Coverage can be satisfied while another CI check is blocked,
or pending when its current revision is missing or still running. Overall
Expand Down Expand Up @@ -541,6 +578,9 @@ source check. If the event lacks that request evidence, the Action withholds
creation, updates and duplicate cleanup instead of assuming freshness. Initial
help answers from non-comment events retain their ordinary immutable reply.

SDD comparison replies require the exact source comment witness before they are
created, refreshed or deduplicated. If that proof is missing or changes, the
existing reply remains unchanged; use a valid new query after checking the source.

`/copilot history` in a pull request's main conversation reads and publishes for
that exact PR, even when its linked issue has a different number. The query uses
Expand Down Expand Up @@ -583,3 +623,9 @@ Doctor distinguishes its source links: **Inspected issue** opens the issue conte
opens the immutable repository tree that was inspected. Spanish uses the matching
entity captions. These links do not authorize a repair or certify CI, producer
health or write permissions.


Comment-triggered replies require a verified native source comment before
publication, including repeated read-only queries and immutable operation
receipts. If the source witness or its reader is unavailable, Copilot keeps
existing replies and performs no comment creation, update or duplicate cleanup.
17 changes: 17 additions & 0 deletions docs/issues/pre-branch-sdds.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,20 @@ unavailable; a corrupted card, changed issue or racing branch cannot produce a
ready result. A newer invalid owned card never restores an older ready state.
Answers from older rounds without matching question provenance remain pending.
Help issues remain branchless and do not require an SDD.


## Compare the first and current publication

Use `/copilot sdd-diff` in the issue to inspect a bounded structural comparison
of the first and current verified SDD. A reply shows immutable document and
commit links, exact added/removed line counts and up to eight escaped changed
section titles. It does not quote document contents or decide whether semantic
requirements changed. The commit comparison may show other files; the command's
counts concern only the owning SDD.

Only a first publication means there is no revision pair. Pending clarifications
or stale issue evidence withhold current counts and return you to the existing
SDD card. Invalid or unavailable authority cannot certify a comparison. Repeating
the same source comment refreshes one reply; it never regenerates the SDD or
changes the branch. See [comment commands](./comment-commands.mdx) for exact PR
link rules, fixed limits and the English/Spanish fallback contract.
25 changes: 25 additions & 0 deletions scripts/coverage-budgets.json
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,31 @@
],
"successMessage": "canonical PR status coverage: PASS (marker policy 100%; read workflow 95% lines/statements, 90% branches/functions)"
},
{
"name": "SDD structural comparison",
"missingEntryLabel": "SDD structural comparison",
"rules": [
{
"files": [
"src/domain/pre_branch_sdd_diff.ts",
"src/application/policies/sdd_diff_message_catalog.ts",
"src/application/policies/sdd_diff_presentation_policy.ts"
],
"mode": "each",
"thresholdProfile": "exhaustive"
},
{
"files": [
"src/application/usecases/sdd/sdd_diff_query_use_case.ts",
"src/data/repository/sdd/sdd_diff_link_repository.ts",
"src/infrastructure/composition/sdd_diff_composition_root.ts"
],
"mode": "each",
"thresholdProfile": "default"
}
],
"successMessage": "SDD structural comparison coverage: PASS (pure policies 100%; each application/adapter/composition 95% lines/statements, 90% branches/functions)"
},
{
"name": "Git hook verification environment",
"missingEntryLabel": "Git hook verification environment",
Expand Down
Loading
Loading