@rse/ase 0.9.62 → 0.9.64

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 (73) hide show
  1. package/dst/ase-artifact.js +19 -8
  2. package/dst/ase-config.js +12 -8
  3. package/dst/ase-hook.js +9 -1
  4. package/dst/ase-service.js +2 -0
  5. package/dst/ase-spec.js +281 -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/etc/stx.conf +5 -3
  12. package/plugin/meta/ase-format-meta.md +23 -105
  13. package/plugin/meta/ase-format-spec.md +22 -1326
  14. package/plugin/meta/ase-tenets.md +63 -4
  15. package/plugin/package.json +6 -2
  16. package/plugin/skills/ase-arch-analyze/help.md +7 -0
  17. package/plugin/skills/ase-arch-discover/help.md +7 -0
  18. package/plugin/skills/ase-code-analyze/help.md +8 -0
  19. package/plugin/skills/ase-code-craft/help.md +7 -0
  20. package/plugin/skills/ase-code-dissect/help.md +7 -0
  21. package/plugin/skills/ase-code-edit/SKILL.md +14 -9
  22. package/plugin/skills/ase-code-edit/help.md +7 -0
  23. package/plugin/skills/ase-code-explain/help.md +7 -0
  24. package/plugin/skills/ase-code-insight/help.md +7 -0
  25. package/plugin/skills/ase-code-lint/help.md +8 -0
  26. package/plugin/skills/ase-code-refactor/help.md +7 -0
  27. package/plugin/skills/ase-code-resolve/help.md +7 -0
  28. package/plugin/skills/ase-docs-distill/help.md +7 -0
  29. package/plugin/skills/ase-docs-proofread/help.md +7 -0
  30. package/plugin/skills/ase-help-intent/SKILL.md +66 -43
  31. package/plugin/skills/ase-help-intent/help.md +27 -16
  32. package/plugin/skills/ase-help-skill/catalog.md +3 -0
  33. package/plugin/skills/ase-help-skill/help.md +7 -0
  34. package/plugin/skills/ase-meta-brainstorm/help.md +8 -0
  35. package/plugin/skills/ase-meta-changelog/help.md +6 -0
  36. package/plugin/skills/ase-meta-chat/help.md +6 -0
  37. package/plugin/skills/ase-meta-commit/help.md +6 -0
  38. package/plugin/skills/ase-meta-compat/help.md +6 -0
  39. package/plugin/skills/ase-meta-config/help.md +7 -0
  40. package/plugin/skills/ase-meta-diaboli/help.md +7 -0
  41. package/plugin/skills/ase-meta-diff/help.md +7 -0
  42. package/plugin/skills/ase-meta-eli5/help.md +6 -0
  43. package/plugin/skills/ase-meta-evaluate/help.md +7 -0
  44. package/plugin/skills/ase-meta-proximity/help.md +7 -0
  45. package/plugin/skills/ase-meta-quorum/help.md +6 -0
  46. package/plugin/skills/ase-meta-quotes/help.md +7 -0
  47. package/plugin/skills/ase-meta-review/help.md +8 -1
  48. package/plugin/skills/ase-meta-search/help.md +6 -0
  49. package/plugin/skills/ase-meta-steelman/help.md +6 -0
  50. package/plugin/skills/ase-meta-why/help.md +7 -0
  51. package/plugin/skills/ase-meta-workflow/help.md +7 -0
  52. package/plugin/skills/ase-spec-edit/SKILL.md +520 -0
  53. package/plugin/skills/ase-spec-edit/help.md +137 -0
  54. package/plugin/skills/ase-sync-export/SKILL.md +66 -110
  55. package/plugin/skills/ase-sync-export/help.md +43 -40
  56. package/plugin/skills/ase-sync-import/SKILL.md +37 -15
  57. package/plugin/skills/ase-sync-import/help.md +21 -10
  58. package/plugin/skills/ase-sync-reconcile/SKILL.md +37 -16
  59. package/plugin/skills/ase-sync-reconcile/help.md +26 -16
  60. package/plugin/skills/ase-task-condense/help.md +6 -0
  61. package/plugin/skills/ase-task-delete/help.md +6 -0
  62. package/plugin/skills/ase-task-dissect/help.md +7 -0
  63. package/plugin/skills/ase-task-edit/help.md +7 -0
  64. package/plugin/skills/ase-task-grill/SKILL.md +5 -4
  65. package/plugin/skills/ase-task-grill/help.md +7 -0
  66. package/plugin/skills/ase-task-id/help.md +6 -0
  67. package/plugin/skills/ase-task-implement/help.md +7 -0
  68. package/plugin/skills/ase-task-list/help.md +6 -0
  69. package/plugin/skills/ase-task-preflight/help.md +7 -0
  70. package/plugin/skills/ase-task-reboot/help.md +6 -0
  71. package/plugin/skills/ase-task-rename/help.md +6 -0
  72. package/plugin/skills/ase-task-view/help.md +6 -0
  73. 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,134 @@ 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 plus a
108
+ `notices` array of environment notices. Set <notices/> to the
109
+ *distinct* notices of all calls. Do not output anything.
121
110
 
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/>,
111
+ 2. Report the exported files with the following <template/>,
157
112
  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):
