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
10 changes: 10 additions & 0 deletions .beads-sdp-mapping.jsonl
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,17 @@
{"sdp_id":"00-146-04","beads_id":"sdplab-m4sx","updated_at":"2026-04-26T00:00:00Z"}
{"sdp_id":"00-146-05","beads_id":"sdplab-tj6g","updated_at":"2026-04-26T00:00:00Z"}
{"sdp_id":"00-146-06","beads_id":"sdplab-23zc","updated_at":"2026-04-26T00:00:00Z"}
{"sdp_id":"00-147-01","beads_id":"sdplab-rp3u.1","updated_at":"2026-05-15T00:00:00Z"}
{"sdp_id":"00-147-02","beads_id":"sdplab-rp3u.2","updated_at":"2026-05-15T00:00:00Z"}
{"sdp_id":"00-147-03","beads_id":"sdplab-rp3u.3","updated_at":"2026-05-15T00:00:00Z"}
{"sdp_id":"00-147-04","beads_id":"sdplab-rp3u.4","updated_at":"2026-05-15T00:00:00Z"}
{"sdp_id":"00-147-05","beads_id":"sdplab-rp3u.5","updated_at":"2026-05-15T00:00:00Z"}
{"sdp_id":"00-147-06","beads_id":"sdplab-rp3u.6","updated_at":"2026-05-15T00:00:00Z"}
{"sdp_id":"00-147-07","beads_id":"sdplab-rp3u.7","updated_at":"2026-05-15T00:00:00Z"}
{"sdp_id":"00-147-08","beads_id":"sdplab-rp3u.8","updated_at":"2026-05-15T00:00:00Z"}
{"sdp_id":"00-147-09","beads_id":"sdplab-rp3u.9","updated_at":"2026-05-15T00:00:00Z"}
{"sdp_id":"00-149-01","beads_id":"sdplab-s1rn","updated_at":"2026-04-27T00:00:00Z"}
{"sdp_id":"00-149-02","beads_id":"sdplab-t5k3","updated_at":"2026-05-15T00:00:00Z"}
{"sdp_id":"00-150-01","beads_id":"sdplab-qgq1","updated_at":"2026-04-27T00:00:00Z"}
{"sdp_id":"00-150-02","beads_id":"sdplab-8rk7","updated_at":"2026-04-27T00:00:00Z"}
{"sdp_id":"00-150-03","beads_id":"sdplab-kcrd","updated_at":"2026-04-27T00:00:00Z"}
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,12 @@ jobs:
mkdir -p .sdp/findings
TS=$(date -u +%Y%m%d-%H%M%SZ)
RC=0
# F143-02 minimal unblock: 130 errors (BACKLOG_WS_MISSING_IN_INDEX,
# DONE_WITH_UNCHECKED_AC, STATUS_MISMATCH, MAPPING_ACTIVE_WS_MISSING)
# are pre-existing structural drift, not blocked-by-this-PR. Demote
# to advisory until INDEX/AC reconciliation lands. Cleanup tracked
# under F143-02 follow-up.
# Repository consistency remains advisory while its broader backlog is
# reconciled. Strict doc-sync is blocking again after F149-02 retired
# the historical backlog/link debt.
python3 scripts/check_repo_consistency.py --strict-ac --json > ".sdp/findings/check-repo-consistency-${TS}.json" || echo "WARN: check_repo_consistency surfaced findings (advisory while backlog reconciles)"
go run ./cmd/sdp-protocol-check --format json > ".sdp/findings/_raw-sdp-protocol-check-${TS}.json" || true
go run ./cmd/sdp-doc-sync --mode check --format json > ".sdp/findings/_raw-sdp-doc-sync-${TS}.json" || true
go run ./cmd/sdp-doc-sync --mode check --format json --strict > ".sdp/findings/_raw-sdp-doc-sync-${TS}.json" || RC=1
# F078-01: version drift gate
scripts/check-version-drift.sh --json > ".sdp/findings/version-drift-${TS}.json" || RC=1
# F078-02: public metadata drift gate
Expand Down
5 changes: 5 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,11 @@ Checks include:

