@rse/ase 0.9.61 → 0.9.63

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 (37) hide show
  1. package/dst/ase-artifact.js +19 -8
  2. package/dst/ase-config.js +12 -8
  3. package/dst/ase-hook.js +8 -0
  4. package/dst/ase-service.js +2 -0
  5. package/dst/ase-spec.js +241 -0
  6. package/dst/ase.js +2 -0
  7. package/package.json +10 -8
  8. package/plugin/.claude-plugin/plugin.json +1 -1
  9. package/plugin/.codex-plugin/plugin.json +1 -1
  10. package/plugin/.github/plugin/plugin.json +1 -1
  11. package/plugin/agents/ase-code-lint.md +47 -3
  12. package/plugin/etc/stx.conf +5 -3
  13. package/plugin/meta/ase-common-grill.md +89 -0
  14. package/plugin/meta/ase-dialog.md +6 -0
  15. package/plugin/meta/ase-format-meta.md +23 -105
  16. package/plugin/meta/ase-format-spec.md +22 -1326
  17. package/plugin/meta/ase-tenets.md +63 -4
  18. package/plugin/package.json +6 -2
  19. package/plugin/skills/ase-arch-analyze/SKILL.md +1 -1
  20. package/plugin/skills/ase-code-analyze/SKILL.md +1 -1
  21. package/plugin/skills/ase-code-analyze/help.md +2 -1
  22. package/plugin/skills/ase-code-edit/SKILL.md +142 -140
  23. package/plugin/skills/ase-code-lint/SKILL.md +5 -5
  24. package/plugin/skills/ase-code-lint/help.md +23 -8
  25. package/plugin/skills/ase-help-skill/catalog.md +3 -0
  26. package/plugin/skills/ase-meta-review/help.md +1 -1
  27. package/plugin/skills/ase-spec-edit/SKILL.md +520 -0
  28. package/plugin/skills/ase-spec-edit/help.md +130 -0
  29. package/plugin/skills/ase-sync-export/SKILL.md +57 -116
  30. package/plugin/skills/ase-sync-export/help.md +30 -42
  31. package/plugin/skills/ase-sync-import/SKILL.md +37 -15
  32. package/plugin/skills/ase-sync-import/help.md +14 -10
  33. package/plugin/skills/ase-sync-reconcile/SKILL.md +37 -16
  34. package/plugin/skills/ase-sync-reconcile/help.md +19 -16
  35. package/plugin/skills/ase-task-grill/SKILL.md +120 -59
  36. package/plugin/skills/ase-task-grill/help.md +42 -12
  37. package/plugin/meta/ase-format-arch.md +0 -1164
@@ -1,17 +1,13 @@
1
1
  ---
2
2
  name: ase-sync-export
3
- argument-hint: "[--help|-h] [--source|-s <source>[,...]] [<hint>]"
3
+ argument-hint: "[--help|-h] [--output|-o <output>[,...]]"
4
4
  description: >
5
- Export artifact content into side-by-side, ready-to-consume files,
6
- one per artifact that declares an export. Use when the user wants to
7
- "export", "render", or "materialize" artifacts like SPEC or ARCH into
8
- derived files such as diagrams or tables.
5
+ Export the SpecBook-based specification (SPEC) into ready-to-consume
6
+ renderings like HTML, PDF, normalized Markdown, or JSON. Use when the
7
+ user wants to "export", "render", or "materialize" the specification.
9
8
  user-invocable: true
10
9
  disable-model-invocation: false
11
10
  effort: xhigh
12
- allowed-tools:
13
- - "Read"
14
- - "Write"
15
11
  ---
16
12
 
