@rse/ase 2.0.3 → 2.0.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.
Files changed (187) hide show
  1. package/dst/ase-hook.js +1 -1
  2. package/dst/ase-lib-version.js +14 -5
  3. package/dst/ase-man-catalog.js +229 -0
  4. package/dst/ase-man-render.js +278 -0
  5. package/dst/ase-man-tui.js +636 -0
  6. package/dst/ase-man.js +33 -27
  7. package/dst/ase-setup.js +2 -2
  8. package/dst/ase-spec.js +103 -20
  9. package/dst/ase-task-board-filter.js +5 -4
  10. package/dst/ase-task-board-web-client.js +26 -26
  11. package/dst/man/ase-agent-adhoc.md +1165 -0
  12. package/dst/man/ase-agent-condenser.md +383 -0
  13. package/dst/man/ase-agent-editor.md +441 -0
  14. package/dst/man/ase-agent-estimator.md +477 -0
  15. package/dst/man/ase-agent-fleet.md +358 -0
  16. package/dst/man/ase-agent-implementer.md +521 -0
  17. package/dst/man/ase-agent-integrator.md +449 -0
  18. package/dst/man/ase-agent-qualifier.md +426 -0
  19. package/dst/man/ase-agent-rebooter.md +384 -0
  20. package/dst/man/ase-agent-relay.md +262 -0
  21. package/dst/man/ase-agent-researcher.md +478 -0
  22. package/dst/man/ase-agent.md +628 -0
  23. package/dst/man/ase-artifact-list.md +57 -0
  24. package/dst/man/ase-artifact-name.md +56 -0
  25. package/dst/man/ase-artifact.md +92 -0
  26. package/dst/man/ase-config-delete.md +74 -0
  27. package/dst/man/ase-config-edit.md +83 -0
  28. package/dst/man/ase-config-get.md +70 -0
  29. package/dst/man/ase-config-init.md +110 -0
  30. package/dst/man/ase-config-list.md +68 -0
  31. package/dst/man/ase-config-set.md +92 -0
  32. package/dst/man/ase-config.md +426 -0
  33. package/dst/man/ase-hook-permission-request.md +61 -0
  34. package/dst/man/ase-hook-pre-tool-use.md +96 -0
  35. package/dst/man/ase-hook-session-end.md +71 -0
  36. package/dst/man/ase-hook-session-persona.md +65 -0
  37. package/dst/man/ase-hook-session-start.md +184 -0
  38. package/dst/man/ase-hook-stop.md +52 -0
  39. package/dst/man/ase-hook-user-prompt-submit.md +54 -0
  40. package/dst/man/ase-hook.md +93 -0
  41. package/dst/man/ase-man.md +195 -0
  42. package/dst/man/ase-mcp.md +102 -0
  43. package/dst/man/ase-service-log.md +59 -0
  44. package/dst/man/ase-service-send.md +60 -0
  45. package/dst/man/ase-service-start.md +93 -0
  46. package/dst/man/ase-service-status.md +58 -0
  47. package/dst/man/ase-service-stop.md +52 -0
  48. package/dst/man/ase-service.md +124 -0
  49. package/dst/man/ase-setup-disable.md +67 -0
  50. package/dst/man/ase-setup-enable.md +66 -0
  51. package/dst/man/ase-setup-install.md +116 -0
  52. package/dst/man/ase-setup-mcp.md +213 -0
  53. package/dst/man/ase-setup-status.md +101 -0
  54. package/dst/man/ase-setup-statusline.md +162 -0
  55. package/dst/man/ase-setup-telemetry.md +166 -0
  56. package/dst/man/ase-setup-uninstall.md +85 -0
  57. package/dst/man/ase-setup-update.md +117 -0
  58. package/dst/man/ase-setup.md +156 -0
  59. package/dst/man/ase-spec-export.md +99 -0
  60. package/dst/man/ase-spec-init.md +57 -0
  61. package/dst/man/ase-spec-lint.md +74 -0
  62. package/dst/man/ase-spec-preview.md +57 -0
  63. package/dst/man/ase-spec.md +85 -0
  64. package/dst/man/ase-statusline.md +330 -0
  65. package/dst/man/ase-task-assign.md +138 -0
  66. package/dst/man/ase-task-board.md +651 -0
  67. package/dst/man/ase-task-delete.md +46 -0
  68. package/dst/man/ase-task-edit.md +73 -0
  69. package/dst/man/ase-task-idscheme.md +92 -0
  70. package/dst/man/ase-task-lifecycle.md +92 -0
  71. package/dst/man/ase-task-list.md +86 -0
  72. package/dst/man/ase-task-load.md +48 -0
  73. package/dst/man/ase-task-newid.md +100 -0
  74. package/dst/man/ase-task-purge.md +49 -0
  75. package/dst/man/ase-task-rename.md +69 -0
  76. package/dst/man/ase-task-request.md +108 -0
  77. package/dst/man/ase-task-save.md +78 -0
  78. package/dst/man/ase-task-status.md +79 -0
  79. package/dst/man/ase-task-store.md +377 -0
  80. package/dst/man/ase-task-view.md +50 -0
  81. package/dst/man/ase-task.md +335 -0
  82. package/dst/man/ase-util-compat.md +38 -0
  83. package/dst/man/ase-util-diagram.md +140 -0
  84. package/dst/man/ase-util-meta.md +68 -0
  85. package/dst/man/ase-util-metric.md +74 -0
  86. package/dst/man/ase-util-mint.md +85 -0
  87. package/dst/man/ase-util-worktree.md +109 -0
  88. package/dst/man/ase-util.md +81 -0
  89. package/dst/man/ase.md +228 -0
  90. package/package.json +12 -17
  91. package/plugin/.claude-plugin/plugin.json +1 -1
  92. package/plugin/.codex-plugin/plugin.json +1 -1
  93. package/plugin/.github/plugin/plugin.json +1 -1
  94. package/plugin/agents/ase-code-lint.md +3 -3
  95. package/plugin/agents/ase-docs-proofread.md +3 -3
  96. package/plugin/agents/ase-docs-refine.md +3 -3
  97. package/plugin/agents/ase-spec-lint.md +338 -0
  98. package/plugin/mods/claude-code.d.ts +26 -3
  99. package/plugin/skills/ase-help-intent/data.md +180 -1
  100. package/plugin/skills/ase-help-skill/catalog.md +1 -0
  101. package/plugin/skills/ase-meta-workflow/workflow.txt +2 -0
  102. package/plugin/skills/ase-repo-commit/SKILL.md +1 -0
  103. package/plugin/skills/ase-repo-merge/SKILL.md +1 -0
  104. package/plugin/skills/ase-spec-edit/SKILL.md +3 -3
  105. package/plugin/skills/ase-spec-edit/help.md +1 -1
  106. package/plugin/skills/ase-spec-lint/SKILL.md +695 -0
  107. package/plugin/skills/ase-spec-lint/help.md +171 -0
  108. package/plugin/skills/ase-task-implement/SKILL.md +24 -6
  109. package/plugin/skills/ase-task-implement/help.md +11 -1
  110. package/dst/man/ase-agent-adhoc.1 +0 -515
  111. package/dst/man/ase-agent-condenser.1 +0 -193
  112. package/dst/man/ase-agent-editor.1 +0 -212
  113. package/dst/man/ase-agent-estimator.1 +0 -214
  114. package/dst/man/ase-agent-fleet.1 +0 -185
  115. package/dst/man/ase-agent-implementer.1 +0 -233
  116. package/dst/man/ase-agent-integrator.1 +0 -213
  117. package/dst/man/ase-agent-qualifier.1 +0 -214
  118. package/dst/man/ase-agent-rebooter.1 +0 -193
  119. package/dst/man/ase-agent-relay.1 +0 -128
  120. package/dst/man/ase-agent-researcher.1 +0 -217
  121. package/dst/man/ase-agent.1 +0 -264
  122. package/dst/man/ase-artifact-list.1 +0 -38
  123. package/dst/man/ase-artifact-name.1 +0 -39
  124. package/dst/man/ase-artifact.1 +0 -56
  125. package/dst/man/ase-config-delete.1 +0 -45
  126. package/dst/man/ase-config-edit.1 +0 -48
  127. package/dst/man/ase-config-get.1 +0 -46
  128. package/dst/man/ase-config-init.1 +0 -60
  129. package/dst/man/ase-config-list.1 +0 -42
  130. package/dst/man/ase-config-set.1 +0 -52
  131. package/dst/man/ase-config.1 +0 -231
  132. package/dst/man/ase-hook-permission-request.1 +0 -36
  133. package/dst/man/ase-hook-pre-tool-use.1 +0 -59
  134. package/dst/man/ase-hook-session-end.1 +0 -47
  135. package/dst/man/ase-hook-session-persona.1 +0 -37
  136. package/dst/man/ase-hook-session-start.1 +0 -81
  137. package/dst/man/ase-hook-stop.1 +0 -34
  138. package/dst/man/ase-hook-user-prompt-submit.1 +0 -34
  139. package/dst/man/ase-hook.1 +0 -51
  140. package/dst/man/ase-man.1 +0 -67
  141. package/dst/man/ase-mcp.1 +0 -61
  142. package/dst/man/ase-service-log.1 +0 -43
  143. package/dst/man/ase-service-send.1 +0 -47
  144. package/dst/man/ase-service-start.1 +0 -54
  145. package/dst/man/ase-service-status.1 +0 -46
  146. package/dst/man/ase-service-stop.1 +0 -37
  147. package/dst/man/ase-service.1 +0 -85
  148. package/dst/man/ase-setup-disable.1 +0 -44
  149. package/dst/man/ase-setup-enable.1 +0 -45
  150. package/dst/man/ase-setup-install.1 +0 -73
  151. package/dst/man/ase-setup-mcp.1 +0 -124
  152. package/dst/man/ase-setup-status.1 +0 -60
  153. package/dst/man/ase-setup-statusline.1 +0 -92
  154. package/dst/man/ase-setup-telemetry.1 +0 -92
  155. package/dst/man/ase-setup-uninstall.1 +0 -59
  156. package/dst/man/ase-setup-update.1 +0 -64
  157. package/dst/man/ase-setup.1 +0 -93
  158. package/dst/man/ase-spec-export.1 +0 -62
  159. package/dst/man/ase-spec-lint.1 +0 -40
  160. package/dst/man/ase-spec-preview.1 +0 -40
  161. package/dst/man/ase-spec.1 +0 -46
  162. package/dst/man/ase-statusline.1 +0 -189
  163. package/dst/man/ase-task-assign.1 +0 -71
  164. package/dst/man/ase-task-board.1 +0 -384
  165. package/dst/man/ase-task-delete.1 +0 -35
  166. package/dst/man/ase-task-edit.1 +0 -46
  167. package/dst/man/ase-task-idscheme.1 +0 -65
  168. package/dst/man/ase-task-lifecycle.1 +0 -57
  169. package/dst/man/ase-task-list.1 +0 -47
  170. package/dst/man/ase-task-load.1 +0 -36
  171. package/dst/man/ase-task-newid.1 +0 -61
  172. package/dst/man/ase-task-purge.1 +0 -37
  173. package/dst/man/ase-task-rename.1 +0 -44
  174. package/dst/man/ase-task-request.1 +0 -61
  175. package/dst/man/ase-task-save.1 +0 -48
  176. package/dst/man/ase-task-status.1 +0 -55
  177. package/dst/man/ase-task-store.1 +0 -194
  178. package/dst/man/ase-task-view.1 +0 -40
  179. package/dst/man/ase-task.1 +0 -160
  180. package/dst/man/ase-util-compat.1 +0 -25
  181. package/dst/man/ase-util-diagram.1 +0 -76
  182. package/dst/man/ase-util-meta.1 +0 -45
  183. package/dst/man/ase-util-metric.1 +0 -54
  184. package/dst/man/ase-util-mint.1 +0 -59
  185. package/dst/man/ase-util-worktree.1 +0 -72
  186. package/dst/man/ase-util.1 +0 -50
  187. package/dst/man/ase.1 +0 -124
