@ikon85/agent-workflow-kit 0.15.0 → 0.16.1
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/.agents/skills/kit-update/SKILL.md +13 -0
- package/.agents/skills/setup-workflow/SKILL.md +39 -1
- package/.agents/skills/setup-workflow/census.md +83 -0
- package/.agents/skills/to-prd/SKILL.md +18 -0
- package/.claude/hooks/drift-guard.py +471 -10
- package/.claude/logs/drift-guard.log +3 -0
- package/.claude/skills/kit-update/SKILL.md +13 -0
- package/.claude/skills/setup-workflow/SKILL.md +39 -1
- package/.claude/skills/setup-workflow/census.md +83 -0
- package/.claude/skills/to-prd/SKILL.md +18 -0
- package/README.md +15 -0
- package/agent-workflow-kit.package.json +26 -8
- package/package.json +1 -1
- package/scripts/test_census_backstop.py +626 -0
- package/scripts/test_skill_setup_workflow_seeds.py +316 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Optional project census
|
|
2
|
+
|
|
3
|
+
The census is a consumer-owned, counted map of product surfaces and behavior
|
|
4
|
+
families. It is optional. Setup records only the user's choice; `census-update`
|
|
5
|
+
does the factual scan, resolves ambiguity, verifies a candidate, and activates
|
|
6
|
+
the result transactionally.
|
|
7
|
+
|
|
8
|
+
## Setup state matrix
|
|
9
|
+
|
|
10
|
+
| State or choice | Setup action | Observable result on repeat |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| `missing` | Explain the census in plain language and ask `yes / later / no`; do not infer an answer. | Ask again only while no choice has been recorded; write no hook or gate. |
|
|
13
|
+
| `yes` | Create the minimal consumer-owned profile, or adopt the existing documented profile path. Set `enabled: true`, keep the active snapshot absent, run only the shipped census self-test, and report `bootstrap` / "not yet meaningful". | Adopt the same profile byte-for-byte; do not rescan, activate, or add another self-test. |
|
|
14
|
+
| `later` | Record a retryable deferral outside the active profile. | Leave census files, hooks, and gates absent; an ordinary setup rerun is a no-op, while an explicit `census-update` may activate later. |
|
|
15
|
+
| `no` | Record an explicit opt-out with census state `disabled`. | Keep the opt-out and do not create census files, hooks, or gates. |
|
|
16
|
+
| `existing` | Adopt the repository's explicitly documented profile and active-snapshot paths without replacing consumer-owned content. Derive its state through the public census API. | Preserve every existing byte and report the derived state. |
|
|
17
|
+
| `explicit-enable` | On a later explicit `census-update` invocation, let that skill scan, decide, verify, and transactionally activate without rerunning setup. | An unchanged verified census reports `current` and performs no write. |
|
|
18
|
+
| `disable` | Set the profile to `enabled: false` transactionally and remove census hooks/gates from enforcement. | Stay `disabled`; retain consumer-owned profiles, scanners, tests, and snapshots unless the user separately approves their deletion. |
|
|
19
|
+
|
|
20
|
+
## Deterministic setup effects
|
|
21
|
+
|
|
22
|
+
The table below is the machine-checkable reference contract for setup. Its
|
|
23
|
+
ordered `operations` are the only effects the setup proof may execute. Choice
|
|
24
|
+
persistence always means `docs/agents/census.md`: the normal setup sentinel is
|
|
25
|
+
the first line and `<!-- census: choice=<yes|later|no> -->` is the second.
|
|
26
|
+
Paths under `retain` are consumer-owned evidence. Enforcement operations refer
|
|
27
|
+
only to kit-owned wiring documented by the consumer; they are not permission to
|
|
28
|
+
invent another census engine.
|
|
29
|
+
|
|
30
|
+
```json census-setup-effects
|
|
31
|
+
[
|
|
32
|
+
{"state":"missing","actor":"setup","choice":"none","operations":[],"retain":[],"repeat":"no-write"},
|
|
33
|
+
{"state":"yes","actor":"setup","choice":"yes","operations":["reconcile-choice-doc","reconcile-minimal-profile","derive-state","run-foundation-self-test"],"retain":[],"repeat":"no-write"},
|
|
34
|
+
{"state":"later","actor":"setup","choice":"later","operations":["reconcile-choice-doc"],"retain":[],"repeat":"no-write"},
|
|
35
|
+
{"state":"no","actor":"setup","choice":"no","operations":["reconcile-choice-doc","derive-state"],"retain":[],"repeat":"no-write"},
|
|
36
|
+
{"state":"existing","actor":"setup","choice":"recorded","operations":["adopt-choice-doc","derive-state"],"retain":["choice-doc","profile","active","scanner","scanner-test"],"repeat":"no-write"},
|
|
37
|
+
{"state":"explicit-enable","actor":"census-update","choice":"recorded","operations":["delegate-census-update","run-census-update-contract"],"retain":["choice-doc","profile","active","scanner","scanner-test"],"repeat":"no-write"},
|
|
38
|
+
{"state":"disable","actor":"census-update","choice":"recorded","operations":["remove-kit-hook","remove-kit-gate","update-profile-disabled","derive-state"],"retain":["choice-doc","profile-unknown-keys","active","scanner","scanner-test"],"repeat":"no-write"}
|
|
39
|
+
]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Bootstrap profile
|
|
43
|
+
|
|
44
|
+
When `yes` creates the default `.census/profile.json`, write the deterministic
|
|
45
|
+
profile shape documented by `census-update`: `schemaVersion: 1`, `enabled:
|
|
46
|
+
true`, and empty `decisions`, `localScanners`, and `overrides` arrays. Do not
|
|
47
|
+
create `.census/active.json`. Its absence is the evidence that the honest state
|
|
48
|
+
is `bootstrap`, not `current`.
|
|
49
|
+
|
|
50
|
+
Before writing, check for an existing repository convention and adopt it. A
|
|
51
|
+
pre-existing profile remains consumer-owned: preserve unknown keys and do not
|
|
52
|
+
replace its decisions. Never derive `current` from file presence; use
|
|
53
|
+
`resolveCensusState` from `scripts/census/index.mjs`.
|
|
54
|
+
|
|
55
|
+
Run the focused `scripts/census/state.test.mjs` census foundation self-test
|
|
56
|
+
already shipped with the kit.
|
|
57
|
+
A passing self-test proves the mechanism is available, not that this repository
|
|
58
|
+
has been scanned. Setup must not install pre-commit, pre-push, CI, planning, or
|
|
59
|
+
handoff gates for `yes`, `later`, or `no`.
|
|
60
|
+
|
|
61
|
+
## Later activation and disable
|
|
62
|
+
|
|
63
|
+
`later` and `no` are setup choices, not partially active censuses. A later,
|
|
64
|
+
explicit `census-update` invocation is the sole activation route. Setup
|
|
65
|
+
delegates this route to the shipped `census-update` contract and its focused
|
|
66
|
+
`scripts/test_census_update_contract.test.mjs` proof; it does not reproduce
|
|
67
|
+
activation, snapshots, or enforcement. Setup itself never calls `activateCensus`.
|
|
68
|
+
|
|
69
|
+
Disable follows the ordered contract: remove the kit-owned hook, remove the
|
|
70
|
+
kit-owned gate, then atomically replace only the profile's `enabled` value with
|
|
71
|
+
`false`, preserving unknown keys, and verify `disabled` through
|
|
72
|
+
`resolveCensusState`. Enforcement removal must finish before any profile
|
|
73
|
+
mutation. Treat the choice document, local scanners, their tests, the profile,
|
|
74
|
+
and the active snapshot as consumer-owned evidence. List those files and ask
|
|
75
|
+
for separate deletion approval; without that approval, retain them.
|
|
76
|
+
Setup never deletes consumer-owned files as part of disable.
|
|
77
|
+
|
|
78
|
+
## Setup report
|
|
79
|
+
|
|
80
|
+
Report the choice, adopted or created paths, derived state, self-test result,
|
|
81
|
+
and whether enforcement changed. Name every action skipped on an idempotent
|
|
82
|
+
rerun. Never claim surface coverage during setup: only `census-update` can
|
|
83
|
+
produce a verified `X of Y` result.
|
|
@@ -76,6 +76,24 @@ gh project item-list 1 --owner <owner> --limit 500 --format json # check targe
|
|
|
76
76
|
- `<!-- prd-source-id: <id> -->` + `<!-- prd-content-fp: <hash> -->` (see step 3).
|
|
77
77
|
5. **Mode B label normalization:** if the reused issue carries wrong/multiple `type:*`, missing `priority:*`, `ready-for-agent`, or `needs-info` → **normalize onto the PRD contract** (exactly one `type:*`, one `priority:*`, no `ready-for-agent`/`needs-info`). Exception per the discriminator (§2): `type:cluster` always, or Wave **without** `wave-stub` → **no** normalization, **hard stop** (step 2); a `wave-stub`-labeled Stufe-1p target normalizes normally — it is a valid Mode B target.
|
|
78
78
|
|
|
79
|
+
### Census freshness before a cross-cutting lock
|
|
80
|
+
|
|
81
|
+
When the PRD claims completeness across several product surfaces, run
|
|
82
|
+
`python3 .claude/hooks/drift-guard.py --census-status` before the board write.
|
|
83
|
+
An activated census reporting `refresh_required` means the cross-cutting PRD
|
|
84
|
+
must not be locked: run `$census-update`, resolve every open surface, and retry.
|
|
85
|
+
`disabled`, `no_census`, `bootstrap`, or `offline` stays visible and fail-open;
|
|
86
|
+
perform and report the existing manual walk instead. This gate does not apply
|
|
87
|
+
to an orthogonal, surface-local PRD.
|
|
88
|
+
|
|
89
|
+
A justified change-local override may acknowledge only a proven mechanical
|
|
90
|
+
false positive. It must carry `scope: "this change"`, a non-empty `reason`, and
|
|
91
|
+
the exact `topologyFingerprint` reported as `change_binding` by the current
|
|
92
|
+
status check. That binding is valid only for those freshly scanned topology
|
|
93
|
+
facts; a later topology change makes the persisted override stale. The
|
|
94
|
+
override never changes scanner facts, builder/topology fingerprints, open
|
|
95
|
+
verdicts, or state resolution, and therefore cannot green real drift.
|
|
96
|
+
|
|
79
97
|
## 4b. Program-PRD body (mode=program)
|
|
80
98
|
|
|
81
99
|
mode=program writes the Program-PRD per `.claude/skills/to-prd/PROGRAM-PRD-FORMAT.md` instead of the `<prd-template>` below — a **parallel** grammar for the program altitude, not a replacement (a Feature-PRD keeps using `<prd-template>` unchanged). It carries: the `## Scope` chapter with stable Scope-Item IDs (`S1`, `S2`, …), the machine-parsable `## Wellenplan` table (`Welle | Status | Name | Phase | Slices | Gate | covers`), the `## Phasen-Gates` checklist (only when the program uses phases), the `## Slices` per-slice detail chapter (one `####` section per planned slice, per `SLICE-METADATA-FORMAT.md`'s grammar), and the Abbruch-Konvention. `scripts/program_graph.py` (`board-sync.py validate-graph`) is the parser — to-prd writes the shape, it does not itself validate the graph (that is `to-waves`'s job, run once the Program-PRD exists).
|
package/README.md
CHANGED
|
@@ -332,6 +332,21 @@ still reference. Flags: `--force` (overwrite pre-existing files on `init`),
|
|
|
332
332
|
|
|
333
333
|
## Release notes
|
|
334
334
|
|
|
335
|
+
### 0.16.1
|
|
336
|
+
|
|
337
|
+
- changed: `.agents/skills/kit-update/SKILL.md`
|
|
338
|
+
- changed: `.agents/skills/to-prd/SKILL.md`
|
|
339
|
+
- changed: `.claude/hooks/drift-guard.py`
|
|
340
|
+
- changed: `.claude/skills/kit-update/SKILL.md`
|
|
341
|
+
- changed: `.claude/skills/to-prd/SKILL.md`
|
|
342
|
+
|
|
343
|
+
### 0.16.0
|
|
344
|
+
|
|
345
|
+
- added: `.agents/skills/setup-workflow/census.md`
|
|
346
|
+
- added: `.claude/skills/setup-workflow/census.md`
|
|
347
|
+
- changed: `.agents/skills/setup-workflow/SKILL.md`
|
|
348
|
+
- changed: `.claude/skills/setup-workflow/SKILL.md`
|
|
349
|
+
|
|
335
350
|
### 0.15.0
|
|
336
351
|
|
|
337
352
|
- added: `.agents/skills/census-update/SKILL.md`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"kitVersion": "0.
|
|
2
|
+
"kitVersion": "0.16.1",
|
|
3
3
|
"files": [
|
|
4
4
|
{
|
|
5
5
|
"path": ".agents/skills/ask-matt/SKILL.md",
|
|
@@ -339,7 +339,7 @@
|
|
|
339
339
|
"kind": "skill",
|
|
340
340
|
"ownerSkill": "kit-update",
|
|
341
341
|
"surface": "codex",
|
|
342
|
-
"sha256": "
|
|
342
|
+
"sha256": "5b7a8c11b5852ee115fa8d3f66a3938d7b4db173a47d711da48abab635b2c261",
|
|
343
343
|
"mode": 420,
|
|
344
344
|
"origin": "kit"
|
|
345
345
|
},
|
|
@@ -487,6 +487,15 @@
|
|
|
487
487
|
"mode": 420,
|
|
488
488
|
"origin": "kit"
|
|
489
489
|
},
|
|
490
|
+
{
|
|
491
|
+
"path": ".agents/skills/setup-workflow/census.md",
|
|
492
|
+
"kind": "skill",
|
|
493
|
+
"ownerSkill": "setup-workflow",
|
|
494
|
+
"surface": "codex",
|
|
495
|
+
"sha256": "ec80f4ad36073e0c7c903434fa098d24f31b9d9a46ce55623782173ddba2e5f9",
|
|
496
|
+
"mode": 420,
|
|
497
|
+
"origin": "kit"
|
|
498
|
+
},
|
|
490
499
|
{
|
|
491
500
|
"path": ".agents/skills/setup-workflow/code-review.md",
|
|
492
501
|
"kind": "skill",
|
|
@@ -546,7 +555,7 @@
|
|
|
546
555
|
"kind": "skill",
|
|
547
556
|
"ownerSkill": "setup-workflow",
|
|
548
557
|
"surface": "codex",
|
|
549
|
-
"sha256": "
|
|
558
|
+
"sha256": "91ba30cc08206204c83d189274579471366221ccfe8f2abdf36957ad85ae136b",
|
|
550
559
|
"mode": 420,
|
|
551
560
|
"origin": "kit"
|
|
552
561
|
},
|
|
@@ -708,7 +717,7 @@
|
|
|
708
717
|
"kind": "skill",
|
|
709
718
|
"ownerSkill": "to-prd",
|
|
710
719
|
"surface": "codex",
|
|
711
|
-
"sha256": "
|
|
720
|
+
"sha256": "0c7c556dfae2641a452ba5874e2e977b3e6f33d941b40be93b5009cb1d959ff8",
|
|
712
721
|
"mode": 420,
|
|
713
722
|
"origin": "kit"
|
|
714
723
|
},
|
|
@@ -848,7 +857,7 @@
|
|
|
848
857
|
{
|
|
849
858
|
"path": ".claude/hooks/drift-guard.py",
|
|
850
859
|
"kind": "hook",
|
|
851
|
-
"sha256": "
|
|
860
|
+
"sha256": "8a031ff04b7aa11ac7c4713de10634e1d1521ca9fbb82fc458a86f78f6d7d1cf",
|
|
852
861
|
"mode": 493,
|
|
853
862
|
"origin": "kit"
|
|
854
863
|
},
|
|
@@ -1312,7 +1321,7 @@
|
|
|
1312
1321
|
"kind": "skill",
|
|
1313
1322
|
"ownerSkill": "kit-update",
|
|
1314
1323
|
"surface": "claude",
|
|
1315
|
-
"sha256": "
|
|
1324
|
+
"sha256": "5b7a8c11b5852ee115fa8d3f66a3938d7b4db173a47d711da48abab635b2c261",
|
|
1316
1325
|
"mode": 420,
|
|
1317
1326
|
"origin": "kit"
|
|
1318
1327
|
},
|
|
@@ -1478,6 +1487,15 @@
|
|
|
1478
1487
|
"mode": 420,
|
|
1479
1488
|
"origin": "kit"
|
|
1480
1489
|
},
|
|
1490
|
+
{
|
|
1491
|
+
"path": ".claude/skills/setup-workflow/census.md",
|
|
1492
|
+
"kind": "skill",
|
|
1493
|
+
"ownerSkill": "setup-workflow",
|
|
1494
|
+
"surface": "claude",
|
|
1495
|
+
"sha256": "ec80f4ad36073e0c7c903434fa098d24f31b9d9a46ce55623782173ddba2e5f9",
|
|
1496
|
+
"mode": 420,
|
|
1497
|
+
"origin": "kit"
|
|
1498
|
+
},
|
|
1481
1499
|
{
|
|
1482
1500
|
"path": ".claude/skills/setup-workflow/code-review.md",
|
|
1483
1501
|
"kind": "skill",
|
|
@@ -1537,7 +1555,7 @@
|
|
|
1537
1555
|
"kind": "skill",
|
|
1538
1556
|
"ownerSkill": "setup-workflow",
|
|
1539
1557
|
"surface": "claude",
|
|
1540
|
-
"sha256": "
|
|
1558
|
+
"sha256": "91ba30cc08206204c83d189274579471366221ccfe8f2abdf36957ad85ae136b",
|
|
1541
1559
|
"mode": 420,
|
|
1542
1560
|
"origin": "kit"
|
|
1543
1561
|
},
|
|
@@ -1699,7 +1717,7 @@
|
|
|
1699
1717
|
"kind": "skill",
|
|
1700
1718
|
"ownerSkill": "to-prd",
|
|
1701
1719
|
"surface": "claude",
|
|
1702
|
-
"sha256": "
|
|
1720
|
+
"sha256": "38352d6e792114cc6c2352c34af841033ccaf06cf34e9ccab1bc76b51a0ca4a1",
|
|
1703
1721
|
"mode": 420,
|
|
1704
1722
|
"origin": "kit"
|
|
1705
1723
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikon85/agent-workflow-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Portable AI-agent workflow skills (plan → execute → land → learn) for Claude Code & Codex — grilling, TDD, diagnosis, two-axis code review, cross-model Codex review, design & domain-modeling, plus a skill router (ask-matt). npx init/update/diff/uninstall.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|