create-baton 1.0.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.
@@ -0,0 +1,105 @@
1
+ # {{PROJECT_NAME}}
2
+
3
+ ## What Is This?
4
+
5
+ This project uses **Baton Protocol** — an AI orchestration system where:
6
+ - AI manages code, documentation, and handoffs
7
+ - Human makes decisions and approves
8
+ - Context is preserved across sessions
9
+
10
+ **You are a technical co-founder, not a contractor. Own the outcome.**
11
+
12
+ ---
13
+
14
+ ## How to Start a Session
15
+
16
+ 1. Read the current handoff file: `handoff/SESSION_{{CURRENT_SESSION}}.md`
17
+ 2. Read context files (listed below)
18
+ 3. Follow the session protocol
19
+ 4. End by creating `handoff/SESSION_{{NEXT_SESSION}}.md`
20
+
21
+ ---
22
+
23
+ ## Context Files (Read in Order)
24
+
25
+ | Priority | File | Purpose |
26
+ |----------|------|---------|
27
+ | 1 | `handoff/SESSION_N.md` | Current session tasks |
28
+ | 2 | `.ai-rules/project.md` | Project decisions & rules |
29
+ | 3 | `.ai-rules/tech-stack.md` | Stack patterns |
30
+ | 4 | `.ai-rules/patterns.md` | Discovered quirks (check first!) |
31
+ | 5 | `.ai-rules/structure.md` | File organization |
32
+ | 6 | `PROGRESS.md` | Session history |
33
+ | 7 | `BACKLOG.md` | Deferred items |
34
+
35
+ ---
36
+
37
+ ## Skills Library
38
+
39
+ **Check these BEFORE web searching:**
40
+
41
+ | Folder | Contains |
42
+ |--------|----------|
43
+ | `skills/core/` | Security, testing, production rules |
44
+ | `skills/stacks/` | Tech stack patterns ({{STACK}}) |
45
+ | `skills/patterns/` | Implementation patterns |
46
+ | `skills/domains/` | Business domain knowledge |
47
+
48
+ ---
49
+
50
+ ## Session Protocol
51
+
52
+ ### Starting
53
+ 1. Read handoff file for current session
54
+ 2. Run health check (build, verify previous work)
55
+ 3. Ask: Any feedback? Blockers? Quick wins?
56
+
57
+ ### During
58
+ - **Tiny tasks:** Do 3-4
59
+ - **Normal tasks:** Do 2
60
+ - **Large tasks:** Do 1
61
+ - Verify each task works before moving on
62
+ - Update docs as you go
63
+ - ASK when unsure
64
+
65
+ ### Ending
66
+ 1. Build passes
67
+ 2. New features work
68
+ 3. PROGRESS.md updated
69
+ 4. handoff/SESSION_{N+1}.md created
70
+ 5. Ask: **"next"** or **"done"**?
71
+
72
+ ---
73
+
74
+ ## Key Rules
75
+
76
+ 1. **Verify before moving on** — Build must pass, feature must work
77
+ 2. **Document as you go** — Update structure.md, patterns.md
78
+ 3. **Skills before search** — Check skills/ before web research
79
+ 4. **Ask when unsure** — Never guess on business logic
80
+ 5. **Handoff is mandatory** — Session isn't done without next handoff
81
+
82
+ ---
83
+
84
+ ## Quick Commands
85
+
86
+ ```bash
87
+ # Build
88
+ {{BUILD_COMMAND}}
89
+
90
+ # Dev server
91
+ {{DEV_COMMAND}}
92
+
93
+ # Type check
94
+ {{TYPECHECK_COMMAND}}
95
+ ```
96
+
97
+ ---
98
+
99
+ ## Project-Specific Rules
100
+
101
+ {{PROJECT_RULES}}
102
+
103
+ ---
104
+
105
+ *Protocol: Baton v3.1*
@@ -0,0 +1,64 @@
1
+ # Baton Protocol — {{PROJECT_NAME}}
2
+
3
+ You are a technical co-founder building {{PROJECT_NAME}}.
4
+ This project uses Baton — an AI orchestration protocol.
5
+
6
+ ## Start Each Session
7
+
8
+ 1. Read `handoff/SESSION_N.md` (current session)
9
+ 2. Read `.ai-rules/` files for context
10
+ 3. Run health check (build, verify previous work)
11
+ 4. Ask: Any feedback? Blockers?
12
+
13
+ ## During Session
14
+
15
+ - Tiny tasks: Do 3-4
16
+ - Normal tasks: Do 2
17
+ - Large tasks: Do 1
18
+ - Verify each task works before moving to next
19
+ - Update documentation as you go
20
+ - ASK when unsure about business logic
21
+
22
+ ## End Each Session
23
+
24
+ - Verify build passes
25
+ - Update PROGRESS.md
26
+ - Create `handoff/SESSION_{N+1}.md`
27
+ - Ask user: **"next"** or **"done"**?
28
+
29
+ ## Skills (Check Before Web Search)
30
+
31
+ - `skills/core/` — Security, testing, production rules
32
+ - `skills/stacks/` — {{STACK}} patterns
33
+ - `skills/patterns/` — Implementation guides
34
+ - `.ai-rules/patterns.md` — Project-specific quirks
35
+
36
+ ## Key Files
37
+
38
+ - `handoff/SESSION_N.md` — Current session tasks
39
+ - `.ai-rules/project.md` — Decisions and rules
40
+ - `.ai-rules/patterns.md` — Discovered quirks
41
+ - `PROGRESS.md` — Session log
42
+ - `BACKLOG.md` — Deferred work
43
+
44
+ ## Rules
45
+
46
+ - Never commit secrets
47
+ - Always use environment variables
48
+ - RLS on all database tables
49
+ - Zod validation on all inputs
50
+ - Verify before declaring done
51
+ - Document quirks in patterns.md
52
+ - Create handoff before ending session
53
+
54
+ ## Commands
55
+
56
+ ```
57
+ Build: {{BUILD_COMMAND}}
58
+ Dev: {{DEV_COMMAND}}
59
+ Types: {{TYPECHECK_COMMAND}}
60
+ ```
61
+
62
+ ## Project Rules
63
+
64
+ {{PROJECT_RULES}}
@@ -0,0 +1,180 @@
1
+ ---
2
+ name: anti-overengineering
3
+ description: >-
4
+ Prevents AI from adding unnecessary complexity, features, and abstractions.
5
+ Enforces YAGNI, size limits, and simplicity-first approach.
6
+ Use when building features, reviewing code complexity, or when the AI
7
+ starts adding things nobody asked for.
8
+ ---
9
+
10
+ # Anti-Over-Engineering Skill
11
+
12
+ > YAGNI: You Aren't Gonna Need It.
13
+ > The best code is code you didn't write.
14
+
15
+ ---
16
+
17
+ ## The Problem
18
+
19
+ AI loves to add complexity. Research shows:
20
+ - PR sizes up 154% with AI assistance
21
+ - 4x more code duplication
22
+ - 9% more bugs per developer
23
+
24
+ **More code = more bugs = more maintenance = slower progress.**
25
+
26
+ ---
27
+
28
+ ## Before Writing ANY Code
29
+
30
+ Ask these 3 questions:
31
+
32
+ 1. **Does this solve the immediate problem?**
33
+ - If no → don't build it
34
+
35
+ 2. **Am I adding features nobody asked for?**
36
+ - If yes → stop
37
+
38
+ 3. **Can this be simpler?**
39
+ - If yes → make it simpler first
40
+
41
+ ---
42
+
43
+ ## Red Flags (Stop and Reconsider)
44
+
45
+ | Red Flag | What's Happening |
46
+ |----------|-----------------|
47
+ | "While we're at it..." | Scope creep |
48
+ | "For flexibility later..." | Premature abstraction |
49
+ | "Just in case..." | YAGNI violation |
50
+ | "Best practice says..." | Cargo culting |
51
+ | "Let me refactor this first..." | Yak shaving |
52
+ | PR > 200 lines for simple task | Over-engineering |
53
+
54
+ ---
55
+
56
+ ## Rules
57
+
58
+ ### 1. One Thing at a Time
59
+
60
+ ```
61
+ BAD:
62
+ "Add login button, and while I'm here let me also
63
+ refactor the header, add dark mode toggle, and
64
+ improve the responsive layout"
65
+
66
+ GOOD:
67
+ "Add login button"
68
+ (That's it. Next task is next task.)
69
+ ```
70
+
71
+ ### 2. No Speculative Features
72
+
73
+ ```
74
+ BAD:
75
+ "Adding config options for future customization"
76
+ "Building plugin system for extensibility"
77
+ "Creating abstraction layer for flexibility"
78
+
79
+ GOOD:
80
+ "Building exactly what's needed now"
81
+ (Add flexibility when you need it, not before)
82
+ ```
83
+
84
+ ### 3. Three Strikes Rule
85
+
86
+ Don't abstract until you've written the same thing THREE times.
87
+
88
+ ```
89
+ First time: Just write it
90
+ Second time: Note the duplication
91
+ Third time: NOW consider abstracting
92
+ ```
93
+
94
+ ### 4. Boring Technology
95
+
96
+ ```
97
+ BAD:
98
+ "Let's try this new framework/library/pattern"
99
+ (Unless specifically requested)
100
+
101
+ GOOD:
102
+ "Using proven, stable technology"
103
+ (New = risk = debugging = time waste)
104
+ ```
105
+
106
+ ### 5. Delete Before Add
107
+
108
+ Before adding new code, ask:
109
+ - Can I delete something instead?
110
+ - Can I simplify existing code?
111
+ - Is there dead code to remove?
112
+
113
+ ---
114
+
115
+ ## Size Limits
116
+
117
+ | Change Type | Max Lines | If Larger... |
118
+ |------------|-----------|--------------|
119
+ | Bug fix | 50 | Split it up |
120
+ | Small feature | 150 | Split it up |
121
+ | Normal feature | 300 | Split into tasks |
122
+ | Large feature | 500 | Split into sessions |
123
+
124
+ **If a "simple" change is 200+ lines, something is wrong.**
125
+
126
+ ---
127
+
128
+ ## Complexity Checklist
129
+
130
+ Before ending a task, verify:
131
+
132
+ - [ ] No unnecessary abstractions added
133
+ - [ ] No "just in case" code
134
+ - [ ] No premature optimization
135
+ - [ ] No gold-plating (extra polish nobody asked for)
136
+ - [ ] Could a junior developer understand this?
137
+ - [ ] Is the PR focused on ONE thing?
138
+
139
+ ---
140
+
141
+ ## When User Asks for Something Complex
142
+
143
+ Don't just build it. Ask:
144
+
145
+ > "This could be built simply (Option A) or with more flexibility (Option B).
146
+ >
147
+ > **Option A (Recommended):** [Simple approach] — Works for current needs, easy to extend later.
148
+ >
149
+ > **Option B:** [Complex approach] — More flexible but adds complexity.
150
+ >
151
+ > Which do you prefer?"
152
+
153
+ **Default to simple. Let user explicitly choose complexity.**
154
+
155
+ ---
156
+
157
+ ## Recovery: Already Over-Engineered?
158
+
159
+ If you realize you've over-engineered:
160
+
161
+ 1. Stop immediately
162
+ 2. Tell the user what happened
163
+ 3. Propose simpler alternative
164
+ 4. Ask if they want to simplify or keep
165
+
166
+ Don't hide it. Don't keep building on bad foundation.
167
+
168
+ ---
169
+
170
+ ## Mantras
171
+
172
+ - Simplicity is a feature
173
+ - Working > perfect
174
+ - Ship > polish
175
+ - Delete > add
176
+ - Ask > assume
177
+
178
+ ---
179
+
180
+ *Last updated: Baton Protocol v3.1*
@@ -0,0 +1,207 @@
1
+ ---
2
+ name: cost-awareness
3
+ description: >-
4
+ AI cost tracking and optimization. Covers model pricing, model selection
5
+ guide, cost-saving practices, and session cost tracking.
6
+ Use when discussing AI costs, choosing models, optimizing token usage,
7
+ or when spending seems high.
8
+ ---
9
+
10
+ # Cost Awareness Skill
11
+
12
+ > AI isn't free. Know what you're spending.
13
+ > Expensive ≠ better. Smart model selection saves money.
14
+
15
+ ---
16
+
17
+ ## Why This Matters
18
+
19
+ Real examples from developers:
20
+ - "$60 in 3 days just fixing React components"
21
+ - "Blew through monthly budget in one week"
22
+ - "Didn't realize web search costs extra tokens"
23
+
24
+ **Don't be surprised. Be aware.**
25
+
26
+ ---
27
+
28
+ ## 2026 Model Pricing (Approximate)
29
+
30
+ | Model | Input (per 1M tokens) | Output (per 1M tokens) | Best For |
31
+ |-------|----------------------|------------------------|----------|
32
+ | **Claude Opus 4.5** | $15 | $75 | Complex reasoning, architecture |
33
+ | **Claude Sonnet** | $3 | $15 | Daily coding, most tasks |
34
+ | **Claude Haiku** | $0.25 | $1.25 | Simple tasks, quick checks |
35
+ | **GPT-5.3-Codex** | $10 | $40 | Agentic coding |
36
+ | **Gemini 3 Pro** | $1.25 | $5 | Long context, large codebases |
37
+
38
+ *Prices change. Check current rates.*
39
+
40
+ ---
41
+
42
+ ## Model Selection Guide
43
+
44
+ ### Use Opus/Expensive Models For:
45
+
46
+ - Architecture decisions
47
+ - Complex debugging
48
+ - Security reviews
49
+ - Major refactors
50
+ - When you're stuck
51
+
52
+ ### Use Sonnet/Mid-tier For:
53
+
54
+ - Daily feature building
55
+ - Code generation
56
+ - Documentation
57
+ - Most normal work
58
+
59
+ ### Use Haiku/Cheap Models For:
60
+
61
+ - Simple questions
62
+ - Formatting
63
+ - Quick lookups
64
+ - Repetitive tasks
65
+
66
+ ---
67
+
68
+ ## Cost-Saving Practices
69
+
70
+ ### 1. Check Skills Before Web Search
71
+
72
+ ```
73
+ EXPENSIVE:
74
+ "Search the web for Next.js best practices"
75
+ (Tokens for search + results + processing)
76
+
77
+ CHEAP:
78
+ "Read skills/stacks/nextjs.md"
79
+ (Just file read, minimal tokens)
80
+ ```
81
+
82
+ **Skills library exists to save money.**
83
+
84
+ ### 2. Don't Reload Context Unnecessarily
85
+
86
+ ```
87
+ EXPENSIVE:
88
+ Reading all .ai-rules files every time you ask a question
89
+
90
+ BETTER:
91
+ Read at session start, reference from memory
92
+ ```
93
+
94
+ ### 3. Ask Specific Questions
95
+
96
+ ```
97
+ EXPENSIVE:
98
+ "Help me with authentication"
99
+ (Vague → long back-and-forth)
100
+
101
+ CHEAP:
102
+ "Add Supabase auth to the login form at src/app/login/page.tsx"
103
+ (Specific → one-shot answer)
104
+ ```
105
+
106
+ ### 4. Use Smaller Models for Simple Tasks
107
+
108
+ ```
109
+ EXPENSIVE:
110
+ Using Opus to rename a variable
111
+
112
+ CHEAP:
113
+ Using Haiku for simple edits, Opus for complex reasoning
114
+ ```
115
+
116
+ ---
117
+
118
+ ## Session Cost Tracking
119
+
120
+ At end of each session, note in PROGRESS.md:
121
+
122
+ ```markdown
123
+ ### Session N - [Date]
124
+
125
+ **Cost:** ~$X.XX
126
+ **Model:** Claude Opus 4.5
127
+ **Notes:** Heavy research session, expect higher cost
128
+
129
+ **Running Total:** ~$XX.XX
130
+ ```
131
+
132
+ ---
133
+
134
+ ## Cost Red Flags
135
+
136
+ | Red Flag | Likely Cause | Solution |
137
+ |----------|--------------|----------|
138
+ | >$20 in one session | Long context, many searches | Split work, use skills |
139
+ | Repeated research | Not using patterns.md | Document discoveries |
140
+ | Many failed attempts | Poor prompts | Be more specific |
141
+ | Constant clarification | Vague requests | Ask complete questions |
142
+
143
+ ---
144
+
145
+ ## Budget Guidelines
146
+
147
+ | Project Type | Expected Total | Per Session |
148
+ |--------------|---------------|-------------|
149
+ | Simple app (5 sessions) | $20-50 | $4-10 |
150
+ | Medium app (10 sessions) | $50-150 | $5-15 |
151
+ | Complex app (20+ sessions) | $150-500 | $7-25 |
152
+
153
+ *These are estimates. Actual varies by complexity and efficiency.*
154
+
155
+ ---
156
+
157
+ ## When Costs Are High
158
+
159
+ If spending seems high:
160
+
161
+ 1. **Review:** What's using tokens?
162
+ - Web searches?
163
+ - Long files?
164
+ - Repeated context?
165
+
166
+ 2. **Optimize:**
167
+ - Use skills library more
168
+ - Be more specific in prompts
169
+ - Consider cheaper model for simple tasks
170
+
171
+ 3. **Communicate:**
172
+ - Tell user if session was expensive and why
173
+ - Suggest optimizations for next session
174
+
175
+ ---
176
+
177
+ ## Cost vs. Time Trade-off
178
+
179
+ Sometimes expensive is worth it:
180
+
181
+ | Situation | Recommendation |
182
+ |-----------|----------------|
183
+ | Stuck for 30+ minutes | Use Opus, worth the cost |
184
+ | Simple task | Use Haiku, save money |
185
+ | Architecture decision | Use Opus, get it right |
186
+ | Formatting/cleanup | Use Haiku |
187
+ | Security review | Use Opus, don't skimp |
188
+
189
+ **Cheap mistakes cost more than expensive prevention.**
190
+
191
+ ---
192
+
193
+ ## Token Estimation
194
+
195
+ Rough guidelines:
196
+
197
+ | Content | Approximate Tokens |
198
+ |---------|-------------------|
199
+ | 1 page of code (~50 lines) | ~500 tokens |
200
+ | Average source file | 500-2000 tokens |
201
+ | BATON_v3.1.md | ~2000 tokens |
202
+ | All .ai-rules files | ~3000-5000 tokens |
203
+ | Web search results | ~1000-3000 tokens |
204
+
205
+ ---
206
+
207
+ *Last updated: Baton Protocol v3.1*