17
13
  @${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
@@ -19,174 +15,119 @@ allowed-tools:
19
15
  @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
20
16
 
21
17
  <purpose name="ase-sync-export">
22
- Export Artifact Set to Side-by-Side Files
18
+ Export Specification into Rendered Files
23
19
  </purpose>
24
20
 
25
21
  <expand name="getopt"
26
22
  arg1="ase-sync-export"
27
- arg2="--source|-s=SPEC,ARCH">
23
+ arg2="--output|-o=">
28
24
  $ARGUMENTS
29
25
  </expand>
30
26
 
31
27
  <objective>
32
- *Export* the *source* artifact kinds (optionally filtered by
33
- <hint/>) into side-by-side files, by reading the source artifacts
34
- and materializing, for every artifact that declares an export,
35
- the corresponding derived file next to the artifact itself.
36
- <hint><getopt-arguments/></hint>.
28
+ *Export* the `SPEC` artifact set -- the SpecBook-based specification --
29
+ into the requested output files, by validating the specification and
30
+ rendering it through the SpecBook export.
37
31
  </objective>
38
32
 
39
33
  @${CLAUDE_SKILL_DIR}/../../meta/ase-format-meta.md
40
- @${CLAUDE_SKILL_DIR}/../../meta/ase-format-spec.md
41
- @${CLAUDE_SKILL_DIR}/../../meta/ase-format-arch.md
42
34
 
43
35
  Procedure
44
36
  ---------
45
37
 
46
38
  <flow>
47
39
 
48
- 1. <step id="STEP 1: Determine Source">
40
+ 1. <step id="STEP 1: Determine Outputs">
49
41
 
50
- 1. The recognized artifact kinds are the seven tokens `TASK`,
51
- `SPEC`, `ARCH`, `CODE`, `DOCS`, `INFR`, and `OTHR`. Parse
52
- <getopt-option-source/> as the comma-separated <source/> kind list.
53
- Upper-case and trim every parsed kind token. Do not output
54
- anything.
42
+ 1. Parse <getopt-option-output/> as the comma-separated <outputs/>
43
+ list of `[<format>:]<file>` entries, with <format/> one of
44
+ `json`, `json5`, `yaml`, `toon`, `html`, `pdf`, or `md`, and
45
+ <file/> a project-relative output file path. Trim every parsed
46
+ entry. Do not output anything.
55
47
 
56
- 2. <if condition="<source/> is empty">
48
+ 2. <if condition="<outputs/> is empty">
57
49
 
58
- Only output the following <template/> and then immediately *STOP*
59
- processing the entire current skill:
60
-
61
- <template>
62
- ⧉ **ASE**: ☻ skill: **ase-sync-export**, ▶ ERROR: empty source artifact list
63
- </template>
50
+ Determine the default output by calling the
51
+ `ase_artifact_name(filename: "index.html", kind: "spec")` tool
52
+ of the `ase` MCP server and set <outputs/> to the single entry
53
+ of its returned `name`. Do not output anything.
64
54
 
65
55
  </if>
66
56
 
67
- 3. If any token in <source/> is *not* one of the seven recognized
68
- kinds, only output the following <template/> (with <kind/> set to
69
- the first offending token) and then immediately *STOP* processing
70
- the entire current skill:
57
+ 3. If any entry in <outputs/> is `-` (the standard output sentinel),
58
+ only output the following <template/> and then immediately *STOP*
59
+ processing the entire current skill:
71
60
 
72
61
  <template>
73
- ⧉ **ASE**: ☻ skill: **ase-sync-export**, ▶ ERROR: unknown artifact kind: **<kind/>**
62
+ ⧉ **ASE**: ☻ skill: **ase-sync-export**, ▶ ERROR: output `-` is not supported -- give an output file
74
63
  </template>
75
64
 
76
- 4. Report the resolved source with the following <template/>:
65
+ 4. Report the resolved outputs with the following <template/>:
77
66
 
78
67
  <template>
79
- <ase-tpl-bullet-signal/> **SOURCE**: <source/>
68
+ <ase-tpl-bullet-signal/> **OUTPUTS**: <outputs/>
80
69
  </template>
81
70
 
82
71
  </step>
83
72
 
84
- 2. <step id="STEP 2: Resolve and Read Artifacts">
73
+ 2. <step id="STEP 2: Validate Specification">
85
74
 
86
- 1. Do not output anything in this STEP 2.
75
+ 1. Call the `ase_specbook_lint()` tool of the `ase` MCP server
76
+ *once* and read its returned `diagnostics` array of `{ file,
77
+ line, column, message }` objects. Do not output anything.
87
78
 
88
- 2. For all kinds in <source/> except `TASK`, call the
89
- `ase_artifact_list(kind: [ ... ])` tool of the `ase` MCP server
90
- *once*, passing the lower-cased `kind` tokens, and read the
91
- returned `artifacts` array of `{ kind, files }` objects to obtain
92
- the project-relative file list per kind. The `TASK` kind is *not*
93
- resolvable via `ase_artifact_list` (task plans are managed by the
94
- `ase_task_*` tools) and declares no export, so *silently skip* it.
79
+ 2. <if condition="<diagnostics/> is not empty">
95
80
 
96
- 3. <if condition="<hint/> is not empty">
81
+ Only output the following <template/> (listing one bullet line
82
+ per diagnostic), give the closing hint by expanding the
83
+ `<ase-tpl-hint/>` below it, and then immediately *STOP*
84
+ processing the entire current skill:
97
85
 
98
- Honor the filtering <hint/> to reduce the source artifacts
99
- and/or the aspects of those artifacts you should take into
100
- account.
86
+ <template>
87
+ **ASE**: skill: **ase-sync-export**, ERROR: specification invalid -- nothing exported
101
88
 
102
- </if>
89
+ - `<file/>:<line/>:<column/>`: <message/>
90
+ [...]
91
+ </template>
103
92
 
104
- 4. Internalize and honor the artifact-format conventions:
93
+ <ase-tpl-hint level="minimal">
94
+ Fix the reported diagnostics in the `SPEC` artifacts (e.g. via `/ase-sync-reconcile -t SPEC`), then re-run this skill.
95
+ </ase-tpl-hint>
105
96
 
106
- - the artifact-set/artifact/aspect/export meta information (`ase-format-meta.md`),
107
- - the `SPEC` format (`ase-format-spec.md`),
108
- - the `ARCH` format (`ase-format-arch.md`).
97
+ </if>
109
98
 
110
- In particular, internalize the generic *Artifact Export*
111
- contract of `ase-format-meta.md` (the `- Export:` bullet, the
112
- side-by-side file-name convention, and the rule that an artifact
113
- without an `- Export:` bullet is *not* exported), and which
114
- artifacts declare an export in the `SPEC` and `ARCH` formats.
99
+ </step>
115
100
 
116
- 5. Read all resolved source artifacts and build a precise
117
- understanding of the content of each artifact that declares an
118
- export.
101
+ 3. <step id="STEP 3: Export Specification">
119
102
 
120
- </step>
103
+ 1. For *each* <output/> in <outputs/>, call the
104
+ `ase_specbook_export(output: "<output/>")` tool of the `ase` MCP
105
+ server, which infers the format from the `[<format>:]<file>`
106
+ entry, writes the rendering to the file, and returns a
107
+ confirmation `text` carrying the written byte size. Do not
108
+ output anything.
121
109
 
122
- 3. <step id="STEP 3: Materialize Exports">
123
-
124
- 1. For *each* read source artifact that declares an `- Export:`
125
- bullet in its format definition, *materialize* the declared
126
- export:
127
-
128
- - *Build* the derived rendering exactly as described by the
129
- artifact's <export-transform/>, faithfully reflecting the
130
- artifact's current content -- no more, no less. Honor **No
131
- Fabrication**: never invent content the artifact does not
132
- support.
133
-
134
- - For an export whose <export-transform/> is a *Mermaid
135
- diagram converted to SVG*, build the Mermaid specification
136
- from the artifact content and render it to an SVG document by
137
- calling the `ase_diagram(diagram: "<mermaid-spec/>", format:
138
- "svg")` tool of the `ase` MCP server, using its `text` output
139
- field as the SVG document. For a textual export (e.g. a
140
- Markdown table), build the content directly. For Markdown
141
- *tables*, honor the table-alignment rule of `ase-skill.md`.
142
-
143
- - *Determine* the side-by-side target file name
144
- <export-filename/>
145
- as `<artifact-set-id/>-<artifact-no/>-<artifact-id/>-<artifact-slug/>-<export-name/>.<export-ext/>`
146
- and resolve it to a project-relative path inside the
147
- artifact's own base directory (`<basedir/>`) by calling the
148
- `ase_artifact_name(filename: "<export-filename/>", kind:
149
- "<artifact-kind/>")` tool of the `ase` MCP server, with
150
- <artifact-kind/> the artifact's own lower-cased kind.
151
-
152
- - *Write* the derived rendering to that resolved path via the
153
- `Write` tool, overwriting any pre-existing export file of the
154
- same name.
155
-
156
- 2. Report the materialized exports with the following <template/>,
110
+ 2. Report the exported files with the following <template/>,
157
111
  listing one bullet line per written file (with <file/> its
158
- project-relative path and <note/> an ultra-brief description of
159
- what was exported):
112
+ project-relative path and <note/> the format and the byte size):
160
113
 
