@ikon85/agent-workflow-kit 0.13.0 → 0.15.0

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.
@@ -0,0 +1,140 @@
1
+ ---
2
+ name: census-update
3
+ description: "Build, refresh, or check an optional project-local census. Use when a user invokes census-update, asks to establish a counted surface census, or needs to reconcile census drift; scan facts in the current repository, guide only ambiguous decisions, and activate a verified candidate transactionally."
4
+ ---
5
+
6
+ # Census Update
7
+
8
+ Build and maintain the current repository's consumer-owned census through the
9
+ public API in `scripts/census/index.mjs`. Keep this skill a thin coordinator:
10
+ do not copy, rename, or reimplement the scanner, state, delta, fingerprint, or
11
+ transaction logic.
12
+
13
+ ## Boundaries
14
+
15
+ - Work only in the current repository. Never inspect another project, aggregate
16
+ cross-project findings, learn shared recipes from other repositories, or
17
+ propose an upstream kit change.
18
+ - Treat code as the source of facts. Never ask the user which files, paths, or
19
+ patterns exist.
20
+ - Ask only for one genuinely ambiguous decision at a time. Include a concise
21
+ recommendation and the evidence behind it.
22
+ - Keep generated scanners, tests, profiles, decisions, and the active census in
23
+ the consumer repository. Do not add a dependency without explicit approval.
24
+
25
+ ## Public mechanism
26
+
27
+ Import only the stable exports from `scripts/census/index.mjs`:
28
+ `scanCensus`, `serializeCensus`, `fingerprintCensus`,
29
+ `CENSUS_BUILDER_VERSION`, `diffCensus`, `CENSUS_STATES`, `CENSUS_VERDICTS`,
30
+ `resolveCensusState`, `activateCensus`, and `CensusTransactionError`.
31
+
32
+ ## Consumer files
33
+
34
+ First adopt an existing, explicitly documented census path convention when the
35
+ repository has one. Otherwise use `.census/profile.json` for the consumer-owned
36
+ profile and `.census/active.json` for the verified snapshot. A missing default
37
+ profile is not an error: report `bootstrap` and stage it only after facts and
38
+ decisions are ready rather than silently enabling a gate.
39
+
40
+ The deterministic profile schema is:
41
+
42
+ ```json
43
+ {
44
+ "schemaVersion": 1,
45
+ "enabled": true,
46
+ "decisions": [
47
+ { "family": "name", "status": "verdict", "evidence": "fact", "justification": "required when not relevant" }
48
+ ],
49
+ "localScanners": [
50
+ { "surface": "family", "module": "repo-relative path", "export": "function", "test": "repo-relative test path" }
51
+ ],
52
+ "overrides": [
53
+ { "scope": "this change", "reason": "visible display-only reason" }
54
+ ]
55
+ }
56
+ ```
57
+
58
+ Keep all three arrays present and order their records by family or surface, then
59
+ path. Preserve extra consumer-owned keys when rewriting an adopted profile.
60
+ Pass `decisions` to `scanCensus` as `behaviorFamilies` after mapping `family` to
61
+ `name`. Put the unchanged decision, local-scanner, and override records in a
62
+ visible `profileReport` beside the scanned snapshot. Derive snapshot state with
63
+ `resolveCensusState`; never assign `current` as a literal shortcut.
64
+
65
+ Local-scanner records configure the verifier passed to `activateCensus`: run
66
+ the named focused test, import the named repository-local export, and require
67
+ its result to include the recorded surface. Both `module` and `test` must be
68
+ repository-relative, contained regular files; reject absolute paths, `..`
69
+ escapes, and symlinks before executing or importing either one. Compare surface
70
+ families with the previous active snapshot; a new family without that passing
71
+ proof is still open for state resolution even when Git tracking lets the base
72
+ scan enumerate it. Overrides are report input only and are never passed into
73
+ scanning, fingerprinting, verification, or state resolution.
74
+
75
+ ## Workflow
76
+
77
+ 1. **Check.** Read the local profile and active census, if present. Report a
78
+ missing profile as `bootstrap`; otherwise derive one
79
+ of `disabled`, `bootstrap`, `current`, `refresh_required`, `updating`, or
80
+ `failed` through the public API. An explicit opt-out is disabled. Do not
81
+ write during this step.
82
+ 2. **Scan facts.** Call `scanCensus` once with the current repository root.
83
+ Product code and production configuration form the surface denominator;
84
+ tests and docs remain evidence. Let the scanner exclude secrets, ignored,
85
+ generated, and vendored content. Never read excluded content to explain a
86
+ result.
87
+ 3. **Show the delta.** For an active census, call `diffCensus` and show only
88
+ added, changed, removed, and open names. Do not dump the full scan unless the
89
+ user asks. For bootstrap, show the discovered families and counts.
90
+ 4. **Resolve ambiguity.** Recommend a decision for each ambiguous behavior or
91
+ surface and ask separately. Record the user's decision with its evidence.
92
+ `nicht relevant` requires a durable justification. Never infer it silently. <!-- language-census: ok -->
93
+ 5. **Handle unknown patterns locally.** Keep an unknown surface `offen`. It can
94
+ become `abgedeckt` only after this repository contains a small local scanner
95
+ and a focused passing test for that pattern. Run that test before rescanning.
96
+ 6. **Verify a candidate.** Build the candidate from the fresh scan and recorded
97
+ decisions. Fail verification when any surface or behavior remains `offen`,
98
+ when a required local scanner test fails, or when the candidate fingerprints
99
+ do not describe the current repository.
100
+ 7. **Activate.** Call `activateCensus` with a real verifier so it stages, verifies,
101
+ and atomically swaps under its local lock. On `CensusTransactionError`, report
102
+ `updating` or `failed` and keep the previous active census authoritative.
103
+ 8. **Prove the result.** Report surface coverage as `X of Y`, then render the
104
+ behavior overview separately. State the resulting census state and the
105
+ builder version.
106
+
107
+ ## Decision rules
108
+
109
+ - Store a justified `nicht relevant` verdict as a visible decision beside the <!-- language-census: ok -->
110
+ candidate; do not erase the family from the overview.
111
+ - A change-local override may suppress a known mechanical false-positive in
112
+ the displayed delta only when its reason and scope are visible. It must not
113
+ alter scanner facts, fingerprints, `offen` verdicts, or state resolution, so
114
+ real drift can never become `current` through an override.
115
+ - Any unexpected product area stays `offen` and therefore prevents `current`,
116
+ even if every known area is covered.
117
+ - Facts discovered after a decision invalidate that decision's stale premise;
118
+ rescan and ask again only if the remaining choice is genuinely ambiguous.
119
+
120
+ ## No-write and recovery proof
121
+
122
+ Before activation, compare the fresh candidate with the active census using
123
+ the public fingerprints and deterministic `serializeCensus` output. If the
124
+ repository and decisions are unchanged and the derived state is `current`,
125
+ report `current` and do not call `activateCensus` or write any file.
126
+
127
+ If scanning, a local test, verification, or activation fails, report `failed`,
128
+ discard the candidate when safe, and confirm that the previous active census
129
+ bytes are unchanged. Never manufacture `current` after an error.
130
+
131
+ ## Final report
132
+
133
+ Return only the useful audit trail:
134
+
135
+ - state and builder version;
136
+ - compact delta;
137
+ - surface coverage `X of Y`;
138
+ - separate behavior overview;
139
+ - visible `nicht relevant` justifications and active override, if any; <!-- language-census: ok -->
140
+ - local scanner tests run and the transaction/no-write result.
@@ -17,6 +17,7 @@ Use this section as the entry-point map for agent-assisted work. The individual
17
17
  - **A design question needs a runnable answer (state, business logic, a UI you have to see):** spike it with `prototype`, then fold what you learned back in.
