@iasiv5/dsh-skills 1.3.6 → 1.3.8
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.
- package/package.json +1 -1
- package/skills/answer-me-with-html/SKILL.md +11 -7
- package/skills/answer-me-with-html/references/codebase.md +38 -0
- package/skills/answer-me-with-html/scripts/am.mjs +2529 -1766
- package/skills/darwin-skill/SKILL.md +6 -2
- package/skills/darwin-skill/references/about-author.md +1 -0
- package/skills/darwin-skill/scripts/darwin.py +23 -8
- package/skills/domain-modeling/GLOSSARY-FORMAT.md +3 -2
- package/skills/impeccable/SKILL.md +5 -5
- package/skills/impeccable/reference/audit.md +8 -1
- package/skills/impeccable/reference/audit.native.md +8 -1
- package/skills/impeccable/reference/craft-floor.md +3 -3
- package/skills/impeccable/reference/critique.md +10 -8
- package/skills/impeccable/reference/degraded/finish-reviewer.md +2 -2
- package/skills/impeccable/reference/doctor.md +5 -1
- package/skills/impeccable/reference/generate.md +1 -1
- package/skills/impeccable/reference/live.md +5 -3
- package/skills/impeccable/reference/new-work-comp.md +1 -1
- package/skills/impeccable/reference/new-work-world.md +1 -1
- package/skills/impeccable/reference/new-work.md +8 -9
- package/skills/impeccable/reference/polish.md +1 -1
- package/skills/impeccable/scripts/VERSION +1 -1
- package/skills/impeccable/scripts/engine-checksums.txt +5 -5
- package/skills/impeccable/scripts/impeccable +28 -5
- package/skills/impeccable/scripts/impeccable.cmd +11 -2
- package/skills/impeccable/scripts/live-browser.js +62 -38
- package/skills/writing-plans/SKILL.md +1 -0
- package/skills/writing-plans/references/plan-self-review.md +4 -0
package/package.json
CHANGED
|
@@ -37,6 +37,8 @@ Produce a page if any of these is true:
|
|
|
37
37
|
|
|
38
38
|
Otherwise answer in plain text. When unsure: the more the question "needs a picture to understand", the more it calls for a page.
|
|
39
39
|
|
|
40
|
+
When the user asks you to explain a repository, draw its architecture or show how its code is organized: read `${CLAUDE_SKILL_DIR}/references/codebase.md` and follow it before you write the draft.
|
|
41
|
+
|
|
40
42
|
Automatic pages are for replies to the user. An internal report returned to another agent is not one:
|
|
41
43
|
|
|
42
44
|
- If a parent agent or a coordinator delegated research, implementation, a review or a progress report, return the text or structure it asked for, with the findings and the evidence. Render no page.
|
|
@@ -50,7 +52,7 @@ If the context contains the `[answer-me-with-html always-on]` reminder (the user
|
|
|
50
52
|
|
|
51
53
|
- Whenever this turn gives a conclusion, summary, plan, comparison, review or explanation, attach a page.
|
|
52
54
|
- Do not skip it because "the answer is short". If there is a conclusion, produce a page.
|
|
53
|
-
- For everyday conclusions use a small page with 2–4 panels: one callout with the conclusion, plus one table or one diagram. Do not add panels just to fill space.
|
|
55
|
+
- For everyday conclusions use a small page with 2–4 panels: one callout with the conclusion, plus one table or one diagram. Layout advice for a new answer, not a content budget (see section 4). Do not add panels just to fill space.
|
|
54
56
|
- Render with `--no-open`, so no browser window interrupts the user. The user opens the page by clicking the path at the end of the reply.
|
|
55
57
|
- Order: render the page first, then write the text reply. The reply is the last thing in the turn, with the page link on its last line (see step 5). Do not write the reply and then call `am render`. The one call that may come after the reply is the choice tool that puts the page's asks to the user, when your host can ask questions: write the reply first, so the user holds the link before answering (see step 5).
|
|
56
58
|
- The internal-report rule of step 1 applies here too: a delegated report that inherits the always-on rule renders no page, unless the delegated task explicitly asks for one.
|
|
@@ -70,7 +72,7 @@ On every other host the token is left as it stands or comes out empty. There, be
|
|
|
70
72
|
|
|
71
73
|
Keep the default output; it needs no flag. If the session cannot write to `~/.answer-me-with-html/pages` (a sandbox that allows writes only in the workspace), the CLI saves the page in a private folder in the system temporary folder and says so on a `!` line; the system may clear that folder. Add `-o "<absolute-workspace-path>/.tmp/answers/topic.html"` to `render -` before the heredoc only when the user wants the page in the workspace or the render fails with `Cannot write the page`. `-o` names an HTML file, not a folder; the CLI creates missing parent directories. Use `AM_HOME` only when the whole data directory must move.
|
|
72
74
|
|
|
73
|
-
1. First list 3–8 panels in your head. Each panel answers one sub-question only.
|
|
75
|
+
1. First list 3–8 panels in your head. Each panel answers one sub-question only. Layout advice for a new answer, not a content budget (see section 4).
|
|
74
76
|
The draft language follows the language of the user's question: an English question gets an English draft, a Chinese question a Chinese draft, a Japanese question a Japanese draft. The page button labels, `<html lang>` and the STE check rules switch automatically by the draft language (a draft containing kana counts as Japanese); STE applies the English or Chinese rules to each sentence by its language (Japanese sentences get only the sentence-length and paragraph-length checks, with the same character limits as Chinese; any other language gets only those two checks, counted in words). To set the language yourself, write `lang:` in the frontmatter: `en`, `zh` (Simplified Chinese), `zh-Hant` or `zh-TW` (Traditional Chinese), `ja`, or any other language tag such as `fr` or `ko`. Detection reads Chinese (Simplified, or Traditional when the text has characters written in only one form), Japanese, Korean, and Cyrillic, Arabic, Hebrew, Thai and Greek text, and reads all Latin-script text as English. Declare the language when the user writes a Latin-script language other than English, when a Chinese text is too short or too plain to show Traditional characters, or when an exact tag matters (Arabic script also writes Persian, Cyrillic also Ukrainian). A language without its own labels still gets the right `<html lang>`, with English page labels.
|
|
75
77
|
2. Choose components by the shape of the information (see section 4).
|
|
76
78
|
3. Render in one go with a heredoc:
|
|
@@ -125,7 +127,7 @@ file: tcp-handshake # when the title has few or no English letters: a short Engl
|
|
|
125
127
|
cols: 3 # most columns in a sheet row (a whole number), default 3
|
|
126
128
|
source: RFC 9293 # any other key is shown in the page header's meta line
|
|
127
129
|
---
|
|
128
|
-
|
|
130
|
+
The core conclusion in one or two sentences (optional): this first paragraph, before any ## heading, is the lead.
|
|
129
131
|
|
|
130
132
|
## A Panel title {span=2 meta="small text, top right"}
|
|
131
133
|
Plain Markdown: paragraphs, lists, tables, quotes.
|
|
@@ -150,7 +152,7 @@ Write a component as a fenced code block (```` ```flow ```` … ```` ``` ````);
|
|
|
150
152
|
| A state machine: states and the events between them, a connection lifecycle, a protocol handshake | `state [LR]` | `[*] -> Idle`, `Idle -> Open: connect()`, `Open -> Open: retransmit` (self-transition), `Open -> [*]` |
|
|
151
153
|
| A data model: entities, their columns and the relations between them | `er [LR]` | entity at column 0, indented `name [type] [PK\|FK\|UK]` fields, `user_id FK -> User`, `User 1--* Order: places` |
|
|
152
154
|
| Classes, code interfaces and their relationships | `class [LR]` | declare `class User` and `interface Store`, indent `+id: string` or `+save(): void`, then `User ..> Store: uses` |
|
|
153
|
-
|
|
|
155
|
+
| HTTP/RPC contracts or one requirement changing several endpoints | `api` | `GET /users/{id}` or `RPC users.UserService/GetUser`, sections `path`, `query`, `headers`, `request [Type]`, `response STATUS [Type]`, indented `id string required` or `email string optional`; multiple endpoints per block; `+` / `-` / `~` markers on endpoints, sections or fields |
|
|
154
156
|
| Messages between actors over time | `sequence [num]` | `A -> B: request`, `B --> A: response`, `note A, B: note`, `== phase ==` |
|
|
155
157
|
| Hierarchy / directories / taxonomy | `tree [list]` | indentation for levels, `label \| description`, `` `id` label `` |
|
|
156
158
|
| History / phases | `timeline [v]` | `time \| title \| description`, `*` highlights |
|
|
@@ -163,7 +165,8 @@ Write a component as a fenced code block (```` ```flow ```` … ```` ``` ````);
|
|
|
163
165
|
| Multi-dimension comparison, can / cannot list | Markdown table | write ok / no / warn in the status column |
|
|
164
166
|
| What a real screen, photo or render looks like, as an existing file | image | `` alone on a line |
|
|
165
167
|
| Code that exists in the project | code block that quotes the file | ```` ```ts src=path/to/file.ts lines=18-30 hl=22 ```` and an empty block |
|
|
166
|
-
|
|
|
168
|
+
| Walk a reader through a diagram step by step, with an explanation per step, or link it to code lines | `steps` | in a panel with one `flow`, `state` or `tree`: `Item: explanation`; or add one code block and write `Item 12-15: note`; the item is the diagram's text, written without a colon |
|
|
169
|
+
| A plan, refactor or PR summary that changes structure | `flow`, `state`, `tree`, `er` or `api` with change markers | start a line with `+ ` added, `- ` removed, `~ ` changed (a node, field, entity, state, endpoint or section only): `+ A -> B`, `- A -> B`, `~ Node`, tree `+ file.js`, `- dir/`, er `+ Coupon`, ` + phone string`, `+ User 1--* Coupon` |
|
|
167
170
|
| A change to code | diff block | ```` ```diff file=path/to/file.ts ```` and the unified diff inside |
|
|
168
171
|
| Code that does not exist yet, or a command | code block | ```` ```ts title="name · sketch" ```` with the code inside |
|
|
169
172
|
|
|
@@ -172,11 +175,12 @@ For `api`, field syntax is `name type [required|optional] | description`. The fi
|
|
|
172
175
|
Selection rules:
|
|
173
176
|
- Conclusion first. The first panel or the lead gives the core answer; the following panels give the evidence.
|
|
174
177
|
- One panel, one question. With more than 8 panels, split the page or cut panels.
|
|
178
|
+
- When the page presents content the user already has (a document, a draft or your previous answer), keep every section, table row and fact of it and change only the form, except the parts the user asked to summarise, shorten or change. The panel budget above constrains the layout of a `sheet`, not which facts survive: a `sheet` holds 8 panels at most, and `template: doc` has no section cap, so use `doc` or split the page instead of cutting. If the user did ask for a summary, list the omitted sections in one `callout`, so the page says what it left out.
|
|
175
179
|
- `span` is a hint. In a browser the sheet sizes each panel to its content and fills every row, so write no `span` for a wide table or diagram. Write `span` only for a panel that must stand out (`span` = `cols` gives it a row of its own). `span` and `rows` are whole numbers; a fraction such as `span=2.5` is an error. `rows` applies only to the plain grid (without JavaScript, in print and on narrow screens); the browser layout ignores it.
|
|
176
|
-
- To show what a plan, refactor or PR summary changes in structure, write one `flow`, `state`, `tree` or `
|
|
180
|
+
- To show what a plan, refactor or PR summary changes in structure, write one `flow`, `state`, `tree`, `er` or `api` and mark the changed lines with `+ `, `- ` or `~ `, not a before and an after. Leave unchanged lines bare. The page shows colors, badges and counts in its Changes view and adds a Before / After switch that shows the plain diagram on either side. To change a link or a relationship, remove the old one with `-` and add the new one with `+`. A name that starts with `- ` needs brackets in `flow` (`[- Gateway]`) or `\- item` in `tree`. A marked entity gives its fields its marker; a marked field does not mark its entity. In `api`, added or removed endpoints and sections pass their marker to their children. Write paired `-` old and `+` new definitions to preserve exact changes; `~` alone has no old value. See `am help flow`, `am help state`, `am help tree`, `am help er` and `am help api`.
|
|
177
181
|
- Quote code that exists with `src=` and `lines=`: the CLI reads the lines, so you type no code and the code is real. Use a path inside the current folder; files outside it are refused. Pick the 10–40 lines that make the point. Mark code that does not exist yet as a sketch in `title=`. In a diff block every line starts with `+`, `-`, a space or `@@`; do not cut lines with `...`, split the diff into two hunks. The render lists every file it embedded; tell the user before they share a page that holds private code. See `am help code`.
|
|
178
182
|
- Use an image only for what a diagram cannot show, such as a real UI. Use an existing file by its absolute path (PNG, JPG, GIF, WebP, AVIF or SVG, up to 5 MB). The alt text is the caption, so write what the picture shows. Images must be local files: remote images do not load in the page. Never generate or invent an image. See `am help image`.
|
|
179
|
-
- Use `ask` only for a fork that changes what you do next, such as a plan or a choice between options: 1 to 5 per page, each in the panel it changes, the question in 15 words or fewer. These numbers are writing advice the CLI does not check: more decisions mean more asks (each in the panel it changes) or splitting the page, and the CLI enforces 2 to 6 options per ask. Mark the option you would pick with `*`. An option may carry a preview: indent a `:::` block under it (any component, or `html`/`svg`), and add `cards` to lay the options out in a grid; draw a preview only when seeing the option is what makes the choice clear (a layout, a drawing, a look), and leave it out for a text choice and for options where it adds nothing. A preview shows on the page only: a host's question tool carries just the question and option text, so it does not reach the user there. Every page has a Reply button: the user picks options, comments on any panel and copies one reply back. When a page has asks, say in your reply how many decisions are open and that the suggested options are what you would do. If your host can ask questions (Claude Code's AskUserQuestion), put those asks to the user with that choice tool after the reply, never before it: the reply carries the page link, and the user should be able to open the page before answering.
|
|
183
|
+
- Use `ask` only for a fork that changes what you do next, such as a plan or a choice between options: 1 to 5 per page, each in the panel it changes, the question in 15 words or fewer. These numbers are writing advice the CLI does not check: more decisions mean more asks (each in the panel it changes) or splitting the page, and the CLI enforces 2 to 6 options per ask. Mark the option you would pick with `*`. An option may carry a preview: indent a `:::` block under it (any component except `steps`, which belongs in a panel of its own, or `html`/`svg`), and add `cards` to lay the options out in a grid; draw a preview only when seeing the option is what makes the choice clear (a layout, a drawing, a look), and leave it out for a text choice and for options where it adds nothing. A preview shows on the page only: a host's question tool carries just the question and option text, so it does not reach the user there. Every page has a Reply button: the user picks options, comments on any panel and copies one reply back. When a page has asks, say in your reply how many decisions are open and that the suggested options are what you would do. If your host can ask questions (Claude Code's AskUserQuestion), put those asks to the user with that choice tool after the reply, never before it: the reply carries the page link, and the user should be able to open the page before answering.
|
|
180
184
|
- For numbers you compare, use `chart`, never a hand-written `svg` block: it follows the theme and dark mode and costs a few lines. Use `limits` when each row is one value against one limit. Write plain numbers (no thousands separators), put the unit in `unit=`, and use `*` on the row the reader must see. With more than one number on a row, name the series on a first line (`| p50 | p95`). Use `bar` to compare items, `line` for values over time (up to 60 points) and `pie` for the shares of one whole (up to 6 slices, no negative values, one number per row). Up to 6 series and 24 bar rows; a collapsed table under the chart holds the numbers. See `am help chart`.
|
|
181
185
|
- Do not invent data. Without real numbers, do not use limits or charts; mark illustrative data as "illustrative" in the description.
|
|
182
186
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Codebase architecture pages
|
|
2
|
+
|
|
3
|
+
Read this when SKILL.md section 1 sends you here: the user asks you to explain a repository, draw its architecture, or show how its code is organized. `am` means the full `node ".../scripts/am.mjs"` command from SKILL.md section 2; write the path out in full.
|
|
4
|
+
|
|
5
|
+
The page is worth its evidence. Explore the code first, record each claim with the lines that prove it, and draw only what you read. One question gets one page.
|
|
6
|
+
|
|
7
|
+
## Explore
|
|
8
|
+
|
|
9
|
+
Work from the repository root, in this order. Each step ends on its own bar.
|
|
10
|
+
|
|
11
|
+
1. **Entry points.** Find every way into the program: `bin` and `main` in `package.json`, `[project.scripts]` in `pyproject.toml`, `cmd/` in Go, `[[bin]]` in `Cargo.toml`, the CLI command table, the route table, the exported index. Done when each entry point has a `path:line`.
|
|
12
|
+
2. **Module boundaries.** List the source files in the working tree, new untracked files included and ignored files left out. A module is a folder or file whose imports stay mostly inside it. Scope the map to the question. For "how is this organized", read the imports of each top-level folder; done when every source file belongs to one module and each module's dependencies are known. For "how does X work", the map is provisional; done when the top-level modules are named, and step 3 reads each module's imports when the trace reaches it.
|
|
13
|
+
3. **Main path.** Take the request the question is about, or the most common one (the default command, the main route). Trace it from its entry point to its output, one call at a time. Done when every hop has a `path:line`.
|
|
14
|
+
4. **Data and config.** Read the types, schemas or tables on the main path, and where settings load from, with their defaults and precedence. Done when each type and setting the main path reads has a `path:line`.
|
|
15
|
+
|
|
16
|
+
On a repository too large to read in this context: once the modules in scope are known, give each one to a subagent, one per module. Brief it with the question, the module's files, its place in the boundaries, and the evidence rule below. Ask for the module's job in one sentence, its entry functions, its part of the main path, and every claim with its span. Merge the reports, then trace the hand-offs between modules yourself.
|
|
17
|
+
|
|
18
|
+
## Evidence
|
|
19
|
+
|
|
20
|
+
- Cite every claim about the code as an inline code span: `` `src/cli.js:42` `` for one line, `` `src/cli.js:42-60` `` for a range, the path relative to the repository root. Write the span when you read the line.
|
|
21
|
+
- Put spans in panel text, table cells and `tree` notes. Diagram labels name parts; the panel text under the diagram cites them.
|
|
22
|
+
- A claim with no line to cite is an inference: mark it as not checked and say how to check it.
|
|
23
|
+
- `am render` checks the spans it can place in the current folder: the file exists and the lines are inside it. A failed span prints a `refs n warnings` line with its draft line. Fix it as you fix a code warning: open the file, find the right lines, correct the span, render again.
|
|
24
|
+
- The check skips some spans: a missing file at the root, a root file with no extension (`LICENSE`), a secret or binary file, and diagram text. A clean render is not proof; the proof is that you read each cited line when you wrote its span.
|
|
25
|
+
|
|
26
|
+
## Draft
|
|
27
|
+
|
|
28
|
+
Render from the repository root, so `src=` and the spans resolve against it.
|
|
29
|
+
|
|
30
|
+
- **Frontmatter:** `commit:` set to `git rev-parse --short HEAD`, with `+dirty` appended when `git status --porcelain` prints anything. The page header shows it, so the reader knows which code the page describes.
|
|
31
|
+
- The first paragraph, before any `##` heading: the answer in two or three sentences.
|
|
32
|
+
- **Modules:** a `tree`, one line per module, `folder/ | job`.
|
|
33
|
+
- **Main path:** a `flow` for how parts connect, or a `sequence` for calls between parts over time. Use the same names as the module tree.
|
|
34
|
+
- **Key code:** code blocks with `src=` and `lines=` for the few spots the main path turns on; when the main path is a `flow`, a `state` or a `tree`, a `steps` block in its panel links one of them to it. `steps` does not link a `sequence` diagram: with one, keep the code and its citations and write no `steps` block.
|
|
35
|
+
- **Module table:** module, its files, its job, what it depends on.
|
|
36
|
+
- **Data model,** when the question is about data: an `er` or `class` diagram.
|
|
37
|
+
|
|
38
|
+
Order the panels by the question: "how does X work" leads with the main path; "how is this organized" leads with the modules.
|