113
+ project-relative path and <note/> the format and the byte size):
160
114
 
161
115
  <template>
162
- <ase-tpl-bullet-signal/> **EXPORTED ARTIFACTS**:
116
+ <ase-tpl-bullet-signal/> **EXPORTED SPECIFICATION**:
163
117
 
164
118
  - `<file/>`: <note/>
165
119
  [...]
166
120
  </template>
167
121
 
168
- <if condition="no source artifact declares an export">
122
+ 3. <if condition="<notices/> is not empty">
169
123
 
170
- Only output the following <template/>:
124
+ Report the environment notices *verbatim* with the following
125
+ <template/>, listing one bullet line per notice:
171
126
 
172
127
  <template>
173
- <ase-tpl-bullet-normal/> **EXPORTED ARTIFACTS**: none -- no source artifact declares an export
128
+ <ase-tpl-bullet-signal/> **ENVIRONMENT NOTICES**:
129
+
130
+ - <notice/>
131
+ [...]
174
132
  </template>
175
133
 
176
134
  </if>
177
135
 
178
- 3. Finally, give the closing hints by expanding the following
136
+ 4. Finally, give the closing hints by expanding the following
179
137
  (which, depending on the configured <ase-guidance-level/>, may
180
138
  each expand into nothing and hence emit no output at all):
181
139
 
182
- <if condition="at least one export file was written">
183
140
  <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.
141
+ 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
142
  </ase-tpl-hint>
186
- </if>
187
143
 
188
144
  <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.
145
+ 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
146
  </ase-tpl-hint>
191
147
 
192
148
  </step>
@@ -1,73 +1,76 @@
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.
31
+
32
+ The `pdf` format is the only one with an external prerequisite: it
33
+ prints the rendering through a Chromium-class browser. Neither `npm
34
+ install -g @rse/ase` nor `ase setup install` downloads one, so unless a
35
+ *Google Chrome* is installed system-wide, the Playwright Chromium has to
36
+ be fetched once via `npx playwright install chromium`. Without any such
37
+ browser the export fails up-front, before the specification is parsed,
38
+ and reports that very command; when it falls back onto a system-installed
39
+ *Google Chrome*, the skill reports this as an environment notice.
37
40
 
38
41
  ## OPTIONS
39
42
 
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
+ `--output`|`-o` *output*[,...]:
44
+ The comma-separated list of `[<format>:]<file>` entries to render,
45
+ with each file path relative to the project root. Defaults to the
46
+ single HTML rendering `index.html` inside the `SPEC` base directory
47
+ (e.g. `docs/specbook/index.html`).
43
48
 
44
- ## ARGUMENTS
49
+ ## SCENARIOS
45
50
 
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.
51
+ - You want the specification rendered as HTML, PDF, Markdown, or JSON
52
+ - You want a shareable, ready-to-consume export of the `SPEC` artifacts
53
+ - You want the specification validated and then materialized into files
51
54
 
52
55
  ## EXAMPLES
53
56
 
54
- Export the specification and architecture artifacts to their
55
- side-by-side files (the default):
57
+ Export the specification to its default HTML rendering:
56
58
 
57
59
  ```text
58
60
  ❯ /ase-sync-export
59
61
  ```
60
62
 
61
- Export only the specification artifacts:
63
+ Export the specification as HTML and PDF:
62
64
 
63
65
  ```text
64
- ❯ /ase-sync-export -s SPEC
66
+ ❯ /ase-sync-export -o docs/spec.html,docs/spec.pdf
65
67
  ```
66
68
 
67
- Export only the data-model artifact:
69
+ Export the specification object model as YAML into a file without a
70
+ telling extension:
68
71
 
69
72
  ```text
70
- ❯ /ase-sync-export -s SPEC data model
73
+ ❯ /ase-sync-export -o yaml:docs/spec.model
71
74
  ```
72
75
 
73
76
  ## 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
@@ -53,6 +57,13 @@ artifact is *surgically updated* to reflect the imported information.
53
57
  from (e.g. a file path, directory, URL, or pasted text). The skill
54
58
  errors out on an empty hint.
55
59
 
60
+ ## SCENARIOS
61
+
62
+ - You want external sources brought into the project artifacts
63
+ - You want a foreign document, URL, or pasted text reflected in the `SPEC`
64
+ - You want requirements from outside imported into a task plan
65
+ - You want legacy material ingested into the specification
66
+
56
67
  ## EXAMPLES
57
68
 
58
69
  Import a foreign requirements document into the specification:
@@ -61,8 +72,8 @@ Import a foreign requirements document into the specification:
61
72
  ❯ /ase-sync-import -t SPEC docs/legacy/requirements.txt
62
73
  ```
63
74
 
64
- Import an external design write-up into the architecture, defaulting to
65
- both specification and architecture as targets:
75
+ Import an external design write-up into the specification (the default
76
+ target), which covers the architecture, too:
66
77
 
67
78
  ```text
68
79
  ❯ /ase-sync-import https://example.com/design-notes.html