18
18
  - **Multi-session build from a PRD or issue:** use `implement` to drive `tdd` end-to-end, one red-green slice at a time.
19
19
  - **Implementation slice:** use `tdd` for one behavior at a time: RED, GREEN, then refactor.
20
+ - **Build or refresh a project-local census:** use `census-update` to scan facts, resolve ambiguous decisions one at a time, and transactionally activate a counted census.
20
21
  - **Finished slice:** use `wrapup` to prepare the branch, PR, and cleanup steps your repo expects.
21
22
  - **Kit release:** use `kit-release` to derive the shipped delta, confirm Semver, regenerate the manifest, run all gates, and then hand landing to `wrapup`.
22
23
  - **Kit update:** use `kit-update` to preview and transactionally apply a parity-verified scoped release without overwriting local modifications.
@@ -0,0 +1,140 @@
1
+ ---
2
+ name: census-update
3
+ description: "Build, refresh, or check an optional project-local census. Use when a user invokes census-update, asks to establish a counted surface census, or needs to reconcile census drift; scan facts in the current repository, guide only ambiguous decisions, and activate a verified candidate transactionally."
4
+ ---
5
+
6
+ # Census Update
7
+
8
+ Build and maintain the current repository's consumer-owned census through the
9
+ public API in `scripts/census/index.mjs`. Keep this skill a thin coordinator:
10
+ do not copy, rename, or reimplement the scanner, state, delta, fingerprint, or
11
+ transaction logic.
12
+
13
+ ## Boundaries
14
+
15
+ - Work only in the current repository. Never inspect another project, aggregate
16
+ cross-project findings, learn shared recipes from other repositories, or
17
+ propose an upstream kit change.
18
+ - Treat code as the source of facts. Never ask the user which files, paths, or
19
+ patterns exist.
20
+ - Ask only for one genuinely ambiguous decision at a time. Include a concise
21
+ recommendation and the evidence behind it.
22
+ - Keep generated scanners, tests, profiles, decisions, and the active census in
23
+ the consumer repository. Do not add a dependency without explicit approval.
24
+
25
+ ## Public mechanism
26
+
27
+ Import only the stable exports from `scripts/census/index.mjs`:
28
+ `scanCensus`, `serializeCensus`, `fingerprintCensus`,
29
+ `CENSUS_BUILDER_VERSION`, `diffCensus`, `CENSUS_STATES`, `CENSUS_VERDICTS`,
30
+ `resolveCensusState`, `activateCensus`, and `CensusTransactionError`.
31
+
32
+ ## Consumer files
33
+
34
+ First adopt an existing, explicitly documented census path convention when the
35
+ repository has one. Otherwise use `.census/profile.json` for the consumer-owned
36
+ profile and `.census/active.json` for the verified snapshot. A missing default
37
+ profile is not an error: report `bootstrap` and stage it only after facts and
38
+ decisions are ready rather than silently enabling a gate.
39
+
40
+ The deterministic profile schema is:
41
+
42
+ ```json
43
+ {
44
+ "schemaVersion": 1,
45
+ "enabled": true,
46
+ "decisions": [
47
+ { "family": "name", "status": "verdict", "evidence": "fact", "justification": "required when not relevant" }
48
+ ],
49
+ "localScanners": [
50
+ { "surface": "family", "module": "repo-relative path", "export": "function", "test": "repo-relative test path" }
51
+ ],
52
+ "overrides": [
53
+ { "scope": "this change", "reason": "visible display-only reason" }
54
+ ]
55
+ }
56
+ ```
57
+
58
+ Keep all three arrays present and order their records by family or surface, then
59
+ path. Preserve extra consumer-owned keys when rewriting an adopted profile.
60
+ Pass `decisions` to `scanCensus` as `behaviorFamilies` after mapping `family` to
61
+ `name`. Put the unchanged decision, local-scanner, and override records in a
62
+ visible `profileReport` beside the scanned snapshot. Derive snapshot state with
63
+ `resolveCensusState`; never assign `current` as a literal shortcut.
64
+
65
+ Local-scanner records configure the verifier passed to `activateCensus`: run
66
+ the named focused test, import the named repository-local export, and require
67
+ its result to include the recorded surface. Both `module` and `test` must be
68
+ repository-relative, contained regular files; reject absolute paths, `..`
69
+ escapes, and symlinks before executing or importing either one. Compare surface
70
+ families with the previous active snapshot; a new family without that passing
71
+ proof is still open for state resolution even when Git tracking lets the base
72
+ scan enumerate it. Overrides are report input only and are never passed into
73
+ scanning, fingerprinting, verification, or state resolution.
74
+
75
+ ## Workflow
76
+
77
+ 1. **Check.** Read the local profile and active census, if present. Report a
78
+ missing profile as `bootstrap`; otherwise derive one
79
+ of `disabled`, `bootstrap`, `current`, `refresh_required`, `updating`, or
80
+ `failed` through the public API. An explicit opt-out is disabled. Do not
81
+ write during this step.
82
+ 2. **Scan facts.** Call `scanCensus` once with the current repository root.
83
+ Product code and production configuration form the surface denominator;
84
+ tests and docs remain evidence. Let the scanner exclude secrets, ignored,
85
+ generated, and vendored content. Never read excluded content to explain a
86
+ result.
87
+ 3. **Show the delta.** For an active census, call `diffCensus` and show only
88
+ added, changed, removed, and open names. Do not dump the full scan unless the
89
+ user asks. For bootstrap, show the discovered families and counts.
90
+ 4. **Resolve ambiguity.** Recommend a decision for each ambiguous behavior or
91
+ surface and ask separately. Record the user's decision with its evidence.
92
+ `nicht relevant` requires a durable justification. Never infer it silently. <!-- language-census: ok -->
93
+ 5. **Handle unknown patterns locally.** Keep an unknown surface `offen`. It can
94
+ become `abgedeckt` only after this repository contains a small local scanner
95
+ and a focused passing test for that pattern. Run that test before rescanning.
96
+ 6. **Verify a candidate.** Build the candidate from the fresh scan and recorded
97
+ decisions. Fail verification when any surface or behavior remains `offen`,
98
+ when a required local scanner test fails, or when the candidate fingerprints
99
+ do not describe the current repository.
100
+ 7. **Activate.** Call `activateCensus` with a real verifier so it stages, verifies,
101
+ and atomically swaps under its local lock. On `CensusTransactionError`, report
102
+ `updating` or `failed` and keep the previous active census authoritative.
103
+ 8. **Prove the result.** Report surface coverage as `X of Y`, then render the
104
+ behavior overview separately. State the resulting census state and the
105
+ builder version.
106
+
107
+ ## Decision rules
108
+
109
+ - Store a justified `nicht relevant` verdict as a visible decision beside the <!-- language-census: ok -->
110
+ candidate; do not erase the family from the overview.
111
+ - A change-local override may suppress a known mechanical false-positive in
112
+ the displayed delta only when its reason and scope are visible. It must not
113
+ alter scanner facts, fingerprints, `offen` verdicts, or state resolution, so
114
+ real drift can never become `current` through an override.
115
+ - Any unexpected product area stays `offen` and therefore prevents `current`,
116
+ even if every known area is covered.
117
+ - Facts discovered after a decision invalidate that decision's stale premise;
118
+ rescan and ask again only if the remaining choice is genuinely ambiguous.
119
+
120
+ ## No-write and recovery proof
121
+
122
+ Before activation, compare the fresh candidate with the active census using
123
+ the public fingerprints and deterministic `serializeCensus` output. If the
124
+ repository and decisions are unchanged and the derived state is `current`,
125
+ report `current` and do not call `activateCensus` or write any file.
126
+
127
+ If scanning, a local test, verification, or activation fails, report `failed`,
128
+ discard the candidate when safe, and confirm that the previous active census
129
+ bytes are unchanged. Never manufacture `current` after an error.
130
+
131
+ ## Final report
132
+
133
+ Return only the useful audit trail:
134
+
135
+ - state and builder version;
136
+ - compact delta;
137
+ - surface coverage `X of Y`;
138
+ - separate behavior overview;
139
+ - visible `nicht relevant` justifications and active override, if any; <!-- language-census: ok -->
140
+ - local scanner tests run and the transaction/no-write result.
@@ -17,6 +17,7 @@ Use this section as the entry-point map for agent-assisted work. The individual
17
17
  - **A design question needs a runnable answer (state, business logic, a UI you have to see):** spike it with `prototype`, then fold what you learned back in.
