@erclx/aitk 0.35.0 → 0.35.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aitk",
3
3
  "description": "Automated governance, versioning, and discovery tools for Claude Code.",
4
- "version": "0.35.0",
4
+ "version": "0.35.1",
5
5
  "author": {
6
6
  "name": "Eric Le",
7
7
  "url": "https://github.com/erclx"
@@ -9,6 +9,10 @@ Generate production-ready Bash scripts for DevOps and CLI workflows. Enforce str
9
9
 
10
10
  Load `${CLAUDE_SKILL_DIR}/references/patterns.md` for the timeline lifecycle, logging, interactive prompt, help-screen, and full-script code templates. `${CLAUDE_SKILL_DIR}` expands to this skill's own directory, so the path resolves from any project. Copy those definitions verbatim, keeping only the colors and functions the script actually uses.
11
11
 
12
+ ## Guards
13
+
14
+ - A request for a script with no human at the terminal stops and routes to `cli-script`. CI jobs, cron entries, agent-run tasks, and any script whose output is consumed by a pipe render no timeline, so generating one costs the frame and returns nothing.
15
+
12
16
  ## Script setup
13
17
 
14
18
  - Start with `#!/usr/bin/env bash`, `set -e`, and `set -o pipefail`.
@@ -7,6 +7,11 @@ description: Generates GitHub Actions CI workflow files with parallel jobs, emoj
7
7
 
8
8
  Generate GitHub Actions workflow files for CI pipelines. Enforce parallel job execution, emoji job naming, and gated deployment stages.
9
9
 
10
+ ## Guards
11
+
12
+ - A request for what runs inside a deploy, publish, or release job stops at the gate. Credentials, environments, and deploy targets are invisible to this skill, so emit the job with its `needs` wiring and a placeholder step, then name what the caller fills in. Never guess a deploy command.
13
+ - The build, test, and deploy commands belong to the project. Read them from its scripts rather than asserting a second copy in the workflow.
14
+
10
15
  ## Workflow setup
11
16
 
12
17
  - Include `workflow_dispatch` on every workflow alongside the primary trigger.
@@ -49,4 +54,5 @@ Before responding, verify:
49
54
  - E2E uses `needs: build`. Release and deploy use `needs: e2e`.
50
55
  - Artifacts upload on `if: failure()` only with `retention-days: 7`.
51
56
  - Job names use emoji + title format.
57
+ - Deploy, publish, and release jobs carry a placeholder step and a named handoff, never a guessed deploy command.
52
58
  - Bun projects use `oven-sh/setup-bun@v2` with `bun install --frozen-lockfile`.
@@ -55,14 +55,19 @@ Read each discovered file in parallel.
55
55
  For each discovered doc, classify as one of:
56
56
 
57
57
  - `stale`: the diff touches something the doc describes
58
+ - `departed`: the doc records a deliberate contract and the diff broke it
58
59
  - `unrelated`: no overlap between diff and doc content
59
60
 
61
+ The split between `stale` and `departed` is whether the doc was describing or promising. A doc that trailed the code is `stale`. A doc stating a contract the code was meant to keep is `departed`, and rewriting it to match the diff would record the regression as the contract.
62
+
60
63
  Classify at the section level, not the file level. A doc edited earlier in the session can still be partially stale. For each diff surface, verify the corresponding section is synced.
61
64
 
62
65
  ## Action
63
66
 
64
67
  Rewrite only the stale sections. Do not touch sections unrelated to the diff. Write the updated file immediately after the preview. Claude Code's tool permission dialog is the confirmation gate. Do not wait for user input.
65
68
 
69
+ Never rewrite a `departed` section. Leave it as written and report it as a finding, since the repair belongs in the code rather than in the prose.
70
+
66
71
  ## Response format
67
72
 
68
73
  ### Preview
@@ -73,6 +78,7 @@ Rewrite only the stale sections. Do not touch sections unrelated to the diff. Wr
73
78
  | Doc | Status | Action |
74
79
  | ----------- | --------- | ------ |
75
80
  | README.md | stale | update |
81
+ | docs/cli.md | departed | report |
76
82
  | docs/api.md | unrelated | skip |
77
83
 
78
84
  After outputting the preview, write all stale updates immediately.
@@ -84,4 +90,5 @@ One line per file, using the same relative path format as the preview table (e.g
84
90
  ```plaintext
85
91
  ✅ Updated: <relative-path>
86
92
  ⏭️ Skipped: <relative-path>
93
+ ⚠️ Departed: <relative-path> records <the contract>, and the diff <what it did>. Left unwritten.
87
94
  ```
@@ -7,6 +7,8 @@ description: Classifies each section of a target project's bloated `CLAUDE.md` i
7
7
 
8
8
  Rebalance a large `CLAUDE.md` so only always-load behavior stays in it, path-scoped behavior becomes a rule, and domain narrative becomes a context entry. Every move is a proposal the user applies by hand.
9
9
 
10
+ Run `migration-context` first when both apply. Its moves populate `.claude/context/`, and Step 3 has to read the folder those moves left so an existing entry resolves to an append rather than blocking the move that should have created it.
11
+
10
12
  ## Guards
11
13
 
12
14
  - If no `CLAUDE.md` exists at `pwd`, stop: `❌ No CLAUDE.md found at the project root.`
@@ -5,6 +5,8 @@ description: Classifies markdown files in a target project's `docs/` folder and
5
5
 
6
6
  # Claude context migrate
7
7
 
8
+ Run this skill before `migration-claude-md` when both apply. That skill proposes entries into the same `.claude/context/` folder, and an entry landing there first makes the corresponding move here read as a conflict and get skipped, which loses the richer `docs/` file.
9
+
8
10
  ## Guards
9
11
 
10
12
  - If no `docs/` directory exists at `pwd`, stop: `❌ No docs/ directory found.`
@@ -36,13 +36,14 @@ Match the detected evidence to the catalog:
36
36
 
37
37
  If a detected technology has no matching rule, stop and surface the gap. Do not guess.
38
38
 
39
- Present three options:
39
+ Present four options:
40
40
 
41
- 1. Author a new rule in the toolkit at `governance/rules/<domain>/<num>-<name>.md` following `.claude/standards/rule.md`, or `${CLAUDE_SKILL_DIR}/../../standards/rule.md` when the project does not have it, commit, then re-run install.
42
- 2. Install the matching non-<tech> rules and skip the tech-specific layer.
43
- 3. Abort.
41
+ 1. Author a new rule in the toolkit at `governance/rules/<domain>/<num>-<name>.md` following `.claude/standards/rule.md`, or `${CLAUDE_SKILL_DIR}/../../standards/rule.md` when the project does not have it, commit, then re-run install. Take this route when the toolkit should ship the rule to every project.
42
+ 2. Invoke `create-rule`, which scaffolds the file into the target project at a non-colliding number. Take this route when the rule is specific to this project and no sync should ever overwrite it.
43
+ 3. Install the matching non-<tech> rules and skip the tech-specific layer.
44
+ 4. Abort.
44
45
 
45
- Rules are authored in the toolkit repository, never in the target project on the fly.
46
+ This skill authors no rule itself. Option 1 writes in the toolkit repository, and option 2 hands the project-local file to `create-rule`.
46
47
 
47
48
  ## Preview
48
49
 
@@ -10,6 +10,7 @@ Orchestrates the onboarding chain. Detects project type, resolves per-domain arg
10
10
  ## Scope
11
11
 
12
12
  - This skill and `aitk init` run once on a fresh scaffold, never on an existing project. They do not guard against clobbering existing configs. When tempted to add guards, mode switches, or an existing-project branch, stop. Extend the per-domain `aitk <domain> install` or `aitk sync` paths instead.
13
+ - The chain does not bootstrap the `index.md` system and does not provision Claude Code plugins. `setup-indexes` owns the first. `setup-plugins` owns the second, which installs once per machine rather than into a project, so no project-scoped chain can carry it. Name both in the report so a clean result does not read as onboarding complete.
13
14
 
14
15
  ## Read catalogs
15
16
 
@@ -112,3 +113,4 @@ After the chain, report:
112
113
  - `setup-verify` outcome
113
114
  - Any domains or scripts that failed
114
115
  - Any detection gaps surfaced during resolve
116
+ - Onboarding steps left to the caller: `setup-indexes` for the `index.md` system, `setup-plugins` for Claude Code plugins
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@erclx/aitk",
3
3
  "type": "module",
4
- "version": "0.35.0",
4
+ "version": "0.35.1",
5
5
  "description": "Infrastructure and quality tooling for developer workflows",
6
6
  "license": "MIT",
7
7
  "bin": {