sandwich-ai 0.1.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.
- package/LICENSE +21 -0
- package/README.md +294 -0
- package/dist/index.js +1760 -0
- package/package.json +80 -0
- package/templates/commands/capture.md +14 -0
- package/templates/commands/code-review.md +20 -0
- package/templates/commands/craft.md +26 -0
- package/templates/commands/debug.md +14 -0
- package/templates/commands/deploy.md +44 -0
- package/templates/commands/design.md +34 -0
- package/templates/commands/docs.md +40 -0
- package/templates/commands/eval.md +29 -0
- package/templates/commands/execute.md +19 -0
- package/templates/commands/observe.md +39 -0
- package/templates/commands/plan.md +33 -0
- package/templates/commands/recheck.md +25 -0
- package/templates/commands/remember.md +12 -0
- package/templates/commands/review-design.md +20 -0
- package/templates/commands/review-requirements.md +17 -0
- package/templates/commands/review.md +20 -0
- package/templates/commands/simplify.md +28 -0
- package/templates/commands/test.md +28 -0
- package/templates/commands/update-planning.md +12 -0
- package/templates/skills/agent-eval/SKILL.md +144 -0
- package/templates/skills/agent-observe/SKILL.md +146 -0
- package/templates/skills/brainstorming/SKILL.md +163 -0
- package/templates/skills/brainstorming/dynamic-questioning.md +350 -0
- package/templates/skills/capture-knowledge/SKILL.md +71 -0
- package/templates/skills/capture-knowledge/agents/openai.yaml +4 -0
- package/templates/skills/debug/SKILL.md +62 -0
- package/templates/skills/debug/agents/openai.yaml +4 -0
- package/templates/skills/deployment/SKILL.md +127 -0
- package/templates/skills/dev-lifecycle/SKILL.md +154 -0
- package/templates/skills/dev-lifecycle/agents/openai.yaml +4 -0
- package/templates/skills/dev-lifecycle/references/check-implementation.md +10 -0
- package/templates/skills/dev-lifecycle/references/code-review.md +12 -0
- package/templates/skills/dev-lifecycle/references/execute-plan.md +13 -0
- package/templates/skills/dev-lifecycle/references/new-requirement.md +14 -0
- package/templates/skills/dev-lifecycle/references/review-design.md +13 -0
- package/templates/skills/dev-lifecycle/references/review-requirements.md +12 -0
- package/templates/skills/dev-lifecycle/references/update-planning.md +13 -0
- package/templates/skills/dev-lifecycle/references/worktree-setup.md +29 -0
- package/templates/skills/dev-lifecycle/references/writing-test.md +12 -0
- package/templates/skills/dev-lifecycle/scripts/check-status.sh +59 -0
- package/templates/skills/memory/SKILL.md +137 -0
- package/templates/skills/memory/agents/openai.yaml +4 -0
- package/templates/skills/prompt-craft/SKILL.md +140 -0
- package/templates/skills/simplify-implementation/SKILL.md +77 -0
- package/templates/skills/simplify-implementation/agents/openai.yaml +4 -0
- package/templates/skills/simplify-implementation/references/readability-guide.md +30 -0
- package/templates/skills/system-design/SKILL.md +104 -0
- package/templates/skills/technical-writer/SKILL.md +67 -0
- package/templates/skills/technical-writer/agents/openai.yaml +4 -0
- package/templates/skills/testing/SKILL.md +110 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Witch
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
# Sandwich CLI
|
|
2
|
+
|
|
3
|
+
Universal CLI to initialize and manage AI coding skills across multiple AI-powered development environments.
|
|
4
|
+
|
|
5
|
+
## Supported Environments
|
|
6
|
+
|
|
7
|
+
| Environment | CLI Key |
|
|
8
|
+
|---|---|
|
|
9
|
+
| Claude Code | `claude` |
|
|
10
|
+
| Cursor | `cursor` |
|
|
11
|
+
| Google Gemini | `gemini` |
|
|
12
|
+
| GitHub Copilot | `github` |
|
|
13
|
+
| Windsurf | `windsurf` |
|
|
14
|
+
| KiloCode | `kilocode` |
|
|
15
|
+
| Antigravity | `antigravity` |
|
|
16
|
+
| OpenAI Codex | `codex` |
|
|
17
|
+
| AMP | `amp` |
|
|
18
|
+
| OpenCode | `opencode` |
|
|
19
|
+
| Roo Code | `roo` |
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g sandwich-ai
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Initialize a project (interactive)
|
|
31
|
+
sandwich init
|
|
32
|
+
|
|
33
|
+
# Initialize with defaults (Claude Code + SDLC + all bundled skills)
|
|
34
|
+
sandwich init --yes
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Running `init` will:
|
|
38
|
+
1. Create `sandwich.json` in your project root
|
|
39
|
+
2. Scaffold the appropriate directory structure for each selected environment
|
|
40
|
+
3. Install selected skills and slash commands
|
|
41
|
+
|
|
42
|
+
## Commands
|
|
43
|
+
|
|
44
|
+
### `sandwich init`
|
|
45
|
+
|
|
46
|
+
Initialize a project with `sandwich.json` and environment directories.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
sandwich init [--yes]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Options:**
|
|
53
|
+
- `--yes` — Skip prompts, use defaults
|
|
54
|
+
|
|
55
|
+
**Interactive prompts:**
|
|
56
|
+
- Select AI environments to support
|
|
57
|
+
- Choose workflow: **SDLC** or **ADLC**
|
|
58
|
+
- Select bundled skills and commands
|
|
59
|
+
- Choose installation mode: `clone` or `symlink`
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
### `sandwich install`
|
|
64
|
+
|
|
65
|
+
Install all skills defined in `sandwich.json`.
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
sandwich install [options]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Options:**
|
|
72
|
+
- `-c, --config <path>` — Path to config file (default: `sandwich.json`)
|
|
73
|
+
- `--overwrite` — Re-install even if already present
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
### `sandwich skill`
|
|
78
|
+
|
|
79
|
+
Manage skills in your project.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
sandwich skill add <registry> <name> [options]
|
|
83
|
+
sandwich skill remove <registry> <name>
|
|
84
|
+
sandwich skill list
|
|
85
|
+
sandwich skill update <registry> <name>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**`add` options:**
|
|
89
|
+
- `-e, --env <envs>` — Target specific environments, comma-separated (e.g. `claude,cursor`)
|
|
90
|
+
- `--overwrite` — Overwrite if already installed
|
|
91
|
+
|
|
92
|
+
**Examples:**
|
|
93
|
+
```bash
|
|
94
|
+
# Add a skill from the Anthropic registry
|
|
95
|
+
sandwich skill add anthropics/skills dev-lifecycle
|
|
96
|
+
|
|
97
|
+
# Add a skill only for Claude Code and Cursor
|
|
98
|
+
sandwich skill add anthropics/skills testing --env claude,cursor
|
|
99
|
+
|
|
100
|
+
# List all installed skills
|
|
101
|
+
sandwich skill list
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
### `sandwich registry`
|
|
107
|
+
|
|
108
|
+
Manage skill registries.
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
sandwich registry add <alias> <url> [--project]
|
|
112
|
+
sandwich registry remove <alias> [--project]
|
|
113
|
+
sandwich registry list
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
By default, registries are saved globally to `~/.sandwich/registries.json`. Use `--project` to save to `sandwich.json` instead.
|
|
117
|
+
|
|
118
|
+
**Examples:**
|
|
119
|
+
```bash
|
|
120
|
+
# Add a custom registry globally
|
|
121
|
+
sandwich registry add my-org https://github.com/my-org/skills
|
|
122
|
+
|
|
123
|
+
# Add a registry scoped to this project
|
|
124
|
+
sandwich registry add my-org https://github.com/my-org/skills --project
|
|
125
|
+
|
|
126
|
+
# List all available registries
|
|
127
|
+
sandwich registry list
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Built-in registries include:** `anthropics/skills`, `vercel-labs/agent-skills`, `vercel-labs/skills`, `sickn33/antigravity-awesome-skills`, and community registries from Supabase, Stripe, Cloudflare, and more.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
### `sandwich memory`
|
|
135
|
+
|
|
136
|
+
Store and search knowledge items using a local SQLite database.
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
sandwich memory store [options]
|
|
140
|
+
sandwich memory search [options]
|
|
141
|
+
sandwich memory update [options]
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**`store` options:**
|
|
145
|
+
- `-t, --title <title>` — Title (max 100 chars)
|
|
146
|
+
- `-c, --content <content>` — Content (max 5000 chars)
|
|
147
|
+
- `--tags <tags>` — Comma-separated tags
|
|
148
|
+
- `-s, --scope <scope>` — `global` or `project:<name>` (default: `global`)
|
|
149
|
+
|
|
150
|
+
**`search` options:**
|
|
151
|
+
- `-q, --query <query>` — Search query (min 3 chars)
|
|
152
|
+
- `--tags <tags>` — Filter by tags
|
|
153
|
+
- `-s, --scope <scope>` — Filter by scope
|
|
154
|
+
- `-l, --limit <n>` — Max results (default: 5)
|
|
155
|
+
|
|
156
|
+
**`update` options:**
|
|
157
|
+
- `--id <id>` — Item ID to update
|
|
158
|
+
- `-t, --title`, `-c, --content`, `--tags`, `-s, --scope` — Fields to update
|
|
159
|
+
|
|
160
|
+
**Examples:**
|
|
161
|
+
```bash
|
|
162
|
+
# Store a design decision
|
|
163
|
+
sandwich memory store \
|
|
164
|
+
--title "Use SQLite for caching" \
|
|
165
|
+
--content "Chose SQLite for local registry cache due to zero-config setup." \
|
|
166
|
+
--tags "database,architecture"
|
|
167
|
+
|
|
168
|
+
# Search stored knowledge
|
|
169
|
+
sandwich memory search --query "database"
|
|
170
|
+
|
|
171
|
+
# Search by tag within a project scope
|
|
172
|
+
sandwich memory search --tags "architecture" --scope project:my-app
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### `sandwich docs`
|
|
178
|
+
|
|
179
|
+
Initialize and validate a structured `docs/ai/` documentation layout.
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
sandwich docs init [--cwd <path>]
|
|
183
|
+
sandwich docs lint [--cwd <path>] [--feature <name>] [--json]
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**`init`** creates `docs/ai/` with directories for each development phase:
|
|
187
|
+
`requirements`, `design`, `planning`, `implementation`, `testing`, `deployment`, `maintenance`
|
|
188
|
+
|
|
189
|
+
**`lint`** validates that the `docs/ai/` structure is correct.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Workflows
|
|
194
|
+
|
|
195
|
+
Sandwich CLI supports two development lifecycle models:
|
|
196
|
+
|
|
197
|
+
### SDLC — Software Development Life Cycle
|
|
198
|
+
|
|
199
|
+
For traditional, deterministic software development. 7 phases:
|
|
200
|
+
1. Planning & Requirements
|
|
201
|
+
2. Review Requirements
|
|
202
|
+
3. System Design
|
|
203
|
+
4. Review Design
|
|
204
|
+
5. Implementation
|
|
205
|
+
6. Testing
|
|
206
|
+
7. Deployment
|
|
207
|
+
|
|
208
|
+
### ADLC — Agentic Development Life Cycle
|
|
209
|
+
|
|
210
|
+
For probabilistic AI agent development. 8 phases:
|
|
211
|
+
0. Preparation & Hypotheses
|
|
212
|
+
1. Scope Framing
|
|
213
|
+
2. Agent Architecture
|
|
214
|
+
3. Simulation & Proof
|
|
215
|
+
4. Implementation & Evals
|
|
216
|
+
5. Testing
|
|
217
|
+
6. Agent Activation
|
|
218
|
+
7. Continuous Learning
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Bundled Skills
|
|
223
|
+
|
|
224
|
+
Sandwich CLI ships with the following skills out of the box:
|
|
225
|
+
|
|
226
|
+
| Skill | Description |
|
|
227
|
+
|---|---|
|
|
228
|
+
| `dev-lifecycle` | End-to-end SDLC/ADLC development phases |
|
|
229
|
+
| `brainstorming` | Ideation and planning |
|
|
230
|
+
| `system-design` | Architecture and design |
|
|
231
|
+
| `testing` | Test strategy and execution |
|
|
232
|
+
| `deployment` | Release and deployment |
|
|
233
|
+
| `debug` | Debugging and troubleshooting |
|
|
234
|
+
| `memory` | Knowledge management |
|
|
235
|
+
| `technical-writer` | Documentation |
|
|
236
|
+
| `simplify-implementation` | Code simplification |
|
|
237
|
+
| `capture-knowledge` | Context capture |
|
|
238
|
+
| `prompt-craft` | Prompt engineering (ADLC) |
|
|
239
|
+
| `agent-eval` | Agent evaluation (ADLC) |
|
|
240
|
+
| `agent-observe` | Agent monitoring (ADLC) |
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Installation Modes
|
|
245
|
+
|
|
246
|
+
When installing skills you can choose between two modes:
|
|
247
|
+
|
|
248
|
+
- **Clone** — Copies skill files into your project. No automatic updates.
|
|
249
|
+
- **Symlink** — Links to the cached local registry. Updates automatically when the registry updates.
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## Project Configuration
|
|
254
|
+
|
|
255
|
+
After `init`, a `sandwich.json` file is created at your project root:
|
|
256
|
+
|
|
257
|
+
```json
|
|
258
|
+
{
|
|
259
|
+
"version": "1",
|
|
260
|
+
"workflow": "sdlc",
|
|
261
|
+
"environments": ["claude", "cursor"],
|
|
262
|
+
"skills": [],
|
|
263
|
+
"registries": [],
|
|
264
|
+
"createdAt": "2025-01-01T00:00:00.000Z",
|
|
265
|
+
"updatedAt": "2025-01-01T00:00:00.000Z"
|
|
266
|
+
}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Global configuration is stored at `~/.sandwich/`.
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## Development
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
# Install dependencies
|
|
277
|
+
npm install
|
|
278
|
+
|
|
279
|
+
# Build
|
|
280
|
+
npm run build
|
|
281
|
+
|
|
282
|
+
# Type check
|
|
283
|
+
npm run typecheck
|
|
284
|
+
|
|
285
|
+
# Run tests
|
|
286
|
+
npm test
|
|
287
|
+
|
|
288
|
+
# Run tests in watch mode
|
|
289
|
+
npm run test:watch
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## License
|
|
293
|
+
|
|
294
|
+
MIT
|