161
114
  <template>
162
- <ase-tpl-bullet-signal/> **EXPORTED ARTIFACTS**:
115
+ <ase-tpl-bullet-signal/> **EXPORTED SPECIFICATION**:
163
116
 
164
117
  - `<file/>`: <note/>
165
118
  [...]
166
119
  </template>
167
120
 
168
- <if condition="no source artifact declares an export">
169
-
170
- Only output the following <template/>:
171
-
172
- <template>
173
- <ase-tpl-bullet-normal/> **EXPORTED ARTIFACTS**: none -- no source artifact declares an export
174
- </template>
175
-
176
- </if>
177
-
178
121
  3. Finally, give the closing hints by expanding the following
179
122
  (which, depending on the configured <ase-guidance-level/>, may
180
123
  each expand into nothing and hence emit no output at all):
181
124
 
182
- <if condition="at least one export file was written">
183
125
  <ase-tpl-hint level="normal">
184
- Exports are *derived* and go stale as their source artifacts drift -- use `/ase-sync-reconcile` to align the artifacts first, then re-run this skill.
126
+ Exports are *derived* and go stale as the specification drifts -- use `/ase-sync-reconcile` to align the artifacts first, then re-run this skill.
185
127
  </ase-tpl-hint>
186
- </if>
187
128
 
