warp-os 1.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/CHANGELOG.md +327 -0
- package/LICENSE +21 -0
- package/README.md +308 -0
- package/VERSION +1 -0
- package/agents/warp-browse.md +715 -0
- package/agents/warp-build-code.md +1299 -0
- package/agents/warp-orchestrator.md +515 -0
- package/agents/warp-plan-architect.md +929 -0
- package/agents/warp-plan-brainstorm.md +876 -0
- package/agents/warp-plan-design.md +1458 -0
- package/agents/warp-plan-onboarding.md +732 -0
- package/agents/warp-plan-optimize-adversarial.md +81 -0
- package/agents/warp-plan-optimize.md +354 -0
- package/agents/warp-plan-scope.md +806 -0
- package/agents/warp-plan-security.md +1274 -0
- package/agents/warp-plan-testdesign.md +1228 -0
- package/agents/warp-qa-debug-adversarial.md +90 -0
- package/agents/warp-qa-debug.md +793 -0
- package/agents/warp-qa-test-adversarial.md +89 -0
- package/agents/warp-qa-test.md +1054 -0
- package/agents/warp-release-update.md +1189 -0
- package/agents/warp-setup.md +1216 -0
- package/agents/warp-upgrade.md +334 -0
- package/bin/cli.js +44 -0
- package/bin/hooks/_warp_html.sh +291 -0
- package/bin/hooks/_warp_json.sh +67 -0
- package/bin/hooks/consistency-check.sh +92 -0
- package/bin/hooks/identity-briefing.sh +89 -0
- package/bin/hooks/identity-foundation.sh +37 -0
- package/bin/install.js +343 -0
- package/dist/warp-browse/SKILL.md +727 -0
- package/dist/warp-build-code/SKILL.md +1316 -0
- package/dist/warp-orchestrator/SKILL.md +527 -0
- package/dist/warp-plan-architect/SKILL.md +943 -0
- package/dist/warp-plan-brainstorm/SKILL.md +890 -0
- package/dist/warp-plan-design/SKILL.md +1473 -0
- package/dist/warp-plan-onboarding/SKILL.md +742 -0
- package/dist/warp-plan-optimize/SKILL.md +364 -0
- package/dist/warp-plan-scope/SKILL.md +820 -0
- package/dist/warp-plan-security/SKILL.md +1286 -0
- package/dist/warp-plan-testdesign/SKILL.md +1244 -0
- package/dist/warp-qa-debug/SKILL.md +805 -0
- package/dist/warp-qa-test/SKILL.md +1070 -0
- package/dist/warp-release-update/SKILL.md +1211 -0
- package/dist/warp-setup/SKILL.md +1229 -0
- package/dist/warp-upgrade/SKILL.md +345 -0
- package/package.json +40 -0
- package/shared/project-hooks.json +32 -0
- package/shared/tier1-engineering-constitution.md +176 -0
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: warp-upgrade
|
|
3
|
+
description: >
|
|
4
|
+
One-command Warp upgrade from inside Claude Code. Pulls latest,
|
|
5
|
+
rebuilds, reinstalls, shows changelog, detects migration requirements,
|
|
6
|
+
and offers to re-run /warp-setup on the current project. No terminal
|
|
7
|
+
switching needed.
|
|
8
|
+
triggers:
|
|
9
|
+
- /warp-upgrade
|
|
10
|
+
- /upgrade
|
|
11
|
+
position: meta
|
|
12
|
+
prev: null
|
|
13
|
+
next: null
|
|
14
|
+
pipeline_reads: []
|
|
15
|
+
pipeline_writes: []
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
<!-- ═══════════════════════════════════════════════════════════ -->
|
|
19
|
+
<!-- TIER 1 — Engineering Foundation. Generated by build.sh -->
|
|
20
|
+
<!-- ═══════════════════════════════════════════════════════════ -->
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# Warp Engineering Foundation
|
|
24
|
+
|
|
25
|
+
Universal principles for every agent in the Warp pipeline. Tier 1: highest authority.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Core Principles
|
|
30
|
+
|
|
31
|
+
**Clarity over cleverness.** Optimize for "I can understand this in six months."
|
|
32
|
+
|
|
33
|
+
**Explicit contracts between layers.** Modules communicate through defined interfaces. Swap persistence without touching the service layer.
|
|
34
|
+
|
|
35
|
+
**Every component earns its place.** No speculative code. If a feature isn't in the current or next phase, it doesn't exist in code.
|
|
36
|
+
|
|
37
|
+
**Fail loud, recover gracefully.** Never swallow errors silently. User-facing experience degrades gracefully — stale-data indicator, not a crash.
|
|
38
|
+
|
|
39
|
+
**Prefer reversible decisions.** When two approaches are equivalent, choose the one that can be undone.
|
|
40
|
+
|
|
41
|
+
**Security is structural.** Designed for the most restrictive phase, enforced from the earliest.
|
|
42
|
+
|
|
43
|
+
**AI is a tool, not an authority.** AI agents accelerate development but do not make architectural decisions autonomously. Every significant design decision is reviewed by the user before it ships.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Bias Classification
|
|
48
|
+
|
|
49
|
+
When the same AI system writes code, writes tests, and evaluates its own output, shared biases create blind spots.
|
|
50
|
+
|
|
51
|
+
| Level | Definition | Trust |
|
|
52
|
+
|-------|-----------|-------|
|
|
53
|
+
| **L1** | Deterministic. Binary pass/fail. Zero AI judgment. | Highest |
|
|
54
|
+
| **L2** | AI interpretation anchored to verifiable external source. | Medium |
|
|
55
|
+
| **L3** | AI evaluating AI. Both sides share training biases. | Lowest |
|
|
56
|
+
|
|
57
|
+
**L1 Imperative:** Every quality gate that CAN be L1 MUST be L1. L3 is the outer layer, never the only layer. When L1 is unavailable, use L2 (grounded in external docs). Fall back to L3 only when no external anchor exists.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Completeness
|
|
62
|
+
|
|
63
|
+
AI compresses implementation 10-100x. Always choose the complete option. Full coverage, hardened behavior, robust edge cases. The delta between "good enough" and "complete" is minutes, not days.
|
|
64
|
+
|
|
65
|
+
Never recommend the less-complete option. Never skip edge cases. Never defer what can be done now.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Quality Gates
|
|
70
|
+
|
|
71
|
+
**Hard Gate** — blocks progression. Between major phases. Present output, ask the user: A) Approve, B) Revise, C) Restart. MUST get user input.
|
|
72
|
+
|
|
73
|
+
**Soft Gate** — warns but allows. Between minor steps. Proceed if quality criteria met; warn and get input if not.
|
|
74
|
+
|
|
75
|
+
**Completeness Gate** — final check before artifact write. Verify no empty sections, key decisions explicit. Fix before writing.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Escalation
|
|
80
|
+
|
|
81
|
+
Always OK to stop and escalate. Bad work is worse than no work.
|
|
82
|
+
|
|
83
|
+
**STOP if:** 3 failed attempts at the same problem, uncertain about security-sensitive changes, scope exceeds what you can verify, or a decision requires domain knowledge you don't have.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## External Data Gate
|
|
88
|
+
|
|
89
|
+
When a task requires real-world data or domain knowledge that cannot be derived from code, docs, or git history — PAUSE and ask the user. Never hallucinate fixtures or APIs. Check docs via Context7 or saved files before writing code that touches external services.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Error Severity
|
|
94
|
+
|
|
95
|
+
| Tier | Definition | Response |
|
|
96
|
+
|------|-----------|----------|
|
|
97
|
+
| T1 | Normal variance (cache miss, retry succeeded) | Log, no action |
|
|
98
|
+
| T2 | Degraded capability (stale data served, fallback active) | Log, degrade visibly |
|
|
99
|
+
| T3 | Operation failed (invalid input, auth rejected) | Log, return error, continue |
|
|
100
|
+
| T4 | Subsystem non-functional (DB unreachable, corrupt state) | Log, halt subsystem, alert |
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Universal Engineering Principles
|
|
105
|
+
|
|
106
|
+
- Assert outcomes, not implementation. Test "input produces output" — not "function X calls Y."
|
|
107
|
+
- Each test is independent. No shared state or execution order dependencies.
|
|
108
|
+
- Mock at the system boundary, not internal helpers.
|
|
109
|
+
- Expected values are hardcoded from the spec, never recalculated using production logic.
|
|
110
|
+
- Every bug fix ships with a regression test.
|
|
111
|
+
- Every error has two audiences: the system (full diagnostics) and the consumer (only actionable info). Never the same message.
|
|
112
|
+
- Errors change shape at every module boundary. No error propagates without translation.
|
|
113
|
+
- Errors never reveal system internals to consumers. No stack traces, file paths, or queries in responses.
|
|
114
|
+
- Graceful degradation: live data → cached → static fallback → feature unavailable.
|
|
115
|
+
- Every input is hostile until validated.
|
|
116
|
+
- Default deny. Any permission not explicitly granted is denied.
|
|
117
|
+
- Secrets never logged, never in error messages, never in responses, never committed.
|
|
118
|
+
- Dependencies flow downward only. Never import from a layer above.
|
|
119
|
+
- Each external service has exactly one integration module that owns its boundary.
|
|
120
|
+
- Data crosses boundaries as plain values. Never pass ORM instances or SDK types between layers.
|
|
121
|
+
- ASCII diagrams for data flow, state machines, and architecture. Use box-drawing characters (─│┌┐└┘├┤┬┴┼) and arrows (→←↑↓).
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Shell Execution
|
|
126
|
+
|
|
127
|
+
Shell commands use Unix syntax (Git Bash). Never use CMD (`dir`, `type`, `del`) or backslash paths in Bash tool calls. On Windows, use forward slashes, `ls`, `grep`, `rm`, `cat`.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## AskUserQuestion
|
|
132
|
+
|
|
133
|
+
**Contract:**
|
|
134
|
+
1. **Re-ground:** Project name, branch, current task. (1-2 sentences.)
|
|
135
|
+
2. **Simplify:** Plain English a smart 16-year-old could follow.
|
|
136
|
+
3. **Recommend:** Name the recommended option and why.
|
|
137
|
+
4. **Options:** Ordered by completeness descending.
|
|
138
|
+
5. **One decision per question.**
|
|
139
|
+
|
|
140
|
+
**When to ask (mandatory):**
|
|
141
|
+
1. Design/UX choice not resolved in artifacts
|
|
142
|
+
2. Trade-off with more than one viable option
|
|
143
|
+
3. Before writing to files outside .warp/
|
|
144
|
+
4. Deviating from architecture or design spec
|
|
145
|
+
5. Skipping or deferring an acceptance criterion
|
|
146
|
+
6. Before any destructive or irreversible action
|
|
147
|
+
7. Ambiguous or underspecified requirement
|
|
148
|
+
8. Choosing between competing library/tool options
|
|
149
|
+
|
|
150
|
+
**Completeness scores in labels (mandatory):**
|
|
151
|
+
Format: `"Option name — X/10 🟢"` (or 🟡 or 🔴). In the label, not the description.
|
|
152
|
+
Rate: 🟢 9-10 complete, 🟡 6-8 adequate, 🔴 1-5 shortcuts.
|
|
153
|
+
|
|
154
|
+
**Formatting:**
|
|
155
|
+
- *Italics* for emphasis, not **bold** (bold for headers only).
|
|
156
|
+
- After each answer: `✔ Decision {N} recorded [quicksave updated]`
|
|
157
|
+
- Previews under 8 lines. Full mockups go in conversation text before the question.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Scale Detection
|
|
162
|
+
|
|
163
|
+
- **Feature:** One capability/screen/endpoint. Lean phases, fewer questions.
|
|
164
|
+
- **Module:** A package or subsystem. Full depth, multiple concerns.
|
|
165
|
+
- **System:** Whole product or greenfield. Maximum depth, every edge case.
|
|
166
|
+
|
|
167
|
+
Detection: Single behavior change → feature. 3+ files → module. Cross-package → system.
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Artifact I/O
|
|
172
|
+
|
|
173
|
+
Header: `<!-- Pipeline: {skill-name} | {date} | Scale: {scale} | Inputs: {prerequisites} -->`
|
|
174
|
+
|
|
175
|
+
Validation: all schema sections present, no empty sections, key decisions explicit.
|
|
176
|
+
Preview: show first 8-10 lines + total line count before writing.
|
|
177
|
+
HTML preview: use `_warp_html.sh` if available. Open in browser at hard gates only.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Completion Banner
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
185
|
+
WARP │ {skill-name} │ {STATUS}
|
|
186
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
187
|
+
Wrote: {artifact path(s)}
|
|
188
|
+
Decisions: {N} recorded
|
|
189
|
+
Next: /{next-skill}
|
|
190
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Status values: **DONE**, **DONE_WITH_CONCERNS** (list concerns), **BLOCKED** (state blocker + what was tried + next steps), **NEEDS_CONTEXT** (state exactly what's needed).
|
|
194
|
+
|
|
195
|
+
<!-- ═══════════════════════════════════════════════════════════ -->
|
|
196
|
+
<!-- Skill-Specific Content. -->
|
|
197
|
+
<!-- ═══════════════════════════════════════════════════════════ -->
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
# Upgrade
|
|
201
|
+
|
|
202
|
+
Meta skill. Upgrades WarpOS from inside Claude Code — no terminal switching.
|
|
203
|
+
|
|
204
|
+
**The upgrade is ONE COMMAND.** Do not decompose into manual steps. The upgrade
|
|
205
|
+
script handles pull, build, install, auto-patch, changelog, and migration detection.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## STEP 1: Locate the WarpOS Repo
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
WARP_REPO=""
|
|
213
|
+
for candidate in \
|
|
214
|
+
"$(cat "$HOME/.warp/repo-path" 2>/dev/null)" \
|
|
215
|
+
"$(readlink -f ~/.claude/skills/warp-setup 2>/dev/null)/../../../.." \
|
|
216
|
+
"$(dirname "$(readlink -f ~/.warp/hooks/identity-briefing.sh 2>/dev/null)")/../.." \
|
|
217
|
+
"$HOME/Projects/warp" \
|
|
218
|
+
"$HOME/warp" \
|
|
219
|
+
; do
|
|
220
|
+
[ -z "$candidate" ] && continue
|
|
221
|
+
if [ -d "$candidate/.git" ] && [ -f "$candidate/VERSION" ] && [ -f "$candidate/build.sh" ]; then
|
|
222
|
+
WARP_REPO="$(cd "$candidate" && pwd)"
|
|
223
|
+
break
|
|
224
|
+
fi
|
|
225
|
+
done
|
|
226
|
+
echo "Warp repo: ${WARP_REPO:-NOT FOUND}"
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
If not found, ask the user for the path.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## STEP 2: Run the Upgrade Script
|
|
234
|
+
|
|
235
|
+
**Run `bin/warp-upgrade.sh` as a single command. Do NOT decompose into manual steps.**
|
|
236
|
+
|
|
237
|
+
The script handles everything: fetch, version check, pull, build, install, auto-patch
|
|
238
|
+
project hooks, changelog display, migration detection, and restart recommendation.
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
cd "$WARP_REPO" && bash bin/warp-upgrade.sh
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
**IMPORTANT — Timeout:** On Windows (Git Bash), build + install can take 2-4 minutes.
|
|
245
|
+
Use a Bash timeout of at least 300000ms (5 minutes). If the default timeout is shorter,
|
|
246
|
+
set it explicitly. A timed-out upgrade leaves a half-installed state.
|
|
247
|
+
|
|
248
|
+
**If the script succeeds:** Read its output, summarize what changed, and remind the user
|
|
249
|
+
to restart Claude Code.
|
|
250
|
+
|
|
251
|
+
**If the script fails:** Read the error output. Common failures:
|
|
252
|
+
- Network error on git pull → "Check your connection and try again"
|
|
253
|
+
- Build error → "build.sh failed — check the error above"
|
|
254
|
+
- Install error (Windows file locks) → "Close other Claude Code instances and retry"
|
|
255
|
+
- Git conflicts → "Your local Warp repo has changes. Run `git stash` first."
|
|
256
|
+
|
|
257
|
+
Only if the script itself is missing or broken should you fall back to manual steps.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## STEP 3: Verify Auto-Patch (if script completed)
|
|
262
|
+
|
|
263
|
+
The upgrade script auto-patches `.claude/settings.local.json` in the current project
|
|
264
|
+
directory with the latest hook config from `~/.warp/project-hooks.json`.
|
|
265
|
+
|
|
266
|
+
Verify the patch applied:
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
# Check that settings.local.json references new hook names
|
|
270
|
+
grep -c 'identity-foundation\|identity-briefing\|consistency-check' .claude/settings.local.json 2>/dev/null && echo "hooks patched" || echo "hooks NOT patched"
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
If NOT patched (script ran from a different directory, or no settings.local.json):
|
|
274
|
+
- If `settings.local.json` exists but has old hook names → patch it manually using
|
|
275
|
+
`~/.warp/project-hooks.json` as the source. Preserve `permissions` and `enabledMcpjsonServers`.
|
|
276
|
+
- If no `settings.local.json` → tell user to run `/warp-setup` (first-time setup, not upgrade).
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## FALLBACK: Manual Steps (only if warp-upgrade.sh is missing/broken)
|
|
281
|
+
|
|
282
|
+
If `bin/warp-upgrade.sh` does not exist or crashes on invocation, fall back to manual:
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
cd "$WARP_REPO"
|
|
286
|
+
git fetch origin --quiet
|
|
287
|
+
git pull --rebase origin master
|
|
288
|
+
bash build.sh
|
|
289
|
+
bash install.sh
|
|
290
|
+
cat CHANGELOG.md | head -60
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
Then manually patch project hooks:
|
|
294
|
+
```bash
|
|
295
|
+
# Read template and patch settings.local.json
|
|
296
|
+
python3 -c "
|
|
297
|
+
import json
|
|
298
|
+
t = json.load(open('$HOME/.warp/project-hooks.json'))
|
|
299
|
+
s = json.load(open('.claude/settings.local.json'))
|
|
300
|
+
s['agent'] = t['agent']
|
|
301
|
+
s['hooks'] = t['hooks']
|
|
302
|
+
json.dump(s, open('.claude/settings.local.json','w'), indent=2)
|
|
303
|
+
print('Patched.')
|
|
304
|
+
"
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
**This fallback exists for emergencies only.** The script is the primary path.
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## OUTPUT FORMAT
|
|
312
|
+
|
|
313
|
+
```
|
|
314
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
315
|
+
WARP │ UPGRADE
|
|
316
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
317
|
+
Repo: {path}
|
|
318
|
+
Upgrade: v{old} → v{new}
|
|
319
|
+
|
|
320
|
+
{changelog excerpt — Added/Changed/Removed}
|
|
321
|
+
|
|
322
|
+
Hooks: auto-patched ✓
|
|
323
|
+
Restart: required (new hooks + skills)
|
|
324
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
**Always remind:** "Restart Claude Code to pick up the new skills and hooks."
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## MUST / MUST NOT
|
|
332
|
+
|
|
333
|
+
**MUST:**
|
|
334
|
+
- Run `bin/warp-upgrade.sh` as a single command (not decomposed steps)
|
|
335
|
+
- Use a 5-minute timeout for the upgrade script on Windows
|
|
336
|
+
- Verify hooks auto-patched after script completes
|
|
337
|
+
- Show changelog summary
|
|
338
|
+
- Remind user to restart Claude Code
|
|
339
|
+
|
|
340
|
+
**MUST NOT:**
|
|
341
|
+
- Decompose the upgrade into individual git/build/install commands when the script works
|
|
342
|
+
- Use default Bash timeout (2 minutes is too short on Windows)
|
|
343
|
+
- Proceed to install if build fails
|
|
344
|
+
- Require the user to re-run `/warp-setup` after a normal upgrade
|
|
345
|
+
- Force-push, reset, or destructively modify the Warp repo without consent
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "warp-os",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "A development operating system for Claude Code. 16 skills compiled into a pipeline that thinks through every step of building a product.",
|
|
5
|
+
"author": "WolfOnWings",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/WolfOnWings/warp"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"warp-os": "./bin/cli.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist/",
|
|
16
|
+
"agents/",
|
|
17
|
+
"bin/cli.js",
|
|
18
|
+
"bin/install.js",
|
|
19
|
+
"bin/hooks/",
|
|
20
|
+
"shared/tier1-engineering-constitution.md",
|
|
21
|
+
"shared/project-hooks.json",
|
|
22
|
+
"VERSION",
|
|
23
|
+
"CHANGELOG.md",
|
|
24
|
+
"README.md",
|
|
25
|
+
"LICENSE"
|
|
26
|
+
],
|
|
27
|
+
"keywords": [
|
|
28
|
+
"claude",
|
|
29
|
+
"claude-code",
|
|
30
|
+
"ai",
|
|
31
|
+
"development",
|
|
32
|
+
"pipeline",
|
|
33
|
+
"tdd",
|
|
34
|
+
"architecture",
|
|
35
|
+
"skills"
|
|
36
|
+
],
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=18.0.0"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"agent": "warp-orchestrator",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"SessionStart": [
|
|
5
|
+
{
|
|
6
|
+
"matcher": "",
|
|
7
|
+
"description": "Warp: identity + pipeline state",
|
|
8
|
+
"hooks": [
|
|
9
|
+
{"type": "command", "command": "bash ~/.warp/hooks/identity-foundation.sh", "timeout": 10},
|
|
10
|
+
{"type": "command", "command": "bash ~/.warp/hooks/identity-briefing.sh", "timeout": 10}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"Stop": [
|
|
15
|
+
{
|
|
16
|
+
"description": "Warp: consistency checks (CLAUDE.md + TODOS.md)",
|
|
17
|
+
"hooks": [
|
|
18
|
+
{"type": "command", "command": "bash ~/.warp/hooks/consistency-check.sh", "timeout": 15}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"PreToolUse": [
|
|
23
|
+
{
|
|
24
|
+
"matcher": "PowerShell",
|
|
25
|
+
"description": "Block PowerShell — Warp scripts and hooks are bash",
|
|
26
|
+
"hooks": [
|
|
27
|
+
{"type": "command", "command": "echo 'Warp requires the Bash tool. All hooks and scripts are bash.' >&2; exit 2", "timeout": 5}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: tier-1-foundation
|
|
3
|
+
version: 0.3.0
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Warp Engineering Foundation
|
|
7
|
+
|
|
8
|
+
Universal principles for every agent in the Warp pipeline. Tier 1: highest authority.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Core Principles
|
|
13
|
+
|
|
14
|
+
**Clarity over cleverness.** Optimize for "I can understand this in six months."
|
|
15
|
+
|
|
16
|
+
**Explicit contracts between layers.** Modules communicate through defined interfaces. Swap persistence without touching the service layer.
|
|
17
|
+
|
|
18
|
+
**Every component earns its place.** No speculative code. If a feature isn't in the current or next phase, it doesn't exist in code.
|
|
19
|
+
|
|
20
|
+
**Fail loud, recover gracefully.** Never swallow errors silently. User-facing experience degrades gracefully — stale-data indicator, not a crash.
|
|
21
|
+
|
|
22
|
+
**Prefer reversible decisions.** When two approaches are equivalent, choose the one that can be undone.
|
|
23
|
+
|
|
24
|
+
**Security is structural.** Designed for the most restrictive phase, enforced from the earliest.
|
|
25
|
+
|
|
26
|
+
**AI is a tool, not an authority.** AI agents accelerate development but do not make architectural decisions autonomously. Every significant design decision is reviewed by the user before it ships.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Bias Classification
|
|
31
|
+
|
|
32
|
+
When the same AI system writes code, writes tests, and evaluates its own output, shared biases create blind spots.
|
|
33
|
+
|
|
34
|
+
| Level | Definition | Trust |
|
|
35
|
+
|-------|-----------|-------|
|
|
36
|
+
| **L1** | Deterministic. Binary pass/fail. Zero AI judgment. | Highest |
|
|
37
|
+
| **L2** | AI interpretation anchored to verifiable external source. | Medium |
|
|
38
|
+
| **L3** | AI evaluating AI. Both sides share training biases. | Lowest |
|
|
39
|
+
|
|
40
|
+
**L1 Imperative:** Every quality gate that CAN be L1 MUST be L1. L3 is the outer layer, never the only layer. When L1 is unavailable, use L2 (grounded in external docs). Fall back to L3 only when no external anchor exists.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Completeness
|
|
45
|
+
|
|
46
|
+
AI compresses implementation 10-100x. Always choose the complete option. Full coverage, hardened behavior, robust edge cases. The delta between "good enough" and "complete" is minutes, not days.
|
|
47
|
+
|
|
48
|
+
Never recommend the less-complete option. Never skip edge cases. Never defer what can be done now.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Quality Gates
|
|
53
|
+
|
|
54
|
+
**Hard Gate** — blocks progression. Between major phases. Present output, ask the user: A) Approve, B) Revise, C) Restart. MUST get user input.
|
|
55
|
+
|
|
56
|
+
**Soft Gate** — warns but allows. Between minor steps. Proceed if quality criteria met; warn and get input if not.
|
|
57
|
+
|
|
58
|
+
**Completeness Gate** — final check before artifact write. Verify no empty sections, key decisions explicit. Fix before writing.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Escalation
|
|
63
|
+
|
|
64
|
+
Always OK to stop and escalate. Bad work is worse than no work.
|
|
65
|
+
|
|
66
|
+
**STOP if:** 3 failed attempts at the same problem, uncertain about security-sensitive changes, scope exceeds what you can verify, or a decision requires domain knowledge you don't have.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## External Data Gate
|
|
71
|
+
|
|
72
|
+
When a task requires real-world data or domain knowledge that cannot be derived from code, docs, or git history — PAUSE and ask the user. Never hallucinate fixtures or APIs. Check docs via Context7 or saved files before writing code that touches external services.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Error Severity
|
|
77
|
+
|
|
78
|
+
| Tier | Definition | Response |
|
|
79
|
+
|------|-----------|----------|
|
|
80
|
+
| T1 | Normal variance (cache miss, retry succeeded) | Log, no action |
|
|
81
|
+
| T2 | Degraded capability (stale data served, fallback active) | Log, degrade visibly |
|
|
82
|
+
| T3 | Operation failed (invalid input, auth rejected) | Log, return error, continue |
|
|
83
|
+
| T4 | Subsystem non-functional (DB unreachable, corrupt state) | Log, halt subsystem, alert |
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Universal Engineering Principles
|
|
88
|
+
|
|
89
|
+
- Assert outcomes, not implementation. Test "input produces output" — not "function X calls Y."
|
|
90
|
+
- Each test is independent. No shared state or execution order dependencies.
|
|
91
|
+
- Mock at the system boundary, not internal helpers.
|
|
92
|
+
- Expected values are hardcoded from the spec, never recalculated using production logic.
|
|
93
|
+
- Every bug fix ships with a regression test.
|
|
94
|
+
- Every error has two audiences: the system (full diagnostics) and the consumer (only actionable info). Never the same message.
|
|
95
|
+
- Errors change shape at every module boundary. No error propagates without translation.
|
|
96
|
+
- Errors never reveal system internals to consumers. No stack traces, file paths, or queries in responses.
|
|
97
|
+
- Graceful degradation: live data → cached → static fallback → feature unavailable.
|
|
98
|
+
- Every input is hostile until validated.
|
|
99
|
+
- Default deny. Any permission not explicitly granted is denied.
|
|
100
|
+
- Secrets never logged, never in error messages, never in responses, never committed.
|
|
101
|
+
- Dependencies flow downward only. Never import from a layer above.
|
|
102
|
+
- Each external service has exactly one integration module that owns its boundary.
|
|
103
|
+
- Data crosses boundaries as plain values. Never pass ORM instances or SDK types between layers.
|
|
104
|
+
- ASCII diagrams for data flow, state machines, and architecture. Use box-drawing characters (─│┌┐└┘├┤┬┴┼) and arrows (→←↑↓).
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Shell Execution
|
|
109
|
+
|
|
110
|
+
Shell commands use Unix syntax (Git Bash). Never use CMD (`dir`, `type`, `del`) or backslash paths in Bash tool calls. On Windows, use forward slashes, `ls`, `grep`, `rm`, `cat`.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## AskUserQuestion
|
|
115
|
+
|
|
116
|
+
**Contract:**
|
|
117
|
+
1. **Re-ground:** Project name, branch, current task. (1-2 sentences.)
|
|
118
|
+
2. **Simplify:** Plain English a smart 16-year-old could follow.
|
|
119
|
+
3. **Recommend:** Name the recommended option and why.
|
|
120
|
+
4. **Options:** Ordered by completeness descending.
|
|
121
|
+
5. **One decision per question.**
|
|
122
|
+
|
|
123
|
+
**When to ask (mandatory):**
|
|
124
|
+
1. Design/UX choice not resolved in artifacts
|
|
125
|
+
2. Trade-off with more than one viable option
|
|
126
|
+
3. Before writing to files outside .warp/
|
|
127
|
+
4. Deviating from architecture or design spec
|
|
128
|
+
5. Skipping or deferring an acceptance criterion
|
|
129
|
+
6. Before any destructive or irreversible action
|
|
130
|
+
7. Ambiguous or underspecified requirement
|
|
131
|
+
8. Choosing between competing library/tool options
|
|
132
|
+
|
|
133
|
+
**Completeness scores in labels (mandatory):**
|
|
134
|
+
Format: `"Option name — X/10 🟢"` (or 🟡 or 🔴). In the label, not the description.
|
|
135
|
+
Rate: 🟢 9-10 complete, 🟡 6-8 adequate, 🔴 1-5 shortcuts.
|
|
136
|
+
|
|
137
|
+
**Formatting:**
|
|
138
|
+
- *Italics* for emphasis, not **bold** (bold for headers only).
|
|
139
|
+
- After each answer: `✔ Decision {N} recorded [quicksave updated]`
|
|
140
|
+
- Previews under 8 lines. Full mockups go in conversation text before the question.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Scale Detection
|
|
145
|
+
|
|
146
|
+
- **Feature:** One capability/screen/endpoint. Lean phases, fewer questions.
|
|
147
|
+
- **Module:** A package or subsystem. Full depth, multiple concerns.
|
|
148
|
+
- **System:** Whole product or greenfield. Maximum depth, every edge case.
|
|
149
|
+
|
|
150
|
+
Detection: Single behavior change → feature. 3+ files → module. Cross-package → system.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Artifact I/O
|
|
155
|
+
|
|
156
|
+
Header: `<!-- Pipeline: {skill-name} | {date} | Scale: {scale} | Inputs: {prerequisites} -->`
|
|
157
|
+
|
|
158
|
+
Validation: all schema sections present, no empty sections, key decisions explicit.
|
|
159
|
+
Preview: show first 8-10 lines + total line count before writing.
|
|
160
|
+
HTML preview: use `_warp_html.sh` if available. Open in browser at hard gates only.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Completion Banner
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
168
|
+
WARP │ {skill-name} │ {STATUS}
|
|
169
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
170
|
+
Wrote: {artifact path(s)}
|
|
171
|
+
Decisions: {N} recorded
|
|
172
|
+
Next: /{next-skill}
|
|
173
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Status values: **DONE**, **DONE_WITH_CONCERNS** (list concerns), **BLOCKED** (state blocker + what was tried + next steps), **NEEDS_CONTEXT** (state exactly what's needed).
|