Skip to content

Commit 32ebb2a

Browse files
nachiketclaude
andcommitted
feat(htmlviewer,docs): v0.6.0 release prep — amendments in SPA + CHANGELOG + follow-up TPs
Pre-release delta closing the user-visible gap from TP-026: amendments shipped in schema/validator/CLI/index/STATE but the static HTML viewer was still ignoring them. htmlviewer: - Bundle gains RecentAmendments (was silently dropped from index.RecentAmendments). - SPA renders an Amendments section under ADR detail bodies (date, kind badge, by, summary, ref linkified, affects_sections chips). - Home view gains a Recent amendments panel below STATE.md, sourced from bundle.recent_amendments. ADR-0027 §Consequences anticipated this — TP-036 backfills the citation. CHANGELOG: - v0.6.0 entry (MINOR — new docops amend CLI verb, new schema field, deprecated slash files removed on upgrade, new SPA surface). Covers amendments pipeline, ADR-0029 slash narrowing, ADR-0030 draft, status-enum DX nudge, CI Node 24 bump, and the known gaps tracked as TP-035/037/038/039. Follow-up TPs: - TP-036 — backfill record for the amendment-aware UI shipped here (cites ADR-0027, ADR-0025). - TP-037 — Timeline view in the SPA (cites ADR-0027). - TP-038 — Graph node annotations: amended/draft/stale (cites ADR-0027, ADR-0025). - TP-039 — Deferred amendment audit rules from ADR-0025 (≥5 threshold, hand-edit drift, stale-ref). ADR-0030 (named baselines) stays draft — needs more ideation before an implementation TP is sensible. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6a74a4a commit 32ebb2a

10 files changed

Lines changed: 464 additions & 19 deletions

CHANGELOG.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,141 @@
22

33
All notable changes to docops are recorded here. Dates are UTC.
44