188
129
  <ase-tpl-hint level="verbose">
189
- Use `/ase-sync-export --source` to narrow the exported artifact kinds, and a trailing filtering hint to narrow the exports themselves.
130
+ Use `/ase-sync-export --output` with a comma-separated list of `[<format>:]<file>` entries to export several renderings at once (e.g. `-o docs/spec.html,docs/spec.pdf`).
190
131
  </ase-tpl-hint>
191
132
 
192
133
  </step>
@@ -1,73 +1,61 @@
1
1
 
2
2
  ## NAME
3
3
 
4
- `ase-sync-export` - Export Artifact Set to Side-by-Side Files
4
+ `ase-sync-export` - Export Specification into Rendered Files
5
5
 
6
6
  ## SYNOPSIS
7
7
 
8
8
  `ase-sync-export`
9
9
  [`--help`|`-h`]
10
- [`--source`|`-s` *source*[,...]]
11
- [*filter*]
10
+ [`--output`|`-o` *output*[,...]]
12
11
 
13
12
  ## DESCRIPTION
14
13
 
15
- The `ase-sync-export` skill exports the content of a set of artifact
16
- kinds (the *source*) into *derived*, ready-to-consume files placed
17
- *side-by-side* with the artifacts themselves. For every source artifact
18
- that declares an *export* in its format definition, the skill builds the
19
- declared rendering and writes it to a sibling file.
20
-
21
- The *source* is a comma-separated list over the seven recognized
22
- artifact kinds `SPEC` (Specification), `ARCH` (Architecture), `CODE`
23
- (Source Code), `DOCS` (Documentation), `TASK` (Task Plans), `INFR`
24
- (Infrastructure), and `OTHR` (catch-all). The file lists for the
25
- involved kinds are resolved via the `ase_artifact_list` MCP tool of the
26
- `ase` MCP server.
27
-
28
- An *export* is declared by a `- Export:` bullet point in an artifact's
29
- format definition (see `ase-format-meta.md`, `ase-format-spec.md`, and
30
- `ase-format-arch.md`); an artifact *without* such a bullet is *not*
31
- exported. Each exported file is named
32
- `<set>-<no>-<id>-<slug>-<export-name>.<ext>` (e.g.
33
- `SPEC-07-DM-Data-Model-export.svg`) and stored in the artifact's own
34
- base directory. Initially, the *Data Model* (`SPEC-DM`) exports as a
35
- Mermaid UML diagram converted to SVG, and the *Technology Stack*
36
- (`ARCH-TS`) exports as a compact Markdown table.
14
+ The `ase-sync-export` skill exports the `SPEC` artifact set -- the
15
+ *SpecBook*-based specification of the project, located via the
16
+ `project.artifact.spec.basedir` configuration -- into *derived*,
17
+ ready-to-consume renderings. The specification is first validated
18
+ against the SpecBook schema configuration via the `ase_specbook_lint`
19
+ MCP tool of the `ase` MCP server; on any diagnostic the skill errors out
20
+ and exports nothing, as a partial or invalid specification must never be
21
+ rendered. Otherwise every requested *output* is rendered via the
22
+ `ase_specbook_export` MCP tool.
23
+
24
+ Each *output* is an `[<format>:]<file>` entry, where the format is one
25
+ of `json`, `json5`, `yaml`, `toon` (the specification object model),
26
+ `html` (self-contained single document with table of contents, full-text
27
+ search, and light/dark theme), `pdf` (paginated print document), or `md`
28
+ (normalized single Markdown document). The format is inferred from the
29
+ filename extension unless it is explicitly given as a prefix. The
30
+ standard output sentinel `-` is not supported.
37
31
 
