@bbcsoftwarefactory/cli 1.1.2 → 1.1.4
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/dist/bbc-install.d.ts +2 -1
- package/dist/bbc-install.js +93 -28
- package/dist/bbc.js +4 -1
- package/dist/bundle/commands/daily/SKILL.md +112 -0
- package/dist/bundle/commands/daily/adapters/command.md +17 -0
- package/dist/bundle/commands/daily/adapters/gemini.toml +17 -0
- package/dist/bundle/commands/issue-clean-and-close/SKILL.md +85 -0
- package/dist/bundle/commands/issue-clean-and-close/adapters/command.md +17 -0
- package/dist/bundle/commands/issue-clean-and-close/adapters/gemini.toml +17 -0
- package/dist/bundle/commands/issue-clean-and-close/references/policy.md +87 -0
- package/dist/bundle/commands/recap/SKILL.md +84 -0
- package/dist/bundle/commands/recap/adapters/command.md +17 -0
- package/dist/bundle/commands/recap/adapters/gemini.toml +17 -0
- package/dist/bundle/installer/clients.json +103 -0
- package/dist/bundle/skills/code-quality-gate/SKILL.md +58 -0
- package/dist/bundle/skills/code-quality-gate/references/gate-bigo.md +31 -0
- package/dist/bundle/skills/code-quality-gate/references/gate-earlyreturn.md +73 -0
- package/dist/bundle/skills/code-quality-gate/references/gate-typesafe.md +32 -0
- package/dist/bundle/skills/code-quality-gate/references/output-schema.yml +40 -0
- package/dist/bundle/skills/delivery-coordinator/SKILL.md +80 -0
- package/dist/bundle/skills/delivery-coordinator/references/hud-output.md +55 -0
- package/dist/bundle/skills/delivery-coordinator/references/intake.md +86 -0
- package/dist/bundle/skills/delivery-coordinator/references/issue-claim.md +143 -0
- package/dist/bundle/skills/delivery-coordinator/references/issue-dedup.md +38 -0
- package/dist/bundle/skills/delivery-coordinator/references/sleuth-regression-exercise.md +60 -0
- package/dist/bundle/skills/delivery-coordinator/references/visual-reference.md +45 -0
- package/dist/bundle/skills/delivery-coordinator/references/worktree-isolation.md +19 -0
- package/dist/bundle/skills/documentation-steward/SKILL.md +43 -0
- package/dist/bundle/skills/documentation-steward/references/discovery.md +17 -0
- package/dist/bundle/skills/documentation-steward/references/handoff.md +15 -0
- package/dist/bundle/skills/greptile-review-loop/SKILL.md +56 -0
- package/dist/bundle/skills/greptile-review-loop/references/review-protocol.md +37 -0
- package/dist/bundle/skills/issue-reviewer/SKILL.md +84 -0
- package/dist/bundle/skills/issue-reviewer/references/review-format.md +100 -0
- package/dist/bundle/skills/issue-reviewer/references/triage.md +105 -0
- package/dist/bundle/skills/question-gate/SKILL.md +64 -0
- package/dist/bundle/skills/question-gate/references/client-hooks.md +111 -0
- package/dist/bundle/skills/question-gate/references/diagram-routing.md +58 -0
- package/dist/bundle/skills/question-gate/tests/fixtures/question-corpus.json +481 -0
- package/dist/bundle/skills/regression-testing/SKILL.md +49 -0
- package/dist/bundle/skills/regression-testing/references/evidence-record.md +35 -0
- package/dist/bundle/skills/requirements-spec/SKILL.md +59 -0
- package/dist/bundle/skills/risk-scout/SKILL.md +53 -0
- package/dist/bundle/skills/risk-scout/references/risk-matrix.md +49 -0
- package/dist/bundle/skills/skill-clean-architecture/SKILL.md +53 -0
- package/dist/bundle/skills/skill-clean-architecture/references/layer-rules.md +22 -0
- package/dist/bundle/skills/skill-clean-architecture/references/source-headers.md +30 -0
- package/dist/bundle/skills/skill-clean-architecture/tests/fixtures/bigo/bad-utf8.js +1 -0
- package/dist/bundle/skills/skill-clean-architecture/tests/fixtures/bigo/edge-crlf.ts +6 -0
- package/dist/bundle/skills/skill-clean-architecture/tests/fixtures/bigo/edge-mixed.ts +15 -0
- package/dist/bundle/skills/skill-clean-architecture/tests/fixtures/bigo/empty.js +0 -0
- package/dist/bundle/skills/skill-clean-architecture/tests/fixtures/bigo/no-newline.js +1 -0
- package/dist/bundle/skills/skill-clean-architecture/tests/fixtures/bigo.expected.yml +95 -0
- package/dist/bundle/skills/tool-depot/SKILL.md +47 -0
- package/dist/bundle/skills/tool-depot/references/checkout.md +29 -0
- package/dist/bundle/skills/tool-depot/references/loki-read.md +41 -0
- package/dist/bundle/skills/tool-depot/references/readonly-access.md +84 -0
- package/dist/bundle/skills/tool-depot/references/tool-catalog.json +47 -0
- package/dist/bundle/skills/tool-depot/scripts/loki-runtime-logs.py +305 -0
- package/dist/bundle/skills/tool-depot/tests/loki-runtime-logs.test.sh +101 -0
- package/dist/bundle/skills/watcher-observability/SKILL.md +72 -0
- package/dist/bundle/skills/watcher-observability/references/batch-protocol.md +44 -0
- package/dist/bundle/skills/watcher-observability/references/configuration.md +31 -0
- package/dist/bundle/skills/watcher-observability/references/error-scan.md +102 -0
- package/dist/bundle/skills/watcher-observability/references/live-protocol.md +49 -0
- package/dist/bundle/skills/watcher-observability/references/server-account.md +72 -0
- package/dist/bundle/skills/watcher-observability/server/watcher-gate.sh +51 -0
- package/dist/bundle/skills/watcher-observability/tests/watcher-gate.test.sh +113 -0
- package/dist/bundle/skills/watcher-observability/watcher.json +1 -0
- package/dist/bundle/skills/workflow-auditor/SKILL.md +53 -0
- package/dist/bundle/skills/workflow-auditor/references/audit-protocol.md +49 -0
- package/dist/bundle/skills/workflow-auditor/references/ledger.md +122 -0
- package/package.json +3 -3
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Delivery ledger
|
|
2
|
+
|
|
3
|
+
The delivery ledger is the record of one delivery: which stages ran, in what order, with what evidence, who authorized what, and every covered external tool operation with its Tool Depot decision. `delivery-coordinator` keeps it; `workflow-auditor` reads it.
|
|
4
|
+
|
|
5
|
+
## Where it lives
|
|
6
|
+
|
|
7
|
+
One ledger per worktree, inside that worktree's private Git directory, so it is never committed or pushed:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ledger=$(git rev-parse --git-path bbc-delivery-ledger.json)
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Run this from the delivery worktree. Removing the worktree removes the ledger, so hand over the audit verdict, not the file. Never put secrets, tokens, customer data, raw logs, or full reports in it; record references (issue or PR IDs, commands, SHAs, rule names) instead.
|
|
14
|
+
|
|
15
|
+
## Format (version 1)
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"version": 1,
|
|
20
|
+
"task": "C1: status filter shows only failed jobs",
|
|
21
|
+
"kind": "change",
|
|
22
|
+
"issue": "example/repo#12",
|
|
23
|
+
"worktree": {"path": "/work/example-status-filter", "branch": "feat/12-status-filter", "base_sha": "<default-branch SHA>"},
|
|
24
|
+
"authorizations": [
|
|
25
|
+
{"id": "AUTH-1", "by": "person", "role": "Tech Lead", "covers": ["implement", "commit_pr"]}
|
|
26
|
+
],
|
|
27
|
+
"stages": [
|
|
28
|
+
{"stage": "specify", "status": "reused", "actor": "requirements-spec", "reason": "Issue example#12 lists C1.", "evidence": {"issue": "example/repo#12", "issue_action": "linked_and_commented", "project_status": "Trabajando"}},
|
|
29
|
+
{"stage": "claim", "status": "done", "actor": "delivery-coordinator", "authorization": "AUTH-1", "evidence": {"issue": "example/repo#12", "claimant": "ana", "check": "free", "verify": "claimed-by-you"}},
|
|
30
|
+
{"stage": "reproduce", "status": "done", "actor": "regression-testing", "evidence": {"command": "npm test -- status-filter", "result": "fail"}},
|
|
31
|
+
{"stage": "implement", "status": "done", "actor": "skill-clean-architecture", "authorization": "AUTH-1"},
|
|
32
|
+
{"stage": "verify", "status": "done", "actor": "regression-testing", "evidence": {"command": "npm test -- status-filter", "result": "pass"}},
|
|
33
|
+
{"stage": "quality", "status": "done", "actor": "code-quality-gate", "evidence": {"typesafe": "pass", "earlyreturn": "pass", "bigo": "pass"}},
|
|
34
|
+
{"stage": "commit_pr", "status": "done", "actor": "host", "authorization": "AUTH-1", "evidence": {"pr": "example/repo#13", "head_sha": "<PR head SHA>", "issue": "example/repo#12", "issue_linked": true}},
|
|
35
|
+
{"stage": "review", "status": "done", "actor": "greptile-review-loop", "evidence": {"head_sha": "<PR head SHA>", "score": "5/5"}}
|
|
36
|
+
],
|
|
37
|
+
"tool_requests": [
|
|
38
|
+
{"id": "TD-1", "requester": "delivery-coordinator", "tool": "github-read", "purpose": "read-approved-issue-or-pr",
|
|
39
|
+
"target": "example/repo#12", "operation": "read issue", "disposition": "eligible"},
|
|
40
|
+
{"id": "TD-2", "requester": "delivery-coordinator", "tool": "github-read", "purpose": "check-issue-claim",
|
|
41
|
+
"target": "example/repo#12", "operation": "read assignees, labels, open PRs, feat/12-* branches", "disposition": "eligible"},
|
|
42
|
+
{"id": "TD-3", "requester": "delivery-coordinator", "tool": "github-write", "purpose": "claim-approved-issue",
|
|
43
|
+
"target": "example/repo#12", "operation": "assign ana, add status:in-progress", "disposition": "eligible", "authorization": "AUTH-1"}
|
|
44
|
+
],
|
|
45
|
+
"tool_uses": [
|
|
46
|
+
{"request": "TD-1", "tool": "github-read", "target": "example/repo#12"},
|
|
47
|
+
{"request": "TD-2", "tool": "github-read", "target": "example/repo#12"},
|
|
48
|
+
{"request": "TD-3", "tool": "github-write", "target": "example/repo#12"}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
| Field | Rule |
|
|
54
|
+
|---|---|
|
|
55
|
+
| `kind` | `change` (edits repository files), `issue-only`, or `read-only`. Only `change` needs a worktree and the write stages. |
|
|
56
|
+
| `lane` | Optional risk lane from `bbc classify-change-lane`: `trivial`, `standard` (default), or `high-risk`. |
|
|
57
|
+
| `issue` | Optional canonical issue this delivery implements (`owner/repo#n`). With it, or with `commit_pr.evidence.issue`, change work needs a `claim` stage ([claim the issue](../../delivery-coordinator/references/issue-claim.md)). |
|
|
58
|
+
| `authorizations` | One entry per human decision. `by` is always `person`; `covers` lists the stages it authorizes. Agents never add an entry on a person's behalf. |
|
|
59
|
+
| `stages` | Chronological. Append a new entry each time a stage runs again (a fix loop repeats `implement` through `review`). |
|
|
60
|
+
| `status` | `done`, `reused` (equivalent evidence; `reason` names its source), or `gap` (`reason` required). |
|
|
61
|
+
| `tool_requests` | Every Tool Depot request with its returned `disposition` (`eligible`, `needs-clarification`, `needs-approval`, `denied`, `unavailable`). Record non-eligible decisions too. |
|
|
62
|
+
| `tool_uses` | Every covered SSH, public web, or GitHub operation actually performed, citing the request it relied on. |
|
|
63
|
+
| `visual` | Required on each `tool_uses` entry for `publish-approved-issue`, `update-approved-issue`, or `comment-approved-issue`: the embedded `https://` image URL, or `{"gap": "<reason>"}`. See the [visual reference rule](../../delivery-coordinator/references/visual-reference.md). |
|
|
64
|
+
|
|
65
|
+
## Stages, in diagram order
|
|
66
|
+
|
|
67
|
+
| `stage` | Diagram step | Gap allowed? |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| `observe` | Optional Sleuth report | Yes |
|
|
70
|
+
| `specify` | Requirements & Specification | No |
|
|
71
|
+
| `claim` | Claim the issue (only with a canonical issue) | Yes: the claimant cannot claim |
|
|
72
|
+
| `reproduce` | Regression Testing · Before (RED) | Yes, with `gap_type` |
|
|
73
|
+
| `implement` | Clean Architecture | No |
|
|
74
|
+
| `verify` | Regression Testing · After (GREEN) | Only after a `no-runnable-test` gap |
|
|
75
|
+
| `quality` | Code Quality Gate | No |
|
|
76
|
+
| `docs` | Documentation Steward | Yes |
|
|
77
|
+
| `commit_pr` | Commit & PR · CI (host) | No |
|
|
78
|
+
| `review` | Greptile Review Loop | Yes: Greptile unavailable or budget spent |
|
|
79
|
+
| `residual_risk` | Risk Scout after PR | Yes |
|
|
80
|
+
| `code_owner` | Human review & merge (`actor: person`) | No |
|
|
81
|
+
| `release_owner` | Deploy decision (`actor: person`) | No |
|
|
82
|
+
|
|
83
|
+
A reproduction gap needs `gap_type`: `not-reproducible` (the workflow stops before implementation) or `no-runnable-test` (verify proportionately without claiming RED/GREEN).
|
|
84
|
+
|
|
85
|
+
## Rules checked by the script
|
|
86
|
+
|
|
87
|
+
| Rule | Violation |
|
|
88
|
+
|---|---|
|
|
89
|
+
| `W1` | Change work without a worktree path, a `feat/<task>` branch, or a default-branch base SHA. |
|
|
90
|
+
| `K1` | Issue-only or read-only work that includes write stages. |
|
|
91
|
+
| `S1` | A required stage for change work is missing: `specify`, `reproduce`, `implement`, `verify`, `quality`, `commit_pr`, `review`. |
|
|
92
|
+
| `S2` | A stage runs before an earlier diagram stage; loops may only return to `reproduce` or `implement`. |
|
|
93
|
+
| `S3` | Implementation started before `specify` and `reproduce`. |
|
|
94
|
+
| `S4` | `verify`, `quality`, `commit_pr`, or `review` was not rerun after the last implementation. |
|
|
95
|
+
| `S5` | A `reused` or `gap` entry without a reason, or a gap where the diagram allows none. |
|
|
96
|
+
| `E1` | RED without a command and a failing result, a reproduction gap without `gap_type`, or implementation after `not-reproducible`. |
|
|
97
|
+
| `E2` | The last verification lacks a command and a passing result, or is a gap without a `no-runnable-test` reproduction gap. |
|
|
98
|
+
| `Q1` | The last quality gate did not pass all three checks. |
|
|
99
|
+
| `R1` | Commit & PR lacks the PR or head SHA, the review lacks a score, or the Greptile review is not for the current PR head. |
|
|
100
|
+
| `R2` | Commit & PR cites a canonical `issue`, but `issue_linked: true` or the matching `comment-approved-issue` Tool Depot use is missing. |
|
|
101
|
+
| `V1` | An issue publish, update, or comment use without a `visual` image URL or a stated visual gap. |
|
|
102
|
+
| `D1` | A `publish-approved-issue` or `reopen-approved-issue` use with no earlier eligible `check-duplicate-issues` use on the same repository ([search before filing](../../delivery-coordinator/references/issue-dedup.md)). |
|
|
103
|
+
| `I1` | A `triage-approved-issue` use with no earlier eligible `check-issue-triage` use on the same issue ([triage](../../issue-reviewer/references/triage.md)). |
|
|
104
|
+
| `I2` | A `triage-approved-issue` use with no later `comment-approved-issue` use on the same issue stating the assignment, labels, and priority. |
|
|
105
|
+
| `C1` | Change work with a canonical issue and no `claim` stage. |
|
|
106
|
+
| `C2` | The claim names another issue or no claimant, its `check` is not `free` / `claimed-by-you` without a person's handover covering `claim`, or its `verify` is not `claimed-by-you`. |
|
|
107
|
+
| `C3` | No eligible `check-issue-claim` use on the issue, no `claim-approved-issue` use when the issue was not already the claimant's, or the claim written before the read. |
|
|
108
|
+
| `C4` | With a claim, the worktree branch is not `feat/<n>-<slug>` for the canonical issue. |
|
|
109
|
+
| `A1` | `claim`, `implement`, or `commit_pr` cites no authorization from a person, or one that does not cover it (`implement` also covers `claim`). |
|
|
110
|
+
| `A2` | An authorization not granted by a person. |
|
|
111
|
+
| `H1` | `code_owner` or `release_owner` recorded with an agent as actor. |
|
|
112
|
+
| `H2` | A deployment decision without a prior Code Owner review. |
|
|
113
|
+
| `L1` | A `high-risk` lane delivery missing a completed `residual_risk` stage (`risk-scout`). |
|
|
114
|
+
| `T1` | A covered tool used without a Tool Depot request. |
|
|
115
|
+
| `T2` | A tool used although the Depot did not return `eligible`. |
|
|
116
|
+
| `T3` | An eligible request whose tool or purpose is not in the catalog. |
|
|
117
|
+
| `T4` | A use whose tool or target differs from its eligible request. |
|
|
118
|
+
| `T5` | A GitHub write request without a person's authorization. |
|
|
119
|
+
| `T6` | A Tool Depot request missing its ID, requester, tool, purpose, target, operation, or disposition. |
|
|
120
|
+
| `T7` | With `--server-log`: a command the server's `watcher-gate` allowed (`allowed:` in syslog) with no matching `ssh` use in `tool_uses`. Each recorded use covers one command whose container or discovery prefix it names. Commands the gate denied never ran and are ignored. |
|
|
121
|
+
|
|
122
|
+
Gaps (`G1` for stages, `G2` for an issue write with a stated visual gap) are not violations. They go to the Code Owner with the PR.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bbcsoftwarefactory/cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Command line interface for the BuilderBot agent skills: Big O scoring, change classification, README workflow rendering, and diff scope extraction.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@bbcsoftwarefactory/cli-core": "^1.1.
|
|
17
|
+
"@bbcsoftwarefactory/cli-core": "^1.1.4"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
|
-
"build": "tsc -p tsconfig.build.json",
|
|
20
|
+
"build": "tsc -p tsconfig.build.json && node build.ts",
|
|
21
21
|
"prepack": "npm run build",
|
|
22
22
|
"test": "node --test \"src/*.test.ts\""
|
|
23
23
|
},
|