@erclx/aitk 0.87.0 → 0.89.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.
@@ -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.87.0",
4
+ "version": "0.89.0",
5
5
  "author": {
6
6
  "name": "Eric Le",
7
7
  "url": "https://github.com/erclx"
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: decision-escalate
3
+ description: Scope boundary for handing a decision back to the operator, and the batching contract that keeps the handoff to one turn
4
+ ---
5
+
6
+ # Decision escalate requirement
7
+
8
+ ## Gap
9
+
10
+ Without this skill, a session facing a decision that belongs to the operator asks about it one question at a time across several turns, so the operator answers each without knowing how many are open and cannot trade one against another. It asks in prose with no options attached, so the operator has to invent the alternatives before picking one. It names an option and omits what the other one buys, so the pick is made blind. It escalates a call it could have settled from the repository or from its own judgment, which spends the operator's attention on work the session owed.
11
+
12
+ It also empties a long backlog into one turn, so the questions past the first few arrive in no order and the operator cannot tell which ones the work is actually stalled on. It carries on with work the unanswered questions govern, so an answer arrives against output already built the other way. It takes the answer, acts, and leaves the plan, task, or record that posed the question reading as open, so the next session re-asks a decision the operator already made.
13
+
14
+ A body written around a named tool fails a third way. A session on a surface carrying no structured question tool reads an instruction it cannot execute and falls back to whatever it would have done unaided, which is the per-decision ask this file exists against.
15
+
16
+ The opposite failure is the one that ships silently. A session that takes a preference decision itself produces work the operator did not ask for and never learns a choice was made, because nothing in the output says a fork was passed.
17
+
18
+ `CLAUDE.md` states both branches of the rule, sending an ordinary judgment call to a pick with the tradeoff in one sentence and a preference-deciding call to the operator. The first branch has `snippets/decision-help.md` behind it and the second had no surface at all.
19
+
20
+ ## Must
21
+
22
+ - Collect every open decision before asking any of them, so the operator sees the set rather than the first one
23
+ - Put the whole batch in one turn, since a batch split across turns is the per-decision ask this skill exists to replace
24
+ - Give each question two to four options, each carrying what it means and what it costs, with the recommendation ranked first and named as such
25
+ - State the behavior first and the tool second, so the body runs on a chat surface carrying no structured question tool
26
+ - Cap a batch at four questions and say how many are held, since a structured question tool takes four and an uncapped batch hides the overflow
27
+ - Hold every escalated decision until it is answered, and continue only the work depending on none of them
28
+ - Route a pick that changes a written artifact into that artifact under the standard owning it, rather than leaving it in the session
29
+
30
+ ## Must not
31
+
32
+ - Answer on the operator's behalf, or treat the recommendation as the answer because no reply arrived
33
+ - Escalate a decision the session can settle from its own judgment or from reading the repository, which is the first branch of the rule and belongs to the session
34
+ - Escalate a decision already taken, which goes to the record that holds it rather than back to the operator
35
+
36
+ ## Guards
37
+
38
+ - Nothing open, stop rather than manufacturing a question to justify the invocation
39
+
40
+ ## Out of scope
41
+
42
+ - Making the ordinary judgment call, which is a pick plus a one-sentence tradeoff and needs no surface
43
+ - The chat-side pick with no repository behind it, which `snippets/decision-help.md` covers and reaches a different reader
44
+ - Writing the decision into a plan, task, or architecture record, which each owning standard governs and this skill only routes to
45
+ - Deciding when to fire. The skill is user-invoked through `disable-model-invocation`, so escalating is the operator's call rather than a description match.
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: decision-escalate
3
+ description: Collects every open decision whose answer turns on the operator's preference, puts them as one batch of questions each carrying options and a recommended default, then waits. Use when asked to "escalate this", "ask me the open questions", "batch the open decisions", "what do you need from me", or "stop and ask before you pick". Do NOT use for a judgment call the session can settle, which is a pick with the tradeoff stated in one sentence.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Decision escalate
8
+
9
+ Put every open decision that belongs to the operator as one batch, each carrying its options and a recommended default, then stop until the batch is answered.
10
+
11
+ One batch is the whole point. A session that asks one question, acts, then asks the next spends the operator's attention once per decision and hides how many are open.
12
+
13
+ ## Guards
14
+
15
+ - If nothing is open, stop: `❌ Nothing to escalate. Every open call is one this session can make.`
16
+ - Escalate only a decision whose answer turns on the operator's preference. A judgment call with two or three reasonable options the session can weigh is a pick with the tradeoff stated in one sentence, taken without asking.
17
+ - Escalate only what is open now. A decision already taken this session goes to the artifact that records it rather than back to the operator.
18
+ - Do not act on any decision in the batch before it is answered. Continue the work that depends on none of them.
19
+ - Do not escalate a question the session can answer by reading the repository. Read first, and escalate what the tree does not settle.
20
+
21
+ ## Step 1: collect what is open
22
+
23
+ Sweep the session for every decision still unmade. The usual sources:
24
+
25
+ - A plan question whose answer turns on preference rather than measurement
26
+ - A fork the session parked to keep moving, where both branches still ship
27
+ - A default the session took silently that changes what the operator receives
28
+ - A scope boundary the request left ambiguous, where the two readings produce different work
29
+
30
+ Drop anything the session can settle. What survives is the batch.
31
+
32
+ ## Step 2: shape each question
33
+
34
+ Each entry carries a short header naming the axis, the question itself, and two to four options. Give every option what it means and what it costs. Rank the recommendation first and say it is the recommendation.
35
+
36
+ An option with no stated cost is not an option, since the operator picks it without knowing what the other one buys.
37
+
38
+ Cap the batch at four. A structured question tool takes four, and a batch past that is a session asking to be redesigned rather than answered. When more than four are open, send the four blocking the most work and say in one line how many are held.
39
+
40
+ ## Step 3: put the batch
41
+
42
+ Put every question in one turn. Never split the batch across turns and never ask the first while the rest stay unstated.
43
+
44
+ When the session runs on a surface carrying a structured question tool, such as `AskUserQuestion` in Claude Code, send the whole batch through one call with one entry per decision. The tool renders the options and collects the picks together.
45
+
46
+ Otherwise write the batch as a numbered list in one message, each question followed by its lettered options with the recommendation marked. The behavior is the same on either surface, and only the rendering changes.
47
+
48
+ Batch shape:
49
+
50
+ ```plaintext
51
+ <N> open decisions. <M> held.
52
+
53
+ 1. <axis>: <question>
54
+ a. <option> (recommended): <what it means>, <what it costs>
55
+ b. <option>: <what it means>, <what it costs>
56
+
57
+ 2. <axis>: <question>
58
+ a. <option> (recommended): <what it means>, <what it costs>
59
+ b. <option>: <what it means>, <what it costs>
60
+ ```
61
+
62
+ ## Step 4: wait
63
+
64
+ Stop after the batch. Do not answer on the operator's behalf, do not act on the recommendation because it is the recommendation, and do not fill the wait with work the batch would invalidate.
65
+
66
+ An operator who answers some and not others has answered those. Continue on the answered ones and hold the rest.
67
+
68
+ ## Step 5: record and continue
69
+
70
+ Restate each pick in one line, then continue the work.
71
+
72
+ A pick that changes a written artifact goes into that artifact under the rule its own standard sets. An answer to an open plan question rewrites that question's `- Suggested:` line to the pick and names the operator as its source, leaving the `- Answer:` slot blank, per `.claude/standards/plan.md`, or `${CLAUDE_SKILL_DIR}/../../standards/plan.md` when the project does not have it. The standard bars a session from filling that slot even when the operator supplied the pick, and the blank slot resolves to the rewritten suggestion, so the record carries the operator's decision either way. A pick that settles nothing written stays in the session.
73
+
74
+ Output after the answers land:
75
+
76
+ ```plaintext
77
+ ✅ <N> decisions answered
78
+ <axis>: <pick>
79
+ <axis>: <pick>
80
+ <M held, restated in one line each>
81
+ ```
@@ -51,7 +51,7 @@ A banned word is bounded on a word character or a hyphen either side. A plain wo
51
51
 
52
52
  A banned spelling keeps the plain word boundary, hyphens included. The two bans target different things: a word ban targets the word, so reading a compound as one word is correct, while a spelling ban targets the orthography inside it, which sits in `behaviour-driven` as plainly as it sits alone.
53
53
 
54
- Two ban shapes stay unmeasured and the report says so on every run. A phrase ban carries a placeholder standing in for the rest of the sentence, so no literal match reaches it, and every rule under `## Voice` is a judgment. A report listing hits without naming those would read as a verdict on the whole standard.
54
+ Two ban shapes stay unmeasured and the report says so on every run. A multi-word ban escapes the harvest by width, whether it carries a placeholder standing in for the rest of the sentence or spells the phrase out in full, and every rule under `## Voice` is a judgment. The bans `## Language` states over what a sentence may claim sit in the first group by construction, since a literal match over a pattern reports the compliant text and reaches none of the violations. A report listing hits without naming those would read as a verdict on the whole standard.
55
55
 
56
56
  ### Bullets, paragraphs, and depth
57
57
 
@@ -169,6 +169,7 @@ Before the first feature session on a UI-heavy project, pick a design tier. The
169
169
  | `aitk:claude-intake` | File a brain dump into an inventory under `.claude/intake/`, one item per finding with a verdict |
170
170
  | `aitk:claude-groundwork` | Before a plan is warranted, measure an unknown in a track folder under `.claude/groundwork/` |
171
171
  | `aitk:claude-feature` | Before implementation, scan for conflicts and ambiguities |
172
+ | `aitk:decision-escalate` | Batch every open decision that turns on your preference into one set of questions, each with a recommended default |
172
173
  | `aitk:claude-roadmap` | Sequence MVP scope into ordered versions in `.claude/ROADMAP.md` |
173
174
  | `aitk:claude-orchestrate` | Assert the orchestrator role, refill the ready queue, and dispatch the feature, review, and worktree skills |
174
175
  | `aitk:claude-diagram` | Draft per-kind mermaid entries under `.claude/diagrams/` from architecture and code, then verify each rendered image |
@@ -72,6 +72,8 @@ The default path is `base`. `aitk init` on `base` installs base tooling configs,
72
72
 
73
73
  Escalate only for real web apps. The `setup-init` skill reads `package.json` and root configs, then picks the matching tooling stack (`vite-react` today) and the matching governance stack (`react`, `astro`, `node`).
74
74
 
75
+ `node-server` is named rather than detected. It carries the server-side security and persistence rules for a project writing request handlers or a persistence layer in TypeScript, and the detect step matches a runtime or a framework against stack names, so nothing there marks a project as a backend. Pass it deliberately with `aitk init --stack node-server` or `aitk gov install node-server <target>`.
76
+
75
77
  Markdown-heavy projects, CLI tools, docs sites, research notebooks, and scripting repos stay on `base`. Escalation is a ceiling move, not a default.
76
78
 
77
79
  Run `aitk tooling list --json` and `aitk gov list --json` to see the current catalogs. Never hardcode stack names.
@@ -0,0 +1,2 @@
1
+ extends = "node"
2
+ rules = ["360-security-server", "370-database"]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@erclx/aitk",
3
3
  "type": "module",
4
- "version": "0.87.0",
4
+ "version": "0.89.0",
5
5
  "description": "Infrastructure and quality tooling for developer workflows",
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -13,10 +13,10 @@ Reference docs for consistent authoring across the toolkit and target projects.
13
13
  - [Diagram reference](diagrams.md): Shape and content rules for .claude/diagrams/<kind>.md files
14
14
  - [Groundwork reference](groundwork.md): Folder layout, reserved numbering, frontmatter and dating, required file contents, and conventions for a measurement track
15
15
  - [Intake reference](intake.md): Folder layout, reserved index number, frontmatter and dating, the item template, the answer contract, and retrieval
16
- - [Markdown reference](markdown.md): Headings, paragraph and list structure, code spans, punctuation, emphasis, and file references
16
+ - [Markdown reference](markdown.md): Headings, paragraph and list structure, code spans, the date form, punctuation, emphasis, and file references
17
17
  - [Memory reference](memory.md): Filename and type prefix, frontmatter, the body shape per type, links between entries, and the lifecycle from write to retire
18
18
  - [Plan reference](plan.md): Filename and slug, required sections, the suggested-and-answer contract, and the lifecycle from the live folder to the archive
19
- - [Prose reference](prose.md): Voice, language, and frontmatter wording for reference markdown
19
+ - [Prose reference](prose.md): Voice, language, what prose may claim, and frontmatter wording for reference markdown
20
20
  - [Publish reference](publish.md): Scan an author runs against finished text, the cross-reference form each destination takes, and the response to an unreadable source
21
21
  - [Readme reference](readme.md): Readme voice, structure, and content conventions
22
22
  - [Requirements reference](requirements.md): Shape and content rules for .claude/REQUIREMENTS.md
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Markdown reference
3
- description: Headings, paragraph and list structure, code spans, punctuation, emphasis, and file references
3
+ description: Headings, paragraph and list structure, code spans, the date form, punctuation, emphasis, and file references
4
4
  ---
5
5
 
6
6
  # Markdown reference
@@ -9,11 +9,11 @@ Applies to markdown reference docs, READMEs, and inline documentation in repos.
9
9
 
10
10
  ## Scope
11
11
 
12
- Governs the markdown mechanics of every markdown file: headings, paragraph and list structure, code spans and fences, punctuation, emphasis, and file references. It is an attribute standard rather than a document-type one, so it applies over documents whose shape another standard sets, and it carries no template because mechanics are written across every document and have no shape of their own.
12
+ Governs the markdown mechanics of every markdown file: headings, paragraph and list structure, code spans and fences, the form a date takes, punctuation, emphasis, and file references. It is an attribute standard rather than a document-type one, so it applies over documents whose shape another standard sets, and it carries no template because mechanics are written across every document and have no shape of their own.
13
13
 
14
14
  Does not govern:
15
15
 
16
- - Voice, word choice, and the wording of a `title` or `description`: `prose.md`
16
+ - Voice, word choice, what prose may claim, and the wording of a `title` or `description`: `prose.md`
17
17
  - What sections a document has, or what belongs in each: the standard for that document type
18
18
  - The text inside a fenced block, which follows the conventions of its own language rather than these
19
19
  - The scan that applies the punctuation bans to finished text on its way out: `publish.md`
@@ -49,6 +49,10 @@ Does not govern:
49
49
  - Use a language identifier on all fenced code blocks (`markdown`, `typescript`, `plaintext`). Never use a bare ` ``` `
50
50
  - In ASCII tree diagrams, use `←` for inline annotations. Never use `#`.
51
51
 
52
+ ## Dates
53
+
54
+ - Write a date as `YYYY-MM-DD` wherever one appears, in frontmatter, in prose, and in a filename. Never a month name, a slash-separated form, or a two-digit year.
55
+
52
56
  ## Punctuation
53
57
 
54
58
  - Do not use em dashes (`—`) or semicolons (`;`). Rewrite or restructure the sentence to avoid them.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Prose reference
3
- description: Voice, language, and frontmatter wording for reference markdown
3
+ description: Voice, language, what prose may claim, and frontmatter wording for reference markdown
4
4
  ---
5
5
 
6
6
  # Prose reference
@@ -11,11 +11,11 @@ The yield covers voice alone. The language rules below stay in force on every su
11
11
 
12
12
  ## Scope
13
13
 
14
- Governs voice, word choice, and frontmatter wording wherever prose is written. It is an attribute standard rather than a document-type one, so it applies over documents whose shape another standard sets, yields on voice alone where that standard states one, and carries no template because voice is written across every document and has none of its own to shape.
14
+ Governs voice, word choice, what prose may claim about its subject and its sources, and frontmatter wording wherever prose is written. It is an attribute standard rather than a document-type one, so it applies over documents whose shape another standard sets, yields on voice alone where that standard states one, and carries no template because voice is written across every document and has none of its own to shape.
15
15
 
16
16
  Does not govern:
17
17
 
18
- - Headings, list and paragraph structure, code spans, punctuation, emphasis, and file references: `markdown.md`
18
+ - Headings, list and paragraph structure, code spans, the form a date takes, punctuation, emphasis, and file references: `markdown.md`
19
19
  - What sections a document has, or what belongs in each: the standard for that document type
20
20
  - Which frontmatter fields a document carries, which is that standard's own subject. This file governs the wording of a `title` and a `description` and nothing else about them.
21
21
  - Phase-label and semver discipline: `versioning.md`
@@ -44,8 +44,14 @@ Does not govern:
44
44
  - Do not pad verb phrases or delay the action. Write the shortest form (`in order to` → `to`, `ensure that X is set` → `set X`, `By doing X, you can Y` → state Y directly).
45
45
  - Do not address the reader as a participant (`Let's`, `Here's`, `Here are`). State the content directly.
46
46
  - Commit to a position. Do not hedge in clusters (`It might be worth considering`) or use false balance (`While X is true, Y is also important`). Recommend, or state the tradeoff.
47
+ - Do not inflate significance. State what a thing does rather than calling it `a major milestone` or `a turning point for the field`.
48
+ - Do not name a person, company, or product to borrow its authority. Name a source only where the claim turns on who made it.
49
+ - Do not attribute a claim to an unnamed authority (`experts say`, `studies show`, `it is widely believed`). Name the source or cut the claim.
50
+ - Do not introduce a fact, name, date, or citation the source does not carry when rewriting existing text. A rewrite changes wording and never claims.
47
51
 
48
- The character bans sit in `markdown.md` under `## Punctuation` rather than here, because an em dash and a semicolon are typography and these are word choice. A surface applying both reads both files.
52
+ The character bans sit in `markdown.md` under `## Punctuation` rather than here, because an em dash and a semicolon are typography and the bans here reach the words a sentence chooses and the claims it makes. A surface applying both reads both files.
53
+
54
+ Illustrate a pattern ban with a multi-word phrase. An audit reading this section harvests the single lowercase backticked words out of every `- Do not use ` bullet into a literal ban set, so a one-word example bans that word everywhere it appears rather than banning the pattern it stands for. Both the toolkit command and the audit hook a project installs parse that shape, so the constraint holds wherever this file lands.
49
55
 
50
56
  ## Frontmatter descriptions
51
57
 
@@ -36,11 +36,15 @@
36
36
 
37
37
  ## Output
38
38
 
39
- - After creating or modifying a file, include its path on its own line so terminal emulators can make it clickable. Do not paraphrase paths into prose ("the seeds folder", "your CLAUDE.md").
39
+ - After creating or modifying a file, include its path on its own line so the reader can open it. Do not paraphrase paths into prose ("the seeds folder", "your CLAUDE.md").
40
+ - Read `CLAUDE_CODE_ENTRYPOINT` once, at the first response that emits a path, and reuse it for the rest of the session. The surface cannot change mid-session, so a second read only confirms the first.
41
+ - When it reads `claude-desktop`, emit each path as a markdown link carrying the path as its text and an absolute `file://` URI as its target, resolving a relative path against the main project root to build that target. The desktop file tree hides dotted folders, so a bare path into one names a file the reader cannot reach.
42
+ - On every other value, including unset, emit the path bare. A terminal emulator makes it clickable through its own path detection, and link markup defeats that.
43
+ - Both forms govern a path emitted in a response. A path written into a markdown file follows `.claude/standards/markdown.md` instead, which backticks a file reference and never repeats it as a link label.
40
44
  - Use the path the user's editor can resolve. The editor is rooted at the main project root.
41
- - In the main worktree: relative from `pwd` works because `pwd` equals the editor root
45
+ - In the main worktree: relative from `pwd` works because `pwd` equals the editor root.
42
46
  - In a linked worktree (under `.claude/worktrees/<name>/`): use absolute paths. Relative paths from worktree `pwd` would not resolve against the editor's project root.
43
- - When the response covers multiple files, group paths under headers: `**Created:**`, `**Modified:**`, `**Deleted:**`. For single-file changes, the path on its own line is enough.
47
+ - When the response covers multiple files, group paths under headers: `**Created:**`, `**Modified:**`, `**Deleted:**`. Every path under them takes the form the entrypoint selected rather than the first alone. For single-file changes, the path on its own line is enough.
44
48
 
45
49
  ## Key paths
46
50