agentic-skill-mill 1.0.3
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/README.md +135 -0
- package/dist/cache/cache-manager.d.ts +27 -0
- package/dist/cache/cache-manager.d.ts.map +1 -0
- package/dist/cache/cache-manager.js +139 -0
- package/dist/cache/cache-manager.js.map +1 -0
- package/dist/cli/commands/check-exports.d.ts +6 -0
- package/dist/cli/commands/check-exports.d.ts.map +1 -0
- package/dist/cli/commands/check-exports.js +7 -0
- package/dist/cli/commands/check-exports.js.map +1 -0
- package/dist/cli/commands/list-project.d.ts +6 -0
- package/dist/cli/commands/list-project.d.ts.map +1 -0
- package/dist/cli/commands/list-project.js +7 -0
- package/dist/cli/commands/list-project.js.map +1 -0
- package/dist/cli/commands/scaffold.d.ts +6 -0
- package/dist/cli/commands/scaffold.d.ts.map +1 -0
- package/dist/cli/commands/scaffold.js +11 -0
- package/dist/cli/commands/scaffold.js.map +1 -0
- package/dist/cli/commands/validate-manifest.d.ts +6 -0
- package/dist/cli/commands/validate-manifest.d.ts.map +1 -0
- package/dist/cli/commands/validate-manifest.js +7 -0
- package/dist/cli/commands/validate-manifest.js.map +1 -0
- package/dist/cli/commands/validate-skill.d.ts +6 -0
- package/dist/cli/commands/validate-skill.d.ts.map +1 -0
- package/dist/cli/commands/validate-skill.js +8 -0
- package/dist/cli/commands/validate-skill.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +268 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/output-formatter.d.ts +6 -0
- package/dist/cli/output-formatter.d.ts.map +1 -0
- package/dist/cli/output-formatter.js +19 -0
- package/dist/cli/output-formatter.js.map +1 -0
- package/dist/core/check-exports.d.ts +21 -0
- package/dist/core/check-exports.d.ts.map +1 -0
- package/dist/core/check-exports.js +67 -0
- package/dist/core/check-exports.js.map +1 -0
- package/dist/core/list-project.d.ts +31 -0
- package/dist/core/list-project.d.ts.map +1 -0
- package/dist/core/list-project.js +118 -0
- package/dist/core/list-project.js.map +1 -0
- package/dist/core/scaffold.d.ts +24 -0
- package/dist/core/scaffold.d.ts.map +1 -0
- package/dist/core/scaffold.js +168 -0
- package/dist/core/scaffold.js.map +1 -0
- package/dist/core/validate-manifest.d.ts +21 -0
- package/dist/core/validate-manifest.d.ts.map +1 -0
- package/dist/core/validate-manifest.js +151 -0
- package/dist/core/validate-manifest.js.map +1 -0
- package/dist/core/validate-skill.d.ts +24 -0
- package/dist/core/validate-skill.d.ts.map +1 -0
- package/dist/core/validate-skill.js +149 -0
- package/dist/core/validate-skill.js.map +1 -0
- package/dist/errors/types.d.ts +19 -0
- package/dist/errors/types.d.ts.map +1 -0
- package/dist/errors/types.js +40 -0
- package/dist/errors/types.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/package.json +56 -0
- package/skill/build/compile.mjs +385 -0
- package/skill/build/manifest.json +29 -0
- package/skill/fragments/meta/architecture-overview.md +37 -0
- package/skill/fragments/meta/cli-command-pattern.md +83 -0
- package/skill/fragments/meta/core-module-pattern.md +38 -0
- package/skill/fragments/meta/fragment-composition.md +40 -0
- package/skill/fragments/meta/rename-workflow.md +51 -0
- package/skill/fragments/meta/research-to-code.md +44 -0
- package/skill/skills/agentic-skill-mill/agentic-skill-mill.md +133 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
### Designing fragments
|
|
2
|
+
|
|
3
|
+
Fragments are reusable knowledge blocks stored in `skill/fragments/<category>/`. They are included in skill sources via include markers (`\{\{include:path\}\}`) and resolved at compile time.
|
|
4
|
+
|
|
5
|
+
**When to create a fragment:**
|
|
6
|
+
- The knowledge applies to 2+ skills (or likely will in the future)
|
|
7
|
+
- The content is self-contained and makes sense without its parent skill
|
|
8
|
+
- Updating the knowledge in one place should propagate everywhere
|
|
9
|
+
|
|
10
|
+
**When NOT to create a fragment:**
|
|
11
|
+
- The content is specific to exactly one skill and unlikely to be reused
|
|
12
|
+
- The content requires context from the surrounding skill to make sense
|
|
13
|
+
- The content is a single sentence or table row (too small to justify the indirection)
|
|
14
|
+
|
|
15
|
+
### Fragment categories
|
|
16
|
+
|
|
17
|
+
| Category | What goes here | Examples |
|
|
18
|
+
|----------|---------------|---------|
|
|
19
|
+
| `common/` | Rules and formats shared across all skills | Output format, guidelines, anti-patterns |
|
|
20
|
+
| `domain/` | Deep domain knowledge specific to the project's subject area | Pacing tables, narrative patterns, voice guides |
|
|
21
|
+
| `meta/` | Knowledge about the skill system itself | Architecture, patterns, workflows |
|
|
22
|
+
|
|
23
|
+
### Creating a fragment
|
|
24
|
+
|
|
25
|
+
1. **Create the file** at `skill/fragments/<category>/<name>.md`
|
|
26
|
+
- No YAML frontmatter -- fragments are pure content
|
|
27
|
+
- Write in the same imperative style as the parent skill
|
|
28
|
+
- Use markdown headers starting at `###` (they'll be nested inside the skill's `##` sections)
|
|
29
|
+
|
|
30
|
+
2. **Include it in the skill source** with an include marker: `\{\{include:<category>/<name>.md\}\}`
|
|
31
|
+
|
|
32
|
+
3. **Declare it in manifest.json** under the skill's `fragments` array -- the compiler cross-validates these declarations against actual includes and errors on mismatches
|
|
33
|
+
|
|
34
|
+
### Fragment rules
|
|
35
|
+
|
|
36
|
+
- **One level of includes only.** Fragments cannot include other fragments. This is enforced by the compiler.
|
|
37
|
+
- **No frontmatter.** Fragments are content blocks, not standalone documents.
|
|
38
|
+
- **Match the parent skill's voice.** If the skill uses imperative mood ("Do X"), the fragment should too.
|
|
39
|
+
- **Fragments are inlined verbatim.** The compiler replaces include markers with the fragment content, trimming trailing whitespace. No wrapping, no indentation changes.
|
|
40
|
+
- **Keep fragments focused.** A fragment about pacing shouldn't also cover narrative patterns. If they're separate concepts, they're separate fragments.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
### Renaming a skill project
|
|
2
|
+
|
|
3
|
+
When the project, skill, or CLI needs a new name, update all touchpoints in one pass to avoid stale references. The rename affects three identity layers:
|
|
4
|
+
|
|
5
|
+
| Layer | Old example | New example |
|
|
6
|
+
|-------|-------------|-------------|
|
|
7
|
+
| npm package name | `presentation-creator` | `tech-demo-director` |
|
|
8
|
+
| CLI binary name | `presentation-util` | `demo-director` |
|
|
9
|
+
| Skill name + managed marker | `presentation-creator` | `tech-demo-director` |
|
|
10
|
+
|
|
11
|
+
### Rename checklist (in order)
|
|
12
|
+
|
|
13
|
+
1. **Skill source directory and file**
|
|
14
|
+
```bash
|
|
15
|
+
mv skill/skills/<old>/ skill/skills/<new>/
|
|
16
|
+
mv skill/skills/<new>/<old>.md skill/skills/<new>/<new>.md
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
2. **Skill source frontmatter** -- update `name:` and H1 title in the renamed .md
|
|
20
|
+
|
|
21
|
+
3. **Manifest** (`skill/build/manifest.json`) -- rename the skill key and `source` path
|
|
22
|
+
|
|
23
|
+
4. **Compiler marker** (`skill/build/compile.mjs`) -- update the `MANAGED_BY` constant
|
|
24
|
+
|
|
25
|
+
5. **Installer** (`install.sh`) -- update `PROJECT_NAME`, `CLI_BIN_NAME`, `MANAGED_MARKER`, `SKILLS` array
|
|
26
|
+
|
|
27
|
+
6. **Package metadata** (`package.json`) -- update `name` and `bin` key
|
|
28
|
+
|
|
29
|
+
7. **CLI metadata** (`src/cli/index.ts`) -- update `.name()` and `.description()` calls
|
|
30
|
+
|
|
31
|
+
8. **README** -- update title, CLI references, project layout example
|
|
32
|
+
|
|
33
|
+
9. **Any docs** referencing the old name (translation-map, lessons-learned, etc.)
|
|
34
|
+
|
|
35
|
+
10. **Regenerate everything:**
|
|
36
|
+
```bash
|
|
37
|
+
rm -rf compiled
|
|
38
|
+
npm install # regenerates package-lock.json
|
|
39
|
+
npm run build # rebuilds TypeScript CLI
|
|
40
|
+
npm run compile # regenerates compiled/ under new paths
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Verification
|
|
44
|
+
|
|
45
|
+
After renaming, run this sweep to confirm no stale references remain:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
grep -r "<old-name>" --include="*.md" --include="*.json" --include="*.mjs" --include="*.ts" --include="*.sh" .
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The grep should return zero results (excluding node_modules and dist).
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
### Extracting CLI utilities from research
|
|
2
|
+
|
|
3
|
+
When research documents, field observations, or domain expertise suggest actionable tooling, follow this process to turn insights into CLI commands:
|
|
4
|
+
|
|
5
|
+
**Step 1: Read the research and tag actionable items**
|
|
6
|
+
|
|
7
|
+
Scan the source material for:
|
|
8
|
+
- Checklists that could be generated dynamically (checklist generator command)
|
|
9
|
+
- Calculations that depend on user inputs (calculator command)
|
|
10
|
+
- Validation rules that can be checked programmatically (validator command)
|
|
11
|
+
- Structured data that can be extracted from existing files (extractor command)
|
|
12
|
+
- Schedules or plans that follow a formula (planner command)
|
|
13
|
+
- Analysis that can be automated against a codebase or artifact (scanner command)
|
|
14
|
+
|
|
15
|
+
**Step 2: Group by command**
|
|
16
|
+
|
|
17
|
+
Each command should do one thing well. If two items from the research share the same input and output shape, they belong in one command. If they have different inputs, they're separate commands.
|
|
18
|
+
|
|
19
|
+
| Research insight | CLI command type | Example |
|
|
20
|
+
|-----------------|-----------------|---------|
|
|
21
|
+
| "Audiences retain 3+/-1 points" | Validator | Check that outlines have 2-4 key sections |
|
|
22
|
+
| "Budget 130 WPM for speaking" | Calculator | Compute per-section word counts from time budgets |
|
|
23
|
+
| "Spaced retrieval beats rereading" | Planner | Generate rehearsal schedule from event date |
|
|
24
|
+
| "Audio quality affects credibility" | Checklist | Pre-flight checklist with audio test item |
|
|
25
|
+
| "Entry points tell the story structure" | Scanner | Analyze repo for entry points and connectivity |
|
|
26
|
+
|
|
27
|
+
**Step 3: Define the interface before writing code**
|
|
28
|
+
|
|
29
|
+
For each command, write the TypeScript interface first:
|
|
30
|
+
- What does the user provide? (Options interface)
|
|
31
|
+
- What does the command return? (Result interface)
|
|
32
|
+
- What warnings can it produce? (`warnings: string[]` in Result)
|
|
33
|
+
|
|
34
|
+
**Step 4: Implement bottom-up**
|
|
35
|
+
|
|
36
|
+
1. Core module in `src/core/` (pure logic, no CLI concerns)
|
|
37
|
+
2. Command wrapper in `src/cli/commands/` (thin delegate)
|
|
38
|
+
3. Wire into `src/cli/index.ts` (with --json support)
|
|
39
|
+
4. Export from `src/index.ts` (for library consumers)
|
|
40
|
+
5. Build and verify: `npm run build && node dist/cli/index.js <command> --help`
|
|
41
|
+
|
|
42
|
+
**Step 5: Embed the research rationale**
|
|
43
|
+
|
|
44
|
+
When a command produces items (checklist entries, warnings, schedule sessions), include a `rationale` or `description` field that cites the research principle. This teaches the user *why*, not just *what*.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentic-skill-mill
|
|
3
|
+
description: "Build, augment, and maintain skill projects that follow the skill-system-template architecture. Covers adding CLI commands, creating fragments, composing skills, renaming projects, and turning research into actionable tooling. Use when the user mentions: add a command, new skill, new fragment, augment the CLI, build a utility, add a tool, rename the project, forge a component, or wants to extend an existing skill project."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agentic Skill Mill
|
|
7
|
+
|
|
8
|
+
Forge and refine skill projects that follow the skill-system-template architecture: fragment-composed skills compiled to multiple IDE targets, paired with a TypeScript companion CLI (`skillmill`) that provides structured commands for agents and humans.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Architecture
|
|
13
|
+
|
|
14
|
+
{{include:meta/architecture-overview.md}}
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
### Step 1: Understand the Goal
|
|
21
|
+
|
|
22
|
+
Ask or infer:
|
|
23
|
+
|
|
24
|
+
| Question | Why It Matters |
|
|
25
|
+
|----------|---------------|
|
|
26
|
+
| What is the user trying to add or change? | Scopes the work: new command, new skill, new fragment, rename, or full project |
|
|
27
|
+
| Is there research or a requirements document? | Source material drives which CLI commands to build |
|
|
28
|
+
| What's the existing project state? | Read manifest.json, package.json, and src/cli/index.ts to understand what's already built |
|
|
29
|
+
| Does this need a new skill, a new fragment, or just a new CLI command? | Different paths require different steps |
|
|
30
|
+
|
|
31
|
+
### Step 2: Read the Project State
|
|
32
|
+
|
|
33
|
+
Before making changes, read these files to understand the current structure:
|
|
34
|
+
|
|
35
|
+
1. `skill/build/manifest.json` — what skills and fragments exist
|
|
36
|
+
2. `src/cli/index.ts` — what CLI commands are wired
|
|
37
|
+
3. `src/index.ts` — what's exported
|
|
38
|
+
4. `package.json` — package name, bin name, dependencies
|
|
39
|
+
|
|
40
|
+
### Step 3: If Adding CLI Commands from Research
|
|
41
|
+
|
|
42
|
+
{{include:meta/research-to-code.md}}
|
|
43
|
+
|
|
44
|
+
### Step 4: Implement Core Modules
|
|
45
|
+
|
|
46
|
+
{{include:meta/core-module-pattern.md}}
|
|
47
|
+
|
|
48
|
+
### Step 5: Implement CLI Command Wrappers
|
|
49
|
+
|
|
50
|
+
{{include:meta/cli-command-pattern.md}}
|
|
51
|
+
|
|
52
|
+
### Step 6: If Adding or Modifying Fragments
|
|
53
|
+
|
|
54
|
+
{{include:meta/fragment-composition.md}}
|
|
55
|
+
|
|
56
|
+
### Step 7: If Adding a New Skill
|
|
57
|
+
|
|
58
|
+
Create the skill source at `skill/skills/<name>/<name>.md` with this structure:
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
---
|
|
62
|
+
name: <skill-name>
|
|
63
|
+
description: "One sentence explaining what this skill does and when to invoke it."
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
# Skill Title
|
|
67
|
+
|
|
68
|
+
Brief description of what this skill produces.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Section Name
|
|
73
|
+
|
|
74
|
+
\{\{include:<category>/<fragment>.md\}\}
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Another Section
|
|
79
|
+
|
|
80
|
+
Direct content or more includes.
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Then register it:
|
|
84
|
+
|
|
85
|
+
1. Add the skill entry to `skill/build/manifest.json` with its source path and fragment dependencies
|
|
86
|
+
2. Add the skill name to the `SKILLS` array in `install.sh`
|
|
87
|
+
3. Compile: `npm run compile`
|
|
88
|
+
|
|
89
|
+
### Step 8: If Renaming the Project
|
|
90
|
+
|
|
91
|
+
{{include:meta/rename-workflow.md}}
|
|
92
|
+
|
|
93
|
+
### Step 9: Build, Compile, and Verify
|
|
94
|
+
|
|
95
|
+
After any change, run the full verification sequence:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
npm run build # TypeScript CLI compiles cleanly
|
|
99
|
+
npm run compile # Skills compile to all 7 IDE targets
|
|
100
|
+
npm run compile:validate # Cross-validates manifest vs source includes
|
|
101
|
+
node dist/cli/index.js --help # CLI shows expected commands
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
If adding a new CLI command, also verify it runs:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
node dist/cli/index.js <command> --help # Options are correct
|
|
108
|
+
node dist/cli/index.js <command> <args> # Human output works
|
|
109
|
+
node dist/cli/index.js <command> --json # JSON output works
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Step 10: Commit
|
|
113
|
+
|
|
114
|
+
Use conventional commit format with a detailed body:
|
|
115
|
+
|
|
116
|
+
- `feat:` for new commands, skills, or fragments
|
|
117
|
+
- `refactor:` for renames or restructuring
|
|
118
|
+
- `fix:` for bug fixes
|
|
119
|
+
|
|
120
|
+
The commit body should list every file category changed (core modules, CLI wrappers, fragments, manifest, etc.) and what was done in each.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Anti-Patterns
|
|
125
|
+
|
|
126
|
+
- **Business logic in CLI wrappers.** Command wrappers delegate; they don't compute.
|
|
127
|
+
- **Console output in core modules.** Core modules return data; they don't print.
|
|
128
|
+
- **Fragments that include fragments.** Only one level of includes is supported.
|
|
129
|
+
- **Undeclared fragments.** Every include marker in a skill source must be declared in manifest.json. The compiler errors on mismatches.
|
|
130
|
+
- **Stale compiled outputs.** Always recompile after changing skills or fragments. Run `npm run compile:validate` to detect staleness.
|
|
131
|
+
- **Partial renames.** When renaming, update every touchpoint in one pass (see rename workflow). A grep sweep with zero results confirms completeness.
|
|
132
|
+
- **Missing --json support.** Every CLI command must support `--json` for structured agent consumption. Agents cannot parse chalk-colored terminal output.
|
|
133
|
+
- **Bare `return` in `set -e` scripts.** In `install.sh`, never write `[[ condition ]] || return` or `grep ... || return`. Bare `return` inherits the exit code of the failed test (1), which `set -e` treats as fatal -- killing the script silently. Always use `return 0` for early-exit guards: `[[ -d "$dir" ]] || return 0`, `[[ -z "$var" ]] && return 0`.
|