Documentation automation for changelog and consistency checks:

After F149-02, strict doc-sync findings are blocking in CI. Do not describe
`sdp-doc-sync --mode check --strict` failures as "known repo-wide debt" unless a
new reviewed PR explicitly changes the tool or CI contract and names the
advisory class.

```bash
sdp-doc-sync --mode check # Validate docs consistency (protocol + links)
sdp-doc-sync --mode check --strict # Treat docs drift as errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

1. **Consumer repos копируют SDP кусками.** Агенты в downstream-проектах (Claude Code, OpenCode, Codex, Cursor) не имеют one-shot способа поставить SDP. Они вытаскивают отдельные skill-файлы, копируют команды без зависимостей, теряют hooks. Результат — каждый репозиторий получает inconsistent subset SDP.
2. **Существует proven UX-эталон.** `oh-my-openagent` (curl|bash bootstrap + структурированная установка `.opencode/`) показал, что разработчики ждут именно такой опыт: "одна команда — полный комплект".
3. **F128 убрал submodule, но drift вернётся вручную.** После [F128-01](../../.beads/index.json) (move sdp/ submodule → native) каноническим стал `.agents/skills/`, симлинки в `.claude/skills/` и т.д. Это работает в `sdp_lab`, но при копировании в чужой репо синхронизация рвётся — нет инструмента, который перегенерирует адаптеры из канонического дерева.
3. **F128 убрал submodule, но drift вернётся вручную.** После F128-01 (move sdp/ submodule → native) каноническим стал `.agents/skills/`, симлинки в `.claude/skills/` и т.д. Это работает в `sdp_lab`, но при копировании в чужой репо синхронизация рвётся — нет инструмента, который перегенерирует адаптеры из канонического дерева.
4. **Паритет сейчас держится на дисциплине документации.** [AGENTS.md](../../AGENTS.md) описывает skill discovery для четырёх harness'ов, но пути конфигурируются вручную. Любое изменение списка skills/commands требует синхронных правок в четырёх деревьях.

## 2. Goals / Non-goals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SDP `dispatch` слой имеет три задокументированных

Router думает что выбрал `composer-2-fast`, харнесс запускается с дефолтом из конфига. Routing-решения не реализуются.

**1.2 Provider-каркас полупустой.** `Provider` interface ([harness.go:21](../../internal/dispatch/harness/harness.go)) задуман как абстракция над rate-limit-aware вендором, но **единственная реализация — `ZAIProvider`** с захардкоженными `glm-5/glm-4.7` и `CheckLimits` возвращающим stub. Anthropic/OpenAI/Cursor/Kimi/Ollama как `Provider` не существуют. `LocalConfig` для Ollama живёт отдельным хардкодом в [internal/dispatch/local.go](../../internal/dispatch/local.go), не интегрирован с общим `Provider`-каркасом.
**1.2 Provider-каркас полупустой.** `Provider` interface ([harness.go:21](../../internal/dispatch/harness/harness.go)) задуман как абстракция над rate-limit-aware вендором, но **единственная реализация — `ZAIProvider`** с захардкоженными `glm-5/glm-4.7` и `CheckLimits` возвращающим stub. Anthropic/OpenAI/Cursor/Kimi/Ollama как `Provider` не существуют. Historical note: old `LocalConfig`/`local.go` was removed by the F145 cleanup; current local dispatch code lives in [internal/dispatch/ollama_client.go](../../internal/dispatch/ollama_client.go) and harness/provider files.

**1.3 Routing single-shot, без confidence loop.** `Router.Route` ранжирует модели **upfront** по prior'ам и выбирает одну. `DispatchingInvoker.Fallback` срабатывает **только на ошибках** (packet load fail, routing fail, invoker missing). Если cheap модель ответила, но плохо — никто не эскалирует.

Expand Down
141 changes: 141 additions & 0 deletions docs/plans/2026-05-15-f149-doc-sync-debt-retirement-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# F149: strict doc-sync debt retirement

Status: draft for review

Owner issue: `sdplab-t5k3`

Parent workstream: `00-149-01`

## Problem

`sdp-doc-sync --mode check --strict` is a local blocking check, but the same class
of findings is advisory in CI while historical backlog drift is reconciled. That
split made "known repo-wide backlog/link debt" a reusable handoff note instead
of owned work.

Current baseline on 2026-05-15:

- strict `sdp-doc-sync` exits 2
- 56 findings
- buckets: broken local links, missing ROADMAP/INDEX feature rows, scaffold
workstreams without required `## Beads` or `## Acceptance Criteria`, and
workstreams whose Beads section has no concrete `sdplab-*` reference