18
18
  - **Multi-session build from a PRD or issue:** use `implement` to drive `tdd` end-to-end, one red-green slice at a time.
19
19
  - **Implementation slice:** use `tdd` for one behavior at a time: RED, GREEN, then refactor.
20
+ - **Build or refresh a project-local census:** use `census-update` to scan facts, resolve ambiguous decisions one at a time, and transactionally activate a counted census.
20
21
  - **Finished slice:** use `wrapup` to prepare the branch, PR, and cleanup steps your repo expects.
21
22
  - **Kit release:** use `kit-release` to derive the shipped delta, confirm Semver, regenerate the manifest, run all gates, and then hand landing to `wrapup`.
22
23
  - **Kit update:** use `kit-update` to preview and transactionally apply a parity-verified scoped release without overwriting local modifications.
@@ -107,6 +107,16 @@
107
107
  ],
108
108
  "provenance": "matt-pocock"
109
109
  },
110
+ "census-update": {
111
+ "class": "generic",
112
+ "publish": true,
113
+ "entryPoint": true,
114
+ "surfaces": [
115
+ "claude",
116
+ "codex"
117
+ ],
118
+ "provenance": "own"
119
+ },
110
120
  "board-to-waves": {
111
121
  "class": "generic",
112
122
  "publish": true,
package/PROVENANCE.md CHANGED
@@ -32,8 +32,8 @@ carries Chase's `THIRD-PARTY-NOTICES.md`.
32
32
  ## Own work (MIT, Copyright (c) 2026 Niko (iKon85))
33
33
 
34
34
  retro, wrapup, spec-self-critique, board-to-waves, verify-spike, decision-gate,
35
- codex-adapter-sync, setup-pre-commit, code-review, orchestrate-wave — covered by
36
- the root LICENSE.
35
+ codex-adapter-sync, setup-pre-commit, code-review, orchestrate-wave,
36
+ census-update — covered by the root LICENSE.
37
37
  `setup-pre-commit` was rewritten from Matt Pocock's husky-based skill to a
38
38
  zero-dep native git `core.hooksPath` scaffold; nothing of the original
39
39
  mechanic remains (courtesy attribution).
package/README.md CHANGED
@@ -332,6 +332,22 @@ still reference. Flags: `--force` (overwrite pre-existing files on `init`),
332
332
 
333
333
  ## Release notes
334
334
 
335
+ ### 0.15.0
336
+
337
+ - added: `.agents/skills/census-update/SKILL.md`
338
+ - added: `.claude/skills/census-update/SKILL.md`
339
+ - changed: `.agents/skills/setup-workflow/workflow-overview.md`
340
+ - changed: `.claude/skills/setup-workflow/workflow-overview.md`
341
+
342
+ ### 0.14.0
343
+
344
+ - added: `scripts/census/delta.mjs`
345
+ - added: `scripts/census/fingerprint.mjs`
346
+ - added: `scripts/census/index.mjs`
347
+ - added: `scripts/census/scan.mjs`
348
+ - added: `scripts/census/state.mjs`
349
+ - added: `scripts/census/transaction.mjs`
350
+
335
351
  ### 0.13.0
336
352
 
337
353
  - added: `.agents/skills/setup-workflow/assets/agent-workflow-kit-update.yml`
@@ -1,5 +1,5 @@
1
1
  {
2
- "kitVersion": "0.13.0",
2
+ "kitVersion": "0.15.0",
3
3
  "files": [
4
4
  {
5
5
  "path": ".agents/skills/ask-matt/SKILL.md",
@@ -37,6 +37,15 @@
37
37
  "mode": 420,
38
38
  "origin": "kit"
39
39
  },
40
+ {
41
+ "path": ".agents/skills/census-update/SKILL.md",
42
+ "kind": "skill",
43
+ "ownerSkill": "census-update",
44
+ "surface": "codex",
45
+ "sha256": "3a04a2667005cae51cfad7952ff85fe43ba1ae390458b4ce746e23f6e872b3fb",
46
+ "mode": 420,
47
+ "origin": "kit"
48
+ },
40
49
  {
41
50
  "path": ".agents/skills/code-review/SKILL.md",
42
51
  "kind": "skill",
@@ -582,7 +591,7 @@
582
591
  "kind": "skill",
583
592
  "ownerSkill": "setup-workflow",
584
593
  "surface": "codex",
585
- "sha256": "6ce3954e4f94d112801cba0d145e4d3b6f101aca5e50e6b1f9794aa0288881a9",
594
+ "sha256": "b83fa87dc0226f21e01d31c91840b78d1ccad0a92e646de203fc3c003e9098f3",
586
595
  "mode": 420,
587
596
  "origin": "kit"
588
597
  },
@@ -893,6 +902,15 @@
893
902
  "mode": 420,
894
903
  "origin": "kit"
895
904
  },
905
+ {
906
+ "path": ".claude/skills/census-update/SKILL.md",
907
+ "kind": "skill",
908
+ "ownerSkill": "census-update",
909
+ "surface": "claude",
910
+ "sha256": "3a04a2667005cae51cfad7952ff85fe43ba1ae390458b4ce746e23f6e872b3fb",
911
+ "mode": 420,
912
+ "origin": "kit"
913
+ },
896
914
  {
897
915
  "path": ".claude/skills/code-review/SKILL.md",
898
916
  "kind": "skill",
@@ -1564,7 +1582,7 @@
1564
1582
  "kind": "skill",
1565
1583
  "ownerSkill": "setup-workflow",
1566
1584
  "surface": "claude",
1567
- "sha256": "6ce3954e4f94d112801cba0d145e4d3b6f101aca5e50e6b1f9794aa0288881a9",
1585
+ "sha256": "b83fa87dc0226f21e01d31c91840b78d1ccad0a92e646de203fc3c003e9098f3",
1568
1586
  "mode": 420,
1569
1587
  "origin": "kit"
1570
1588
  },
@@ -1880,6 +1898,48 @@
1880
1898
  "mode": 493,
1881
1899
  "origin": "kit"
1882
1900
  },
1901
+ {
1902
+ "path": "scripts/census/delta.mjs",
1903
+ "kind": "script",
1904
+ "sha256": "b4f92ecb4bf1920bd62707c83f308269385bc5e35c2205abc97d8d8b849ade84",
1905
+ "mode": 420,
1906
+ "origin": "kit"
1907
+ },
1908
+ {
1909
+ "path": "scripts/census/fingerprint.mjs",
1910
+ "kind": "script",
1911
+ "sha256": "fbb25d9f53ab74a9bdffc5db816a56f0d976204b74c2126b8ec7c11e8c8d54fc",
1912
+ "mode": 420,
1913
+ "origin": "kit"
1914
+ },
1915
+ {
1916
+ "path": "scripts/census/index.mjs",
1917
+ "kind": "script",
1918
+ "sha256": "ef87d073842dec13f27c929e573e064314fdd704aeeec85e80d526c044f23a9a",
1919
+ "mode": 420,
1920
+ "origin": "kit"
1921
+ },
1922
+ {
1923
+ "path": "scripts/census/scan.mjs",
1924
+ "kind": "script",
1925
+ "sha256": "0988282c8aa6f1e1644eab924fab6e5e306c5a8bb3c26175ff74080d8de673d9",
1926
+ "mode": 420,
1927
+ "origin": "kit"
1928
+ },
1929
+ {
1930
+ "path": "scripts/census/state.mjs",
1931
+ "kind": "script",
1932
+ "sha256": "588fb5bd3a3855fd7acdf9c056c63e0a04f94308b91f48b9be18807ca849fab7",
1933
+ "mode": 420,
1934
+ "origin": "kit"
1935
+ },
1936
+ {
1937
+ "path": "scripts/census/transaction.mjs",
1938
+ "kind": "script",
1939
+ "sha256": "63a27f4b28583178bfc08fd6ac553528d9d955e1ec06bc37f779824d5fcaa92f",
1940
+ "mode": 420,
1941
+ "origin": "kit"
1942
+ },
1883
1943
  {
1884
1944
  "path": "scripts/execute-ready-check.py",
1885
1945
  "kind": "script",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikon85/agent-workflow-kit",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
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": {