ci: specs live in the issue body — body digest in review anchors, gate without a spec file

The spec file solved exactly one problem — proving that a review verdict
was passed on a given text — and created two: docs/specs/README.md
conflicted between parallel tasks and served as a second, stale status
dictionary, and every spec edit cost a commit, a push and a label. The
proof moves into the pipeline.

- review-doc-guard: normalizeIssueBody / issueBodyDigest (CRLF, trailing
  whitespace, trailing newlines), the anchor line `Тело issue: <sha256>`,
  anchorIssueBodyFrom, and issueBodyChanged — the finding "the spec
  changed after a green spec review", judged against the pipeline's own
  record in the last green SPEC-REVIEW, never against prose.
- reusableGreenVerdict takes the current digest: reuse (#499) skips the
  model entirely, so without this a spec edit between rounds would pass
  unseen. Documents without the record (the whole backlog) keep judging
  by tree.
- process.yml: the material step reads the body with `gh issue view` in
  the same run that fixes the material — the event snapshot describes a
  text the reviewer may never see; the digest goes into the anchors, into
  reuse and, when it differs, into the reviewer's prompt.
- process-gate: rule 3 judges the text (a `## ТЗ` heading or an AC1) with
  the archived file still accepted; adding a new file under docs/specs/
  warns — the directory is frozen.
- task-packet reads AC from the body first, the archived file second.
- PROCESS.md §2.3/§5/§7.1/§7.3/§10.5, AGENTS.md and docs/specs/README.md
  say so; the index table is gone with the long-standing §7.3 debt.

Mutants: review-anchor-drops-issue-body, review-ignores-changed-spec-body,
reuse-ignores-changed-issue-body, process-gate-requires-spec-file.

Issue: #517
User-Visible: no
This commit is contained in:
Codex
2026-09-10 10:18:17 +03:00
parent e20560afa8
commit 156835c048
11 changed files with 437 additions and 309 deletions
+7 -1
View File
@@ -107,7 +107,13 @@ export function buildPacket(inputs) {
const track = labels.includes('trivial') ? 'trivial' : labels.includes('small') ? 'small' : 'полный';
const stage = status === 'S4-spec-review' || status === 'S3-spec' || status === 'S5-ready' ? 'spec' : 'code';
const verdict = lastVerdict(comments, reviewDocs, stage);
const acSource = specs.length ? specs.map((s) => s.text).join('\n') : issue.body;
// ТЗ живёт в теле issue (#517); архивный файл — источник только у задач до
// перехода, у которых в теле AC нет. Порядок именно такой: тело правится и
// после создания файла, и тогда файл описывает не тот текст, что читает
// ревьюер.
const fromBody = extractAcceptanceCriteria(issue.body);
const acSource = fromBody.length || !specs.length
? issue.body : specs.map((s) => s.text).join('\n');
const acs = evidenceFor(extractAcceptanceCriteria(acSource), reviewDocs.length ? reviewDocs.at(-1).text : '');
const unverified = acs.filter((a) => a.evidence.startsWith('без записи'));
const packet = {