## Goal

Retire the strict `sdp-doc-sync` backlog so the local strict check exits 0, then
change the repo policy so future "known debt" notes must either point at an open
owner issue or fail the relevant gate.

This work does not add a doc-sync allowlist. That would preserve the failure
mode under a more formal name. After this branch, strict doc-sync findings are
blocking unless a future PR explicitly changes the tool or CI contract with its
own reviewed policy.

## Non-goals

- Reopen product design for F083/F084/F085/F101/F133/F145/F146/F147.
- Complete the F145/F146/F147 implementation workstreams.
- Rewrite historical archive docs outside the active docs checked by
`sdp-doc-sync`.
- Merge without a separate PR review and explicit merge authorization.

## Slices

### Slice 1: ownership and spec

- Add this design.
- Add executable workstream `00-149-02`.
- Link `00-149-02` to `sdplab-t5k3` in the workstream and mapping.
- Run independent spec review before broad cleanup.

Acceptance:

- `00-149-02` has explicit scope, non-goals, acceptance criteria, and Beads link.
- Review artifacts record at least requirements, evidence/tracing, and DX/gate
review planes.
- Unusable reviewer output is recorded as `not_assessed` with reviewer, model,
attempt, and reason; it is not counted as review approval.

### Slice 2: factual doc debt cleanup

- Fix broken local links or intentionally mark links historical in active docs.
- Add missing ROADMAP/INDEX entries for features referenced by active backlog
files, or archive/supersede the backlog files if they are not active backlog.
- Normalize scaffold workstreams so they satisfy the current section contract
while still stating `design-pending` or non-executable status.
- Replace placeholder Beads text with concrete `sdplab-*` references where the
Beads issue exists.

Acceptance:

- `go run ./cmd/sdp-doc-sync --mode check --strict` exits 0.
- Before/after doc-sync evidence is recorded:
- baseline strict output with finding count;
- final strict output with exit 0;
- per-finding resolution notes grouped by bucket.
- Any non-executable scaffold keeps all concrete non-executable markers:
- frontmatter `status: design-pending` or another non-buildable status;
- an explicit `## Status` section saying it must not be built yet;
- acceptance criteria that describe design/readiness gates, not implementation
completion;
- no language that claims implementation readiness.
- No workstream is made runnable by accident: for every touched
`design-pending` workstream, reviewers must check that its status and next
action still route to `/design` or `/feature`, not `/build`.
- Archiving/superseding is allowed only when the resolution note proves the file
is not linked as active from ROADMAP/INDEX and names the replacement or reason.

### Slice 3: rule and gate cleanup

- Update repo policy to say strict doc-sync debt may be advisory only when it has
an explicit owner issue, expiry/revisit path, CI artifact, and a reviewed
tool/CI contract that names the advisory class. A handoff note is not enough.
- Remove stale language that treats historical backlog/doc drift as an indefinite
advisory class after Slice 2 is green.
- Keep CI advisory/reporting semantics only for newly discovered findings that
meet the advisory-eligibility criteria above, not for already-retired debt.

