tuncss-plan-kit 0.1.1 → 0.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.
@@ -1,44 +1,48 @@
1
- import path from "path";
2
- import { fileURLToPath } from "url";
3
-
4
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
5
- const skillsDir = path.resolve(__dirname, "../../skills");
6
-
7
- // Minimal templates: just pass the user's input through. The skill's
8
- // `description` frontmatter is what triggers the model to invoke the skill
9
- // when relevant — we don't force-load it from the wrapper, which would
10
- // dump the full SKILL.md body into the chat in OpenCode's UI.
11
- const WRAPPERS = {
12
- brainstorm: {
13
- description: "Turn an idea into an approved spec",
14
- template: "$ARGUMENTS\n",
15
- },
16
- "plan-universal": {
17
- description: "Turn an approved spec into an executable implementation plan",
18
- template: "$ARGUMENTS\n",
19
- },
20
- "handoff-plan": {
21
- description:
22
- "Generate a paste-ready handoff message for another LLM agent to execute the plan",
23
- template: "$ARGUMENTS\n",
24
- },
25
- };
26
-
27
- export const TuncssPlanKitPlugin = async () => ({
28
- config: async (config) => {
29
- config.skills = config.skills || {};
30
- config.skills.paths = config.skills.paths || [];
31
- if (!config.skills.paths.includes(skillsDir)) {
32
- config.skills.paths.push(skillsDir);
33
- }
34
- config.command = config.command || {};
35
- for (const [name, def] of Object.entries(WRAPPERS)) {
36
- if (!config.command[name]) {
37
- config.command[name] = {
38
- template: def.template,
39
- description: def.description,
40
- };
41
- }
42
- }
43
- },
44
- });
1
+ import path from "path";
2
+ import { fileURLToPath } from "url";
3
+
4
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
5
+ const skillsDir = path.resolve(__dirname, "../../skills");
6
+
7
+ // Minimal templates: just pass the user's input through. The skill's
8
+ // `description` frontmatter is what triggers the model to invoke the skill
9
+ // when relevant — we don't force-load it from the wrapper, which would
10
+ // dump the full SKILL.md body into the chat in OpenCode's UI.
11
+ const WRAPPERS = {
12
+ brainstorm: {
13
+ description: "Turn an idea into an approved spec",
14
+ template: "$ARGUMENTS\n",
15
+ },
16
+ "plan-universal": {
17
+ description: "Turn an approved spec into an executable implementation plan",
18
+ template: "$ARGUMENTS\n",
19
+ },
20
+ "handoff-plan": {
21
+ description:
22
+ "Generate a paste-ready handoff message for another LLM agent to execute the plan",
23
+ template: "$ARGUMENTS\n",
24
+ },
25
+ changelog: {
26
+ description: "Record what changed in docs/CHANGELOG.md",
27
+ template: "$ARGUMENTS\n",
28
+ },
29
+ };
30
+
31
+ export const TuncssPlanKitPlugin = async () => ({
32
+ config: async (config) => {
33
+ config.skills = config.skills || {};
34
+ config.skills.paths = config.skills.paths || [];
35
+ if (!config.skills.paths.includes(skillsDir)) {
36
+ config.skills.paths.push(skillsDir);
37
+ }
38
+ config.command = config.command || {};
39
+ for (const [name, def] of Object.entries(WRAPPERS)) {
40
+ if (!config.command[name]) {
41
+ config.command[name] = {
42
+ template: def.template,
43
+ description: def.description,
44
+ };
45
+ }
46
+ }
47
+ },
48
+ });
package/README.md CHANGED
@@ -1,113 +1,115 @@
1
- # tuncss-plan-kit
2
-
3
- Three skills for spec-driven development, installable into Claude Code, Codex CLI, and OpenCode:
4
-
5
- - **`/brainstorm`** — turn an idea into an approved spec (`docs/specs/`)
6
- - **`/plan-universal`** — turn a spec into an executable plan (`docs/plans/`)
7
- - **`/handoff-plan`** — generate a paste-ready briefing for another LLM agent to execute the plan (`docs/handoffs/`)
8
-
9
- No agents, no routing, no TDD ceremony. Just three skills that get you from idea → spec → plan → handoff.
10
-
11
- ## Install
12
-
13
- In your project directory:
14
-
15
- ```bash
16
- npx tuncss-plan-kit init
17
- ```
18
-
19
- The installer auto-detects which platform(s) the project uses and writes the right files.
20
-
21
- | Detected | Means |
22
- |---|---|
23
- | `.claude/` or `CLAUDE.md` | Claude Code |
24
- | `.codex/` | Codex CLI |
25
- | `.opencode/` | OpenCode |
26
- | `AGENTS.md` (alone) | Both Codex and OpenCode (they share `AGENTS.md`) |
27
-
28
- If nothing is detected, pass an explicit target:
29
-
30
- ```bash
31
- npx tuncss-plan-kit init --target=claude
32
- npx tuncss-plan-kit init --target=claude,codex
33
- npx tuncss-plan-kit init --target=all
34
- ```
35
-
36
- Re-running is safe. Skill and command files are overwritten only with `--force`. Instruction-file marker blocks are always replaced in place — your other content survives.
37
-
38
- Restart your coding agent after install so it picks up the new skills and slash commands.
39
-
40
- ## What gets written where
41
-
42
- | Platform | Skills | Commands | Instructions |
43
- |---|---|---|---|
44
- | Claude Code | `.claude/skills/<n>/SKILL.md` | *(none — skills auto-expose as slash)* | `CLAUDE.md` |
45
- | Codex CLI | `.agents/skills/<n>/SKILL.md` | `.codex/prompts/<n>.md` | `AGENTS.md` |
46
- | OpenCode | `.opencode/skills/<n>/SKILL.md` | `.opencode/commands/<n>.md` | `AGENTS.md` |
47
-
48
- Claude Code automatically exposes any skill named `foo` as `/foo`, so the kit doesn't write wrapper command files for it. Codex and OpenCode don't auto-expose, so wrappers are written there to give you the same `/brainstorm`, `/plan-universal`, `/handoff-plan` UX everywhere.
49
-
50
- With `--global` the same files go to user-wide locations (`~/.claude/`, `~/.agents/`, `~/.codex/`).
51
-
52
- **OpenCode `--global` is supported via an npm-plugin route**: the kit installs itself into `~/.config/opencode/node_modules/`, registers itself in `~/.config/opencode/opencode.json`'s `plugin` array, and drops command wrappers into `~/.config/opencode/commands/`. After install, restart OpenCode — skills appear in every project. (For Claude and Codex, `--global` is a plain file copy.)
53
-
54
- Project-local is still the default for all three — recommended unless you specifically want the kit available everywhere.
55
-
56
- ## Workflow
57
-
58
- ```
59
- You: /brainstorm I want a CLI that ...
60
- Agent: ↓ brainstorming skill
61
- asks one question at a time, proposes 2-3 approaches, presents
62
- the design section by section, writes spec to docs/specs/
63
- You: (review and approve)
64
-
65
- You: /plan-universal
66
- Agent: ↓ writing-plans skill
67
- writes plan to docs/plans/ with execution contract at the top,
68
- tasks shaped as Targets / Model Tier / Implementation Notes /
69
- Done When / Verification
70
-
71
- You: do TASK-01
72
- Agent: reads only TASK-01's block, stays inside its Targets, stops for
73
- approval when done
74
-
75
- — or —
76
-
77
- You: /handoff-plan
78
- Agent: ↓ handoff skill
79
- writes a short briefing to docs/handoffs/ that you can paste
80
- into another agent (or feed it the file path)
81
- ```
82
-
83
- ## What's in a plan
84
-
85
- Every plan starts with this contract:
86
-
87
- > 1. Read **only** that task's block. Do not preview other tasks.
88
- > 2. Stay strictly inside its **Targets** — do not edit files outside that list.
89
- > 3. Follow the **Implementation Notes**; do not invent extra scope.
90
- > 4. When **Done When** and **Verification** are satisfied, **stop and report**. Wait for approval.
91
- > 5. If verification fails, report and stop. Do not attempt fixes outside the task's Targets.
92
-
93
- Tasks are tagged with model tiers (T1 Fast / T2 Balanced / T3 Power / T4 Reasoning) so you can route execution to the cheapest model that can do the job.
94
-
95
- ## Options
96
-
97
- ```
98
- npx tuncss-plan-kit init [--target=<list>] [--global] [--force]
99
- ```
100
-
101
- | Flag | Effect |
102
- |------|--------|
103
- | `--target=<list>` | Comma-separated. Values: `claude`, `codex`, `opencode`, `all`. Auto-detected if omitted. |
104
- | `--global` | Install to user-wide locations instead of the current project. |
105
- | `--force` | Overwrite existing skill/command files without warning. |
106
-
107
- ## Why this exists
108
-
109
- Existing kits ship dozens of agents and skills you'll never use, but every one of them sits in your context and burns tokens each turn. `tuncss-plan-kit` ships three files that cover the only loop most projects need: design → plan → execute (here or elsewhere). That's it.
110
-
111
- ## License
112
-
113
- MIT
1
+ # tuncss-plan-kit
2
+
3
+ Four skills for spec-driven development, installable into Claude Code, Codex CLI, and OpenCode:
4
+
5
+ - **`/brainstorm`** — turn an idea into an approved spec (`docs/specs/`)
6
+ - **`/plan-universal`** — turn a spec into an executable plan (`docs/plans/`)
7
+ - **`/handoff-plan`** — generate a paste-ready briefing for another LLM agent to execute the plan (`docs/handoffs/`)
8
+ - **`/changelog`** — record what changed, in plain sentences (`docs/CHANGELOG.md`)
9
+
10
+ No agents, no routing, no TDD ceremony. Just four skills that get you from idea → spec → plan → handoff, and a record of what actually changed.
11
+
12
+ ## Install
13
+
14
+ In your project directory:
15
+
16
+ ```bash
17
+ npx tuncss-plan-kit init
18
+ ```
19
+
20
+ The installer auto-detects which platform(s) the project uses and writes the right files.
21
+
22
+ | Detected | Means |
23
+ |---|---|
24
+ | `.claude/` or `CLAUDE.md` | Claude Code |
25
+ | `.codex/` | Codex CLI |
26
+ | `.opencode/` | OpenCode |
27
+ | `AGENTS.md` (alone) | Both Codex and OpenCode (they share `AGENTS.md`) |
28
+
29
+ If nothing is detected, pass an explicit target:
30
+
31
+ ```bash
32
+ npx tuncss-plan-kit init --target=claude
33
+ npx tuncss-plan-kit init --target=claude,codex
34
+ npx tuncss-plan-kit init --target=all
35
+ ```
36
+
37
+ Re-running is safe. Skill and command files are overwritten only with `--force`. Instruction-file marker blocks are always replaced in place — your other content survives.
38
+
39
+ Restart your coding agent after install so it picks up the new skills and slash commands.
40
+
41
+ ## What gets written where
42
+
43
+ | Platform | Skills | Commands | Instructions |
44
+ |---|---|---|---|
45
+ | Claude Code | `.claude/skills/<n>/SKILL.md` | *(none — skills auto-expose as slash)* | `CLAUDE.md` |
46
+ | Codex CLI | `.agents/skills/<n>/SKILL.md` | `.codex/prompts/<n>.md` | `AGENTS.md` |
47
+ | OpenCode | `.opencode/skills/<n>/SKILL.md` | `.opencode/commands/<n>.md` | `AGENTS.md` |
48
+
49
+ Claude Code automatically exposes any skill named `foo` as `/foo`, so the kit doesn't write wrapper command files for it. Codex and OpenCode don't auto-expose, so wrappers are written there to give you the same `/brainstorm`, `/plan-universal`, `/handoff-plan` UX everywhere.
50
+
51
+ With `--global` the same files go to user-wide locations (`~/.claude/`, `~/.agents/`, `~/.codex/`).
52
+
53
+ **OpenCode `--global` is supported via an npm-plugin route**: the kit installs itself into `~/.config/opencode/node_modules/`, registers itself in `~/.config/opencode/opencode.json`'s `plugin` array, and drops command wrappers into `~/.config/opencode/commands/`. After install, restart OpenCode — skills appear in every project. (For Claude and Codex, `--global` is a plain file copy.)
54
+
55
+ Project-local is still the default for all three — recommended unless you specifically want the kit available everywhere.
56
+
57
+ ## Workflow
58
+
59
+ ```
60
+ You: /brainstorm I want a CLI that ...
61
+ Agent: ↓ brainstorming skill
62
+ asks one question at a time, proposes 2-3 approaches, presents
63
+ the design section by section, writes spec to docs/specs/
64
+ You: (review and approve)
65
+
66
+ You: /plan-universal
67
+ Agent: ↓ writing-plans skill
68
+ writes plan to docs/plans/ with execution contract at the top,
69
+ tasks shaped as Targets / Model Tier / Implementation Notes /
70
+ Done When / Verification
71
+
72
+ You: do TASK-01
73
+ Agent: reads only TASK-01's block, stays inside its Targets, writes the
74
+ changelog entry to docs/CHANGELOG.md, stops for approval when done
75
+
76
+ — or —
77
+
78
+ You: /handoff-plan
79
+ Agent: ↓ handoff skill
80
+ writes a short briefing to docs/handoffs/ that you can paste
81
+ into another agent (or feed it the file path)
82
+ ```
83
+
84
+ ## What's in a plan
85
+
86
+ Every plan starts with this contract:
87
+
88
+ > 1. Read **only** that task's block. Do not preview other tasks.
89
+ > 2. Stay strictly inside its **Targets** — do not edit files outside that list.
90
+ > 3. Follow the **Implementation Notes**; do not invent extra scope.
91
+ > 4. When **Done When** and **Verification** are satisfied, write the changelog entry (rule 6), then **stop and report**. Wait for approval before moving to the next task.
92
+ > 5. If verification fails, report the failure and stop. Do not attempt fixes outside the task's Targets, and do not write a changelog entry.
93
+ > 6. **Changelog entry:** use the `changelog` skill to append this task's entry to `docs/CHANGELOG.md`. Base it on the actual diff, not on what you set out to do.
94
+
95
+ Tasks are tagged with model tiers (T1 Fast / T2 Balanced / T3 Power / T4 Reasoning) so you can route execution to the cheapest model that can do the job.
96
+
97
+ ## Options
98
+
99
+ ```
100
+ npx tuncss-plan-kit init [--target=<list>] [--global] [--force]
101
+ ```
102
+
103
+ | Flag | Effect |
104
+ |------|--------|
105
+ | `--target=<list>` | Comma-separated. Values: `claude`, `codex`, `opencode`, `all`. Auto-detected if omitted. |
106
+ | `--global` | Install to user-wide locations instead of the current project. |
107
+ | `--force` | Overwrite existing skill/command files without warning. |
108
+
109
+ ## Why this exists
110
+
111
+ Existing kits ship dozens of agents and skills you'll never use, but every one of them sits in your context and burns tokens each turn. `tuncss-plan-kit` ships four files that cover the only loop most projects need: design → plan → execute (here or elsewhere) → record. That's it.
112
+
113
+ ## License
114
+
115
+ MIT