takomi 2.0.4 → 2.0.6
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/README.md +26 -2
- package/assets/.agent/skills/code-review/SKILL.md +34 -81
- package/assets/.agent/skills/jstar-reviewer/SKILL.md +229 -0
- package/assets/.agent/skills/jstar-reviewer/agents/openai.yaml +7 -0
- package/assets/.agent/skills/takomi/SKILL.md +59 -0
- package/assets/.agent/skills/takomi/references/migration-map.md +28 -0
- package/assets/.agent/skills/takomi/workflows/agent_reset.md +173 -0
- package/assets/.agent/skills/takomi/workflows/escalate.md +112 -0
- package/assets/.agent/skills/takomi/workflows/migrate.md +135 -0
- package/assets/.agent/skills/takomi/workflows/mode-architect.md +422 -0
- package/assets/.agent/skills/takomi/workflows/mode-ask.md +294 -0
- package/assets/.agent/skills/takomi/workflows/mode-code.md +481 -0
- package/assets/.agent/skills/takomi/workflows/mode-debug.md +407 -0
- package/assets/.agent/skills/takomi/workflows/mode-orchestrator.md +222 -0
- package/assets/.agent/skills/takomi/workflows/mode-review.md +341 -0
- package/assets/.agent/skills/takomi/workflows/mode-visionary.md +186 -0
- package/assets/.agent/skills/takomi/workflows/optimize-agent-context.md +54 -0
- package/assets/.agent/skills/takomi/workflows/remotion-build.md +323 -0
- package/assets/.agent/skills/takomi/workflows/reverse_genesis.md +132 -0
- package/assets/.agent/skills/takomi/workflows/review_code.md +96 -0
- package/assets/.agent/skills/takomi/workflows/spawn-jstar-code-review.md +161 -0
- package/assets/.agent/skills/takomi/workflows/stitch.md +149 -0
- package/assets/.agent/skills/takomi/workflows/vibe-build.md +271 -0
- package/assets/.agent/skills/takomi/workflows/vibe-continueBuild.md +184 -0
- package/assets/.agent/skills/takomi/workflows/vibe-design.md +98 -0
- package/assets/.agent/skills/takomi/workflows/vibe-finalize.md +208 -0
- package/assets/.agent/skills/takomi/workflows/vibe-genesis.md +191 -0
- package/assets/.agent/skills/takomi/workflows/vibe-primeAgent.md +110 -0
- package/assets/.agent/skills/takomi/workflows/vibe-spawnTask.md +188 -0
- package/assets/.agent/skills/takomi/workflows/vibe-syncDocs.md +90 -0
- package/assets/.agent/workflows/review_code.md +96 -133
- package/assets/.agent/workflows/spawn-jstar-code-review.md +161 -121
- package/package.json +1 -1
- package/src/cli.js +7 -6
- package/src/store.js +4 -3
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: The Remotion Builder - Generate a detailed video spec, get approval, then build. Two-phase workflow for programmatic video creation.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Remotion Builder Workflow
|
|
6
|
+
|
|
7
|
+
> **Purpose**: Create programmatic videos using Remotion. This workflow forces mandatory rule reading, detailed planning, and an asset audit before any code is written.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## ⚠️ CRITICAL: MANDATORY RULE READING
|
|
12
|
+
|
|
13
|
+
**YOU ARE NOT SMART ENOUGH TO GUESS REMOTION PATTERNS.**
|
|
14
|
+
|
|
15
|
+
Before writing ANY Remotion code, you MUST read the relevant rule files. Do NOT proceed without reading these. Do NOT assume you know what you're doing.
|
|
16
|
+
|
|
17
|
+
### Step 0.1: Read the Main Skill
|
|
18
|
+
// turbo
|
|
19
|
+
```bash
|
|
20
|
+
cat ".agent/skills/remotion/SKILL.md"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Step 0.2: Read REQUIRED Rule Files
|
|
24
|
+
|
|
25
|
+
Based on what the video needs, you MUST read the corresponding rule files. This is NOT optional.
|
|
26
|
+
|
|
27
|
+
**For ANY animation work (ALWAYS READ THESE):**
|
|
28
|
+
// turbo
|
|
29
|
+
```bash
|
|
30
|
+
cat ".agent/skills/remotion/rules/animations.md"
|
|
31
|
+
cat ".agent/skills/remotion/rules/timing.md"
|
|
32
|
+
cat ".agent/skills/remotion/rules/sequencing.md"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**If using scene transitions:**
|
|
36
|
+
// turbo
|
|
37
|
+
```bash
|
|
38
|
+
cat ".agent/skills/remotion/rules/transitions.md"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**If using text animations (typewriter, highlights, etc):**
|
|
42
|
+
// turbo
|
|
43
|
+
```bash
|
|
44
|
+
cat ".agent/skills/remotion/rules/text-animations.md"
|
|
45
|
+
cat ".agent/skills/remotion/rules/fonts.md"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**If using images, videos, or audio:**
|
|
49
|
+
// turbo
|
|
50
|
+
```bash
|
|
51
|
+
cat ".agent/skills/remotion/rules/assets.md"
|
|
52
|
+
cat ".agent/skills/remotion/rules/images.md"
|
|
53
|
+
cat ".agent/skills/remotion/rules/videos.md"
|
|
54
|
+
cat ".agent/skills/remotion/rules/audio.md"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**If using 3D elements:**
|
|
58
|
+
// turbo
|
|
59
|
+
```bash
|
|
60
|
+
cat ".agent/skills/remotion/rules/3d.md"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**If using captions/subtitles:**
|
|
64
|
+
// turbo
|
|
65
|
+
```bash
|
|
66
|
+
cat ".agent/skills/remotion/rules/display-captions.md"
|
|
67
|
+
cat ".agent/skills/remotion/rules/transcribe-captions.md"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**If using charts/data visualization:**
|
|
71
|
+
// turbo
|
|
72
|
+
```bash
|
|
73
|
+
cat ".agent/skills/remotion/rules/charts.md"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**If using Lottie animations:**
|
|
77
|
+
// turbo
|
|
78
|
+
```bash
|
|
79
|
+
cat ".agent/skills/remotion/rules/lottie.md"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**If using GIFs:**
|
|
83
|
+
// turbo
|
|
84
|
+
```bash
|
|
85
|
+
cat ".agent/skills/remotion/rules/gifs.md"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
> ⛔ **DO NOT PROCEED TO PHASE 1 UNTIL YOU HAVE READ THE RELEVANT RULES.**
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## PHASE 1: Video Specification
|
|
93
|
+
|
|
94
|
+
Generate a **Video Spec Document** in `docs/remotion/[video_name]_spec.md`.
|
|
95
|
+
|
|
96
|
+
### Step 1.1: Generate the Video Spec
|
|
97
|
+
|
|
98
|
+
Create the spec with this structure:
|
|
99
|
+
|
|
100
|
+
```markdown
|
|
101
|
+
# 🎬 Video Spec: [Video Name]
|
|
102
|
+
|
|
103
|
+
## Overview
|
|
104
|
+
| Property | Value |
|
|
105
|
+
|----------|-------|
|
|
106
|
+
| **Type** | [Main/Short/B-Roll/Intro/Outro] |
|
|
107
|
+
| **Duration** | [X seconds] (Y frames @ Zfps) |
|
|
108
|
+
| **Resolution** | [WxH] |
|
|
109
|
+
| **FPS** | 30 |
|
|
110
|
+
| **Composition ID** | `[CompositionId]` |
|
|
111
|
+
|
|
112
|
+
## Rules I Read Before Writing This Spec
|
|
113
|
+
- [x] animations.md
|
|
114
|
+
- [x] timing.md
|
|
115
|
+
- [x] sequencing.md
|
|
116
|
+
- [ ] transitions.md (if applicable)
|
|
117
|
+
- [ ] text-animations.md (if applicable)
|
|
118
|
+
- [ ] ... (list all rules you read)
|
|
119
|
+
|
|
120
|
+
## Creative Direction
|
|
121
|
+
[1-2 sentences describing the visual concept]
|
|
122
|
+
|
|
123
|
+
### Color Palette
|
|
124
|
+
| Color | Hex | Usage |
|
|
125
|
+
|-------|-----|-------|
|
|
126
|
+
| Primary | #XXXXXX | [usage] |
|
|
127
|
+
|
|
128
|
+
### Typography
|
|
129
|
+
| Font | Weight | Size | Usage |
|
|
130
|
+
|------|--------|------|-------|
|
|
131
|
+
| [Font Name] | [weight] | [px] | [usage] |
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Scene Breakdown
|
|
136
|
+
|
|
137
|
+
### Scene 1: [Name] (0s - Xs)
|
|
138
|
+
**Duration**: X seconds (Y frames)
|
|
139
|
+
|
|
140
|
+
#### Visual Elements
|
|
141
|
+
- [ ] Element 1: [Description]
|
|
142
|
+
|
|
143
|
+
#### Animations (from timing.md / animations.md)
|
|
144
|
+
| Element | Type | Start | End | Easing |
|
|
145
|
+
|---------|------|-------|-----|--------|
|
|
146
|
+
| [Element] | [fadeIn/spring/interpolate] | X | Y | [spring({damping:200}) / Easing.out(Easing.exp)] |
|
|
147
|
+
|
|
148
|
+
#### Code Approach
|
|
149
|
+
\```tsx
|
|
150
|
+
// Frame-by-frame animation using useCurrentFrame() - NEVER CSS transitions
|
|
151
|
+
const frame = useCurrentFrame();
|
|
152
|
+
const opacity = interpolate(frame, [0, 30], [0, 1], { extrapolateRight: 'clamp' });
|
|
153
|
+
\```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Technical Requirements
|
|
158
|
+
|
|
159
|
+
### Props Schema (Zod)
|
|
160
|
+
\```ts
|
|
161
|
+
import { z } from "zod";
|
|
162
|
+
export const [Id]Schema = z.object({ ... });
|
|
163
|
+
\```
|
|
164
|
+
|
|
165
|
+
### Critical Rules (MEMORIZE THESE)
|
|
166
|
+
> ⛔ FORBIDDEN: CSS transitions, CSS animations, Tailwind animation classes
|
|
167
|
+
> ✅ REQUIRED: All animations via useCurrentFrame() + interpolate()/spring()
|
|
168
|
+
> ✅ REQUIRED: premountFor={1 * fps} on all <Sequence> components
|
|
169
|
+
> ✅ REQUIRED: staticFile() for public folder assets
|
|
170
|
+
> ✅ REQUIRED: Clamp extrapolation to prevent values going beyond range
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Step 1.2: Request Approval
|
|
174
|
+
|
|
175
|
+
Use `notify_user` with `BlockedOnUser: true` to request spec approval.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## PHASE 2: Asset Audit
|
|
180
|
+
|
|
181
|
+
After spec approval, generate an **Asset Manifest**.
|
|
182
|
+
|
|
183
|
+
### Step 2.1: Generate Asset Manifest
|
|
184
|
+
|
|
185
|
+
Create `docs/remotion/[video_name]_assets.md`:
|
|
186
|
+
|
|
187
|
+
```markdown
|
|
188
|
+
# 🎨 Asset Manifest: [Video Name]
|
|
189
|
+
|
|
190
|
+
## 1. Code-Generatable Components ✅
|
|
191
|
+
*These can be built entirely with React/SVG code*
|
|
192
|
+
|
|
193
|
+
| Component | Description | Complexity |
|
|
194
|
+
|-----------|-------------|------------|
|
|
195
|
+
| `ComponentName.tsx` | Description | Low/Medium/High |
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## 2. Image Prompts for User 🖼️
|
|
200
|
+
*I CANNOT generate these myself. I am providing prompts for YOU to generate.*
|
|
201
|
+
|
|
202
|
+
> **Instructions for User:**
|
|
203
|
+
> Use these prompts with your preferred image generation tool (Midjourney, DALL-E, generate_image tool, etc.)
|
|
204
|
+
> After generating, save the images to `public/assets/[video_name]/`
|
|
205
|
+
|
|
206
|
+
| Asset | Prompt | Size | Save As |
|
|
207
|
+
|-------|--------|------|---------|
|
|
208
|
+
| Background | "Abstract dark gradient with subtle grid pattern, cyberpunk aesthetic, 16:9 aspect ratio" | 1920x1080 | `bg_hero.png` |
|
|
209
|
+
| Logo Icon | "Minimal geometric logo, neon cyan glow, dark background, icon style, square" | 512x512 | `logo.png` |
|
|
210
|
+
|
|
211
|
+
**Total prompts**: X images for you to generate
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## 3. External Assets Needed 📦
|
|
216
|
+
*These require you to provide - stock footage, your logos, audio files*
|
|
217
|
+
|
|
218
|
+
| Asset | Type | Description | Action |
|
|
219
|
+
|-------|------|-------------|--------|
|
|
220
|
+
| Your Logo | SVG/PNG | Your brand logo | You provide |
|
|
221
|
+
| Background Music | MP3 | Ambient tech music | Source from [Epidemic Sound](https://epidemicsound.com) |
|
|
222
|
+
| Screen Recording | MP4 | Demo of your app | You record |
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## 4. Your Choices ⚡
|
|
227
|
+
|
|
228
|
+
Tell me for each:
|
|
229
|
+
|
|
230
|
+
| Item | Options |
|
|
231
|
+
|------|---------|
|
|
232
|
+
| UI Mockups | [ ] I'll build code components / [ ] I'll provide screenshots |
|
|
233
|
+
| Background | [ ] Generate with prompt above / [ ] I'll provide my own |
|
|
234
|
+
| Logo | [ ] Generate with prompt above / [ ] I'll provide my own |
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## After You Decide
|
|
239
|
+
|
|
240
|
+
**If you want me to proceed with code components:**
|
|
241
|
+
Reply: "Build the components"
|
|
242
|
+
|
|
243
|
+
**If you want to generate images first:**
|
|
244
|
+
Run the prompts yourself, then reply: "Assets ready in public/assets/[folder]"
|
|
245
|
+
|
|
246
|
+
**If you're providing your own assets:**
|
|
247
|
+
Reply: "I'm providing: [list files] - they're in public/assets/[folder]"
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Step 2.2: Wait for User
|
|
251
|
+
|
|
252
|
+
Use `notify_user` with `BlockedOnUser: true`. Do NOT proceed until user responds with their choices.
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## PHASE 3: Component Building
|
|
257
|
+
|
|
258
|
+
Only after user confirms assets OR chooses code-gen:
|
|
259
|
+
|
|
260
|
+
### Step 3.1: Create Components
|
|
261
|
+
|
|
262
|
+
For each component in the manifest:
|
|
263
|
+
1. Re-read the relevant rule files (animations.md, timing.md, etc.)
|
|
264
|
+
2. Create the component following patterns from the rules EXACTLY
|
|
265
|
+
3. Use `useCurrentFrame()` for ALL animations
|
|
266
|
+
4. NEVER use CSS transitions or Tailwind animation classes
|
|
267
|
+
|
|
268
|
+
### Step 3.2: Create Main Composition
|
|
269
|
+
|
|
270
|
+
1. Import all components
|
|
271
|
+
2. Set up `<Sequence>` structure per the spec
|
|
272
|
+
3. Add `premountFor={1 * fps}` to every Sequence
|
|
273
|
+
4. Register in `Root.tsx`
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## PHASE 4: Verification
|
|
278
|
+
|
|
279
|
+
### Step 4.1: Start Studio
|
|
280
|
+
// turbo
|
|
281
|
+
```bash
|
|
282
|
+
pnpm start
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Step 4.2: Manual Verification
|
|
286
|
+
1. Open composition in browser
|
|
287
|
+
2. Scrub through timeline
|
|
288
|
+
3. Verify all animations trigger at correct frames
|
|
289
|
+
4. Check console for errors
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## Quick Reference (From Rules)
|
|
294
|
+
|
|
295
|
+
### Interpolation (from timing.md)
|
|
296
|
+
```tsx
|
|
297
|
+
const opacity = interpolate(frame, [0, 30], [0, 1], {
|
|
298
|
+
extrapolateRight: 'clamp',
|
|
299
|
+
extrapolateLeft: 'clamp',
|
|
300
|
+
});
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Spring (from timing.md)
|
|
304
|
+
```tsx
|
|
305
|
+
const scale = spring({
|
|
306
|
+
frame,
|
|
307
|
+
fps,
|
|
308
|
+
config: { damping: 200 }, // Smooth, no bounce
|
|
309
|
+
});
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Sequence (from sequencing.md)
|
|
313
|
+
```tsx
|
|
314
|
+
<Sequence from={1 * fps} durationInFrames={2 * fps} premountFor={1 * fps}>
|
|
315
|
+
<MyComponent />
|
|
316
|
+
</Sequence>
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### Assets (from assets.md)
|
|
320
|
+
```tsx
|
|
321
|
+
import { Img, staticFile } from 'remotion';
|
|
322
|
+
<Img src={staticFile('image.png')} />
|
|
323
|
+
```
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Onboard an AI to an existing codebase by generating an "Autopsy Report".
|
|
3
|
+
---
|
|
4
|
+
# Workflow: Reverse Genesis (Codebase Onboarding)
|
|
5
|
+
|
|
6
|
+
**System Instruction:**
|
|
7
|
+
This workflow is the OPPOSITE of `/init_vibecode_genesis`.
|
|
8
|
+
Instead of planning a NEW project, you are **onboarding to an EXISTING codebase**.
|
|
9
|
+
|
|
10
|
+
Your job is to generate a **Project Autopsy Report** — a comprehensive analysis of the current state of the code.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Steps
|
|
15
|
+
|
|
16
|
+
### 1. Reconnaissance (Auto-Scan)
|
|
17
|
+
|
|
18
|
+
**A. Project Overview:**
|
|
19
|
+
```bash
|
|
20
|
+
cat README.md 2>/dev/null || echo "No README found"
|
|
21
|
+
cat docs/Project_Requirements.md 2>/dev/null || echo "No PRD found"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**B. Tech Stack Detection:**
|
|
25
|
+
```bash
|
|
26
|
+
# Node/JS
|
|
27
|
+
cat package.json 2>/dev/null | head -50
|
|
28
|
+
# Python
|
|
29
|
+
cat requirements.txt 2>/dev/null || cat pyproject.toml 2>/dev/null
|
|
30
|
+
# Rust
|
|
31
|
+
cat Cargo.toml 2>/dev/null
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**C. Architecture Scan:**
|
|
35
|
+
```bash
|
|
36
|
+
# List top-level structure
|
|
37
|
+
ls -la
|
|
38
|
+
# List source structure
|
|
39
|
+
find src -type f -name "*.ts" -o -name "*.py" -o -name "*.rs" 2>/dev/null | head -30
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**D. Database Schema (if applicable):**
|
|
43
|
+
```bash
|
|
44
|
+
cat prisma/schema.prisma 2>/dev/null | head -100
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**E. Recent Activity:**
|
|
48
|
+
```bash
|
|
49
|
+
git log --oneline -10
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 2. Generate Autopsy Report
|
|
53
|
+
Create `docs/autopsy_report.md` with the following:
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
# Project Autopsy Report
|
|
57
|
+
|
|
58
|
+
**Generated:** [Current Date/Time]
|
|
59
|
+
**Purpose:** Onboard a new AI Orchestrator to this existing codebase.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 1. Project Elevator Pitch
|
|
64
|
+
[One-sentence purpose of this application]
|
|
65
|
+
|
|
66
|
+
## 2. Core Technology Stack
|
|
67
|
+
| Category | Technology |
|
|
68
|
+
| :--- | :--- |
|
|
69
|
+
| Language | TypeScript / Python / etc. |
|
|
70
|
+
| Framework | Next.js / FastAPI / etc. |
|
|
71
|
+
| Database | PostgreSQL / SQLite / etc. |
|
|
72
|
+
| Key Libraries | [List major dependencies] |
|
|
73
|
+
|
|
74
|
+
## 3. Inferred Architecture
|
|
75
|
+
[Describe the architectural pattern observed]
|
|
76
|
+
- e.g., "Next.js App Router with Feature-Sliced Design"
|
|
77
|
+
- e.g., "Modular Python with central event bus"
|
|
78
|
+
|
|
79
|
+
## 4. Key Modules & Responsibilities
|
|
80
|
+
| File/Module | Responsibility |
|
|
81
|
+
| :--- | :--- |
|
|
82
|
+
| `src/app/` | Next.js pages and routes |
|
|
83
|
+
| `src/features/` | Domain-specific logic |
|
|
84
|
+
| `src/lib/` | Shared utilities |
|
|
85
|
+
|
|
86
|
+
## 5. Inferred Coding Conventions
|
|
87
|
+
- **Naming:** snake_case / PascalCase / camelCase
|
|
88
|
+
- **Components:** Server Components by default
|
|
89
|
+
- **Validation:** Zod for all inputs
|
|
90
|
+
- **Styling:** Tailwind CSS utility-first
|
|
91
|
+
|
|
92
|
+
## 6. Entry Points
|
|
93
|
+
- Main: `src/app/page.tsx` or `main.py`
|
|
94
|
+
- API: `src/app/api/`
|
|
95
|
+
|
|
96
|
+
## 7. Current State
|
|
97
|
+
**Recent Commits:**
|
|
98
|
+
[List from git log]
|
|
99
|
+
|
|
100
|
+
**Open Issues:**
|
|
101
|
+
[List from gh issue list]
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## MISSION BRIEFING (For Orchestrator)
|
|
106
|
+
|
|
107
|
+
You have now assimilated this codebase.
|
|
108
|
+
|
|
109
|
+
**Your Directive:**
|
|
110
|
+
1. Acknowledge you understand the existing architecture.
|
|
111
|
+
2. Adopt the project's coding conventions.
|
|
112
|
+
3. Ask the user: "What would you like to build or fix?"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### 3. Full File Embedding (Optional)
|
|
116
|
+
If the project is complex, embed key files directly:
|
|
117
|
+
- `src/lib/utils.ts`
|
|
118
|
+
- Main config files
|
|
119
|
+
- Core business logic
|
|
120
|
+
|
|
121
|
+
### 4. Confirmation
|
|
122
|
+
Tell the user:
|
|
123
|
+
"🔬 **Autopsy Report Generated.**
|
|
124
|
+
Saved to: `docs/autopsy_report.md`
|
|
125
|
+
|
|
126
|
+
This report contains:
|
|
127
|
+
- Tech stack analysis
|
|
128
|
+
- Architecture breakdown
|
|
129
|
+
- Coding conventions
|
|
130
|
+
- Current state
|
|
131
|
+
|
|
132
|
+
To onboard a new AI, paste this report into the new session."
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run the up-to-date J-Star review and audit loop for a change set.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# J-Star Review Workflow
|
|
6
|
+
|
|
7
|
+
Use this workflow when the repository already has J-Star installed and you need to verify a change set.
|
|
8
|
+
|
|
9
|
+
## Core Rule
|
|
10
|
+
|
|
11
|
+
`review` and `audit` are separate steps.
|
|
12
|
+
|
|
13
|
+
For a serious verification pass, run both.
|
|
14
|
+
|
|
15
|
+
## 1. Build the Local Index
|
|
16
|
+
|
|
17
|
+
If the repository is missing `.jstar/storage`, or if major files were added, run:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
jstar init
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 2. Choose the Scope
|
|
24
|
+
|
|
25
|
+
### Staged changes
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git add .
|
|
29
|
+
jstar review
|
|
30
|
+
jstar audit
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Last commit
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
jstar review --last
|
|
37
|
+
jstar audit --last
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Branch or PR scope
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
jstar review --pr
|
|
44
|
+
jstar audit --pr
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 3. Read the Outputs
|
|
48
|
+
|
|
49
|
+
Review outputs:
|
|
50
|
+
- `.jstar/last-review.md`
|
|
51
|
+
- `.jstar/session.json`
|
|
52
|
+
|
|
53
|
+
Audit outputs:
|
|
54
|
+
- `.jstar/audit_report.md`
|
|
55
|
+
- `.jstar/audit_report.json`
|
|
56
|
+
|
|
57
|
+
## 4. Fix Loop
|
|
58
|
+
|
|
59
|
+
Agent instructions:
|
|
60
|
+
1. Read both the review and audit outputs.
|
|
61
|
+
2. Prioritize review `P0_CRITICAL` and `P1_HIGH` issues first.
|
|
62
|
+
3. Prioritize audit `CRITICAL` and `HIGH` findings first.
|
|
63
|
+
4. Apply fixes.
|
|
64
|
+
5. Stage changes with `git add .`.
|
|
65
|
+
6. Re-run both `review` and `audit` for the same scope.
|
|
66
|
+
7. If only lower-priority review issues remain, stop when the remaining work is not worth another loop.
|
|
67
|
+
8. Maximum loops: 3. If issues persist, stop and ask the user.
|
|
68
|
+
|
|
69
|
+
## 5. False Positives and Debate
|
|
70
|
+
|
|
71
|
+
For review findings that need challenge or adjudication:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
jstar chat --headless
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Headless commands:
|
|
78
|
+
- `{"action":"list"}`
|
|
79
|
+
- `{"action":"debate","issueId":0,"argument":"..."}`
|
|
80
|
+
- `{"action":"ignore","issueId":0}`
|
|
81
|
+
- `{"action":"accept","issueId":0}`
|
|
82
|
+
- `{"action":"exit"}`
|
|
83
|
+
|
|
84
|
+
For known deterministic audit false positives, use:
|
|
85
|
+
- `.jstar/audit-ignore.json`
|
|
86
|
+
|
|
87
|
+
## 6. Automation Mode
|
|
88
|
+
|
|
89
|
+
Machine-readable review output:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
jstar review --json > .jstar/last-review.json
|
|
93
|
+
jstar audit --json > .jstar/audit_report.json
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Use `review --json` and `audit --json` for automation. Do not rely on `review --headless`.
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Install J-Star Reviewer in the current repository and set up the up-to-date review and audit flows.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /spawn-jstar - Install J-Star Reviewer in This Repository
|
|
6
|
+
|
|
7
|
+
Use this workflow to install the `jstar-reviewer` npm package and wire the repository for both code review and security audit.
|
|
8
|
+
|
|
9
|
+
## Core Rule
|
|
10
|
+
|
|
11
|
+
`review` and `audit` are separate steps.
|
|
12
|
+
|
|
13
|
+
For a serious verification pass, run both. Do not present one as a substitute for the other.
|
|
14
|
+
|
|
15
|
+
## Command Prefix
|
|
16
|
+
|
|
17
|
+
Examples below use `jstar`.
|
|
18
|
+
|
|
19
|
+
If you do not want a global install, replace `jstar` with `npx jstar-reviewer`.
|
|
20
|
+
|
|
21
|
+
## 1. Prerequisites
|
|
22
|
+
|
|
23
|
+
- Node.js 18+
|
|
24
|
+
- Git repository
|
|
25
|
+
- Gemini API key
|
|
26
|
+
- Groq API key
|
|
27
|
+
|
|
28
|
+
## 2. Install the CLI
|
|
29
|
+
|
|
30
|
+
Preferred:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pnpm add -g jstar-reviewer
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Fallback:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm install -g jstar-reviewer
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
No global install:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npx jstar-reviewer --help
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## 3. Set Up the Repository
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
jstar setup
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
This should create or update:
|
|
55
|
+
- `.jstar/`
|
|
56
|
+
- `.env.example`
|
|
57
|
+
- `.gitignore`
|
|
58
|
+
|
|
59
|
+
## 4. Create `.env.local`
|
|
60
|
+
|
|
61
|
+
PowerShell:
|
|
62
|
+
|
|
63
|
+
```powershell
|
|
64
|
+
Copy-Item .env.example .env.local
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
POSIX shell:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
cp .env.example .env.local
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Required variables:
|
|
74
|
+
|
|
75
|
+
```env
|
|
76
|
+
GEMINI_API_KEY=your_gemini_key
|
|
77
|
+
GROQ_API_KEY=your_groq_key
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Optional but useful:
|
|
81
|
+
|
|
82
|
+
```env
|
|
83
|
+
GEMINI_EMBEDDING_MODEL=gemini-embedding-001
|
|
84
|
+
REVIEW_MODEL_NAME=moonshotai/kimi-k2-instruct-0905
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## 5. Build the Local Index
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
jstar init
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
If indexing fails with a Google 404 for the embedding model, set:
|
|
94
|
+
|
|
95
|
+
```env
|
|
96
|
+
GEMINI_EMBEDDING_MODEL=gemini-embedding-001
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## 6. First Verification Pass
|
|
100
|
+
|
|
101
|
+
### Option A: Interactive user flow
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
jstar review
|
|
105
|
+
jstar audit
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Use this when the user wants the normal CLI/TUI experience.
|
|
109
|
+
|
|
110
|
+
### Option B: Agent automation flow
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
jstar review --json > .jstar/last-review.json
|
|
114
|
+
jstar audit --json > .jstar/audit_report.json
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Use this when an agent needs machine-readable output.
|
|
118
|
+
|
|
119
|
+
### Option C: Review debate flow
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
jstar chat --headless
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Headless commands:
|
|
126
|
+
- `{"action":"list"}`
|
|
127
|
+
- `{"action":"debate","issueId":0,"argument":"..."}`
|
|
128
|
+
- `{"action":"ignore","issueId":0}`
|
|
129
|
+
- `{"action":"accept","issueId":0}`
|
|
130
|
+
- `{"action":"exit"}`
|
|
131
|
+
|
|
132
|
+
## 7. Common Target Modes
|
|
133
|
+
|
|
134
|
+
Staged changes:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
jstar review
|
|
138
|
+
jstar audit
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Last commit:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
jstar review --last
|
|
145
|
+
jstar audit --last
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Branch or PR scope:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
jstar review --pr
|
|
152
|
+
jstar audit --pr
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Outputs
|
|
156
|
+
|
|
157
|
+
- `.jstar/last-review.md`
|
|
158
|
+
- `.jstar/session.json`
|
|
159
|
+
- `.jstar/audit_report.md`
|
|
160
|
+
- `.jstar/audit_report.json`
|
|
161
|
+
- `.jstar/audit-ignore.json`
|