Acceptance:

- `docs/reference/ci-gates-map.md`, `docs/reference/quality-gates.md`, and
`AGENTS.md` agree on current doc-sync semantics.
- CI no longer documents the retired F143/F149 backlog debt as a standing reason
to ignore doc-sync findings.
- No new allowlist or ignore file is introduced by this remediation.

## Review Plan

Spec review:

- requirements plane: does the spec resolve the real problem without inventing
product scope?
- evidence/tracing plane: does it preserve `not_assessed` and prevent accidental
green claims?
- DX/gate plane: will future agents know when doc-sync is blocking vs advisory?

Slice review:

- after Slice 1: review spec and ownership only
- after Slice 2: review the cleanup diff plus strict doc-sync evidence
- after Slice 3: review policy/gate diff and final PR readiness

Review lane states:

- `assessed`: reviewer produced specific findings or explicit approval with
citations to the embedded target.
- `not_assessed`: reviewer output is empty, asks to call tools instead of
reviewing the embedded target, is off-task, lacks findings/verdict, or depends
on unavailable artifacts.
- `degraded`: reviewer completes the plane but misses some requested evidence;
record what was and was not assessed.

## Verification

Minimum branch gates before PR readiness:

- `go run ./cmd/sdp-doc-sync --mode check --strict`
- `go run ./cmd/sdp-protocol-check --format json --strict`
- `./scripts/run_go_quality_gates.sh` or documented host fallback
- PR checks matching the branch protection set are green; absent, skipped, or
advisory-only checks are recorded by name and not treated as passing evidence.
6 changes: 3 additions & 3 deletions docs/reference/ci-gates-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ states. They must not be rendered as green merge checks.
### consistency-gate
- **Owner**: platform
- **Triggers**: Every PR
- **Steps**: Advisory findings from `python3 scripts/check_repo_consistency.py --strict-ac --json`, `go run ./cmd/sdp-protocol-check --format json`, `go run ./cmd/sdp-doc-sync --mode check --format json`, and `go run ./cmd/sdp-protocol-check --lint-skills --format json`; blocking drift checks from `scripts/check-version-drift.sh --json` and `scripts/check-public-metadata.sh --json`.
- **Steps**: Advisory findings from `python3 scripts/check_repo_consistency.py --strict-ac --json`, `go run ./cmd/sdp-protocol-check --format json`, and `go run ./cmd/sdp-protocol-check --lint-skills --format json`; blocking drift checks from `go run ./cmd/sdp-doc-sync --mode check --format json --strict`, `scripts/check-version-drift.sh --json`, and `scripts/check-public-metadata.sh --json`.
- **Never skipped**
- **Failure semantics**: Blocks merge on version drift or public metadata drift. Repository consistency, protocol-check, doc-sync, and skill-lint findings are written as advisory artifacts while historical backlog/doc drift is reconciled.
- **Local reproduce**: `scripts/check-version-drift.sh --json && scripts/check-public-metadata.sh --json`; advisory: `python3 scripts/check_repo_consistency.py --strict-ac --json`
- **Failure semantics**: Blocks merge on strict doc-sync drift, version drift, or public metadata drift. Repository consistency, protocol-check, and skill-lint findings are written as advisory artifacts.
- **Local reproduce**: `go run ./cmd/sdp-doc-sync --mode check --strict && scripts/check-version-drift.sh --json && scripts/check-public-metadata.sh --json`; advisory: `python3 scripts/check_repo_consistency.py --strict-ac --json`
- **Output schema**: JSON findings file
- **Artifact path**: `.sdp/findings/*.json` (uploaded as CI artifact)