5+
## v0.6.0 — 2026-04-30
6+
7+
### Added — Amendments as first-class decision metadata (ADR-0025)
8+
9+
ADRs can now carry a structured, append-only `amendments:` log for
10+
editorial fixes, errata, clarifications, and late-binding patches that
11+
don't warrant a full superseding ADR. Validator, CLI, index, STATE.md,
12+
and the static HTML viewer are all amendment-aware.
13+
14+
```yaml
15+
# docs/decisions/ADR-0019-...md
16+
amendments:
17+
- date: 2026-04-23
18+
kind: editorial # editorial | errata | clarification | late-binding
19+
by: nix
20+
summary: "Tap/bucket repo names: per-tool → org-wide convention"
21+
affects_sections: ["v0.1.0 scope"]
22+
ref: TP-024
23+
```
24+
25+
- **Schema + validator** — `kind` enum (4 values) is the single source
26+
of truth for both the Go validator and `decision.schema.json`. Inline
27+
`[AMENDED YYYY-MM-DD kind]` markers in the body are correlated with
28+
frontmatter entries; mismatches are validation errors. Markers inside
29+
fenced code blocks are skipped. Amendments on `superseded` ADRs emit
30+
warnings rather than errors.
31+
- **`docops amend` CLI** — non-interactive mutation. Mirrors ADR-0025's
32+
flag surface (`--kind`, `--summary`, `--section`, `--ref`, `--by`,
33+
`--body`/`--body-file`, `--marker-at`). yaml.Node-based frontmatter
34+
edits preserve comments, key order, and quoting on unrelated fields.
35+
Atomic tmp+rename write.
36+
- **Index + STATE.md** — `docs/.index.json` gains `amendments` per ADR
37+
plus a top-level `recent_amendments` list (newest-first, windowed by
38+
`recent_activity_window_days`, UTC-midnight comparison).
39+
STATE.md gains a "Recent amendments" section.
40+
- **Static viewer (`docops html` / `docops serve`)** — ADR detail pages
41+
render an Amendments section under the body; the Home view shows a
42+
Recent amendments panel after STATE.md. The viewer bundle now carries
43+
`recent_amendments` in addition to per-doc `amendments`.
44+
- **TP-027 backfill** — ADR-0019's HTML-comment amendment stub is
45+
promoted to a proper frontmatter entry.
46+
47+
Audit rules from ADR-0025 (≥5 amendments threshold, hand-edit drift,
48+
stale-ref) are deferred to TP-039.
49+
50+
### Changed — Slash command surface narrows to 5 milestone moments (ADR-0029)
51+
52+
Slash-style harnesses (Claude, Cursor, OpenCode) now ship a focused set
53+
of `/docops:*` commands instead of one slash per CLI verb:
54+
55+
```
56+
init progress next do plan
57+
```
58+
59+
Granular operations (`get`, `list`, `graph`, `search`, `audit`, `close`,
60+
`new-adr`, `new-ctx`, `new-task`, `refresh`, `state`, `upgrade`) remain
61+
available as **skills** for natural-language dispatch by the LLM, and
62+
as CLI verbs. The `/docops:do` skill routes free-form intents to the
63+
right skill or CLI invocation.
64+
65+
`docops upgrade` removes the 12 deprecated slash files from
66+
`.claude/commands/docops/` and `.cursor/commands/docops/` automatically
67+
on next run. **Codex bundle is unchanged** — it uses skill-bundle
68+
delivery (not slashes), so the full surface stays in-bundle as
69+
subroutines.
70+
71+
### Added — ADR-0030 (draft) — named baselines
72+
73+
Drafted but not implemented: a baseline is a name + git tag + frozen
74+
index pointer (`docs/baselines/<name>.json`). Future work will add
75+
`docops baseline create|list|show|diff|current` and
76+
`docops get <ID> --at <baseline>`. No code change in this release.
77+
78+
### Changed — Status enum literals surfaced where LLMs read
79+
80+
LLMs were guessing `in_progress`, `wip`, `todo` for task status and
81+
hitting validator errors. The canonical enums are now inline in the
82+
docops block in `AGENTS.md`/`CLAUDE.md` (and templates), in the
83+
`new-task`, `new-adr`, and `close` skill files, with the common wrong
84+
guesses called out. JSON Schema remains canonical; these are read-side
85+
hints to short-circuit the trial-and-error loop.
86+
87+
The `new-task` skill no longer references the nonexistent
88+
`docops status TP-xxx active` command — replaced with explicit
89+
edit-frontmatter + `docops refresh`.
90+
91+
### Changed — CI runtimes bumped to Node 24
92+
93+
`actions/checkout v4 → v6`, `actions/setup-go v5 → v6`,
94+
`goreleaser/goreleaser-action v6 → v7` to clear GitHub's 2026-06-02
95+
Node 20 deprecation.
96+
97+
### Internal
98+
99+
- New `internal/amender/` package; `cmd/docops/cmd_amend.go`.
100+
- `schema.Amendment` + `ADR.Amendments` (yaml `omitempty`); validator
101+
gains `ValidateAmendmentMarkers`; `loader.Doc` gains `Body []byte`
102+
for ADRs so the validator can correlate markers.
103+
- `index.IndexedDoc.Amendments`, `index.Index.RecentAmendments`,
104+
`index.IndexedAmendment`, `index.RecentAmendment`.
105+
- `state.Snapshot` threads `RecentAmendments` through; renderer emits
106+
the section only when non-empty.
107+
- `htmlviewer.Bundle.RecentAmendments` (was silently dropped).
108+
- `scaffold.SlashDeliverableCmds` defines the milestone-moment subset;
109+
upgrader auto-removes deprecated slash files via the existing
110+
"no-longer-shipped" cleanup path. New
111+
`TestRun_DeprecatesPreADR0029Slashes` covers the migration.
112+
- `templates/skills/docops/do.md` routing table updated to skill names
113+
(or CLI fallback) rather than defunct slashes.
114+
- `skill-lint` allowlist gains `amend`.
115+
116+
### Known gaps (tracked)
117+
118+
- TP-035 — `/docops:do` dispatcher fixture suite (≥95% routing
119+
accuracy bar). Load-bearing under ADR-0029 long-term; ships shortly
120+
after.
121+
- TP-037 — Timeline view in static HTML viewer.
122+
- TP-038 — Graph node annotations (amended/draft/stale).
123+
- TP-039 — Deferred amendment audit rules from ADR-0025.
124+
- ADR-0030 implementation — pending design ideation.
125+
- TP-034 deferred behavior — "preserve user-modified slash files with
126+
warning" rather than always overwriting on upgrade.
127+
128+
### Migration
129+
130+
Pre-launch — no migration needed. If you have an in-flight DocOps repo,
131+
running `docops upgrade` will:
132+
133+
1. Remove 12 deprecated `/docops:*` slash files from Claude/Cursor
134+
command directories.
135+
2. Refresh `AGENTS.md` / `CLAUDE.md` docops blocks with Invariant #6
136+
(status enums).
137+
138+
ADRs without `amendments:` continue to validate; the field is additive.
139+
5140
## v0.5.2 — 2026-04-25
6141

