tuncss-plan-kit 0.1.1 → 0.3.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,123 @@
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, OpenCode, and Antigravity:
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/` | Antigravity |
28
+ | `AGENTS.md` (alone) | Codex, OpenCode, and Antigravity (they share `AGENTS.md`) |
29
+
30
+ If nothing is detected, pass an explicit target:
31
+
32
+ ```bash
33
+ npx tuncss-plan-kit init --target=claude
34
+ npx tuncss-plan-kit init --target=claude,codex
35
+ npx tuncss-plan-kit init --target=all
36
+ ```
37
+
38
+ 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.
39
+
40
+ Restart your coding agent after install so it picks up the new skills and slash commands.
41
+
42
+ ## What gets written where
43
+
44
+ | Platform | Skills | Commands | Instructions |
45
+ |---|---|---|---|
46
+ | Claude Code | `.claude/skills/<n>/SKILL.md` | *(none — skills auto-expose as slash)* | `CLAUDE.md` |
47
+ | Codex CLI | `.agents/skills/<n>/SKILL.md` | `.codex/prompts/<n>.md` | `AGENTS.md` |
48
+ | OpenCode | `.opencode/skills/<n>/SKILL.md` | `.opencode/commands/<n>.md` | `AGENTS.md` |
49
+ | Antigravity | `.agents/skills/<n>/SKILL.md` | *(none — skills auto-expose as slash)* | `AGENTS.md` |
50
+
51
+ Claude Code and Antigravity automatically expose any skill named `foo` as `/foo`, so the kit doesn't write wrapper command files for them. Codex and OpenCode don't auto-expose, so wrappers are written there to give you the same `/brainstorm`, `/plan-universal`, `/handoff-plan`, `/changelog` UX everywhere.
52
+
53
+ Antigravity and Codex share `.agents/skills/`, so installing both writes those files once — the second platform reports them as already written.
54
+
55
+ Note: `agy changelog` is Antigravity's own built-in subcommand for release notes. The kit's `/changelog` is a slash command inside the agent session — same word, different place.
56
+
57
+ With `--global` the same files go to user-wide locations (`~/.claude/`, `~/.agents/`, `~/.codex/`, `~/.gemini/config/`).
58
+
59
+ **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.)
60
+
61
+ **Antigravity `--global` is a plain file copy to `~/.gemini/config/`** — a single location the desktop app, the `agy` CLI, and the IDE all read, so one install covers them all.
62
+
63
+ Project-local is still the default for all four — recommended unless you specifically want the kit available everywhere.
64
+
65
+ ## Workflow
66
+
67
+ ```
68
+ You: /brainstorm I want a CLI that ...
69
+ Agent: ↓ brainstorming skill
70
+ asks one question at a time, proposes 2-3 approaches, presents
71
+ the design section by section, writes spec to docs/specs/
72
+ You: (review and approve)
73
+
74
+ You: /plan-universal
75
+ Agent: ↓ writing-plans skill
76
+ writes plan to docs/plans/ with execution contract at the top,
77
+ tasks shaped as Targets / Model Tier / Implementation Notes /
78
+ Done When / Verification
79
+
80
+ You: do TASK-01
81
+ Agent: reads only TASK-01's block, stays inside its Targets, writes the
82
+ changelog entry to docs/CHANGELOG.md, stops for approval when done
83
+
84
+ — or —
85
+
86
+ You: /handoff-plan
87
+ Agent: ↓ handoff skill
88
+ writes a short briefing to docs/handoffs/ that you can paste
89
+ into another agent (or feed it the file path)
90
+ ```
91
+
92
+ ## What's in a plan
93
+
94
+ Every plan starts with this contract:
95
+
96
+ > 1. Read **only** that task's block. Do not preview other tasks.
97
+ > 2. Stay strictly inside its **Targets** — do not edit files outside that list.
98
+ > 3. Follow the **Implementation Notes**; do not invent extra scope.
99
+ > 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.
100
+ > 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.
101
+ > 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.
102
+
103
+ 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.
104
+
105
+ ## Options
106
+
107
+ ```
108
+ npx tuncss-plan-kit init [--target=<list>] [--global] [--force]
109
+ ```
110
+
111
+ | Flag | Effect |
112
+ |------|--------|
113
+ | `--target=<list>` | Comma-separated. Values: `claude`, `codex`, `opencode`, `antigravity`, `all`. Auto-detected if omitted. |
114
+ | `--global` | Install to user-wide locations instead of the current project. |
115
+ | `--force` | Overwrite existing skill/command files without warning. |
116
+
117
+ ## Why this exists
118
+
119
+ 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.
120
+
121
+ ## License
122
+
123
+ MIT