38
32
  ## OPTIONS
39
33
 
40
- `--source`|`-s` *source*[,...]:
41
- The comma-separated list of artifact kinds to export. Defaults to
42
- `SPEC,ARCH` (the skill errors out on an empty source).
43
-
44
- ## ARGUMENTS
45
-
46
- *filter*:
47
- An optional free-form filtering hint that narrows the source
48
- artifacts, or the aspects of those artifacts, to take into account
49
- when materializing the exports. If omitted, every export declared by
50
- a source artifact is materialized.
34
+ `--output`|`-o` *output*[,...]:
35
+ The comma-separated list of `[<format>:]<file>` entries to render,
36
+ with each file path relative to the project root. Defaults to the
37
+ single HTML rendering `index.html` inside the `SPEC` base directory
38
+ (e.g. `docs/specbook/index.html`).
51
39
 
52
40
  ## EXAMPLES
53
41
 
54
- Export the specification and architecture artifacts to their
55
- side-by-side files (the default):
42
+ Export the specification to its default HTML rendering:
56
43
 
57
44
  ```text
58
45
  ❯ /ase-sync-export
59
46
  ```
60
47
 
61
- Export only the specification artifacts:
48
+ Export the specification as HTML and PDF:
62
49
 
63
50
  ```text
64
- ❯ /ase-sync-export -s SPEC
51
+ ❯ /ase-sync-export -o docs/spec.html,docs/spec.pdf
65
52
  ```
66
53
 
67
- Export only the data-model artifact:
54
+ Export the specification object model as YAML into a file without a
55
+ telling extension:
68
56
 
69
57
  ```text
70
- ❯ /ase-sync-export -s SPEC data model
58
+ ❯ /ase-sync-export -o yaml:docs/spec.model
71
59
  ```
72
60
 
73
61
  ## SEE ALSO
@@ -6,7 +6,7 @@ description: >
6
6
  (the target), generating or updating them to reflect the imported
7
7
  information. Use when the user wants to "import", "ingest", or
8
8
  "bring in" external sources like files, URLs, or pasted text into
9
- artifacts like SPEC, ARCH, CODE, DOCS, TASK, INFR, or OTHR.
9
+ artifacts like SPEC, CODE, DOCS, TASK, INFR, or OTHR.
10
10
  user-invocable: true
11
11
  disable-model-invocation: false
12
12
  effort: xhigh
@@ -22,7 +22,7 @@ Import Foreign Sources into Artifact Set
22
22
 
23
23
  <expand name="getopt"
24
24
  arg1="ase-sync-import"
25
- arg2="--target|-t=SPEC,ARCH">
25
+ arg2="--target|-t=SPEC">
26
26
  $ARGUMENTS
27
27
  </expand>
28
28
 
@@ -36,7 +36,6 @@ reflect the imported information:
36
36
 
37
37
  @${CLAUDE_SKILL_DIR}/../../meta/ase-format-meta.md
38
38
  @${CLAUDE_SKILL_DIR}/../../meta/ase-format-spec.md
39
- @${CLAUDE_SKILL_DIR}/../../meta/ase-format-arch.md
40
39
  @${CLAUDE_SKILL_DIR}/../../meta/ase-format-task.md
41
40
  @${CLAUDE_SKILL_DIR}/../../meta/ase-tenets.md
42
41
 
@@ -47,8 +46,8 @@ Procedure
47
46
 
48
47
  1. <step id="STEP 1: Determine Target">
49
48
 
50
- 1. The recognized artifact kinds are the seven tokens `TASK`,
51
- `SPEC`, `ARCH`, `CODE`, `DOCS`, `INFR`, and `OTHR`. Parse
49
+ 1. The recognized artifact kinds are the six tokens `TASK`,
50
+ `SPEC`, `CODE`, `DOCS`, `INFR`, and `OTHR`. Parse
52
51
  <getopt-option-target/> as the comma-separated <target/> kind list.
53
52
  Upper-case and trim every parsed kind token. Do not output
54
53
  anything.
@@ -64,7 +63,7 @@ Procedure
64
63
 
