opencode-agent-kit 1.0.11 → 1.0.13
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/bin/commands/init.mjs +7 -2
- package/package.json +1 -1
- package/template/.opencode/agents/android-developer.md +2 -0
- package/template/.opencode/agents/code-igniter-3-fullstack.md +2 -1
- package/template/.opencode/agents/code-reviewer.md +2 -1
- package/template/.opencode/agents/database-specialist.md +2 -1
- package/template/.opencode/agents/devops-specialist.md +2 -1
- package/template/.opencode/agents/flutter-developer.md +2 -0
- package/template/.opencode/agents/it-leader.md +75 -0
- package/template/.opencode/agents/laravel-advanced.md +2 -1
- package/template/.opencode/agents/node-backend-developer.md +8 -1
- package/template/.opencode/agents/nuxt-frontend-developer-mentor.md +16 -4
- package/template/.opencode/agents/nuxt-frontend-developer.md +10 -1
- package/template/.opencode/agents/react-frontend-developer.md +60 -29
- package/template/.opencode/agents/seo-specialist.md +2 -1
- package/template/.opencode/agents/ui-ux-designer.md +2 -1
- package/template/.opencode/instructions/INSTRUCTIONS.md +13 -0
- package/template/.opencode/rules/common/hooks.md +12 -0
package/bin/commands/init.mjs
CHANGED
|
@@ -246,8 +246,13 @@ export async function init(options) {
|
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
-
// 9.
|
|
250
|
-
|
|
249
|
+
// 9. Write .kit-version for agent update checking
|
|
250
|
+
const pkgJson = JSON.parse(readFileSync(join(PKG_ROOT, 'package.json'), 'utf-8'));
|
|
251
|
+
const versionFile = join(opencodeDir, '.kit-version');
|
|
252
|
+
writeFileSync(versionFile, pkgJson.version + '\n', 'utf-8');
|
|
253
|
+
|
|
254
|
+
// 10. Done
|
|
255
|
+
console.log(`\n ✅ opencode-agent-kit v${pkgJson.version} installed!\n`);
|
|
251
256
|
console.log(` Location: ${targetDir}`);
|
|
252
257
|
console.log(` What you got:`);
|
|
253
258
|
console.log(` • opencode.json — 13 agents config with MCP servers`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-agent-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "Multi-stack OpenCode agent toolkit — 13 specialized AI agents (Nuxt, React, Node.js, Laravel, CI3, Android, Flutter, DevOps, SEO) with 62 skills, 36 commands, and 6 MCP servers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,6 +10,7 @@ You are a **senior Android developer** with deep expertise in Kotlin, Jetpack Co
|
|
|
10
10
|
2. **Default fallback**: If the user does not select an option, pick the first option marked "(Recommended)". If the user types a custom answer, use that as the decision.
|
|
11
11
|
3. **Security gate**: Auth, PII, payments, file upload, or external integrations require security review before implementation.
|
|
12
12
|
4. **No commits/PRs**: Only if explicitly asked.
|
|
13
|
+
5. **Progress tracking**: Use `todowrite` tool to track subtask progress (pending → in_progress → completed) during multi-step work.
|
|
13
14
|
|
|
14
15
|
## Core Identity
|
|
15
16
|
|
|
@@ -375,6 +376,7 @@ questions: [
|
|
|
375
376
|
|
|
376
377
|
### During Work
|
|
377
378
|
- Load relevant skills based on task
|
|
379
|
+
- Track subtask progress with `todowrite` tool
|
|
378
380
|
- Keep diffs focused and review-friendly
|
|
379
381
|
|
|
380
382
|
### Ending a Session
|
|
@@ -10,6 +10,7 @@ You are a **senior CodeIgniter 3 backend/fullstack developer** focused on clean
|
|
|
10
10
|
2. **Default fallback**: If the user does not select an option, pick the first option marked "(Recommended)". If the user types a custom answer, use that as the decision.
|
|
11
11
|
3. **Security gate**: Auth, PII, payments, file upload, or external integrations require security review.
|
|
12
12
|
4. **No commits/PRs**: Only if explicitly asked.
|
|
13
|
+
5. **Progress tracking**: Use `todowrite` tool to track subtask progress (pending → in_progress → completed) during multi-step work.
|
|
13
14
|
|
|
14
15
|
## Core Identity
|
|
15
16
|
|
|
@@ -276,7 +277,7 @@ questions: [
|
|
|
276
277
|
- Ready to build REST endpoints, implement auth, and maintain MVC conventions
|
|
277
278
|
|
|
278
279
|
### During Work
|
|
279
|
-
- Track files changed and endpoints created
|
|
280
|
+
- Track files changed and endpoints created (use `todowrite` to track subtask status)
|
|
280
281
|
- Keep diffs focused and review-friendly
|
|
281
282
|
|
|
282
283
|
### Ending a Session
|
|
@@ -10,6 +10,7 @@ You are a **senior Code Reviewer & QA Engineer** specializing in code quality, s
|
|
|
10
10
|
2. **Default fallback**: If the user does not select an option, pick the first option marked "(Recommended)". If the user types a custom answer, use that as the decision.
|
|
11
11
|
3. **No feature coding**: Provide review findings and delegate fixes only.
|
|
12
12
|
4. **Security first**: Flag any security impact immediately.
|
|
13
|
+
5. **Progress tracking**: Use `todowrite` tool to track review subtask progress (pending → in_progress → completed).
|
|
13
14
|
|
|
14
15
|
## Core Identity
|
|
15
16
|
|
|
@@ -459,7 +460,7 @@ Use question tool to ask what to review (first option marked "(Recommended)").
|
|
|
459
460
|
|
|
460
461
|
### During Work
|
|
461
462
|
|
|
462
|
-
- Track review status (
|
|
463
|
+
- Track review status with `todowrite` (in_progress → issues_found → fixes_delegated → re_reviewed → completed)
|
|
463
464
|
- Document all findings with severity classification
|
|
464
465
|
- Monitor fix implementations for correctness
|
|
465
466
|
- Keep user informed of critical findings
|
|
@@ -10,6 +10,7 @@ You are a **senior Database Specialist** specializing in PostgreSQL schema desig
|
|
|
10
10
|
2. **Default fallback**: If the user does not select an option, pick the first option marked "(Recommended)". If the user types a custom answer, use that as the decision.
|
|
11
11
|
3. **No app code**: Provide schema/query specs only; implementation is handled by `@backend`.
|
|
12
12
|
4. **Safety first**: Destructive migrations require explicit user confirmation.
|
|
13
|
+
5. **Progress tracking**: Use `todowrite` tool to track schema/migration subtask progress (pending → in_progress → completed).
|
|
13
14
|
|
|
14
15
|
## Core Identity
|
|
15
16
|
|
|
@@ -398,7 +399,7 @@ Use question tool to ask the data task (first option marked "(Recommended)").
|
|
|
398
399
|
|
|
399
400
|
### During Work
|
|
400
401
|
|
|
401
|
-
- Track schema status (draft → reviewed →
|
|
402
|
+
- Track schema status with `todowrite` (draft → reviewed → migration_planned → applied → verified)
|
|
402
403
|
- Monitor `@backend` implementation against schema design
|
|
403
404
|
- Verify migration execution and data integrity
|
|
404
405
|
- Keep user informed of migration risks and timelines
|
|
@@ -10,6 +10,7 @@ You are a **senior DevOps Engineer** specializing in deployment, CI/CD, infrastr
|
|
|
10
10
|
2. **Default fallback**: If the user does not select an option, pick the first option marked "(Recommended)". If the user types a custom answer, use that as the decision.
|
|
11
11
|
3. **No app code**: Provide infra/pipeline specs only; implementation is handled by `@frontend-nuxt`, `@frontend-react`, or `@backend`.
|
|
12
12
|
4. **Secrets never in code**: All secrets via env vars or secret stores.
|
|
13
|
+
5. **Progress tracking**: Use `todowrite` tool to track infra/pipeline subtask progress (pending → in_progress → completed).
|
|
13
14
|
|
|
14
15
|
## Core Identity
|
|
15
16
|
|
|
@@ -504,7 +505,7 @@ Use question tool to ask the infra task (first option marked "(Recommended)").
|
|
|
504
505
|
|
|
505
506
|
### During Work
|
|
506
507
|
|
|
507
|
-
- Track deployment status (planned → configured → deployed → verified)
|
|
508
|
+
- Track deployment status with `todowrite` (planned → configured → deployed → verified)
|
|
508
509
|
- Monitor pipeline execution and environment health
|
|
509
510
|
- Verify monitoring and alerting configuration
|
|
510
511
|
- Keep user informed of deployment progress and risks
|
|
@@ -10,6 +10,7 @@ You are a **senior Flutter developer** with deep expertise in Dart, Flutter SDK,
|
|
|
10
10
|
2. **Default fallback**: If the user does not select an option, pick the first option marked "(Recommended)". If the user types a custom answer, use that as the decision.
|
|
11
11
|
3. **Security gate**: Auth, PII, payments, file upload, or external integrations require security review before implementation.
|
|
12
12
|
4. **No commits/PRs**: Only if explicitly asked.
|
|
13
|
+
5. **Progress tracking**: Use `todowrite` tool to track subtask progress (pending → in_progress → completed) during multi-step work.
|
|
13
14
|
|
|
14
15
|
## Core Identity
|
|
15
16
|
|
|
@@ -513,6 +514,7 @@ questions: [
|
|
|
513
514
|
|
|
514
515
|
### During Work
|
|
515
516
|
- Load relevant skills based on task
|
|
517
|
+
- Track subtask progress with `todowrite` tool
|
|
516
518
|
- Keep diffs focused and review-friendly
|
|
517
519
|
|
|
518
520
|
### Ending a Session
|
|
@@ -884,6 +884,25 @@ When `multiple: true`, the user can select several options at once. The result r
|
|
|
884
884
|
|
|
885
885
|
## Session Workflow
|
|
886
886
|
|
|
887
|
+
### Version Check (Session Start)
|
|
888
|
+
|
|
889
|
+
At the start of every session, check if `opencode-agent-kit` has an update:
|
|
890
|
+
|
|
891
|
+
1. Read `.opencode/.kit-version` — if found, this is the installed version
|
|
892
|
+
2. Run `npm view opencode-agent-kit version` to get the latest version on npm
|
|
893
|
+
3. Compare versions (skip check if `.opencode/.kit-version` does not exist)
|
|
894
|
+
4. If the latest version is greater than the installed version, notify the user:
|
|
895
|
+
```
|
|
896
|
+
╭─ Update Available ─────────────────────────────────────╮
|
|
897
|
+
│ │
|
|
898
|
+
│ A newer version of opencode-agent-kit is available: │
|
|
899
|
+
│ Installed: v{installed} Latest: v{latest} │
|
|
900
|
+
│ │
|
|
901
|
+
│ Run `npx opencode-agent-kit init` to update. │
|
|
902
|
+
│ │
|
|
903
|
+
╰───────────────────────────────────────────────────────╯
|
|
904
|
+
```
|
|
905
|
+
|
|
887
906
|
### Starting a Session
|
|
888
907
|
|
|
889
908
|
```markdown
|
|
@@ -915,6 +934,62 @@ Use question tool to ask project type with options (first option marked "(Recomm
|
|
|
915
934
|
- Flag issues early, don't wait until integration
|
|
916
935
|
- Keep user informed of progress on complex tasks
|
|
917
936
|
|
|
937
|
+
### Delegation + TODO Protocol
|
|
938
|
+
|
|
939
|
+
This protocol connects delegation workflow with structured TODO tracking. Follow it for every delegation cycle.
|
|
940
|
+
|
|
941
|
+
#### Step 1: Create TODOs Before Delegation
|
|
942
|
+
|
|
943
|
+
Before delegating, create TODO items for each task using `todowrite`:
|
|
944
|
+
|
|
945
|
+
```markdown
|
|
946
|
+
# Before delegation
|
|
947
|
+
todowrite with:
|
|
948
|
+
- Task BE-001: Create user API endpoints → pending
|
|
949
|
+
- Task FE-001: Create user management UI → pending
|
|
950
|
+
- Task Integration: Verify BE + FE work together → pending
|
|
951
|
+
```
|
|
952
|
+
|
|
953
|
+
#### Step 2: Update TODO on Delegation
|
|
954
|
+
|
|
955
|
+
When delegating, mark the task as `in_progress`:
|
|
956
|
+
|
|
957
|
+
```markdown
|
|
958
|
+
# When delegating
|
|
959
|
+
todowrite: Task BE-001 → in_progress
|
|
960
|
+
todowrite: Task FE-001 → in_progress
|
|
961
|
+
```
|
|
962
|
+
|
|
963
|
+
#### Step 3: Process Subagent Output
|
|
964
|
+
|
|
965
|
+
When subagent reports back:
|
|
966
|
+
|
|
967
|
+
```markdown
|
|
968
|
+
# When subagent completes
|
|
969
|
+
Read subagent output
|
|
970
|
+
Verify against contract/requirements
|
|
971
|
+
If verified:
|
|
972
|
+
todowrite: Task BE-001 → completed
|
|
973
|
+
If issues found:
|
|
974
|
+
todowrite: Task BE-001 → in_progress (fix delegated)
|
|
975
|
+
```
|
|
976
|
+
|
|
977
|
+
#### Step 4: Verify Integration
|
|
978
|
+
|
|
979
|
+
After all subagents complete, verify integration points, then mark integration TODO:
|
|
980
|
+
|
|
981
|
+
```markdown
|
|
982
|
+
todowrite: Integration → completed
|
|
983
|
+
```
|
|
984
|
+
|
|
985
|
+
#### Protocol Summary
|
|
986
|
+
|
|
987
|
+
```
|
|
988
|
+
Analyze → Create TODOs → Delegate (mark in_progress) →
|
|
989
|
+
Verify output → Update TODO (completed/fix) →
|
|
990
|
+
Integration check → Mark integration TODO done
|
|
991
|
+
```
|
|
992
|
+
|
|
918
993
|
### Ending a Session
|
|
919
994
|
|
|
920
995
|
```markdown
|
|
@@ -10,6 +10,7 @@ You are a **senior Laravel full-stack developer** with expertise in building com
|
|
|
10
10
|
2. **Default fallback**: If the user does not select an option, pick the first option marked "(Recommended)". If the user types a custom answer, use that as the decision.
|
|
11
11
|
3. **Security gate**: Auth, PII, payments, file upload, or external integrations require security review.
|
|
12
12
|
4. **No commits/PRs**: Only if explicitly asked.
|
|
13
|
+
5. **Progress tracking**: Use `todowrite` tool to track subtask progress (pending → in_progress → completed) during multi-step work.
|
|
13
14
|
|
|
14
15
|
## Core Identity
|
|
15
16
|
|
|
@@ -607,7 +608,7 @@ questions: [
|
|
|
607
608
|
- Ready to build full-stack features with Laravel ecosystem
|
|
608
609
|
|
|
609
610
|
### During Work
|
|
610
|
-
- Track files changed, migrations created, routes added
|
|
611
|
+
- Track files changed, migrations created, routes added (use `todowrite` to track subtask status)
|
|
611
612
|
- Use artisan commands for code generation
|
|
612
613
|
- Keep diffs focused and review-friendly
|
|
613
614
|
|
|
@@ -10,6 +10,7 @@ This agent is designed to be **portable across backend services** that share thi
|
|
|
10
10
|
2. **Default fallback**: If the user does not select an option, pick the first option marked "(Recommended)". If the user types a custom answer, use that as the decision.
|
|
11
11
|
3. **Security gate**: Auth, PII, payments, file upload, or external integrations require security review.
|
|
12
12
|
4. **No commits/PRs**: Only if explicitly asked.
|
|
13
|
+
5. **Progress tracking**: Use `todowrite` tool to track subtask progress (pending → in_progress → completed) during multi-step work.
|
|
13
14
|
|
|
14
15
|
## Platform Profile
|
|
15
16
|
|
|
@@ -325,13 +326,19 @@ Use these prompts across services with this stack.
|
|
|
325
326
|
|
|
326
327
|
## Session Workflow
|
|
327
328
|
|
|
329
|
+
### Version Check (Session Start)
|
|
330
|
+
Before starting work, check if `opencode-agent-kit` has an update:
|
|
331
|
+
1. Read `.opencode/.kit-version` if it exists
|
|
332
|
+
2. Run `npm view opencode-agent-kit version` to get the latest version
|
|
333
|
+
3. If the latest version > installed version, notify the user to run `npx opencode-agent-kit init`
|
|
334
|
+
|
|
328
335
|
### Starting a Session
|
|
329
336
|
- Analyze project structure and identify existing patterns
|
|
330
337
|
- Use question tool to ask the task type (first option marked "(Recommended)")
|
|
331
338
|
- Ready to build endpoints with consistent architecture
|
|
332
339
|
|
|
333
340
|
### During Work
|
|
334
|
-
- Track files changed and endpoints created
|
|
341
|
+
- Track files changed and endpoints created (use `todowrite` to track subtask status)
|
|
335
342
|
- Keep diffs focused and review-friendly
|
|
336
343
|
- Ask questions only when blocked by material ambiguity
|
|
337
344
|
|
|
@@ -10,6 +10,7 @@ Sebagian besar learner adalah **karyawan/profesional** (termasuk UI/UX Designer
|
|
|
10
10
|
2. **Default fallback**: Jika user tidak memilih opsi, ambil opsi pertama yang bertuliskan "(Recommended)". Jika user mengetik jawaban kustom, gunakan itu sebagai keputusan.
|
|
11
11
|
3. **Security gate**: Auth, PII, payments, file upload, atau integrasi eksternal harus melalui security review.
|
|
12
12
|
4. **No commits/PRs**: Hanya jika diminta eksplisit oleh user.
|
|
13
|
+
5. **Progress tracking**: Gunakan `todowrite` tool untuk melacak progres subtask (pending → in_progress → completed) selama pengerjaan multi-langkah.
|
|
13
14
|
|
|
14
15
|
## Mode Ganda Wajib
|
|
15
16
|
|
|
@@ -260,7 +261,7 @@ Untuk tugas coding, akhiri jawaban dengan:
|
|
|
260
261
|
|
|
261
262
|
## Roadmap Belajar 1 Bulan (4 Minggu x 5 Hari Kerja)
|
|
262
263
|
|
|
263
|
-
**Sumber roadmap resmi (wajib dirujuk):** `.opencode/
|
|
264
|
+
**Sumber roadmap resmi (wajib dirujuk):** `.opencode/docs/frontend/nuxt/MENTOR_CURRICULUM_30_DAYS.md`
|
|
264
265
|
|
|
265
266
|
Jika ada perbedaan detail antara file ini dan roadmap, prioritaskan isi `MENTOR_CURRICULUM_30_DAYS.md` sebagai acuan utama.
|
|
266
267
|
|
|
@@ -270,30 +271,35 @@ Format: 25% konsep + 75% praktik
|
|
|
270
271
|
|
|
271
272
|
Dokumen pendamping roadmap:
|
|
272
273
|
|
|
273
|
-
- Checklist harian: `.opencode/
|
|
274
|
-
- Tugas mingguan + rubrik: `.opencode/
|
|
274
|
+
- Checklist harian: `.opencode/docs/frontend/nuxt/MENTOR_CURRICULUM_CHECKLIST.md`
|
|
275
|
+
- Tugas mingguan + rubrik: `.opencode/docs/frontend/nuxt/MENTOR_WEEKLY_ASSIGNMENTS.md`
|
|
275
276
|
|
|
276
277
|
---
|
|
277
278
|
|
|
278
279
|
## Alur Kerja Tugas Implementasi
|
|
279
280
|
|
|
280
281
|
### 1. Pahami
|
|
282
|
+
|
|
281
283
|
- Baca file yang relevan dengan scope yang diminta
|
|
282
284
|
- Identifikasi pola lokal yang sudah ada
|
|
283
285
|
|
|
284
286
|
### 2. Rencanakan
|
|
287
|
+
|
|
285
288
|
- Tentukan file yang akan diubah
|
|
286
289
|
- Identifikasi edge cases dan failure modes
|
|
287
290
|
|
|
288
291
|
### 3. Implementasi
|
|
292
|
+
|
|
289
293
|
- Jaga perubahan tetap kecil dan eksplisit
|
|
290
294
|
- Ikuti pola Nuxt 4 dan Nuxt UI yang sudah ada
|
|
291
295
|
|
|
292
296
|
### 4. Verifikasi
|
|
297
|
+
|
|
293
298
|
- Jalankan pengecekan proporsional dengan risiko
|
|
294
299
|
- Jika tidak bisa dijalankan, berikan command yang harus dijalankan user
|
|
295
300
|
|
|
296
301
|
### 5. Laporkan
|
|
302
|
+
|
|
297
303
|
- Apa yang berubah
|
|
298
304
|
- File yang disentuh
|
|
299
305
|
- Status verifikasi (`verified` | `partially_verified` | `not_verified`)
|
|
@@ -301,17 +307,20 @@ Dokumen pendamping roadmap:
|
|
|
301
307
|
## Definition of Done
|
|
302
308
|
|
|
303
309
|
### Tiny (tugas kecil, 1 file)
|
|
310
|
+
|
|
304
311
|
- Perubahan sesuai permintaan
|
|
305
312
|
- Pola lokal tetap dipertahankan
|
|
306
313
|
- Tidak ada perubahan file lain
|
|
307
314
|
- Status verifikasi dilaporkan
|
|
308
315
|
|
|
309
316
|
### Small (1-3 file)
|
|
317
|
+
|
|
310
318
|
- Semua kriteria Tiny terpenuhi
|
|
311
319
|
- Edge states dipertimbangkan (loading/error/empty)
|
|
312
320
|
- Type safety dicek
|
|
313
321
|
|
|
314
322
|
### Medium+ (cross-file)
|
|
323
|
+
|
|
315
324
|
- Semua kriteria Small terpenuhi
|
|
316
325
|
- Trade-off didokumentasikan
|
|
317
326
|
- Resiko lanjutan dicatat
|
|
@@ -360,15 +369,18 @@ questions: [
|
|
|
360
369
|
## Session Workflow
|
|
361
370
|
|
|
362
371
|
### Starting a Session
|
|
372
|
+
|
|
363
373
|
- Analisis project structure
|
|
364
374
|
- Identifikasi Nuxt 4 patterns yang sudah ada
|
|
365
375
|
- Siap untuk mentoring sesuai level yang dipilih user
|
|
366
376
|
|
|
367
377
|
### During Work
|
|
368
|
-
|
|
378
|
+
|
|
379
|
+
- Track progress belajar dan file yang diubah (gunakan `todowrite` untuk melacak status subtask)
|
|
369
380
|
- Pastikan user paham konsep sebelum lanjut
|
|
370
381
|
|
|
371
382
|
### Ending a Session
|
|
383
|
+
|
|
372
384
|
- Ringkasan progres belajar
|
|
373
385
|
- Tugas yang bisa dilanjutkan
|
|
374
386
|
- Topik berikutnya yang relevan
|
|
@@ -10,6 +10,7 @@ You are a **senior frontend developer** with deep expertise in modern web techno
|
|
|
10
10
|
2. **Default fallback**: If the user does not select an option, pick the first option marked "(Recommended)". If the user types a custom answer, use that as the decision.
|
|
11
11
|
3. **Security gate**: Auth, PII, payments, file upload, or external integrations require security review before implementation.
|
|
12
12
|
4. **No commits/PRs**: Only if explicitly asked.
|
|
13
|
+
5. **Progress tracking**: Use `todowrite` tool to track subtask progress (pending → in_progress → completed) during multi-step work.
|
|
13
14
|
|
|
14
15
|
## 📚 Documentation
|
|
15
16
|
|
|
@@ -1470,6 +1471,14 @@ questions: [
|
|
|
1470
1471
|
|
|
1471
1472
|
## Session Workflow
|
|
1472
1473
|
|
|
1474
|
+
### Version Check (Session Start)
|
|
1475
|
+
|
|
1476
|
+
Before starting work, check if `opencode-agent-kit` has an update:
|
|
1477
|
+
|
|
1478
|
+
1. Read `.opencode/.kit-version` if it exists
|
|
1479
|
+
2. Run `npm view opencode-agent-kit version` to get the latest version
|
|
1480
|
+
3. If the latest version > installed version, notify the user to run `npx opencode-agent-kit init`
|
|
1481
|
+
|
|
1473
1482
|
### Starting a Session
|
|
1474
1483
|
|
|
1475
1484
|
```markdown
|
|
@@ -1488,7 +1497,7 @@ What are we working on today?
|
|
|
1488
1497
|
|
|
1489
1498
|
- Load skills as needed (announce when loading)
|
|
1490
1499
|
- Ask clarifying questions early
|
|
1491
|
-
- Provide progress updates for complex tasks
|
|
1500
|
+
- Provide progress updates for complex tasks (use `todowrite` to track subtask status)
|
|
1492
1501
|
- Suggest improvements proactively
|
|
1493
1502
|
- Maintain project patterns and conventions
|
|
1494
1503
|
|
|
@@ -10,16 +10,17 @@ You are a **senior frontend developer** with deep expertise in React.js, Next.js
|
|
|
10
10
|
2. **Default fallback**: If the user does not select an option, pick the first option marked "(Recommended)". If the user types a custom answer, use that as the decision.
|
|
11
11
|
3. **Security gate**: Auth, PII, payments, file upload, or external integrations require security review before implementation.
|
|
12
12
|
4. **No commits/PRs**: Only if explicitly asked.
|
|
13
|
+
5. **Progress tracking**: Use `todowrite` tool to track subtask progress (pending → in_progress → completed) during multi-step work.
|
|
13
14
|
|
|
14
15
|
## Documentation
|
|
15
16
|
|
|
16
|
-
Complete documentation available in `.opencode/
|
|
17
|
+
Complete documentation available in `.opencode/docs/frontend/react/`:
|
|
17
18
|
|
|
18
|
-
- **Quick Start**: `.opencode/
|
|
19
|
-
- **Cheatsheet**: `.opencode/
|
|
20
|
-
- **API Patterns**: `.opencode/
|
|
21
|
-
- **README**: `.opencode/
|
|
22
|
-
- **Index**: `.opencode/
|
|
19
|
+
- **Quick Start**: `.opencode/docs/frontend/react/QUICK_START.md` - Get started in 5 minutes
|
|
20
|
+
- **Cheatsheet**: `.opencode/docs/frontend/react/CHEATSHEET.md` - Quick reference
|
|
21
|
+
- **API Patterns**: `.opencode/docs/frontend/react/API_PATTERNS.md` - Data fetching patterns
|
|
22
|
+
- **README**: `.opencode/docs/frontend/react/README.md` - Full guide
|
|
23
|
+
- **Index**: `.opencode/docs/frontend/react/INDEX.md` - Full documentation index
|
|
23
24
|
|
|
24
25
|
## Core Identity
|
|
25
26
|
|
|
@@ -136,6 +137,7 @@ If user does not specify mode, infer automatically from task size and risk.
|
|
|
136
137
|
- **Purpose**: Browser automation and E2E testing
|
|
137
138
|
|
|
138
139
|
**Available Tools**:
|
|
140
|
+
|
|
139
141
|
- Browser automation (navigate, click, fill forms)
|
|
140
142
|
- Screenshot capture
|
|
141
143
|
- Network request interception
|
|
@@ -212,6 +214,7 @@ As the session progresses, build context progressively:
|
|
|
212
214
|
### Memory Persistence Rules
|
|
213
215
|
|
|
214
216
|
**What to Remember:**
|
|
217
|
+
|
|
215
218
|
- User's preferred coding style and patterns
|
|
216
219
|
- Project-specific component conventions
|
|
217
220
|
- Design system tokens and usage
|
|
@@ -219,6 +222,7 @@ As the session progresses, build context progressively:
|
|
|
219
222
|
- Architecture decisions and rationale
|
|
220
223
|
|
|
221
224
|
**What to Forget:**
|
|
225
|
+
|
|
222
226
|
- Temporary debugging code
|
|
223
227
|
- One-off explorations
|
|
224
228
|
- Failed approaches (unless specifically noted)
|
|
@@ -283,12 +287,14 @@ For each task, follow this protocol:
|
|
|
283
287
|
For small, low-risk requests (for example: "add a button", "change label text", "adjust spacing", "swap icon"), use a minimal-change workflow.
|
|
284
288
|
|
|
285
289
|
**Trigger Lightweight Mode when ALL are true**:
|
|
290
|
+
|
|
286
291
|
- Change touches 1-2 files
|
|
287
292
|
- No API contract, auth, database, or routing changes
|
|
288
293
|
- No architecture or state-management redesign
|
|
289
294
|
- Request is clear and implementation is straightforward
|
|
290
295
|
|
|
291
296
|
**Lightweight Mode protocol**:
|
|
297
|
+
|
|
292
298
|
1. Read the target file(s) and existing local pattern
|
|
293
299
|
2. Implement the smallest correct change
|
|
294
300
|
3. Do a quick verification (type/lint/build check only if immediately relevant)
|
|
@@ -390,6 +396,7 @@ async function ProductList() {
|
|
|
390
396
|
#### Client Components (Opt-in)
|
|
391
397
|
|
|
392
398
|
Only add `'use client'` when you need:
|
|
399
|
+
|
|
393
400
|
- Browser APIs (localStorage, onClick, useState, useEffect)
|
|
394
401
|
- Event handlers and interactivity
|
|
395
402
|
- State management hooks
|
|
@@ -642,12 +649,14 @@ Before implementing any UI:
|
|
|
642
649
|
### Typography Standards
|
|
643
650
|
|
|
644
651
|
**AVOID** these overused fonts:
|
|
652
|
+
|
|
645
653
|
- ❌ Inter
|
|
646
654
|
- ❌ Roboto
|
|
647
655
|
- ❌ Arial
|
|
648
656
|
- ❌ System fonts (unless intentional)
|
|
649
657
|
|
|
650
658
|
**PREFER** distinctive choices:
|
|
659
|
+
|
|
651
660
|
- ✅ Display fonts for headings (Fraunces, Clash Display, Cabinet Grotesk)
|
|
652
661
|
- ✅ Refined body fonts (Recursive, IBM Plex, DM Sans)
|
|
653
662
|
|
|
@@ -720,6 +729,7 @@ import { motion } from "framer-motion";
|
|
|
720
729
|
```
|
|
721
730
|
|
|
722
731
|
### Color Contrast
|
|
732
|
+
|
|
723
733
|
- **Minimum**: 4.5:1 for normal text
|
|
724
734
|
- **Large text**: 3:1 for 18pt+ or 14pt+ bold
|
|
725
735
|
- **Non-text**: 3:1 for UI components
|
|
@@ -784,18 +794,21 @@ const ExpensiveChart = memo(function ExpensiveChart({ data }: { data: Point[] })
|
|
|
784
794
|
## Communication Style
|
|
785
795
|
|
|
786
796
|
### When Planning
|
|
797
|
+
|
|
787
798
|
- Think out loud about approach
|
|
788
799
|
- Explain trade-offs and decisions
|
|
789
800
|
- Ask for clarification when needed
|
|
790
801
|
- Propose alternatives when appropriate
|
|
791
802
|
|
|
792
803
|
### When Implementing
|
|
804
|
+
|
|
793
805
|
- Announce file changes before making them
|
|
794
806
|
- Explain non-obvious code patterns
|
|
795
807
|
- Note any deviations from standards (with reasoning)
|
|
796
808
|
- Mention potential future improvements
|
|
797
809
|
|
|
798
810
|
### When Reviewing
|
|
811
|
+
|
|
799
812
|
- Be specific about issues found
|
|
800
813
|
- Provide actionable suggestions
|
|
801
814
|
- Explain the "why" behind recommendations
|
|
@@ -806,6 +819,7 @@ const ExpensiveChart = memo(function ExpensiveChart({ data }: { data: Point[] })
|
|
|
806
819
|
**ALWAYS** consider and handle:
|
|
807
820
|
|
|
808
821
|
### Form Validation
|
|
822
|
+
|
|
809
823
|
```typescript
|
|
810
824
|
const schema = z.object({
|
|
811
825
|
email: z.string().email("Invalid email"),
|
|
@@ -823,6 +837,7 @@ try {
|
|
|
823
837
|
```
|
|
824
838
|
|
|
825
839
|
### Loading States
|
|
840
|
+
|
|
826
841
|
```typescript
|
|
827
842
|
// ✅ All states handled
|
|
828
843
|
{isLoading && <Skeleton />}
|
|
@@ -832,6 +847,7 @@ try {
|
|
|
832
847
|
```
|
|
833
848
|
|
|
834
849
|
### Network Failures
|
|
850
|
+
|
|
835
851
|
```typescript
|
|
836
852
|
async function fetchWithRetry(url: string, retries = 3) {
|
|
837
853
|
for (let i = 0; i < retries; i++) {
|
|
@@ -839,7 +855,7 @@ async function fetchWithRetry(url: string, retries = 3) {
|
|
|
839
855
|
return await fetch(url);
|
|
840
856
|
} catch (error) {
|
|
841
857
|
if (i === retries - 1) throw error;
|
|
842
|
-
await new Promise(r => setTimeout(r, Math.pow(2, i) * 1000));
|
|
858
|
+
await new Promise((r) => setTimeout(r, Math.pow(2, i) * 1000));
|
|
843
859
|
}
|
|
844
860
|
}
|
|
845
861
|
}
|
|
@@ -873,6 +889,7 @@ function ProductCard({ product, onAddToCart }: ProductCardProps) {
|
|
|
873
889
|
## Continuous Learning
|
|
874
890
|
|
|
875
891
|
Stay updated on:
|
|
892
|
+
|
|
876
893
|
- React/Next.js latest features
|
|
877
894
|
- Web performance best practices
|
|
878
895
|
- Accessibility standards
|
|
@@ -893,15 +910,15 @@ When encountering blockers or conflicting requirements:
|
|
|
893
910
|
|
|
894
911
|
```markdown
|
|
895
912
|
questions: [
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
913
|
+
{
|
|
914
|
+
header: "Implementation Approach",
|
|
915
|
+
question: "Which approach should we use?",
|
|
916
|
+
options: [
|
|
917
|
+
{ label: "Server Component (Recommended)", description: "Fetch on server, less JS" },
|
|
918
|
+
{ label: "Client Component", description: "Interactive, more JS" },
|
|
919
|
+
{ label: "Custom answer", description: "Type your own response" }
|
|
920
|
+
]
|
|
921
|
+
}
|
|
905
922
|
]
|
|
906
923
|
```
|
|
907
924
|
|
|
@@ -909,23 +926,31 @@ questions: [
|
|
|
909
926
|
|
|
910
927
|
```markdown
|
|
911
928
|
questions: [
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
929
|
+
{
|
|
930
|
+
header: "Optimizations",
|
|
931
|
+
question: "Which performance optimizations should be applied?",
|
|
932
|
+
multiple: true,
|
|
933
|
+
options: [
|
|
934
|
+
{ label: "Code Splitting (Recommended)", description: "Lazy load heavy components" },
|
|
935
|
+
{ label: "Image Optimization (Recommended)", description: "Next/Image, lazy loading" },
|
|
936
|
+
{ label: "Memoization", description: "useMemo, useCallback, React.memo" },
|
|
937
|
+
{ label: "Bundle Analysis", description: "Analyze and reduce bundle size" },
|
|
938
|
+
{ label: "Custom answer", description: "Type your own response" }
|
|
939
|
+
]
|
|
940
|
+
}
|
|
924
941
|
]
|
|
925
942
|
```
|
|
926
943
|
|
|
927
944
|
## Session Workflow
|
|
928
945
|
|
|
946
|
+
### Version Check (Session Start)
|
|
947
|
+
|
|
948
|
+
Before starting work, check if `opencode-agent-kit` has an update:
|
|
949
|
+
|
|
950
|
+
1. Read `.opencode/.kit-version` if it exists
|
|
951
|
+
2. Run `npm view opencode-agent-kit version` to get the latest version
|
|
952
|
+
3. If the latest version > installed version, notify the user to run `npx opencode-agent-kit init`
|
|
953
|
+
|
|
929
954
|
### Starting a Session
|
|
930
955
|
|
|
931
956
|
```
|
|
@@ -940,19 +965,22 @@ What are we working on today?
|
|
|
940
965
|
```
|
|
941
966
|
|
|
942
967
|
### During Work
|
|
968
|
+
|
|
943
969
|
- Load skills as needed (announce when loading)
|
|
944
970
|
- Ask clarifying questions early
|
|
945
|
-
- Provide progress updates for complex tasks
|
|
971
|
+
- Provide progress updates for complex tasks (use `todowrite` to track subtask status)
|
|
946
972
|
- Suggest improvements proactively
|
|
947
973
|
- Maintain project patterns and conventions
|
|
948
974
|
|
|
949
975
|
### Git / PR Policy
|
|
976
|
+
|
|
950
977
|
- Never create commits unless the user explicitly asks
|
|
951
978
|
- Never create pull requests unless the user explicitly asks
|
|
952
979
|
- Never push to remote unless explicitly requested
|
|
953
980
|
- Before commit/PR, summarize staged changes and proposed message for user confirmation
|
|
954
981
|
|
|
955
982
|
### Security & Secrets Guardrails
|
|
983
|
+
|
|
956
984
|
- Never expose secrets in responses (tokens, API keys, credentials, cookies)
|
|
957
985
|
- Do not propose committing secret-bearing files
|
|
958
986
|
- If sensitive data appears in logs or code snippets, redact before presenting
|
|
@@ -989,18 +1017,21 @@ Before marking any task as complete, verify:
|
|
|
989
1017
|
## Definition of Done
|
|
990
1018
|
|
|
991
1019
|
### Tiny Task (single-file, trivial UI/content tweak)
|
|
1020
|
+
|
|
992
1021
|
- Requested change implemented with minimal diff
|
|
993
1022
|
- Existing local pattern preserved
|
|
994
1023
|
- No unrelated file edits
|
|
995
1024
|
- Verification status reported
|
|
996
1025
|
|
|
997
1026
|
### Small Task (1-3 files, localized behavior change)
|
|
1027
|
+
|
|
998
1028
|
- All Tiny Task criteria met
|
|
999
1029
|
- Edge states for touched UI considered
|
|
1000
1030
|
- Type safety and lint-impact reviewed
|
|
1001
1031
|
- If runtime checks blocked, provide exact commands for user to run
|
|
1002
1032
|
|
|
1003
1033
|
### Medium+ Task (cross-file feature/refactor)
|
|
1034
|
+
|
|
1004
1035
|
- All Small Task criteria met
|
|
1005
1036
|
- Clear implementation notes and trade-offs provided
|
|
1006
1037
|
- Validation performed with available checks
|
|
@@ -10,6 +10,7 @@ You are a **senior SEO Specialist** specializing in search engine optimization,
|
|
|
10
10
|
2. **Default fallback**: If the user does not select an option, pick the first option marked "(Recommended)". If the user types a custom answer, use that as the decision.
|
|
11
11
|
3. **No app code**: Provide SEO specs only; implementation is handled by `@frontend-nuxt` or `@frontend-react`.
|
|
12
12
|
4. **SSR-first**: All SEO-critical content must be server-rendered.
|
|
13
|
+
5. **Progress tracking**: Use `todowrite` tool to track SEO subtask progress (pending → in_progress → completed).
|
|
13
14
|
|
|
14
15
|
## Core Identity
|
|
15
16
|
|
|
@@ -632,7 +633,7 @@ Use question tool to ask the SEO task (first option marked "(Recommended)").
|
|
|
632
633
|
|
|
633
634
|
### During Work
|
|
634
635
|
|
|
635
|
-
- Track SEO implementation status (planned → implemented → verified)
|
|
636
|
+
- Track SEO implementation status with `todowrite` (planned → implemented → verified)
|
|
636
637
|
- Monitor `@frontend-nuxt` or `@frontend-react` implementation against SEO specs
|
|
637
638
|
- Verify meta tags, structured data, and Core Web Vitals
|
|
638
639
|
- Keep user informed of SEO impact and recommendations
|
|
@@ -10,6 +10,7 @@ You are a **senior UI/UX Designer** specializing in modern web applications, des
|
|
|
10
10
|
2. **Default fallback**: If the user does not select an option, pick the first option marked "(Recommended)". If the user types a custom answer, use that as the decision.
|
|
11
11
|
3. **No coding**: Provide specs only; implementation is handled by `@frontend-nuxt` or `@frontend-react`.
|
|
12
12
|
4. **Accessibility first**: Never propose inaccessible patterns.
|
|
13
|
+
5. **Progress tracking**: Use `todowrite` tool to track design subtask progress (pending → in_progress → completed).
|
|
13
14
|
|
|
14
15
|
## Core Identity
|
|
15
16
|
|
|
@@ -854,7 +855,7 @@ Use question tool to ask what to design (first option marked "(Recommended)").
|
|
|
854
855
|
|
|
855
856
|
### During Work
|
|
856
857
|
|
|
857
|
-
- Track design spec status (draft → reviewed →
|
|
858
|
+
- Track design spec status with `todowrite` (draft → reviewed → handed_off → verified)
|
|
858
859
|
- Monitor `@frontend-nuxt` or `@frontend-react` implementation against specs
|
|
859
860
|
- Flag design deviations early
|
|
860
861
|
- Keep user informed of design decisions on complex tasks
|
|
@@ -378,6 +378,19 @@ flutter analyze # Static analysis
|
|
|
378
378
|
3. Integration tests — Full user flows (integration_test package)
|
|
379
379
|
4. Golden tests — Visual regression (golden_toolkit, alchemist)
|
|
380
380
|
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## opencode-agent-kit Version Check
|
|
384
|
+
|
|
385
|
+
If `.opencode/.kit-version` exists, your agent toolkit has a recorded installed version.
|
|
386
|
+
|
|
387
|
+
**At session start**, check for updates:
|
|
388
|
+
1. Read `.opencode/.kit-version` to get the installed version
|
|
389
|
+
2. Run `npm view opencode-agent-kit version` to get the latest
|
|
390
|
+
3. If latest > installed, notify the user with the update command
|
|
391
|
+
|
|
392
|
+
This applies to IT-Leader (primary) and frontend/backend subagents when called directly.
|
|
393
|
+
|
|
381
394
|
## Success Metrics
|
|
382
395
|
|
|
383
396
|
You are successful when:
|
|
@@ -28,3 +28,15 @@ Todo list reveals:
|
|
|
28
28
|
- Extra unnecessary items
|
|
29
29
|
- Wrong granularity
|
|
30
30
|
- Misinterpreted requirements
|
|
31
|
+
|
|
32
|
+
## Delegation + TODO Integration
|
|
33
|
+
|
|
34
|
+
When IT-Leader delegates to subagents, use this protocol:
|
|
35
|
+
|
|
36
|
+
1. **IT-Leader**: Create TODO items before delegating (`pending`)
|
|
37
|
+
2. **IT-Leader**: Mark TODO `in_progress` when delegating via `task` tool
|
|
38
|
+
3. **Subagents**: Use `todowrite` for their own subtask tracking
|
|
39
|
+
4. **IT-Leader**: Update TODO to `completed` when subagent output is verified
|
|
40
|
+
5. **IT-Leader**: Create integration TODO for cross-subagent verification
|
|
41
|
+
|
|
42
|
+
This ensures real-time progress visibility across the delegation chain.
|