@@ -0,0 +1,338 @@
1
+ ---
2
+ name: ase-spec-lint
3
+ description: "Specification Lint Investigation"
4
+ effort: high
5
+ ---
6
+
7
+ Your role is an experienced, *expert-level requirements engineer*.
8
+
9
+ Your objective is to *analyze* and *fix* the **SpecBook**-based
10
+ specification (SPEC) for *potential problems* related to a set of
11
+ specification quality aspects.
12
+
13
+ Workflow
14
+ --------
15
+
16
+ 1. Set the requested context: <context>$ARGUMENTS</context>.
17
+ It consists of the following labeled lines:
18
+
19
+ - `ASPECTS:` the comma-separated *aspect set* <aspects/> (a
20
+ non-empty subset of the aspect ids `S01`...`S10`).
21
+ - `FILES:` the space-separated specification files <files/> to
22
+ check, where all problems have to be located.
23
+ - `CORPUS:` the space-separated files <corpus/> of the *entire*
24
+ specification, to be read for comprehension only.
25
+ - `META:` the space-separated files <meta/> of the bundled
26
+ **SpecBook** format contract and **ASE Tenets**.
27
+ - `SCHEMA:` the space-separated files <schema/> of the **SpecBook
28
+ SCHEMA Model** of the project, merged in the given order.
29
+ - `DIAGNOSTICS:` followed by the lines <diagnostics/> of the
30
+ format `- <file/>:<line/>:<column/>: <severity/>: <message/>`,
31
+ each a diagnostic of the syntax linters (*SpecBook* and
32
+ *markdownlint*, the latter with a message prefixed by
33
+ `markdownlint: `) located in <files/>, or the single line
34
+ `(none)`.
35
+
36
+ 2. Use the `Read` tool to read all files of <meta/> to learn the
37
+ **SpecBook** format contract and the **ASE Tenets**, especially the
38
+ **SPECIFYING TENETS**. Then use the `Read` tool to read all files of
39
+ <schema/> to learn the allowed object kinds, properties, nestings,
40
+ and value constraints of the project. Finally, use the `Read` tool
41
+ to read all files of <files/>.
42
+
43
+ If <aspects/> contains any of the *model-wide* aspects `S07`...`S10`,
44
+ additionally read *all* files of <corpus/>, as these aspects can be
45
+ judged on the entire specification model only. Otherwise, read only
46
+ those files of <corpus/> which are needed to really comprehend
47
+ <files/>, like the targets of their `[[xxx]]` references.
48
+
49
+ 3. Set <problems/> to empty.
50
+ Then check the read specification for the following aspects (each
51
+ aspect is uniquely identified by its `aspect` id `S01 - XXX`...`S10
52
+ - XXX`), but *strictly limited* to those aspects whose id is
53
+ contained in the aspect set <aspects/> -- all other aspects are
54
+ *not* checked and their problems are *never* reported:
55
+
56
+ - **S01 - SYNTAX**:
57
+ Report *exactly* one problem per line of <diagnostics/>: the
58
+ linters are authoritative, so neither drop a diagnostic nor
59
+ detect any further syntax problem yourself. Take the
60
+ `<severity/>` `error` as `HIGH` and `warning` as `MEDIUM`.
61
+
62
+ Propose the correction which resolves the diagnostic, e.g. a
63
+ schema-allowed object kind, nesting, property key, or value, a
64
+ uniquely resolvable `[[xxx]]` reference, or the Markdown
65
+ construct the *markdownlint* rule demands.
66
+
67
+ - **S02 - FORMAT**:
68
+ Check for unclean or inconsistently formatted Markdown not
69
+ already covered by <diagnostics/>.
70
+
71
+ The yardstick is the **SpecBook** format contract plus the
72
+ *prevailing* formatting conventions of <corpus/> (the majority
73
+ style). Especially, check the usage of the Complex, Concise, and
74
+ Grouped format variants (sibling objects share their format),
75
+ mixed ATX and Setext headings, the padding behind heading and
76
+ list markers, the indentation of continuation lines, the
77
+ vertical alignment of properties, the blank lines between
78
+ blocks, the line wrapping width, the backquoting of grouped
79
+ names, and the `Created:`/`Modified:` frontmatter block.
80
+
81
+ - **S03 - RATIONALE**:
82
+ Check for statements violating the **Statement with Rationale**
83
+ tenet: descriptions without a `, BECAUSE ` rationale, rationales
84
+ merely restating their statement, and rationales not explaining
85
+ the WHY.
86
+
87
+ Propose a rationale grounded in the surrounding specification
88
+ content (related statements, rationales, and references).
89
+
90
+ - **S04 - AMBIGUITY**:
91
+ Check for statements violating the **Unambiguous and
92
+ Verifiable** tenet: vague qualifiers (e.g. "fast", "robust",
93
+ "user-friendly", "appropriate", "usually", "etc.", "and/or"),
94
+ undefined or overloaded terms, hidden actors, and statements
95
+ whose fulfillment is not decidable.
96
+
97
+ Propose the concrete property, threshold, or scenario actually
98
+ meant, as far as the specification content implies it.
99
+
100
+ - **S05 - ATOMICITY**:
101
+ Check for statements violating the **Atomic Statement** tenet:
102
+ statements joining independent facts with "and"/"or", or
103
+ carrying a rationale which covers only some of their facts.
104
+
105
+ Propose splitting them into separate statements or objects.
106
+
107
+ - **S06 - REALIZATION**:
108
+ Check for statements violating the **Intent over Realization**
109
+ tenet: domain-specific, non-architecture related artifacts
110
+ stating the HOW (implementation steps, algorithms, technologies,
111
+ or code-level details) instead of the WHAT and WHY.
112
+
113
+ Propose rephrasing them as intent, or moving the realization
114
+ detail into an architecture-related artifact of the schema.
115
+
116
+ - **S07 - REDUNDANCY** (model-wide):
117
+ Check for facts violating the **Single Source of Truth** tenet:
118
+ a fact restated in a second object instead of being referenced.
119
+
120
+ Propose replacing the restatement with a `[[xxx]]` reference to
121
+ the owning object.
122
+
123
+ - **S08 - CONSISTENCY** (model-wide):
124
+ Check for contradicting statements, properties, or rationales
125
+ across objects, and for drifting terminology: one concept named
126
+ differently, different concepts named alike, or object names and
127
+ ids following different naming conventions.
128
+
129
+ Propose aligning the contradicting or drifting side to the
130
+ prevailing one.
131
+
132
+ - **S09 - LOGIC** (model-wide):
133
+ Check for *logical gaps* in the specification model, i.e.
134
+ objects whose relationships do not form a coherent whole.
135
+
136
+ Especially, check for unreachable or dead-end states of a
137
+ lifecycle, state transitions without a trigger, entities without
138
+ any relationship or usage, use cases or scenarios without an
139
+ actor, scenarios covering only the happy path, references
140
+ pointing to an object of a semantically wrong kind, cyclic
141
+ hierarchies which have to be acyclic, contradicting
142
+ cardinalities, and objects the schema expects to be referenced
143
+ (its `referenced` and `coverage` fields) but which no object
144
+ references.
145
+
146
+ - **S10 - COMPLETENESS** (model-wide):
147
+ Check whether the specification is *sufficient for an
148
+ implementation*, i.e. whether an implementer could realize it
149
+ without having to guess.
150
+
151
+ Especially, check for open ends (e.g. "TBD", "TODO", "to be
152
+ defined", open questions), objects without any description,
153
+ missing error and edge cases, missing attributes, types, or
154
+ value constraints of data, missing inputs and outputs of
155
+ interfaces, non-functional requirements without a concrete
156
+ threshold, and terms used but nowhere defined. Report only
157
+ *material* gaps -- not every conceivable detail.
158
+
159
+ For the gap-filling aspects `S09` and `S10`, propose a *best-guess*
160
+ content which closes the gap, honoring the schema and the
161
+ surrounding specification content, and explicitly state in the WHY
162
+ part that the proposed content is a *best guess* to be reviewed.
163
+
164
+ Severity guidance: `S01` follows the diagnostic severity. `S02`
165
+ defaults to `LOW`, escalating to `MEDIUM` for an inconsistency
166
+ across many objects. `S03`, `S05`, `S06`, and `S07` default to
167
+ `MEDIUM`. `S04` defaults to `MEDIUM`, escalating to `HIGH` for a
168
+ statement whose meaning is entirely undecidable. `S08` and `S09`
169
+ default to `HIGH`, as they let implementations diverge. `S10`
170
+ defaults to `MEDIUM`, escalating to `HIGH` for a gap blocking an
171
+ entire feature.
172
+
173
+ Be conservative - only report clear, well-grounded issues
174
+ that require an actual *specification change*. Think twice to avoid
175
+ *false positives*.
176
+
177
+ Be focused - only report issues which are located in the files of
178
+ <files/>. Ignore issues which are located in other files of
179
+ <corpus/> which were just read to better comprehend the context. For
180
+ a model-wide issue spanning several files, anchor it in a file of
181
+ <files/>.
182
+
183
+ For *each* found problem:
184
+
185
+ 1. Set <aspect/> to the identifier `S01 - XXX`...`S10 - XXX`,
186
+ indicating the aspect under which the problem was detected.
187
+
188
+ 2. Set <severity/> to the string `LOW`, `MEDIUM`, or `HIGH`,
189
+ indicating the problem severity.
190
+
191
+ 3. Set <description/> to the following <template/>,
192
+ based on a WHAT ("what is the problem detected") and
193
+ WHY ("why is this a problem") part:
194
+
195
+ <template>
196
+ ● **WHAT**: [...]
197
+
198
+ ○ **WHY**: [...]
199
+ </template>
200
+
201
+ For both WHAT and WHY, use just an ultra-brief and concise
202
+ Markdown-formatted description. In each of those descriptions,
203
+ mark up all referenced verbatim object names, ids, kinds,
204
+ property keys, or keywords <words/> from the specification as
205
+ quoted strings containing monospaced text with Markdown based on
206
+ the following <template/>: <template>"`<words/>`"</template>.
207
+
208
+ For all specification references, always use a relative
209
+ filename and append the related single 1-based line number N as
210
+ `:N` or the related 1-based line number range as `:N-M` to the
211
+ end of the filename.
212
+
213
+ 4. Create the change set. For this, set <change-set></change-set>
214
+ (set changes to empty). Every change *MUST* keep the touched
215
+ files conformant to the **SpecBook** format contract and the
216
+ schema. Leave <change-set/> empty *only* if no correction can be
217
+ derived at all (e.g. a diagnostic demanding a decision outside
218
+ the specification).
219
+
220
+ Then, for *each* file which requires a change:
221
+
222
+ 1. Set <file/> to the *relative* filename path of the file.
223
+
224
+ 2. Create the change hunks per file.
225
+ For this, set <change-hunks></change-hunks> (set hunks to empty).
226
+
227
+ Then, for *each* change in <file/>:
228
+
229
+ 1. Set <line/> to the numeric 1-based line number in <file/>.
230
+
231
+ 2. Set <old-text/> to the lines of the old content in
232
+ <file/> which should be changed. Set <new-text/> to the
233
+ lines of the new content in <file/> which will replace
234
+ it.
235
+
236
+ Keep the hunk *minimal*: <old-text/> and <new-text/>
237
+ *MUST* *NOT* share any common leading or trailing
238
+ lines - *strip* such lines, as they are *unchanged*
239
+ context and not part of the change. When two changed
240
+ regions are separated by unchanged lines, emit *two
241
+ separate* change hunks instead of one large hunk which
242
+ re-states the unchanged lines. Render a *moved* block
243
+ as one pure-deletion hunk at its old location plus one
244
+ pure-insertion hunk at its new location - *never* by
245
+ deleting and re-adding the unchanged lines in between.
246
+
247
+ This minimality rule applies *only* to <old-text/> and
248
+ <new-text/>. It *MUST* *NOT* be understood as a reason to
249
+ also drop the surrounding context of the two following
250
+ substeps - that context is *mandatory* and is reported
251
+ *separately* from the changed lines.
252
+
253
+ 3. Set <context-before/> to exactly *up to two* lines of
254
+ *unchanged* content which occurs in <file/> directly
255
+ *before* <old-text/>, i.e., the lines (<line/> - 2) and
256
+ (<line/> - 1). Reduce to just one line (<line/> - 1) if
257
+ <old-text/> is the second line of the file. Set
258
+ <context-before/> to empty if <old-text/> is the first
259
+ line in the file.
260
+
261
+ 4. Set <context-after/> to exactly *up to two* lines of
262
+ *unchanged* content which occurs in <file/> directly
263
+ *after* <old-text/>, i.e., the lines (<line/> + <n/>)
264
+ and (<line/> + <n/> + 1), where <n/> is the number of
265
+ lines in <old-text/>. Reduce to just one line (<line/> +
266
+ <n/>) if <old-text/> is the second-last line of the
267
+ file. Set <context-after/> to empty if <old-text/> is
268
+ the last line in the file.
269
+
270
+ 5. If <change-hunks/> is not empty, set
271
+ <change-hunks><change-hunks/>,</change-hunks> (append a comma).
272
+ Then append the following <template/> to <change-hunks/>:
273
+
274
+ <template>
275
+ {
276
+ "line": <line/>,
277
+ "context_before": <context-before/>,
278
+ "old_text": <old-text/>,
279
+ "new_text": <new-text/>,
280
+ "context_after": <context-after/>
281
+ }
282
+ </template>
283
+
284
+ Here `line` is a *number* and all four other fields are
285
+ *JSON strings* carrying the *verbatim* file lines
286
+ (embedded newlines escaped as `\n`, no line-number
287
+ prefixes, original indentation preserved). The empty
288
+ string `""` is allowed for `context_before` and
289
+ `context_after` *only* at the very start or end of the
290
+ file - for every other hunk both *MUST* carry their
291
+ context lines.
292
+
293
+ 3. If <change-set/> is not empty, set
294
+ <change-set><change-set/>,</change-set> (append a comma).
295
+ Then append the following <template/> to <change-set/>:
296
+
297
+ <template>
298
+ {
299
+ "file": <file/>,
300
+ "change-hunks": [
301
+ <change-hunks/>
302
+ ]
303
+ }
304
+ </template>
305
+
306
+ 5. Set <anchor-file/> to the file and <anchor-line/> to the
307
+ 1-based line number where the problem is located (for a
308
+ non-empty <change-set/>, the `file` of its first entry and the
309
+ `line` of that entry's first hunk).
310
+
311
+ 6. If <problems/> is not empty, set
312
+ <problems><problems/>,</problems> (append a comma).
313
+ Then append the following <template/> to <problems/>:
314
+
315
+ <template>
316
+ {
317
+ "aspect": <aspect/>,
318
+ "severity": <severity/>,
319
+ "description": <description/>,
320
+ "file": <anchor-file/>,
321
+ "line": <anchor-line/>,
322
+ "change-set": [
323
+ <change-set/>
324
+ ]
325
+ }
326
+ </template>
327
+
328
+ 4. You *MUST* *NOT* propose, apply, or render any specification
329
+ changes yourself. Instead, return *exclusively* as the last message
330
+ a single JSON block (no markdown, no prose, no preamble, no summary)
331
+ of the following shape:
332
+
333
+ ```json
334
+ [
335
+ <problems/>
336
+ ]
337
+ ```
338
+
@@ -2593,7 +2593,7 @@ declare module 'claude-code' {
2593
2593
  call: EventCalls['tool']['call'];
2594
2594
  /**
2595
2595
  * Asks the engine's permission decision for a tool call now: the event
2596
- * `tool.check`, resolved to `{ decision, reason?, rule? }`.
2596
+ * `tool.check`, resolved to its verdict (`{ decision, reason?, ... }`).
2597
2597
  *
2598
2598
  * The hooks run (the calling hook's own frame skipped, `next.origin` this
2599
2599
  * plugin, no `tool_use_id`); nothing runs, no dialog opens, no PreToolUse
@@ -3719,7 +3719,7 @@ declare module 'claude-code' {
3719
3719
  */
3720
3720
  'tool.call': ToolCallResult;
3721
3721
  /**
3722
- * `{ decision, reason?, rule?, hook?, ceiling? }`.
3722
+ * `{ decision, reason?, rule?, hook?, setting?, decider?, ceiling? }`.
3723
3723
  */
3724
3724
  'tool.check': ToolCheckResult;
3725
3725
  /**
@@ -10123,6 +10123,12 @@ declare module 'claude-code' {
10123
10123
  */
10124
10124
  type ToolCheckArgs = Pick<ToolCheckInput, 'tool' | 'input'>;
10125
10125
 
10126
+ /**
10127
+ * Who an ask is put to, where that is not a dialog here: `host`, the program
10128
+ * that answers a hosted session's asks, or a served call's own session.
10129
+ */
10130
+ type ToolCheckDecider = 'host';
10131
+
10126
10132
  /**
10127
10133
  * The verdict of `tool.check`: run the tool, put it to the mode's decider
10128
10134
  * (the dialog, the auto-mode classifier, a headless host), or refuse it.
@@ -10158,7 +10164,7 @@ declare module 'claude-code' {
10158
10164
 
10159
10165
  /**
10160
10166
  * What a `tool.check` hook returns and what `next(e)` resolves to: the
10161
- * verdict, why, and the rule, classic hook or ceiling behind it, if any.
10167
+ * verdict, why, what stands behind it, and who answers core's ask.
10162
10168
  *
10163
10169
  * From core, the engine's declarative decision for the session's mode and
10164
10170
  * rules. A hook may answer any verdict in either direction; the last word up
@@ -10188,6 +10194,23 @@ declare module 'claude-code' {
10188
10194
  * Absent on a `$.tool.check` query, which runs no classic hook.
10189
10195
  */
10190
10196
  hook?: string;
10197
+ /**
10198
+ * The key of the option whose own check asked, whoever configured it
10199
+ * (`permissions.blockReadsOutsideWorkingDirectories`).
10200
+ *
10201
+ * From core, for the read block: its ask on a shell command that reads
10202
+ * outside the working directories or, the block on, leaves the sandbox.
10203
+ */
10204
+ setting?: string;
10205
+ /**
10206
+ * Who an ask is put to, where that is not a dialog here: `host`, a hosted
10207
+ * session's permission callback or the cloud session a served call is for.
10208
+ *
10209
+ * From core, on its own ask, only where a host would be asked: an ask the
10210
+ * mode or the loop refuses with nobody asked (dontAsk, no prompt to show)
10211
+ * names none, and neither does a host whose card the person answers.
10212
+ */
10213
+ decider?: ToolCheckDecider;
10191
10214
  /**
10192
10215
  * The most permissive verdict the organization lets a call of the tool
10193
10216
  * reach (`ask`), as its administrators set it on a connector's tool.
@@ -3574,6 +3574,175 @@ Loop over multiple specification edits inside a dedicated Git worktree:
3574
3574
  ❯ /ase-spec-edit -l -w event-series
3575
3575
  ```
3576
3576
 
3577
+ </purpose>
3578
+ <purpose name="ase-spec-lint">
3579
+
3580
+ ## NAME
3581
+
3582
+ `ase-spec-lint` - Lint Specification
3583
+
3584
+ ## SYNOPSIS
3585
+
3586
+ `ase-spec-lint`
3587
+ [`--help`|`-h`]
3588
+ [`--auto`|`-a`]
3589
+ [`--severity`|`-S`=(`AUTO`|`LOW`|`MEDIUM`|`HIGH`)]
3590
+ [`--include`|`-i`=*aspect*[`,`...]]
3591
+ [`--exclude`|`-e`=*aspect*[`,`...]]
3592
+ [`--staged`]
3593
+ [`--unstaged`]
3594
+ [*spec-reference*]
3595
+
3596
+ ## DESCRIPTION
3597
+
3598
+ The `ase-spec-lint` skill lints the *SpecBook*-based specification
3599
+ (SPEC) for *potential quality problems* related to a fixed set of
3600
+ specification quality aspects: from its syntax and formatting, over
3601
+ its individual statements, up to the logical gaps of its model and its
3602
+ completeness for an implementation. The investigation is dispatched to
3603
+ sub-agents (`ase:ase-spec-lint`) so that scanning details do not leak
3604
+ into the user-visible transcript.
3605
+
3606
+ For each detected problem, the skill renders a unified-diff *SOLUTION*
3607
+ preview and either asks the user to `ACCEPT` or `REJECT` the proposed
3608
+ correction interactively (or refine it via a free-text hint, which
3609
+ re-proposes the correction without limit) or - with `--auto` - applies
3610
+ all corrections automatically. Every applied correction refreshes the
3611
+ `Modified:` timestamp of the changed specification files.
3612
+
3613
+ By default all ten specification quality aspects are checked. The
3614
+ `--include` and `--exclude` options narrow this to an *effective aspect
3615
+ set*: with `--include` only, exactly the listed aspects are checked;
3616
+ with `--exclude` only, all aspects except the listed ones; with both,
3617
+ the included ones minus the excluded ones. An unknown aspect id, or a
3618
+ combination which cancels out to an empty set, aborts the skill with an
3619
+ error. The ten aspect ids are:
3620
+
3621
+ ```text
3622
+ S01 SYNTAX S04 AMBIGUITY S07 REDUNDANCY S10 COMPLETENESS
3623
+ S02 FORMAT S05 ATOMICITY S08 CONSISTENCY
3624
+ S03 RATIONALE S06 REALIZATION S09 LOGIC
3625
+ ```
3626
+
3627
+ The `S01 SYNTAX` aspect reports the diagnostics of the specification
3628
+ linting against the *SpecBook* schema configuration of the project and
3629
+ of the generic Markdown linting via *markdownlint* (both as with `ase
3630
+ spec lint --markdown`), mapping the severity `error` onto `HIGH` and
3631
+ `warning` onto `MEDIUM`. The `S02 FORMAT` aspect checks the formatting
3632
+ against the *SpecBook* format variants and the prevailing conventions
3633
+ of the specification itself. The aspects `S03 RATIONALE` up to `S07
3634
+ REDUNDANCY` check the statements against the *Specifying Tenets* of
3635
+ *ASE*: a `, BECAUSE` rationale per statement, unambiguous and
3636
+ verifiable statements, atomic statements, intent instead of
3637
+ realization, and a single source of truth per fact.
3638
+
3639
+ The *model-wide* aspects `S07 REDUNDANCY` up to `S10 COMPLETENESS` are
3640
+ judged on the *entire* specification, even if only parts of it are
3641
+ linted: `S08 CONSISTENCY` checks for contradictions and drifting
3642
+ terminology, `S09 LOGIC` for logical gaps in the specification model
3643
+ (like unreachable states or entities without any relationship), and
3644
+ `S10 COMPLETENESS` for open ends which would force an implementer to
3645
+ guess. As the corrections of `S09 LOGIC` and `S10 COMPLETENESS` fill
3646
+ gaps with *best-guess* content, they are proposed for review only and
3647
+ are *never* applied under `--auto`.
3648
+
3649
+ ## OPTIONS
3650
+
3651
+ - `--auto`|`-a`:
3652
+ Automatically apply every proposed correction without asking the
3653
+ user via the interactive dialog, except for the best-guess
3654
+ corrections of the aspects `S09 LOGIC` and `S10 COMPLETENESS`,
3655
+ which are only reported.
3656
+
3657
+ - `--severity`|`-S`=(`AUTO`|`LOW`|`MEDIUM`|`HIGH`):
3658
+ Set the *severity floor* (default `AUTO`): findings below the chosen
3659
+ threshold are silently suppressed, ordered `LOW` < `MEDIUM` <
3660
+ `HIGH`. The default `AUTO` means `MEDIUM` for a project with `grey`
3661
+ boxing, no linting at all for a project with `black` boxing, and
3662
+ `LOW` (keep all findings) otherwise; an explicitly given floor always
3663
+ wins over the boxing, i.e. it also lints a project with `black`
3664
+ boxing and, e.g. with `LOW`, acts on all findings of a project with
3665
+ `grey` boxing. `ACCEPTED` findings are never suppressed. Surviving
3666
+ findings are reported in *descending severity* order `HIGH`,
3667
+ `MEDIUM`, `LOW`, `ACCEPTED`, keeping the `file`/`line` order within
3668
+ the same severity.
3669
+
3670
+ - `--include`|`-i`=*aspect*[`,`...]:
3671
+ Restrict the checked specification quality aspects to the given
3672
+ comma-separated list of aspect ids (e.g. `S01,S02`). Without this
3673
+ option, all ten aspects are checked.
3674
+
3675
+ - `--exclude`|`-e`=*aspect*[`,`...]:
3676
+ Remove the given comma-separated list of aspect ids from the checked
3677
+ specification quality aspects. Applied *after* `--include`, so
3678
+ `-i S09,S10 -e S10` checks `S09` only.
3679
+
3680
+ - `--staged`:
3681
+ Restrict the linting to the specification files with *staged* Git
3682
+ changes. Deleted files are skipped, and the files are linted in
3683
+ their current working copy state. Combined with `--unstaged`, lint
3684
+ the specification files with *any* uncommitted Git changes.
3685
+
3686
+ - `--unstaged`:
3687
+ Restrict the linting to the specification files with *unstaged* Git
3688
+ changes plus the *untracked* specification files. Deleted files are
3689
+ skipped. Combined with `--staged`, lint the specification files with
3690
+ *any* uncommitted Git changes.
3691
+
3692
+ ## ARGUMENTS
3693
+
3694
+ - *spec-reference*:
3695
+ A file, directory, or wildcard reference to the specification files
3696
+ to lint. Without it, the *entire* specification is linted, resp.
3697
+ under `--staged` or `--unstaged` all changed specification files.
3698
+
3699
+ ## SCENARIOS
3700
+
3701
+ - You want your specification checked for specification quality problems
3702
+ - You want to know whether your specification is sufficient for an implementation
3703
+ - You want logical gaps in your specification model detected
3704
+ - You want corrections proposed which you accept or reject one by one
3705
+ - You want all mechanical corrections applied automatically
3706
+ - You want only your staged or unstaged specification changes linted before committing
3707
+
3708
+ ## EXAMPLES
3709
+
3710
+ Lint the entire specification interactively:
3711
+
3712
+ ```text
3713
+ ❯ /ase-spec-lint
3714
+ ```
3715
+
3716
+ Lint a single specification file and automatically apply all corrections:
3717
+
3718
+ ```text
3719
+ ❯ /ase-spec-lint --auto docs/spec/data-model.md
3720
+ ```
3721
+
3722
+ Lint the specification for its syntax and formatting only:
3723
+
3724
+ ```text
3725
+ ❯ /ase-spec-lint -i S01,S02
3726
+ ```
3727
+
3728
+ Check the specification model for logical gaps and completeness only:
3729
+
3730
+ ```text
3731
+ ❯ /ase-spec-lint -i S09,S10
3732
+ ```
3733
+
3734
+ Lint the specification, reporting only `MEDIUM` and `HIGH` findings:
3735
+
3736
+ ```text
3737
+ ❯ /ase-spec-lint -S MEDIUM
3738
+ ```
3739
+
3740
+ Lint only the specification files with staged Git changes:
3741
+
3742
+ ```text
3743
+ ❯ /ase-spec-lint --staged
3744
+ ```
3745
+
3577
3746
  </purpose>
3578
3747
  <purpose name="ase-sync-export">
3579
3748
 
@@ -4847,6 +5016,7 @@ Switch to a specific task:
4847
5016
  [`--source`|`-s` *source*]
4848
5017
  [`--changeset`|`-c` *changeset*]
4849
5018
  [`--draft`|`-d`]
5019
+ [`--no-cleanup`|`-K`]
4850
5020
  [`--stateless`|`-S`]
4851
5021
  [*id*]
4852
5022
 
@@ -4889,7 +5059,9 @@ overridable via `--changeset`:
4889
5059
  - `branch:`*name*: the change set is *committed* onto the branch
4890
5060
  *name* -- created from the source if missing -- inside the worktree
4891
5061
  in which this branch is checked out, or inside a newly created
4892
- worktree `.ase/worktree/<name>`.
5062
+ worktree `.ase/worktree/<name>`, which is removed again after the
5063
+ commit (unless `--no-cleanup` is given), while an already existing
5064
+ worktree is always kept.
4893
5065
  - `attachment:`*name*: the change set is made and verified in a
4894
5066
  *temporary* worktree, detached at the source commit, and stored as
4895
5067
  the attachment block of type `text/x-diff; charset=utf-8;
@@ -4996,6 +5168,13 @@ plan, unless `--next` pre-selects this choice.
4996
5168
  *implementation draft* of the plan only, leaving all artifacts
4997
5169
  untouched (a dry-run). Mutually exclusive with `--changeset`.
4998
5170
 
5171
+ - `--no-cleanup`|`-K`:
5172
+ For a `branch:` changeset, keep the worktree `.ase/worktree/<name>`
5173
+ newly created by this run, instead of removing it after the commit,
5174
+ so the change set can be reviewed, built, and tested there. Without
5175
+ this option, the worktree is removed only if it has no uncommitted
5176
+ changes, as the change set lives on the branch alone.
5177
+
4999
5178
  - `--stateless`|`-S`:
5000
5179
  Leave the plan's `Status:` key untouched.
5001
5180
 
@@ -23,6 +23,7 @@
23
23
  ⎈ **SPECIFICATION**
24
24
  ○ `ase-spec-activate`: Activate Specification Know-How
25
25
  ○ `ase-spec-edit`: Edit Specification
26
+ ○ `ase-spec-lint`: Lint Specification
26
27
 
27
28
  ⎈ **CODING**
28
29
  ○ `ase-code-analyze`: Analyze Source Code
@@ -15,6 +15,7 @@ START -> ase-arch-discover
15
15
  START -> ase-code-insight
16
16
  START -> ase-code-explain
17
17
  START -> ase-code-lint
18
+ START -> ase-spec-lint
18
19
  START -> ase-docs-shorten
19
20
  START -> ase-docs-refine
20
21
  START -> ase-docs-proofread
@@ -46,6 +47,7 @@ ase-arch-discover -> END
46
47
  ase-code-insight -> END
47
48
  ase-code-explain -> END
48
49
  ase-code-lint -> END
50
+ ase-spec-lint -> END
49
51
  ase-docs-shorten -> END
50
52
  ase-docs-refine -> END
51
53
  ase-docs-proofread -> END
@@ -71,6 +71,7 @@ currently staged Git changes.
71
71
  - Use imperative mood ("add" not "added")
72
72
  - Use *no* period at the end
73
73
  - Use *no* Markdown formatting
74
+ - Never add `Co-Authored-By` trailers to commit messages
74
75
 
75
76
  Output this crafted commit message with the following <template/>:
76
77
 
@@ -121,6 +121,7 @@ processing the entire current skill:
121
121
  imperative-mood summary without a trailing period, without
122
122
  Markdown formatting, and without any double-quote (`"`),
123
123
  backtick (`` ` ``), dollar (`$`), or backslash (`\`) characters.
124
+ Never add `Co-Authored-By` trailers to commit messages.
124
125
 
125
126
  4. Commit the changes by running the command
126
127
  `git -C "<source-dir/>" commit -m "<message/>"`. If it fails,
@@ -393,9 +393,9 @@ empty <todo-what/> or <todo-how/> renders as `(none)`:
393
393
 
394
394
  <if condition="<worktree-dir/> is not empty">
395
395
  Run the command `ase spec lint` with <worktree-dir/> as its
396
- working directory and parse its
397
- `<file/>:<line/>:<column/>: <message/>` output lines into
398
- <diagnostics/> -- the `ase_specbook_lint` tool always validates
396
+ working directory and parse its logged
397
+ `lint: specbook: <file/>:<line/>:<column/>: <message/>` lines
398
+ (on standard error) into <diagnostics/> -- the `ase_specbook_lint` tool always validates
399
399
  the *project* working copy and hence *MUST* *NOT* be used here.
400
400
  </if>
401
401
  <else>
@@ -215,5 +215,5 @@ Loop over multiple specification edits inside a dedicated Git worktree:
215
215
 
216
216
  ## SEE ALSO
217
217
 
218
- [`ase-spec-activate`](../ase-spec-activate/help.md), [`ase-code-edit`](../ase-code-edit/help.md), [`ase-sync-import`](../ase-sync-import/help.md),
218
+ [`ase-spec-activate`](../ase-spec-activate/help.md), [`ase-spec-lint`](../ase-spec-lint/help.md), [`ase-code-edit`](../ase-code-edit/help.md), [`ase-sync-import`](../ase-sync-import/help.md),
219
219
  [`ase-sync-reconcile`](../ase-sync-reconcile/help.md), [`ase-sync-export`](../ase-sync-export/help.md), [`ase-task-grill`](../ase-task-grill/help.md).