7142
### Changed — Codex layout collapses to one skill bundle

docs/.docops/counters.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"next": {
44
"ADR": 31,
55
"CTX": 5,
6-
"TP": 36
6+
"TP": 40
77
}
88
}

docs/.index.json

Lines changed: 106 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"generated_at": "2026-04-30T02:57:42Z",
2+
"generated_at": "2026-04-30T03:28:22Z",
33
"version": 1,
44
"docs": [
55
{
@@ -1198,9 +1198,21 @@
11981198
{
11991199
"id": "TP-027",
12001200
"edge": "requires"
1201+
},
1202+
{
1203+
"id": "TP-036",
1204+
"edge": "requires"
1205+
},
1206+
{
1207+
"id": "TP-038",
1208+
"edge": "requires"
1209+
},
1210+
{
1211+
"id": "TP-039",
1212+
"edge": "requires"
12011213
}
12021214
],
1203-
"implementation": "done",
1215+
"implementation": "partial",
12041216
"stale": false
12051217
},
12061218
{
@@ -1265,9 +1277,21 @@
12651277
{
12661278
"id": "TP-032",
12671279
"edge": "requires"
1280+
},
1281+
{
1282+
"id": "TP-036",
1283+
"edge": "requires"
1284+
},
1285+
{
1286+
"id": "TP-037",
1287+
"edge": "requires"
1288+
},
1289+
{
1290+
"id": "TP-038",
1291+
"edge": "requires"
12681292
}
12691293
],
1270-
"implementation": "done",
1294+
"implementation": "partial",
12711295
"stale": false
12721296
},
12731297
{
@@ -2218,8 +2242,8 @@
22182242
],
22192243
"summary": "Ship the machine layer behind ADR-0025: the `amendments:` frontmatter field, the `docops amend` CLI, validator + audit + index + state integration, and the JSON Schema extension.",
22202244
"word_count": 602,
2221-
"last_touched": "2026-04-23T08:37:39Z",
2222-
"age_days": 6,
2245+
"last_touched": "2026-04-30T02:58:00Z",
2246+
"age_days": 0,
22232247
"referenced_by": [
22242248
{
22252249
"id": "TP-027",
@@ -2243,8 +2267,8 @@
22432267
],
22442268
"summary": "Once TP-026 ships the `amendments:` schema and `docops amend` CLI, convert ADR-0019's HTML-comment amendment stub into a proper frontmatter entry using the new machinery. ADR-0019 is the live motivati…",
22452269
"word_count": 354,
2246-
"last_touched": "2026-04-23T08:37:39Z",
2247-
"age_days": 6,
2270+
"last_touched": "2026-04-30T02:58:00Z",
2271+
"age_days": 0,
22482272
"stale": false
22492273
},
22502274
{
@@ -2374,7 +2398,7 @@
23742398
"summary": "- Phase 1 (`cf3a2c7`) — `Harness` interface + registry; Claude/Cursor adapters. Byte-identical output. - Phase 2 (`daa00b6`) — OpenCode adapter + layout-aware writer (`planHarness`, frontmatter pa…",
23752399
"word_count": 1413,
23762400
"last_touched": "2026-04-24T03:10:20Z",
2377-
"age_days": 5,
2401+
"age_days": 6,
23782402
"stale": false
23792403
},
23802404
{
@@ -2414,6 +2438,80 @@
24142438
"last_touched": "2026-04-29T18:40:48Z",
24152439
"age_days": 0,
24162440
"stale": false
2441+
},
2442+
{
2443+
"id": "TP-036",
2444+
"kind": "TP",
2445+
"folder": "docs/tasks",
2446+
"path": "docs/tasks/TP-036-render-amendment-aware-ui-in-static-viewer-adr-det.md",
2447+
"title": "Render amendment-aware UI in static viewer (ADR detail + Home recent)",
2448+
"task_status": "backlog",
2449+
"priority": "p2",
2450+
"assignee": "unassigned",
2451+
"requires": [
2452+
"ADR-0027",
2453+
"ADR-0025"
2454+
],
2455+
"summary": "Surface ADR-0025 amendments in the `docops html` / `docops serve` SPA — both on the per-ADR detail page and on the Home view — sourced from `recent_amendments` and per-doc `amendments` in the viewer b…",
2456+
"word_count": 158,
2457+
"last_touched": "2026-04-30T03:28:10Z",
2458+
"age_days": 0,
2459+
"stale": false
2460+
},
2461+
{
2462+
"id": "TP-037",
2463+
"kind": "TP",
2464+
"folder": "docs/tasks",
2465+
"path": "docs/tasks/TP-037-add-timeline-view-to-static-html-viewer.md",
2466+
"title": "Add timeline view to static HTML viewer",
2467+
"task_status": "backlog",
2468+
"priority": "p2",
2469+
"assignee": "unassigned",
2470+
"requires": [
2471+
"ADR-0027"
2472+
],
2473+
"summary": "A chronological \"Timeline\" tab in the SPA that surfaces project events on a single time axis: ADR transitions, amendments, task closes. Helps humans and LLMs reason about *when* decisions and work hap…",
2474+
"word_count": 241,
2475+
"last_touched": "2026-04-30T03:28:16Z",
2476+
"age_days": 0,
2477+
"stale": false
2478+
},
2479+
{
2480+
"id": "TP-038",
2481+
"kind": "TP",
2482+
"folder": "docs/tasks",
2483+
"path": "docs/tasks/TP-038-annotate-graph-nodes-amended-adrs-draft-stale.md",
2484+
"title": "Annotate graph nodes — amended ADRs, draft, stale",
2485+
"task_status": "backlog",
2486+
"priority": "p2",
2487+
"assignee": "unassigned",
2488+
"requires": [
2489+
"ADR-0027",
2490+
"ADR-0025"
2491+
],
2492+
"summary": "Enrich the Cytoscape graph in the SPA with per-node visual cues drawn from data already in the bundle:",
2493+
"word_count": 174,
2494+
"last_touched": "2026-04-30T03:18:30Z",
2495+
"age_days": 0,
2496+
"stale": false
2497+
},
2498+
{
2499+
"id": "TP-039",
2500+
"kind": "TP",
2501+
"folder": "docs/tasks",
2502+
"path": "docs/tasks/TP-039-implement-deferred-amendment-audit-rules-from-adr.md",
2503+
"title": "Implement deferred amendment audit rules from ADR-0025",
2504+
"task_status": "backlog",
2505+
"priority": "p2",
2506+
"assignee": "unassigned",
2507+
"requires": [
2508+
"ADR-0025"
2509+
],
2510+
"summary": "Implement the three audit rules ADR-0025 §\"Audit rules\" specified but that TP-026 phase 3 deferred:",
2511+
"word_count": 222,
2512+
"last_touched": "2026-04-30T03:20:47Z",
2513+
"age_days": 0,
2514+
"stale": false
24172515
}
24182516
],
24192517
"recent_amendments": [

docs/STATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
- Context: 4 active · 0 superseded
88
- ADRs: 28 accepted · 2 draft · 0 superseded (29 `coverage: required`, 1 `coverage: not-needed`)
9-
- Tasks: 4 backlog · 0 active · 0 blocked · 31 done
9+
- Tasks: 8 backlog · 0 active · 0 blocked · 31 done
1010

1111
## Needs attention
1212

@@ -22,6 +22,7 @@
2222
- 2026-04-30 e76d4ad feat(schema,validator): TP-026 phase 1 — amendments data layer + TP-027 backfill
2323
- 2026-04-30 ccd0781 docs(TP-034): close — slash surface narrowed to 5 moments per ADR-0029
2424
- 2026-04-30 12172df docs: add TP-034/TP-035 — implement ADR-0029 command-surface tiering
25+
- 2026-04-30 03bcaea feat(index,state): TP-026 phase 3 — amendments in index + STATE; close TP-026/TP-027
2526
- 2026-04-25 6458183 feat(upgrader): Codex layout collapses to one skill bundle
2627
- 2026-04-24 fc421e0 docs: add ADR-0027 + ADR-0028 with TP-030–TP-033
2728
- 2026-04-24 faa2bb7 docs: TP-033 Phase 4 — v0.4.0 CHANGELOG, README, status flips
@@ -37,7 +38,6 @@
3738
- 2026-04-23 afcd855 TP-023 phase 1: ship /docops:{next,get,list,graph,search} skills
3839
- 2026-04-23 aeb53b3 chore: enable tap/bucket auto-publish for v0.2.1
3940
- 2026-04-23 a131d95 planning: ADR-0024 + TP-022 — ship CLAUDE.md alongside AGENTS.md
40-
- 2026-04-23 325e547 planning: TP-023/024/025 — skills gap, taps, npm distribution
4141

4242
## Recent amendments
4343

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Render amendment-aware UI in static viewer (ADR detail + Home recent)
3+
status: backlog
4+
priority: p2
5+
assignee: unassigned
6+
requires: [ADR-0027, ADR-0025]
7+
depends_on: []
8+
---
9+
10+
## Goal
11+
12+
Surface ADR-0025 amendments in the `docops html` / `docops serve` SPA — both
13+
on the per-ADR detail page and on the Home view — sourced from
14+
`recent_amendments` and per-doc `amendments` in the viewer bundle.
15+
16+
ADR-0027 §Consequences already calls this out: "Amendments rendering is
17+
transparent — `internal/index.IndexedDoc` already has an `Amendments`
18+
field; the SPA renders it if present, skips it if absent." This task closes
19+
that loop.
20+
21+
## Acceptance
22+
23+
- `Bundle` carries `recent_amendments` (list from `index.RecentAmendments`)
24+
in addition to per-doc `amendments`.
25+
- ADR detail view shows an "Amendments" section under the body when
26+
`doc.amendments` is non-empty: date, kind badge, by, summary, optional
27+
`ref` linkified, optional `affects_sections` chips.
28+
- Home view shows a "Recent amendments" section after STATE.md when
29+
`bundle.recent_amendments` is non-empty (top 10, newest first).
30+
- No new external dependencies; SPA stays a single file.
31+
32+
## Notes
33+
34+
Status: shipped under v0.6.0. This TP is a backfilled record of the work
35+
so the index has the citation trail.

0 commit comments

Comments
 (0)