skillshop 2.0.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +273 -100
  2. package/agents-content/000_communication-writing.block.md +11 -0
  3. package/agents-content/001_external-actions.block.md +9 -0
  4. package/agents-content/AGENTS.md +11 -0
  5. package/package.json +6 -3
  6. package/skills-content/architecture-scanner/SKILL.md +274 -0
  7. package/skills-content/architecture-scanner/files.json +10 -0
  8. package/skills-content/architecture-scanner/scan.sh +823 -0
  9. package/skills-content/change-review/SKILL.md +76 -0
  10. package/skills-content/change-review/agents/openai.yaml +4 -0
  11. package/skills-content/changelog/SKILL.md +99 -0
  12. package/skills-content/changeset/changeset.md +80 -0
  13. package/skills-content/code-buddy/SKILL.md +136 -0
  14. package/skills-content/design-system-catalog/SKILL.md +106 -0
  15. package/skills-content/design-system-catalog/extract-components.mjs +441 -0
  16. package/skills-content/design-system-catalog/generate-catalog.sh +255 -0
  17. package/skills-content/flare/SKILL.md +96 -0
  18. package/skills-content/grilling/SKILL.md +31 -0
  19. package/skills-content/install-sigmap/SKILL.md +97 -0
  20. package/skills-content/one-shot/SKILL.md +51 -0
  21. package/skills-content/release/SKILL.md +128 -0
  22. package/skills-content/shadow-clone/SKILL.md +228 -0
  23. package/skills-content/shadow-clone/extract-signatures.mjs +202 -0
  24. package/skills-content/shadow-clone/scan-repo.mjs +343 -0
  25. package/skills-content/ship/SKILL.md +95 -0
  26. package/skills-content/shots/SKILL.md +89 -0
  27. package/skills-content/shots/agents/openai.yaml +4 -0
  28. package/skills-content/skillshop/SKILL.md +157 -0
  29. package/skills-content/skillz/SKILL.md +15 -0
  30. package/skills-content/transcript-clean/SKILL.md +55 -0
  31. package/skills-content/transcript-edit/SKILL.md +80 -0
  32. package/skills-content/vitest/GENERATION.md +5 -0
  33. package/skills-content/vitest/SKILL.md +52 -0
  34. package/skills-content/vitest/references/advanced-environments.md +264 -0
  35. package/skills-content/vitest/references/advanced-projects.md +300 -0
  36. package/skills-content/vitest/references/advanced-type-testing.md +237 -0
  37. package/skills-content/vitest/references/advanced-vi.md +249 -0
  38. package/skills-content/vitest/references/core-cli.md +166 -0
  39. package/skills-content/vitest/references/core-config.md +174 -0
  40. package/skills-content/vitest/references/core-describe.md +193 -0
  41. package/skills-content/vitest/references/core-expect.md +219 -0
  42. package/skills-content/vitest/references/core-hooks.md +244 -0
  43. package/skills-content/vitest/references/core-test-api.md +233 -0
  44. package/skills-content/vitest/references/features-concurrency.md +250 -0
  45. package/skills-content/vitest/references/features-context.md +238 -0
  46. package/skills-content/vitest/references/features-coverage.md +207 -0
  47. package/skills-content/vitest/references/features-filtering.md +211 -0
  48. package/skills-content/vitest/references/features-mocking.md +265 -0
  49. package/skills-content/vitest/references/features-snapshots.md +207 -0
  50. package/skills-content/workleaf/SKILL.md +77 -0
  51. package/skills-content/worklog/SKILL.md +145 -0
  52. package/skills-content/worklog/references/summary-format.md +114 -0
  53. package/skills-content/worktree/SKILL.md +71 -0
  54. package/src/agents-instructions.js +256 -0
  55. package/src/cli.js +87 -23
  56. package/src/import.js +12 -7
  57. package/src/index.js +1 -0
  58. package/src/legacy-agents-content.js +36 -0
  59. package/src/legacy-cli.js +1822 -0
  60. package/src/library.js +9 -0
  61. package/src/specifier.js +11 -0
  62. package/src/user-install.js +48 -0