Expand Down
3 changes: 2 additions & 1 deletion docs/reference/quality-gates.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ green.
| Cognitive complexity | not_assessed | Root `.golangci.yml` does not enable `gocognit` or `gocyclo` | No gate until the linter config and thresholds are selected |
| CRAP score | not_assessed | No CRAP formula/tool is selected for Go in this repo | No gate until a formula and implementation are selected |
| Modern Go hygiene | evidence_only | `go vet` and `golangci-lint` run, but root lint config disables `staticcheck`, `gosimple`, and `ineffassign` | Partial evidence only; do not call this a full modern-Go gate |
| Spec drift | evidence_only | `sdp-protocol-check`, `sdp-doc-sync`, and repo consistency checks emit findings | Advisory except for version/public metadata drift |
| Doc consistency drift | pass/fail | `sdp-doc-sync --mode check --strict` locally and in CI | Blocking |
| Protocol/repo consistency drift | evidence_only | `sdp-protocol-check` and repo consistency checks emit findings | Advisory except for version/public metadata drift |
| Work without spec/workstream | cannot_verify outside PR/checkpoint context | `scope-gate` verifies checkpoint workstreams when `.sdp/checkpoints/*.json` is present in PR diff | Blocking only when checkpoint evidence exists; otherwise absence of evidence is not approval |

`scripts/quality-metrics.sh` prints this same state vocabulary before running
Expand Down
80 changes: 80 additions & 0 deletions docs/reviews/f149-doc-sync-debt/slice-2-doc-sync-resolution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Slice 2 doc-sync resolution

Date: 2026-05-15

Owner: `sdplab-t5k3`

## Baseline

Command:

```bash
go run ./cmd/sdp-doc-sync --mode check --strict
```

Baseline result before Slice 2 cleanup:

- exit status: 2
- findings: 56 errors, 0 warnings

Buckets:

- broken active-doc local links
- missing ROADMAP feature records
- missing INDEX feature records
- scaffold workstreams without `## Beads` or `## Acceptance Criteria`
- workstreams with placeholder Beads text and no concrete `sdplab-*` reference

## Resolutions

### Broken links

- Removed the broken `.beads/index.json` markdown link from the F141 plan. The
F128 reference remains textual because the old Beads index file no longer
exists.
- Repointed the F145 plan's old `internal/dispatch/local.go` link to the current
`internal/dispatch/ollama_client.go` context and marked the old file as
historical.
- Removed the broken markdown link in `00-145-06` while preserving the historical
deletion intent for `internal/dispatch/local.go`.

### ROADMAP and INDEX feature records

- Added active ROADMAP records for `F133`, `F135`, and `F163`.
- Added INDEX rows for `F131`, `F133`, and the post-F150 features `F151` through
`F160`.
- Updated F145/F146/F147 INDEX rows from stale backlog/no-ws text to the actual
shipped workstream ranges.

### Scaffold section normalization

- Converted inline Beads text in `00-083-01`, `00-084-01`, `00-085-01`, and
`00-101-02` into real `## Beads` sections.
- Added design-gate acceptance criteria to `00-083-01`, `00-084-01`, and
`00-085-01`; these files remain `status: design-pending` and explicitly route
to `/design` before `/build`.
- Renamed legacy `## Acceptance` headings in `00-101-02` and `00-133-01` to
`## Acceptance Criteria` and converted existing bullets into checkboxes.

### Beads placeholders

- Replaced F145 and F146 placeholder Beads text with their existing mapped leaf
`sdplab-*` IDs from `.beads-sdp-mapping.jsonl`.
- Replaced F147 placeholder text with historical leaf Beads `sdplab-rp3u.1`
through `sdplab-rp3u.9`, discovered during follow-up verification after the
initial review. The temporary synthetic anchor `sdplab-itzf` was superseded
and is not used in the documentation.

## Final Evidence

```bash
go run ./cmd/sdp-doc-sync --mode check --strict
OK: documentation consistency passed
```

```bash
go run ./cmd/sdp-protocol-check --format json --strict
{
"issues": []
}
```
Loading
Loading