@windyroad/itil 0.24.0 → 0.24.1-preview.270
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/package.json +2 -1
- package/scripts/check-problems-readme-budget.sh +73 -0
- package/scripts/classify-readme-drift.sh +115 -0
- package/scripts/reconcile-readme.sh +208 -0
- package/scripts/test/check-problems-readme-budget.bats +192 -0
- package/scripts/test/classify-readme-drift.bats +262 -0
- package/scripts/test/reconcile-readme.bats +509 -0
- package/scripts/test/release-watch-poll-loop.bats +180 -0
- package/skills/work-problems/SKILL.md +41 -1
|
@@ -412,16 +412,56 @@ After each iteration, report:
|
|
|
412
412
|
- The outcome (success, partially progressed, skipped, scope expanded)
|
|
413
413
|
- How many problems remain in the backlog
|
|
414
414
|
- The iteration's cost metadata — format: `($<cost>, <duration_s>s, <total_tokens_K>K tokens)`. Cost comes from the `.total_cost_usd` field extracted in Step 5; duration from `.duration_ms`; total tokens is the sum of `.usage.input_tokens + .usage.output_tokens + .usage.cache_creation_input_tokens + .usage.cache_read_input_tokens`.
|
|
415
|
+
- Risk-register scaffold line when Step 6.4 drained ≥1 entry — format: `Risk register: <N> entries scaffolded (pending review)` per JTBD-006 outcome 4 (auditability of AI-assisted work). Omit the line when the drain was a no-op.
|
|
415
416
|
|
|
416
417
|
Format as a brief status line, not a wall of text. The user will read these when they return.
|
|
417
418
|
|
|
418
419
|
**Example:**
|
|
419
420
|
```
|
|
420
421
|
[Iteration 1] Worked P029 (Edit gate overhead for governance docs) — implemented fix, closed. 8 problems remain. ($0.32, 23s, 171K tokens)
|
|
421
|
-
[Iteration 2] Worked P021 (Governance skill structured prompts) — investigated root cause, transitioned to known-error. 7 problems remain. ($0.85, 47s, 432K tokens)
|
|
422
|
+
[Iteration 2] Worked P021 (Governance skill structured prompts) — investigated root cause, transitioned to known-error. 7 problems remain. Risk register: 1 entry scaffolded (pending review). ($0.85, 47s, 432K tokens)
|
|
422
423
|
[Iteration 3] Skipped P016 (Multi-concern ticket splitting) — fix released, awaiting user verification. Worked P024 (Risk scorer WIP flag) — implemented fix, closed. 6 problems remain. ($1.12, 62s, 541K tokens)
|
|
423
424
|
```
|
|
424
425
|
|
|
426
|
+
### Step 6.4: Drain risk-register queue (per ADR-056 Phase 2b)
|
|
427
|
+
|
|
428
|
+
After the iteration's commit lands and before the release-cadence check, drain any `RISK_REGISTER_HINT` entries that the iteration's pipeline runs enqueued to `.afk-run-state/risk-register-queue.jsonl`. The hook (Phase 2a) writes the queue silently; this step (Phase 2b) materialises queued hints into `docs/risks/R<NNN>-<slug>.active.md` register entries. Per-iter cadence keeps the queue bounded and attaches the resulting `docs(risks): scaffold ...` commit to the iter that produced the hint (preserves ADR-014 single-ticket-unit-of-work grain).
|
|
429
|
+
|
|
430
|
+
**Mechanism — invoke the shared drain script:**
|
|
431
|
+
|
|
432
|
+
1. Run the shim: `wr-risk-scorer-drain-register-queue` (resolves to `packages/risk-scorer/scripts/drain-register-queue.sh` per ADR-049 naming grammar). The script:
|
|
433
|
+
- Skips silently if `.afk-run-state/risk-register-queue.jsonl` is empty or absent (no-op exit 0).
|
|
434
|
+
- Skips silently if `docs/risks/` has not been scaffolded (Phase 1 / install-updates Step 6.5 has not fired in this project yet — preserves the queue for the next drain).
|
|
435
|
+
- Dedupes by `risk_slug`: N hints for the same slug → one register file with N Evidence Log entries (per the user direction "for each risk in `.risk-reports` there should be something in the register").
|
|
436
|
+
- Mints new R<NNN> IDs via local-max + origin-max +1 (ADR-019 dual-source ID for ticket-creator surfaces).
|
|
437
|
+
- Writes each new entry from a fixed shape with `Status: Active (auto-scaffolded — pending review)`, ADR-026 sentinel `not estimated — no prior data` for ungrounded scoring fields, and a `Curation: pending review` field for downstream review tooling.
|
|
438
|
+
- Updates `docs/risks/README.md` Register table with one row per new risk (em-dash for stub scoring per ADR-056 §pending-review).
|
|
439
|
+
- Stages all writes via `git add docs/risks` and truncates the queue file on success.
|
|
440
|
+
|
|
441
|
+
2. Parse stdout key=value output:
|
|
442
|
+
- `entries_drained=N` — total queue lines processed.
|
|
443
|
+
- `new_risks_created=N` — new register files written.
|
|
444
|
+
- `evidence_appended=N` — slug-matched existing files updated.
|
|
445
|
+
- `next_action=commit-staged|none` — when `commit-staged`, run a dedicated `docs(risks): scaffold` commit through the standard ADR-014 commit-gate flow.
|
|
446
|
+
|
|
447
|
+
3. **Commit (when `next_action=commit-staged`)**: stage is already done; commit message:
|
|
448
|
+
```
|
|
449
|
+
docs(risks): scaffold R<NNN>... (<N> entries from queue)
|
|
450
|
+
|
|
451
|
+
Drained .afk-run-state/risk-register-queue.jsonl per ADR-056 Phase 2b.
|
|
452
|
+
<new_risks_created> new register entries; <evidence_appended> existing
|
|
453
|
+
entries gained Evidence Log lines. All entries marked Active
|
|
454
|
+
(auto-scaffolded — pending review) with ADR-026 sentinels for
|
|
455
|
+
ungrounded scoring fields.
|
|
456
|
+
```
|
|
457
|
+
The commit goes through architect / JTBD / risk-scorer review per ADR-014. Per ADR-013 Rule 5, the drain action itself is policy-authorised silent proceed — no `AskUserQuestion` round-trip needed; the shape is mechanical and ADR-056 supplies the authority.
|
|
458
|
+
|
|
459
|
+
4. Pass the `new_risks_created + evidence_appended` count into Step 6's progress report so the AFK summary surfaces register population per JTBD-006 outcome 4. When `entries_drained=0`, omit the register line entirely.
|
|
460
|
+
|
|
461
|
+
**Idempotency**: safe to invoke when queue is empty / missing. The script's no-op path is the steady state in projects without active above-appetite events.
|
|
462
|
+
|
|
463
|
+
**Failure handling**: if the drain script exits non-zero (template missing, write error, git failure), do NOT halt the loop — log the failure in the iter report and proceed to Step 6.5. The queue retains entries for next drain; Phase 3 backfill recovers any persistent loss.
|
|
464
|
+
|
|
425
465
|
### Step 6.5: Release-cadence check (per ADR-018, above-appetite branch per ADR-042)
|
|
426
466
|
|
|
427
467
|
After the iteration's commit lands but before starting the next iteration, check whether the unreleased queue would push pipeline risk to or above appetite. This prevents silent accumulation of unreleased changesets across AFK iterations (P041). **The orchestrator MUST NOT release above appetite under any circumstance** — above-appetite states route to the ADR-042 auto-apply loop or halt.
|