65
64
  </if>
66
65
 
67
- 3. If any token in <target/> is *not* one of the seven recognized
66
+ 3. If any token in <target/> is *not* one of the six recognized
68
67
  kinds, only output the following <template/> (with <kind/> set to
69
68
  the first offending token) and then immediately *STOP* processing
70
69
  the entire current skill:
@@ -123,16 +122,18 @@ Procedure
123
122
 
124
123
  2. Internalize and honor the artifact-format conventions:
125
124
 
126
- - the artifact-set/artifact/aspect meta information (`ase-format-meta.md`),
127
- - the `SPEC` format (`ase-format-spec.md`),
128
- - the `ARCH` format (`ase-format-arch.md`),
125
+ - the artifact-set meta information (`ase-format-meta.md`),
126
+ - the `SPEC` format, i.e. the SpecBook models and formats plus
127
+ the SpecBook schema configuration of the project
128
+ (`ase-format-spec.md`),
129
129
  - the `TASK` format (`ase-format-task.md`).
130
130
 
131
131
  Whenever a target artifact belongs to one of these kinds, it
132
132
  *MUST* be kept (or made) conformant to the corresponding format
133
- (headings, structure, identifiers, and the `<timestamp-modified/>`
134
- rule). The kinds `CODE`, `DOCS`, `INFR`, and `OTHR` have no
135
- dedicated format contract and are treated as free-form.
133
+ (headings, structure, identifiers, references, and the
134
+ `Modified:` timestamp rule). The kinds `CODE`, `DOCS`, `INFR`,
135
+ and `OTHR` have no dedicated format contract and are treated as
136
+ free-form.
136
137
 
137
138
  3. You *MUST* internalize and strictly honor the **GENERIC TENETS**,
138
139
  the **CRAFTING TENETS**, and the **RECONCILIATION TENETS** of the
@@ -163,14 +164,35 @@ Procedure
163
164
  sources do not support; if the sources are silent or ambiguous on
164
165
  something the target needs, surface the gap rather than guessing.
165
166
  Re-express the imported facts at the *target's* level of
166
- abstraction (a SPEC states intent, an ARCH states structure).
167
+ abstraction (a SPEC states intent and structure).
167
168
 
168
169
  Apply the generation/update directly to the target artifacts via
169
170
  the `Write`/`Edit` tools. For a `TASK` target, apply it via the
170
171
  `ase_task_save` MCP tool instead -- *NEVER* write a task plan
171
172
  file via `Write`/`Edit` or by executing a shell command.
172
173
 
173
- 6. Report the performed changes with the following <template/>, listing
174
+ 6. <if condition="at least one `SPEC` artifact was generated or updated">
175
+
176
+ Validate the specification by calling the `ase_specbook_lint()`
177
+ tool of the `ase` MCP server and reading its returned
178
+ `diagnostics` array of `{ file, line, column, message }`
179
+ objects. If it is not empty, fix the reported problems in the
180
+ affected `SPEC` artifacts via the `Write`/`Edit` tools and call
181
+ the tool again -- for at most *three* rounds in total. Do not
182
+ output anything, unless diagnostics remain after the last round,
183
+ in which case output the following <template/>, listing one
184
+ bullet line per remaining diagnostic:
185
+
186
+ <template>
187
+ <ase-tpl-bullet-signal/> **REMAINING DIAGNOSTICS**:
188
+
189
+ - `<file/>:<line/>:<column/>`: <message/>
190
+ [...]
191
+ </template>
192
+
193
+ </if>
194
+
195
+ 7. Report the performed changes with the following <template/>, listing
174
196
  one bullet line per generated or updated file (with <file/> its
175
197
  project-relative path and <note/> an ultra-brief description of
176
198
  what was imported):
@@ -192,7 +214,7 @@ Procedure
192
214
 
193
215
  </if>
194
216
 