@@ -0,0 +1,274 @@
1
+ ---
2
+ name: architecture-scanner
3
+ description: Architecture scanner and documentation generator. Use when scanning the codebase architecture, updating architecture docs, or generating architecture documentation.
4
+ metadata:
5
+ author: Daniel Fosco
6
+ version: "2026.8.30"
7
+ ---
8
+
9
+ # Architecture Scanner Skill
10
+
11
+ > Triggered by: "scan the codebase architecture", "update the architecture", "update arch", "generate architecture docs", "scan arch", "full update", "full architecture update", "full refresh architecture"
12
+
13
+ ## What This Does
14
+
15
+ Generates documentation files in `.agents/architecture/` that describe every architecturally significant file in the codebase. The system has two layers:
16
+
17
+ - **`architecture.index.md`** — The architectural overview. Groups files by category (ordered and configured via the `categories` array in `files.json`) and includes prose summaries. Categories with `"priority": "critical"` get 2-3x more detailed overviews. A reader should be able to understand the system's architecture from this file alone.
18
+ - **Per-file docs** (`{filepath}.md`) — Detailed documentation for individual files, including what they do, how they work (with code samples), their dependencies, and dependents. Every file reference is cross-linked to its architecture doc.
19
+
20
+ ## How to Execute
21
+
22
+ The scanner handles repository mechanics. The agent handles architectural interpretation and writing. The primary modes are:
23
+
24
+ ```bash
25
+ .agents/skills/architecture-scanner/scan.sh --full
26
+ ```
27
+
28
+ - Runs: discovery -> placeholder creation -> index skeleton creation -> verify
29
+ - Existing authored docs and an existing authored index are preserved.
30
+
31
+ After `--full`, run `--enrich-all` for a first scan or `--enrich` for an incremental scan, then perform the writing pass described below. The command output is a worklist for the agent, not final documentation.
32
+
33
+ ```bash
34
+ .agents/skills/architecture-scanner/scan.sh --enrich
35
+ ```
36
+
37
+ - Runs: agent-enrichment planning only (no file writes)
38
+ - The script prints a JSON worklist (`create`, `update`, `delete`) with per-file targets and manual next steps.
39
+ - Use an agent action to write/refresh each listed `.agents/architecture/{path}.md` using goal-first narrative and architectural context.
40
+ - The JSON worklist includes these fields per target: `path`, `doc`, `category`, `importance`, `exports`, `hint_dependencies`, `hint_dependents`, `enrichment_focus`, and optional `existing_goal_preview`.
41
+
42
+ ```bash
43
+ .agents/skills/architecture-scanner/scan.sh --enrich-all
44
+ ```
45
+
46
+ - Runs: agent-enrichment planning for every non-low file in `files.json`, even if unchanged.
47
+ - `--enrich-all` is useful when the user requests a full rewrite, style reset, or comprehensive prose refresh.
48
+ - For unchanged files, tasks are returned with `reason: full_rewrite`, not `source_changed`.
49
+ - The output remains an agent-only plan (`create`, `update`, `delete`) with no file writes.
50
+
51
+ ```bash
52
+ .agents/skills/architecture-scanner/scan.sh --steps "discover,docs,index,verify"
53
+ ```
54
+
55
+ - Runs only selected steps in order. Supported step names:
56
+ - `discover` (scan and refresh `files.json`)
57
+ - manifest/docs (print full manifest / create missing placeholders)
58
+ - `stale` (print changed/removed manifest)
59
+ - `enrich` (agent-enrichment plan: changed files only)
60
+ - `enrich-all` (agent-enrichment plan: all non-low files)
61
+ - `index` (index from existing docs)
62
+ - `verify` (coverage/linkback consistency check)
63
+
64
+ ### Step 0: Inventory repository topology (required)
65
+
66
+ Before discovery, inspect tracked manifests and workspace configuration for the repository's actual ecosystems. Examples include `package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`, and language-specific workspace files. Use `git ls-files` or the repository's workspace tooling so generated dependency directories and external worktrees are not mistaken for packages.
67
+
68
+ Read every relevant root and workspace manifest to understand package names, responsibilities, entry points, and internal dependencies. Do not assume a `packages/*` layout or that one manifest represents the entire repository.
69
+
70
+ ### Step 1: Discover files
71
+
72
+ ```bash
73
+ .agents/skills/architecture-scanner/scan.sh --discover
74
+ ```
75
+
76
+ This scans the repo using discovery rules and creates or updates `files.json` in the skill folder. If `files.json` doesn't exist yet, it creates it with default priorities. If it already exists, it **adds new files** and **removes deleted files**, but **preserves user-set `importance` values** — those are never overwritten.
77
+
78
+ Discovery includes common root and workspace manifests. Review and extend `DISCOVERY_RULES` when the repository uses another ecosystem or layout; a scanner cannot infer architectural importance from filenames alone.
79
+
80
+ Run this first to ensure the file list is current.
81
+
82
+ ### Step 2: Determine what needs to be done
83
+
84
+ Run `--stale` to get the incremental manifest when you want change-aware updates. For scripted full flows, use `--full` or `--steps` directly.
85
+
86
+ ```bash
87
+ .agents/skills/architecture-scanner/scan.sh --stale
88
+ ```
89
+
90
+ This uses **git history** to detect changes: it finds the most recent commit that touched `.agents/architecture/`, then diffs against `HEAD` to identify changed source files, and also includes uncommitted (staged/unstaged) changes.
91
+
92
+ `--stale` returns a JSON object with three incremental buckets:
93
+
94
+ - **`files`** — docs to create/update:
95
+ - `"missing"` = source exists but doc does not (added/new file docs)
96
+ - `"stale"` = source changed since last architecture update
97
+ - **`removed`** — docs to delete because source was removed/moved or is no longer tracked
98
+ - **`index`** — whether `architecture.index.md` should be regenerated (`"status": "stale"`) and why
99
+
100
+ If `files` and `removed` are both empty and `index.status` is `"fresh"`, docs are up to date.
101
+
102
+ **When `--stale` suggests a full scan:** If more than 50% of documented files need updates, output includes `"suggestion": "full_scan"` and a message. In this case, switch to a full scan:
103
+
104
+ ```bash
105
+ .agents/skills/architecture-scanner/scan.sh --manifest
106
+ ```
107
+
108
+ You can also force a full scan explicitly with:
109
+
110
+ ```bash
111
+ .agents/skills/architecture-scanner/scan.sh --full
112
+ ```
113
+
114
+ This outputs every non-low file regardless of change status. Use this for:
115
+ - **First-time runs** (no architecture docs exist yet)
116
+ - **Template changes** (when the doc format itself changed, so all docs need regeneration)
117
+ - **When `--stale` suggests it** (many files changed across multiple commits)
118
+ - **When the user explicitly requests a full scan**
119
+ - **When the user says natural-language variants like "full update" / "full refresh"**
120
+
121
+ **Low importance files are excluded from both manifests and should NOT get architecture docs.**
122
+
123
+ ### Step 3: Agent writes the documentation
124
+
125
+ The scanner creates only missing placeholder files. For each entry in `files` (from `--stale`) or each entry in the full manifest (`--manifest`/`--full`), the agent must read the actual source and write the architecture document at:
126
+
127
+ ```
128
+ .agents/architecture/{filepath}.md
129
+ ```
130
+
131
+ For example:
132
+ - `src/application/core/loader.js` → `.agents/architecture/src/application/core/loader.js.md`
133
+ - `vite.config.js` → `.agents/architecture/vite.config.js.md`
134
+
135
+ #### For NEW files (status `"missing"`, or first full scan):
136
+
137
+ The placeholder already has the required headings. Read the source, then replace every agent comment with source-grounded prose. The manifest's `doc` field contains the exact relative path to use.
138
+
139
+ #### For STALE files (status `"stale"`):
140
+
141
+ The doc already exists but the source file has changed. Follow this process:
142
+
143
+ 1. **Read the source file** to understand what changed
144
+ 2. **Read the existing doc file** to see what's already documented
145
+ 3. **Use the edit tool** to update only the sections that are affected by the source changes — preserve accurate authored context
146
+ 4. Do NOT recreate the file from scratch — make surgical updates
147
+
148
+ #### For REMOVED files (status `"removed"` in `removed` array):
149
+
150
+ Delete the stale architecture doc file referenced by the entry's `doc` field. If any docs are deleted, regenerate the index in Step 4.
151
+
152
+ **What to check when updating a stale doc:**
153
+ - Has the file's purpose changed? → Update **Meaning**
154
+ - Have exports/functions/components changed? → Update **Composition**
155
+ - Have imports changed? → Update **Dependencies**
156
+ - Have downstream consumers changed? → Update **Dependents** (re-grep)
157
+ - Any new edge cases or behavior changes? → Update **Notes**
158
+
159
+ #### Doc template
160
+
161
+ Each doc file MUST follow this template:
162
+
163
+ ```markdown
164
+ # `{filepath}`
165
+
166
+ <!--
167
+ source: {filepath}
168
+ category: {category}
169
+ importance: {importance}
170
+ -->
171
+
172
+ > [← Architecture Index](../architecture.index.md)
173
+
174
+ (Adjust the relative path based on nesting depth — e.g., `../../architecture.index.md` for files 2 levels deep like `src/application/core/loader.js.md`)
175
+
176
+ ## Meaning
177
+
178
+ {1-2 paragraph architectural summary: what this file means in the system, why it exists, what responsibility it owns, and what would break or become unclear without it. This must be readable by someone unfamiliar with the codebase.}
179
+
180
+ ## Composition
181
+
182
+ {Detailed description of the file's structure: what it exports, key functions/components, internal organization, type signatures, parameter details. Include code samples from the actual source file to illustrate key exports, signatures, and patterns — don't just describe them in prose.}
183
+
184
+ ## Dependencies
185
+
186
+ {List of significant imports — what this file depends on, and why}
187
+
188
+ ## Dependents
189
+
190
+ {What depends on this file — who imports it, derived by grepping}
191
+
192
+ ## Notes
193
+
194
+ {Any non-obvious behavior, edge cases, circular dependency considerations, or architectural decisions worth noting. Omit this section if there's nothing notable.}
195
+ ```
196
+
197
+ **Rules for writing docs:**
198
+ - Read each file's actual content before writing its doc — do NOT guess
199
+ - The **Meaning** section is the most important — it should be a clear, standalone conceptual summary (1-2 paragraphs), not a restatement of the filename or category
200
+ - The remaining sections (Composition, Dependencies, Dependents, Notes) are all top-level headings — do NOT wrap them in a `<details>` element
201
+ - **Include code samples** — when describing exports, function signatures, component props, data shapes, or usage patterns, include actual code snippets from the source file. This makes docs scannable and concrete.
202
+ - **Cross-link file references** — every time a file path is mentioned anywhere in the documentation (Goal, Composition, Dependencies, Dependents, Notes, or the index), it MUST be a markdown hyperlink to that file's architecture doc. Use relative paths from the current doc to the target doc. For example, in a doc at `.agents/architecture/src/application/context.jsx.md`, a reference to the loader would be written as [`src/application/core/loader.js`](./core/loader.js.md). If the referenced file has no architecture doc (e.g., low-importance files), link to the source file on GitHub or leave it as plain text with a backtick code span.
203
+ - The "Dependents" section should be derived by grepping for imports of this file
204
+ - For `medium` importance files, keep it concise — shorter Meaning, fewer code samples
205
+ - For `high` importance files, write a thorough Meaning (2 paragraphs), comprehensive Composition with multiple code samples, and complete dependency/dependent lists
206
+
207
+ ### Step 4: Agent writes the index
208
+
209
+ ```bash
210
+ .agents/skills/architecture-scanner/scan.sh --index
211
+ ```
212
+
213
+ This creates `architecture.index.md` only when it is missing. If it already exists, the script preserves it. The agent must read and update the index after writing file docs.
214
+
215
+ When the index is missing, `--index` creates its structural skeleton. When `--stale` reports `index.status: "stale"` because files changed, added, or were removed, the agent edits the existing index directly so its authored overview and concepts are preserved.
216
+
217
+ The agent MUST write the repository overview and category concepts. Read the `categories` array in `files.json` to determine category order, display names, and priority levels. The final index should follow this structure:
218
+
219
+ ```markdown
220
+ # Architecture Index
221
+
222
+ > Architecture guide for this repository. The scanner maintains structure; the agent maintains meaning.
223
+
224
+ ## Repository overview
225
+
226
+ {2-4 paragraphs explaining what the repository is for, the packages or modules and runtime surfaces it contains, the central user/system concepts, and the major flow between them. Base this on every relevant manifest and the source graph.}
227
+
228
+ ## {Category Name}
229
+
230
+ {Conceptual overview: what this category represents, why it exists, what it owns, and how it relates to other categories.}
231
+
232
+ - [`path/to/file.js`](./path/to/file.js.md) — {one-line description}
233
+ - [`path/to/other.js`](./path/to/other.js.md) — {one-line description}
234
+
235
+ ## {Next Category}
236
+ ...
237
+ ```
238
+
239
+ **Category configuration** is defined in `files.json` under the `categories` array:
240
+
241
+ ```json
242
+ "categories": [
243
+ { "id": "application", "name": "Application Core", "priority": "critical", "order": 1 },
244
+ { "id": "config", "name": "Configuration", "priority": "normal", "order": 5 }
245
+ ]
246
+ ```
247
+
248
+ - **`order`** — Controls the display order of categories in the index (ascending)
249
+ - **`name`** — The display heading used in the index (`## {name}`)
250
+ - **`priority`** — Controls the depth of the overview:
251
+ - **`critical`** — The overview for this category should be 2-3x longer than normal. Write 3-4 paragraphs covering key concepts, data flow, architectural decisions, and how the parts interact. Include code samples or diagrams in the overview itself when helpful. These are the categories a new contributor must deeply understand.
252
+ - **`normal`** — Standard 1-2 paragraph overview explaining purpose, key patterns, and relationships between files.
253
+
254
+ **Rules for the index:**
255
+ - Category sections are ordered by the `order` field in the `categories` array
256
+ - Each category section gets an architectural overview — length determined by `priority`
257
+ - Each link gets a brief one-line meaning statement, written from the file's Meaning section
258
+ - **Cross-link file references** — every file path mentioned in the overview text must link to its architecture doc (same rule as per-file docs)
259
+ - The opening architecture narrative must reflect the **full repository inventory** from Step 0, not just the packages or modules currently documented in one category
260
+ - Write for someone unfamiliar with the codebase — the index is the entry point to understanding the architecture
261
+
262
+ ### Step 5: Verify
263
+
264
+ - Confirm every file in the manifest has a corresponding `.md` doc
265
+ - Confirm every entry in `removed` had its doc file deleted
266
+ - Confirm `architecture.index.md` links to all docs
267
+ - Confirm every doc has a backlink to the index
268
+
269
+ ### Step 6: Commit
270
+
271
+ ```bash
272
+ git add .agents/architecture/ .agents/skills/architecture-scanner/
273
+ git commit -m "Update architecture documentation"
274
+ ```
@@ -0,0 +1,10 @@
1
+ {
2
+ "categories": [
3
+ { "id": "config", "name": "Configuration", "priority": "normal", "order": 1 },
4
+ { "id": "entry", "name": "Entry Points", "priority": "critical", "order": 2 },
5
+ { "id": "interface", "name": "Interfaces", "priority": "normal", "order": 3 },
6
+ { "id": "core", "name": "Core Implementation", "priority": "critical", "order": 4 },
7
+ { "id": "test", "name": "Tests", "priority": "low", "order": 5 }
8
+ ],
9
+ "files": []
10
+ }