195
- 7. Finally, give the closing hint by expanding the following (which,
217
+ 8. Finally, give the closing hint by expanding the following (which,
196
218
  depending on the configured <ase-guidance-level/>, may expand
197
219
  into nothing and hence emit no output at all):
198
220
 
@@ -24,26 +24,30 @@ be local files or directories, remote URLs, pasted text passages, or
24
24
  references to other documents. Local files are read via the `Read` tool
25
25
  and remote URLs are fetched via the available web tools.
26
26
 
27
- The *target* is a comma-separated list over the seven recognized
28
- artifact kinds `SPEC` (Specification), `ARCH` (Architecture), `CODE`
29
- (Source Code), `DOCS` (Documentation), `TASK` (Task Plans), `INFR`
30
- (Infrastructure), and `OTHR` (catch-all). It defaults to `SPEC,ARCH`.
31
- The file lists for the involved kinds are resolved via the
32
- `ase_artifact_list` MCP tool of the `ase` MCP server.
27
+ The *target* is a comma-separated list over the six recognized
28
+ artifact kinds `SPEC` (Specification, covering both requirements and
29
+ architecture), `CODE` (Source Code), `DOCS` (Documentation), `TASK`
30
+ (Task Plans), `INFR` (Infrastructure), and `OTHR` (catch-all). It
31
+ defaults to `SPEC`. The file lists for the involved kinds are resolved
32
+ via the `ase_artifact_list` MCP tool of the `ase` MCP server.
33
33
 
34
34
  While importing, the skill honors the artifact-format conventions of
35
- `ase-format-meta.md`, `ase-format-spec.md`, `ase-format-arch.md`, and
35
+ `ase-format-meta.md`, `ase-format-spec.md` (the *SpecBook* models and
36
+ formats plus the SpecBook schema configuration), and
36
37
  `ase-format-task.md`; the kinds `CODE`, `DOCS`, `INFR`, and `OTHR` have
37
38
  no dedicated format contract and are treated as free-form. A target
38
39
  artifact that does not yet exist but is warranted by the imported
39
40
  information is *generated* from scratch, while an existing target
40
41
  artifact is *surgically updated* to reflect the imported information.
42
+ Generated or updated `SPEC` artifacts are validated via the
43
+ `ase_specbook_lint` MCP tool and the reported diagnostics are fixed in
44
+ at most three rounds; any remaining diagnostics are surfaced.
41
45
 
42
46
  ## OPTIONS
43
47
 
44
48
  `--target`|`-t` *target*[,...]:
45
49
  The comma-separated list of artifact kinds to generate or update.
46
- Defaults to `SPEC,ARCH`. The skill errors out on an empty target or
50
+ Defaults to `SPEC`. The skill errors out on an empty target or
47
51
  an unknown/unsupported kind.
48
52
 
49
53
  ## ARGUMENTS
@@ -61,8 +65,8 @@ Import a foreign requirements document into the specification:
61
65
  ❯ /ase-sync-import -t SPEC docs/legacy/requirements.txt
62
66
  ```
63
67
 
64
- Import an external design write-up into the architecture, defaulting to
65
- both specification and architecture as targets:
68
+ Import an external design write-up into the specification (the default
69
+ target), which covers the architecture, too:
66
70
 
67
71
  ```text
68
72
  ❯ /ase-sync-import https://example.com/design-notes.html
@@ -5,7 +5,7 @@ description: >
5
5
  Reconcile one set of artifact kinds (the target) to reflect the
6
6
  current state of another set of artifact kinds (the source), while
7
7
  optionally honoring a filtering hint. Use when the user wants to
8
- "reconcile", "sync", "align", or "update" artifacts like SPEC, ARCH,
8
+ "reconcile", "sync", "align", or "update" artifacts like SPEC,
9
9
  CODE, DOCS, TASK, INFR, or OTHR against each other.
10
10
  user-invocable: true
11
11
  disable-model-invocation: false
@@ -35,7 +35,6 @@ artifacts and aligning the target artifacts accordingly:
35
35
 
36
36
  @${CLAUDE_SKILL_DIR}/../../meta/ase-format-meta.md
37
37
  @${CLAUDE_SKILL_DIR}/../../meta/ase-format-spec.md
38
- @${CLAUDE_SKILL_DIR}/../../meta/ase-format-arch.md
39
38
  @${CLAUDE_SKILL_DIR}/../../meta/ase-format-task.md
40
39
  @${CLAUDE_SKILL_DIR}/../../meta/ase-tenets.md
41
40
 
@@ -46,8 +45,8 @@ Procedure
46
45
 
47
46
  1. <step id="STEP 1: Determine Target and Source">
48
47
 
49
- 1. The recognized artifact kinds are the seven tokens `TASK`,
50
- `SPEC`, `ARCH`, `CODE`, `DOCS`, `INFR`, and `OTHR`. Parse
48
+ 1. The recognized artifact kinds are the six tokens `TASK`,
49
+ `SPEC`, `CODE`, `DOCS`, `INFR`, and `OTHR`. Parse
51
50
  <getopt-option-target/> as the comma-separated <target/> kind list and
52
51
  <getopt-option-source/> as the comma-separated <source/> kind list.
53
52
  Upper-case and trim every parsed kind token. Do not output
@@ -66,13 +65,13 @@ Procedure
66
65
 
67
66
  3. <if condition="<source/> is equal 'AUTO'">
68
67
 
69
- Set <source/> to the seven recognized kinds
70
- `TASK,SPEC,ARCH,CODE,DOCS,INFR,OTHR` *minus* all kinds present
68
+ Set <source/> to the six recognized kinds
69
+ `TASK,SPEC,CODE,DOCS,INFR,OTHR` *minus* all kinds present
71
70
  in <target/>. Do not output anything.
72
71
 
73
72
  </if>
74
73
 
75
- 4. If any token in <target/> or <source/> is *not* one of the seven
74
+ 4. If any token in <target/> or <source/> is *not* one of the six
76
75
  recognized kinds, only output the following <template/> (with
77
76
  <kind/> set to the first offending token) and then immediately
78
77
  *STOP* processing the entire current skill:
@@ -136,17 +135,18 @@ Procedure
136
135
 
137
136
  1. Internalize and honor the artifact-format conventions:
138
137
 
139
- - the artifact-set/artifact/aspect meta information (`ase-format-meta.md`),
140
- - the `SPEC` format (`ase-format-spec.md`),
141
- - the `ARCH` format (`ase-format-arch.md`),
138
+ - the artifact-set meta information (`ase-format-meta.md`),
139
+ - the `SPEC` format, i.e. the SpecBook models and formats plus
140
+ the SpecBook schema configuration of the project
141
+ (`ase-format-spec.md`),
142
142
  - the `TASK` format (`ase-format-task.md`).
143
143
 
144
144
  Whenever a target artifact belongs to one of these
145
145
  kinds, the update *MUST* keep it conformant to the
146
- corresponding format (headings, structure, identifiers, and the
147
- `<timestamp-modified/>` rule). The kinds `CODE`, `DOCS`, `INFR`,
148
- and `OTHR` have no dedicated format contract and are treated as
149
- free-form.
146
+ corresponding format (headings, structure, identifiers,
147
+ references, and the `Modified:` timestamp rule). The kinds
148
+ `CODE`, `DOCS`, `INFR`, and `OTHR` have no dedicated format
149
+ contract and are treated as free-form.
150
150
 
151
151
  2. You *MUST* internalize and strictly honor the **GENERIC TENETS**,
152
152
  the **RECONCILIATION TENETS**, the **REFACTORING TENETS**, and
@@ -188,7 +188,28 @@ Procedure
188
188
  <timestamp-modified-old/>` line, replace this with `Modified:
189
189
  <timestamp-modified/>`.
190
190
 
191
- 5. Report the performed updates with the following <template/>, listing
191
+ 5. <if condition="at least one `SPEC` output artifact was changed">
192
+
193
+ Validate the specification by calling the `ase_specbook_lint()`
194
+ tool of the `ase` MCP server and reading its returned
195
+ `diagnostics` array of `{ file, line, column, message }`
196
+ objects. If it is not empty, fix the reported problems in the
197
+ affected `SPEC` artifacts via the `Write`/`Edit` tools and call
198
+ the tool again -- for at most *three* rounds in total. Do not
199
+ output anything, unless diagnostics remain after the last round,
200
+ in which case output the following <template/>, listing one
201
+ bullet line per remaining diagnostic:
202
+
203
+ <template>
204
+ <ase-tpl-bullet-signal/> **REMAINING DIAGNOSTICS**:
205
+
206
+ - `<file/>:<line/>:<column/>`: <message/>
207
+ [...]
208
+ </template>
209
+
210
+ </if>
211
+
212
+ 6. Report the performed updates with the following <template/>, listing
192
213
  one bullet line per changed output file (with <file/> its
193
214
  project-relative path and <note/> an ultra-brief description of
194
215
  what was reconciled):
@@ -210,7 +231,7 @@ Procedure
210
231
 
211
232
  </if>
212
233
 
213
- 6. Finally, give the closing hints by expanding the following
234
+ 7. Finally, give the closing hints by expanding the following
214
235
  (which, depending on the configured <ase-guidance-level/>, may
215
236
  each expand into nothing and hence emit no output at all):
216
237