@paulojalowyj/openkit 0.1.1
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/.opencode/ARCHITECTURE.md +150 -0
- package/.opencode/LICENSE +21 -0
- package/.opencode/bin/cli.js +213 -0
- package/.opencode/commands/README.md +273 -0
- package/.opencode/commands/analyze.md +64 -0
- package/.opencode/commands/brainstorm.md +186 -0
- package/.opencode/commands/checklist.md +62 -0
- package/.opencode/commands/clarify.md +40 -0
- package/.opencode/commands/context.md +68 -0
- package/.opencode/commands/create.md +70 -0
- package/.opencode/commands/debug.md +160 -0
- package/.opencode/commands/deploy.md +244 -0
- package/.opencode/commands/doc.md +45 -0
- package/.opencode/commands/engineer.md +483 -0
- package/.opencode/commands/impl.md +242 -0
- package/.opencode/commands/plan.md +250 -0
- package/.opencode/commands/preview.md +87 -0
- package/.opencode/commands/specify.md +66 -0
- package/.opencode/commands/status.md +103 -0
- package/.opencode/commands/tasks.md +58 -0
- package/.opencode/commands/test.md +104 -0
- package/.opencode/commands/ui-ux.md +216 -0
- package/.opencode/prompts/backend-specialist.md +315 -0
- package/.opencode/prompts/chat.md +36 -0
- package/.opencode/prompts/database-architect.md +244 -0
- package/.opencode/prompts/debugger.md +244 -0
- package/.opencode/prompts/devops-engineer.md +259 -0
- package/.opencode/prompts/documentation-writer.md +121 -0
- package/.opencode/prompts/explorer-agent.md +92 -0
- package/.opencode/prompts/frontend-specialist.md +608 -0
- package/.opencode/prompts/mobile-developer.md +393 -0
- package/.opencode/prompts/orchestrator.md +472 -0
- package/.opencode/prompts/penetration-tester.md +205 -0
- package/.opencode/prompts/performance-optimizer.md +204 -0
- package/.opencode/prompts/product-owner.md +113 -0
- package/.opencode/prompts/project-planner.md +413 -0
- package/.opencode/prompts/security-auditor.md +187 -0
- package/.opencode/prompts/seo-specialist.md +128 -0
- package/.opencode/prompts/test-engineer.md +190 -0
- package/.opencode/rules/AGENT_TEMPLATE.md +391 -0
- package/.opencode/rules/MASTER.md +272 -0
- package/.opencode/rules/README.md +266 -0
- package/.opencode/rules/TODOLIST_EXAMPLES.md +675 -0
- package/.opencode/rules/TODOLIST_PROTOCOL.md +495 -0
- package/.opencode/rules/TOOL_USAGE.md +731 -0
- package/.opencode/scripts/auto_preview.py +100 -0
- package/.opencode/scripts/checklist.py +217 -0
- package/.opencode/scripts/session_manager.py +225 -0
- package/.opencode/scripts/verify_all.py +403 -0
- package/.opencode/skills/api-patterns/SKILL.md +80 -0
- package/.opencode/skills/api-patterns/api-style.md +42 -0
- package/.opencode/skills/api-patterns/auth.md +24 -0
- package/.opencode/skills/api-patterns/documentation.md +26 -0
- package/.opencode/skills/api-patterns/graphql.md +41 -0
- package/.opencode/skills/api-patterns/rate-limiting.md +31 -0
- package/.opencode/skills/api-patterns/response.md +37 -0
- package/.opencode/skills/api-patterns/rest.md +40 -0
- package/.opencode/skills/api-patterns/scripts/api_validator.py +211 -0
- package/.opencode/skills/api-patterns/security-testing.md +122 -0
- package/.opencode/skills/api-patterns/trpc.md +41 -0
- package/.opencode/skills/api-patterns/versioning.md +22 -0
- package/.opencode/skills/app-builder/SKILL.md +101 -0
- package/.opencode/skills/app-builder/agent-coordination.md +71 -0
- package/.opencode/skills/app-builder/feature-building.md +53 -0
- package/.opencode/skills/app-builder/project-detection.md +34 -0
- package/.opencode/skills/app-builder/scaffolding.md +116 -0
- package/.opencode/skills/app-builder/tech-stack.md +40 -0
- package/.opencode/skills/app-builder/templates/SKILL.md +39 -0
- package/.opencode/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/.opencode/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/.opencode/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/.opencode/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/.opencode/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/.opencode/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/.opencode/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/.opencode/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +81 -0
- package/.opencode/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
- package/.opencode/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
- package/.opencode/skills/app-builder/templates/nuxt-app/TEMPLATE.md +100 -0
- package/.opencode/skills/app-builder/templates/python-fastapi/TEMPLATE.md +82 -0
- package/.opencode/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
- package/.opencode/skills/architecture/SKILL.md +55 -0
- package/.opencode/skills/architecture/context-discovery.md +43 -0
- package/.opencode/skills/architecture/examples.md +94 -0
- package/.opencode/skills/architecture/pattern-selection.md +68 -0
- package/.opencode/skills/architecture/patterns-reference.md +50 -0
- package/.opencode/skills/architecture/trade-off-analysis.md +77 -0
- package/.opencode/skills/bash-linux/SKILL.md +199 -0
- package/.opencode/skills/behavioral-modes/SKILL.md +242 -0
- package/.opencode/skills/brainstorming/SKILL.md +163 -0
- package/.opencode/skills/brainstorming/dynamic-questioning.md +350 -0
- package/.opencode/skills/clean-code/SKILL.md +201 -0
- package/.opencode/skills/code-review-checklist/SKILL.md +109 -0
- package/.opencode/skills/database-design/SKILL.md +73 -0
- package/.opencode/skills/database-design/database-selection.md +43 -0
- package/.opencode/skills/database-design/indexing.md +39 -0
- package/.opencode/skills/database-design/migrations.md +48 -0
- package/.opencode/skills/database-design/optimization.md +36 -0
- package/.opencode/skills/database-design/orm-selection.md +30 -0
- package/.opencode/skills/database-design/schema-design.md +56 -0
- package/.opencode/skills/database-design/scripts/schema_validator.py +172 -0
- package/.opencode/skills/deployment-procedures/SKILL.md +241 -0
- package/.opencode/skills/documentation-templates/SKILL.md +279 -0
- package/.opencode/skills/frontend-design/SKILL.md +446 -0
- package/.opencode/skills/frontend-design/animation-guide.md +331 -0
- package/.opencode/skills/frontend-design/color-system.md +311 -0
- package/.opencode/skills/frontend-design/data/charts.csv +26 -0
- package/.opencode/skills/frontend-design/data/colors.csv +97 -0
- package/.opencode/skills/frontend-design/data/icons.csv +101 -0
- package/.opencode/skills/frontend-design/data/landing.csv +31 -0
- package/.opencode/skills/frontend-design/data/products.csv +97 -0
- package/.opencode/skills/frontend-design/data/prompts.csv +24 -0
- package/.opencode/skills/frontend-design/data/react-performance.csv +45 -0
- package/.opencode/skills/frontend-design/data/stacks/flutter.csv +53 -0
- package/.opencode/skills/frontend-design/data/stacks/html-tailwind.csv +56 -0
- package/.opencode/skills/frontend-design/data/stacks/jetpack-compose.csv +53 -0
- package/.opencode/skills/frontend-design/data/stacks/nextjs.csv +53 -0
- package/.opencode/skills/frontend-design/data/stacks/nuxt-ui.csv +51 -0
- package/.opencode/skills/frontend-design/data/stacks/nuxtjs.csv +59 -0
- package/.opencode/skills/frontend-design/data/stacks/react-native.csv +52 -0
- package/.opencode/skills/frontend-design/data/stacks/react.csv +54 -0
- package/.opencode/skills/frontend-design/data/stacks/shadcn.csv +61 -0
- package/.opencode/skills/frontend-design/data/stacks/svelte.csv +54 -0
- package/.opencode/skills/frontend-design/data/stacks/swiftui.csv +51 -0
- package/.opencode/skills/frontend-design/data/stacks/vue.csv +50 -0
- package/.opencode/skills/frontend-design/data/styles.csv +59 -0
- package/.opencode/skills/frontend-design/data/typography.csv +58 -0
- package/.opencode/skills/frontend-design/data/ui-reasoning.csv +101 -0
- package/.opencode/skills/frontend-design/data/ux-guidelines.csv +100 -0
- package/.opencode/skills/frontend-design/data/web-interface.csv +31 -0
- package/.opencode/skills/frontend-design/decision-trees.md +418 -0
- package/.opencode/skills/frontend-design/motion-graphics.md +306 -0
- package/.opencode/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/.opencode/skills/frontend-design/scripts/core.py +258 -0
- package/.opencode/skills/frontend-design/scripts/design_system.py +1067 -0
- package/.opencode/skills/frontend-design/scripts/search.py +106 -0
- package/.opencode/skills/frontend-design/scripts/ux_audit.py +735 -0
- package/.opencode/skills/frontend-design/typography-system.md +345 -0
- package/.opencode/skills/frontend-design/ux-psychology.md +541 -0
- package/.opencode/skills/frontend-design/visual-effects.md +383 -0
- package/.opencode/skills/geo-fundamentals/SKILL.md +156 -0
- package/.opencode/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/.opencode/skills/i18n-localization/SKILL.md +154 -0
- package/.opencode/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/.opencode/skills/intelligent-routing/SKILL.md +335 -0
- package/.opencode/skills/lint-and-validate/SKILL.md +45 -0
- package/.opencode/skills/lint-and-validate/scripts/lint_runner.py +172 -0
- package/.opencode/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/.opencode/skills/mobile-design/SKILL.md +394 -0
- package/.opencode/skills/mobile-design/decision-trees.md +516 -0
- package/.opencode/skills/mobile-design/mobile-backend.md +491 -0
- package/.opencode/skills/mobile-design/mobile-color-system.md +420 -0
- package/.opencode/skills/mobile-design/mobile-debugging.md +122 -0
- package/.opencode/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/.opencode/skills/mobile-design/mobile-navigation.md +458 -0
- package/.opencode/skills/mobile-design/mobile-performance.md +767 -0
- package/.opencode/skills/mobile-design/mobile-testing.md +356 -0
- package/.opencode/skills/mobile-design/mobile-typography.md +433 -0
- package/.opencode/skills/mobile-design/platform-android.md +666 -0
- package/.opencode/skills/mobile-design/platform-ios.md +561 -0
- package/.opencode/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/.opencode/skills/mobile-design/touch-psychology.md +537 -0
- package/.opencode/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
- package/.opencode/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/.opencode/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/.opencode/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/.opencode/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/.opencode/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/.opencode/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/.opencode/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/.opencode/skills/nextjs-react-expert/SKILL.md +267 -0
- package/.opencode/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/.opencode/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/.opencode/skills/parallel-agents/SKILL.md +175 -0
- package/.opencode/skills/performance-profiling/SKILL.md +143 -0
- package/.opencode/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/.opencode/skills/plan-writing/SKILL.md +176 -0
- package/.opencode/skills/python-patterns/SKILL.md +462 -0
- package/.opencode/skills/red-team-tactics/SKILL.md +199 -0
- package/.opencode/skills/seo-fundamentals/SKILL.md +129 -0
- package/.opencode/skills/seo-fundamentals/scripts/seo_checker.py +222 -0
- package/.opencode/skills/server-management/SKILL.md +161 -0
- package/.opencode/skills/stack-selection/SKILL.md +448 -0
- package/.opencode/skills/systematic-debugging/SKILL.md +109 -0
- package/.opencode/skills/tailwind-patterns/SKILL.md +269 -0
- package/.opencode/skills/tdd-workflow/SKILL.md +149 -0
- package/.opencode/skills/testing-patterns/SKILL.md +178 -0
- package/.opencode/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/.opencode/skills/vulnerability-scanner/SKILL.md +276 -0
- package/.opencode/skills/vulnerability-scanner/checklists.md +121 -0
- package/.opencode/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/.opencode/skills/web-design-guidelines/SKILL.md +57 -0
- package/.opencode/skills/webapp-testing/SKILL.md +187 -0
- package/.opencode/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/.opencode/templates/DOCS-ACTION_ITEMS.md +5 -0
- package/.opencode/templates/DOCS-API.md +11 -0
- package/.opencode/templates/DOCS-BACKEND.md +10 -0
- package/.opencode/templates/DOCS-CONTEXT.md +25 -0
- package/.opencode/templates/DOCS-DATABASE.md +10 -0
- package/.opencode/templates/DOCS-FRONTEND.md +11 -0
- package/.opencode/templates/DOCS-QUALITY_GATES.md +20 -0
- package/.opencode/templates/DOCS-SECURITY.md +17 -0
- package/.opencode/templates/SDD-AcceptanceCriteria.md +21 -0
- package/.opencode/templates/SDD-Checklist.md +27 -0
- package/.opencode/templates/SDD-Contracts.md +21 -0
- package/.opencode/templates/SDD-Plan.md +45 -0
- package/.opencode/templates/SDD-ProblemStatement.md +25 -0
- package/.opencode/templates/SDD-Quickstart.md +23 -0
- package/.opencode/templates/SDD-Research.md +24 -0
- package/.opencode/templates/SDD-Risks.md +16 -0
- package/.opencode/templates/SDD-Tasks.md +41 -0
- package/.opencode/templates/SDD-UserStories.md +45 -0
- package/.opencode/templates/TechStack.md +111 -0
- package/LICENSE +21 -0
- package/PACKAGE_STATUS.md +97 -0
- package/README.md +251 -0
- package/README.pt-BR.md +192 -0
- package/bin/cli.js +505 -0
- package/blueprints/fullstack/.env.example +15 -0
- package/blueprints/fullstack/AGENTS.md +3 -0
- package/blueprints/fullstack/README.md +65 -0
- package/blueprints/fullstack/backend/.dockerignore +10 -0
- package/blueprints/fullstack/backend/.python-version +1 -0
- package/blueprints/fullstack/backend/Dockerfile +33 -0
- package/blueprints/fullstack/backend/alembic.ini +40 -0
- package/blueprints/fullstack/backend/app/__init__.py +0 -0
- package/blueprints/fullstack/backend/app/api/README.md +3 -0
- package/blueprints/fullstack/backend/app/api/__init__.py +0 -0
- package/blueprints/fullstack/backend/app/celery_app.py +5 -0
- package/blueprints/fullstack/backend/app/core/README.md +3 -0
- package/blueprints/fullstack/backend/app/core/__init__.py +0 -0
- package/blueprints/fullstack/backend/app/database.py +14 -0
- package/blueprints/fullstack/backend/app/main.py +16 -0
- package/blueprints/fullstack/backend/app/models/README.md +3 -0
- package/blueprints/fullstack/backend/app/models/__init__.py +3 -0
- package/blueprints/fullstack/backend/app/models/item.py +10 -0
- package/blueprints/fullstack/backend/app/routers/__init__.py +0 -0
- package/blueprints/fullstack/backend/app/routers/items.py +20 -0
- package/blueprints/fullstack/backend/app/schemas/README.md +3 -0
- package/blueprints/fullstack/backend/app/schemas/__init__.py +0 -0
- package/blueprints/fullstack/backend/app/schemas/item.py +15 -0
- package/blueprints/fullstack/backend/app/services/item_service.py +23 -0
- package/blueprints/fullstack/backend/app/settings.py +36 -0
- package/blueprints/fullstack/backend/app/tasks/README.md +3 -0
- package/blueprints/fullstack/backend/app/tasks/__init__.py +0 -0
- package/blueprints/fullstack/backend/migrations/env.py +47 -0
- package/blueprints/fullstack/backend/migrations/versions/0001_initial_sample_data.py +31 -0
- package/blueprints/fullstack/backend/pyproject.toml +45 -0
- package/blueprints/fullstack/docker-compose.dev.yml +114 -0
- package/blueprints/fullstack/docker-compose.prod.yml +90 -0
- package/blueprints/fullstack/docs/README.md +29 -0
- package/blueprints/fullstack/docs/engineering/api/README.md +3 -0
- package/blueprints/fullstack/docs/engineering/architecture/README.md +3 -0
- package/blueprints/fullstack/docs/engineering/backend/README.md +3 -0
- package/blueprints/fullstack/docs/engineering/frontend/README.md +3 -0
- package/blueprints/fullstack/docs/engineering/security/README.md +3 -0
- package/blueprints/fullstack/docs/engineering/standards/README.md +3 -0
- package/blueprints/fullstack/frontend/.dockerignore +4 -0
- package/blueprints/fullstack/frontend/Dockerfile +23 -0
- package/blueprints/fullstack/frontend/components.json +17 -0
- package/blueprints/fullstack/frontend/index.html +12 -0
- package/blueprints/fullstack/frontend/package.json +28 -0
- package/blueprints/fullstack/frontend/src/components/README.md +3 -0
- package/blueprints/fullstack/frontend/src/components/ui/.keep +4 -0
- package/blueprints/fullstack/frontend/src/index.css +57 -0
- package/blueprints/fullstack/frontend/src/lib/README.md +3 -0
- package/blueprints/fullstack/frontend/src/lib/api.ts +1 -0
- package/blueprints/fullstack/frontend/src/lib/utils.ts +6 -0
- package/blueprints/fullstack/frontend/src/main.tsx +66 -0
- package/blueprints/fullstack/frontend/src/routes/README.md +3 -0
- package/blueprints/fullstack/frontend/src/routes/root.tsx +7 -0
- package/blueprints/fullstack/frontend/src/vite-env.d.ts +1 -0
- package/blueprints/fullstack/frontend/tailwind.config.ts +12 -0
- package/blueprints/fullstack/frontend/tsconfig.json +13 -0
- package/blueprints/fullstack/frontend/tsconfig.node.json +12 -0
- package/blueprints/fullstack/frontend/vite.config.ts +12 -0
- package/index.js +14 -0
- package/opencode.json +306 -0
- package/package.json +57 -0
- package/scripts/prepare.js +65 -0
- package/scripts/update-version.js +29 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Opencode System Architecture
|
|
2
|
+
|
|
3
|
+
> Comprehensive AI Agent Capability Expansion Toolkit (Optimized for Z.AI Coding Plan)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
Opencode Agent System is a modular system consisting of:
|
|
10
|
+
|
|
11
|
+
- **15 Specialist Agents** - Domain-specific prompts for implementation
|
|
12
|
+
- **Primary Agents** - Build, Plan, Chat, and Orchestrator for interactive workflows
|
|
13
|
+
- **33 Skills** - Domain-specific knowledge modules
|
|
14
|
+
- **18 Commands** - Streamlined slash command procedures
|
|
15
|
+
- **1 Master Ruleset** - Fonte única para qualidade e consistência
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Directory Structure
|
|
20
|
+
|
|
21
|
+
```plaintext
|
|
22
|
+
.opencode/
|
|
23
|
+
├── ARCHITECTURE.md # This file
|
|
24
|
+
├── prompts/ # Agent prompts
|
|
25
|
+
├── skills/ # Capability Modules
|
|
26
|
+
├── commands/ # Slash Commands (/slash)
|
|
27
|
+
├── rules/ # MASTER.md (única fonte de regras)
|
|
28
|
+
├── scripts/ # Automation & Validation
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Agents (15)
|
|
35
|
+
|
|
36
|
+
Optimized for domain separation and execution quality.
|
|
37
|
+
|
|
38
|
+
| Agent | Focus | Key Skills |
|
|
39
|
+
| ----- | ----- | ---------- |
|
|
40
|
+
| `backend-specialist` | Python/FastAPI, SQL | api-patterns, database-design, python-patterns |
|
|
41
|
+
| `frontend-specialist` | React (TanStack), UI | frontend-design, nextjs-react-expert, tailwind-patterns |
|
|
42
|
+
| `test-engineer` | QA, E2E (Playwright) | testing-patterns, webapp-testing, tdd-workflow |
|
|
43
|
+
| `mobile-developer` | iOS, Android, RN | mobile-design |
|
|
44
|
+
| `devops-engineer` | Docker, CI/CD | deployment-procedures, server-management |
|
|
45
|
+
| `security-auditor` | Compliance, OWASP | vulnerability-scanner, red-team-tactics |
|
|
46
|
+
| `penetration-tester` | Offensive Security | red-team-tactics |
|
|
47
|
+
| `database-architect` | Schema, Migrations | database-design |
|
|
48
|
+
| `project-planner` | Task Breakdown | brainstorming, plan-writing, architecture |
|
|
49
|
+
| `product-owner` | Requirements, Backlog | plan-writing, brainstorming |
|
|
50
|
+
| `explorer-agent` | Code Analysis | architecture, systematic-debugging |
|
|
51
|
+
| `debugger` | Root Cause Analysis | systematic-debugging |
|
|
52
|
+
| `performance-optimizer` | Web Vitals | performance-profiling |
|
|
53
|
+
| `seo-specialist` | Ranking, Geo | seo-fundamentals, geo-fundamentals |
|
|
54
|
+
| `documentation-writer` | Manuals, Docs | documentation-templates |
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Skills (Highlights)
|
|
59
|
+
|
|
60
|
+
Modular knowledge domains loaded on-demand.
|
|
61
|
+
|
|
62
|
+
**Stack Selection (NEW):**
|
|
63
|
+
| Skill | Purpose |
|
|
64
|
+
|-------|---------|
|
|
65
|
+
| `stack-selection` | Tech stack selection with decision trees, user preferences, and blueprint defaults |
|
|
66
|
+
|
|
67
|
+
**Core Skills:**
|
|
68
|
+
|
|
69
|
+
### Frontend & Design (Migrated Engine)
|
|
70
|
+
| Skill | Capabilities |
|
|
71
|
+
| ----- | ------------ |
|
|
72
|
+
| `frontend-design` | **UI/UX Engine**: 50+ styles, 97 palettes, auto-design system generator |
|
|
73
|
+
| `nextjs-react-expert` | React performance, Vercel engineering best practices |
|
|
74
|
+
| `tailwind-patterns` | Tailwind v4 utilities, design tokens |
|
|
75
|
+
|
|
76
|
+
### Backend & Data
|
|
77
|
+
| Skill | Capabilities |
|
|
78
|
+
| ----- | ------------ |
|
|
79
|
+
| `python-patterns` | FastAPI best practices, Pydantic, Async/Await |
|
|
80
|
+
| `database-design` | Schema optimization, Alembic migrations |
|
|
81
|
+
| `api-patterns` | RESTful design, Error handling standards |
|
|
82
|
+
|
|
83
|
+
### Quality & Security
|
|
84
|
+
| Skill | Capabilities |
|
|
85
|
+
| ----- | ------------ |
|
|
86
|
+
| `webapp-testing` | Playwright E2E automation, browser testing |
|
|
87
|
+
| `vulnerability-scanner` | Security auditing, dependency analysis |
|
|
88
|
+
| `clean-code` | Universal coding standards (mandatory) |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Commands
|
|
93
|
+
|
|
94
|
+
Streamlined commands for OpenCode workflows. Invoke with `/command`.
|
|
95
|
+
|
|
96
|
+
| Command | Purpose |
|
|
97
|
+
| ------- | ------- |
|
|
98
|
+
| `/engineer` | **Universal Builder**: CoT (Chain of Thought) driven planning + execution |
|
|
99
|
+
| `/impl` | **Feature Implementation**: Reasoning Loop for safe code changes |
|
|
100
|
+
| `/plan` | **Task Planning**: Detailed breakdowns and sprint alignment |
|
|
101
|
+
| `/test` | **Quality Assurance**: Run unit checks and E2E suites |
|
|
102
|
+
| `/ui-ux` | **Design Studio**: Generate design systems and UI components |
|
|
103
|
+
| `/deploy` | **Production**: Safe deployment procedures and verifications |
|
|
104
|
+
| `/debug` | **Systematic Debugging**: 4-phase root cause analysis |
|
|
105
|
+
| `/context` | **Repo Analysis**: Generate context packs for LLMs |
|
|
106
|
+
| `/doc` | **Documentation**: Write manuals and API docs |
|
|
107
|
+
| `/status` | **Progress Tracking**: View active tasks and stats |
|
|
108
|
+
| `/preview` | **Dev Environment**: Manage Docker Compose (`scripts/auto_preview.py`) |
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Core Rules (Mandatory)
|
|
113
|
+
|
|
114
|
+
Tudo consolidado em `.opencode/rules/MASTER.md`:
|
|
115
|
+
|
|
116
|
+
1. Runtime model choice and Socratic Gate.
|
|
117
|
+
2. Regras universais de linguagem, clean code e dependências.
|
|
118
|
+
3. Protocolo de roteamento de agentes e carregamento de skills.
|
|
119
|
+
4. Documentação de sprints, planos e artefatos oficiais.
|
|
120
|
+
5. Checklist final e scripts obrigatórios (Security -> Lint -> Tests -> UX -> SEO).
|
|
121
|
+
6. **User Interaction Protocol (MANDATORY)**: Use `question` tool for ALL user choices, preferences, and clarifications. NEVER ask multi-option questions inline.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Automation Scripts
|
|
126
|
+
|
|
127
|
+
Located in `.opencode/scripts/`.
|
|
128
|
+
|
|
129
|
+
| Script | Usage | Description |
|
|
130
|
+
| ------ | ----- | ----------- |
|
|
131
|
+
| `auto_preview.py` | `python .opencode/scripts/auto_preview.py start` | Manages full-stack env via Docker Compose |
|
|
132
|
+
| `checklist.py` | `python .opencode/scripts/checklist.py .` | Fast validation (Lint, Tests, Security) |
|
|
133
|
+
| `verify_all.py` | `python .opencode/scripts/verify_all.py . --url <URL>` | Full suite (Lighthouse, E2E, SEO, Mobile) |
|
|
134
|
+
| `session_manager.py` | `python .opencode/scripts/session_manager.py status` | Project stats and stack detection |
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Quick Reference
|
|
139
|
+
|
|
140
|
+
**"I want to build a new feature"**
|
|
141
|
+
> Use `/plan` then `/impl` (or `/engineer` for complex tasks).
|
|
142
|
+
|
|
143
|
+
**"I want to design a UI"**
|
|
144
|
+
> Use `/ui-ux` to generate a system, then `frontend-specialist`.
|
|
145
|
+
|
|
146
|
+
**"I want to test everything"**
|
|
147
|
+
> Use `/test` locally, then `/deploy` for verification.
|
|
148
|
+
|
|
149
|
+
**"I want to verify the project"**
|
|
150
|
+
> Run `python .opencode/scripts/checklist.py .`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Paulo Jalowyj
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { Command } from 'commander';
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
import path from 'path';
|
|
6
|
+
import { fileURLToPath } from 'url';
|
|
7
|
+
import { copyFileSync, existsSync, mkdirSync, readdirSync } from 'fs';
|
|
8
|
+
import { dirname } from 'path';
|
|
9
|
+
import inquirer from 'inquirer';
|
|
10
|
+
import { execSync } from 'child_process';
|
|
11
|
+
import fs from 'fs-extra';
|
|
12
|
+
|
|
13
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
+
const __dirname = dirname(__filename);
|
|
15
|
+
|
|
16
|
+
const program = new Command();
|
|
17
|
+
|
|
18
|
+
function checkOpenCodeInstalled() {
|
|
19
|
+
try {
|
|
20
|
+
execSync('which opencode || where opencode', {
|
|
21
|
+
stdio: 'ignore',
|
|
22
|
+
shell: true
|
|
23
|
+
});
|
|
24
|
+
return true;
|
|
25
|
+
} catch (e) {
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
try {
|
|
29
|
+
execSync('npm list -g @opencode-ai/plugin', {
|
|
30
|
+
stdio: 'ignore',
|
|
31
|
+
shell: true
|
|
32
|
+
});
|
|
33
|
+
return true;
|
|
34
|
+
} catch (e) {
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async function installOpenCode() {
|
|
41
|
+
console.log(chalk.yellow('\nInstalando OpenCode...'));
|
|
42
|
+
|
|
43
|
+
try {
|
|
44
|
+
execSync('curl -fsSL https://opencode.ai/install | bash', {
|
|
45
|
+
stdio: 'inherit',
|
|
46
|
+
shell: true
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
if (!checkOpenCodeInstalled()) {
|
|
50
|
+
throw new Error('Installação concluída mas OpenCode não detectado');
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
console.log(chalk.green('OpenCode instalado com sucesso!\n'));
|
|
54
|
+
} catch (error) {
|
|
55
|
+
console.log(`\n${chalk.red('Falha na instalação do OpenCode.')}`);
|
|
56
|
+
console.log(chalk.white(`Error: ${error.message}\n`));
|
|
57
|
+
console.log(chalk.yellow('Instale manualmente:'));
|
|
58
|
+
console.log(chalk.white(' curl -fsSL https://opencode.ai/install | bash\n'));
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function promptInstallOpenCode() {
|
|
64
|
+
const { install } = await inquirer.prompt([{
|
|
65
|
+
type: 'confirm',
|
|
66
|
+
name: 'install',
|
|
67
|
+
message: 'OpenCode não está instalado. Deseja instalar agora?',
|
|
68
|
+
default: true
|
|
69
|
+
}]);
|
|
70
|
+
return install;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function showOpenCodeNotInstalledError() {
|
|
74
|
+
console.log(chalk.red('\nOpenCode não está instalado no seu sistema.\n'));
|
|
75
|
+
console.log(chalk.cyan('Para usar este pacote, você precisa ter o OpenCode instalado.\n'));
|
|
76
|
+
console.log(chalk.yellow('Instalação manual:'));
|
|
77
|
+
console.log(chalk.white(' curl -fsSL https://opencode.ai/install | bash\n'));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
program
|
|
81
|
+
.name('openkit')
|
|
82
|
+
.description('Initialize OpenCode Agent System in your project')
|
|
83
|
+
.version('0.1.1');
|
|
84
|
+
|
|
85
|
+
program
|
|
86
|
+
.command('init')
|
|
87
|
+
.description('Initialize OpenCode configuration in current directory')
|
|
88
|
+
.option('-f, --force', 'Overwrite existing .opencode directory')
|
|
89
|
+
.action(async (options) => {
|
|
90
|
+
console.log(chalk.blue('Initializing OpenCode Agent System...'));
|
|
91
|
+
|
|
92
|
+
const isInstalled = checkOpenCodeInstalled();
|
|
93
|
+
|
|
94
|
+
if (!isInstalled) {
|
|
95
|
+
const shouldInstall = await promptInstallOpenCode();
|
|
96
|
+
|
|
97
|
+
if (shouldInstall) {
|
|
98
|
+
try {
|
|
99
|
+
await installOpenCode();
|
|
100
|
+
} catch (error) {
|
|
101
|
+
console.log(chalk.red('\nInitialization aborted due to installation failure.\n'));
|
|
102
|
+
process.exit(1);
|
|
103
|
+
}
|
|
104
|
+
} else {
|
|
105
|
+
showOpenCodeNotInstalledError();
|
|
106
|
+
process.exit(1);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const projectDir = process.cwd();
|
|
111
|
+
const opencodeDir = path.join(projectDir, '.opencode');
|
|
112
|
+
const templateDir = path.join(__dirname, '..', '.opencode');
|
|
113
|
+
|
|
114
|
+
if (existsSync(opencodeDir) && !options.force) {
|
|
115
|
+
console.log(chalk.yellow('Warning: .opencode directory already exists'));
|
|
116
|
+
console.log('Use --force to overwrite');
|
|
117
|
+
process.exit(1);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (existsSync(opencodeDir) && options.force) {
|
|
121
|
+
console.log(chalk.yellow('Removing existing .opencode directory...'));
|
|
122
|
+
await removeDir(opencodeDir);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
mkdirSync(opencodeDir, { recursive: true });
|
|
126
|
+
|
|
127
|
+
console.log(chalk.green('Copying OpenCode configuration...'));
|
|
128
|
+
await copyDir(templateDir, opencodeDir);
|
|
129
|
+
|
|
130
|
+
console.log(chalk.green('Successfully initialized OpenCode!'));
|
|
131
|
+
console.log(chalk.cyan('\nNext steps:'));
|
|
132
|
+
console.log(' 1. Restart OpenCode TUI');
|
|
133
|
+
console.log(' 2. Use /engineer, /plan, /debug, and other commands\n');
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
program
|
|
137
|
+
.command('doctor')
|
|
138
|
+
.description('Check OpenCode installation')
|
|
139
|
+
.action(async () => {
|
|
140
|
+
console.log(chalk.blue('Checking OpenCode installation...\n'));
|
|
141
|
+
|
|
142
|
+
const projectDir = process.cwd();
|
|
143
|
+
const opencodeDir = path.join(projectDir, '.opencode');
|
|
144
|
+
|
|
145
|
+
const checks = [
|
|
146
|
+
{
|
|
147
|
+
name: '.opencode directory',
|
|
148
|
+
check: () => existsSync(opencodeDir),
|
|
149
|
+
file: true,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'Commands',
|
|
153
|
+
check: () => existsSync(path.join(opencodeDir, 'commands/debug.md')),
|
|
154
|
+
file: true,
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: 'Prompts',
|
|
158
|
+
check: () => existsSync(path.join(opencodeDir, 'prompts/backend-specialist.md')),
|
|
159
|
+
file: true,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: 'Skills',
|
|
163
|
+
check: () => existsSync(path.join(opencodeDir, 'skills/')),
|
|
164
|
+
dir: true,
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: 'Config',
|
|
168
|
+
check: () => existsSync(path.join(projectDir, 'opencode.json')),
|
|
169
|
+
file: true,
|
|
170
|
+
},
|
|
171
|
+
];
|
|
172
|
+
|
|
173
|
+
let allPassed = true;
|
|
174
|
+
|
|
175
|
+
for (const check of checks) {
|
|
176
|
+
const result = check.check();
|
|
177
|
+
if (result) {
|
|
178
|
+
console.log(chalk.green(`OK ${check.name}`));
|
|
179
|
+
} else {
|
|
180
|
+
console.log(chalk.red(`FAIL ${check.name}`));
|
|
181
|
+
allPassed = false;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
console.log('');
|
|
186
|
+
if (allPassed) {
|
|
187
|
+
console.log(chalk.green('All checks passed.'));
|
|
188
|
+
} else {
|
|
189
|
+
console.log(chalk.yellow('Some checks failed. Run `npx @paulojalowyj/openkit init`'));
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
async function copyDir(src, dest) {
|
|
194
|
+
mkdirSync(dest, { recursive: true });
|
|
195
|
+
const entries = readdirSync(src, { withFileTypes: true });
|
|
196
|
+
|
|
197
|
+
for (const entry of entries) {
|
|
198
|
+
const srcPath = path.join(src, entry.name);
|
|
199
|
+
const destPath = path.join(dest, entry.name);
|
|
200
|
+
|
|
201
|
+
if (entry.isDirectory()) {
|
|
202
|
+
await copyDir(srcPath, destPath);
|
|
203
|
+
} else {
|
|
204
|
+
copyFileSync(srcPath, destPath);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
async function removeDir(dir) {
|
|
210
|
+
await fs.remove(dir);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
program.parse(process.argv);
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
# Custom Commands - OpenKit
|
|
2
|
+
|
|
3
|
+
> Slash commands for the OpenCode TUI
|
|
4
|
+
> OpenKit integration with structured commands
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Available Commands
|
|
9
|
+
|
|
10
|
+
When you type `/` in the OpenCode TUI, you will see:
|
|
11
|
+
|
|
12
|
+
| Command | Description | Usage |
|
|
13
|
+
|---------|-------------|-------|
|
|
14
|
+
| `/engineer` | Universal orchestrator for complex tasks | `/engineer build full e-commerce` |
|
|
15
|
+
| `/specify` | Create feature specification | `/specify add user profiles` |
|
|
16
|
+
| `/clarify` | Clarify requirements in spec | `/clarify` |
|
|
17
|
+
| `/plan` | Create structured task plans | `/plan create auth system` |
|
|
18
|
+
| `/tasks` | Generate executable tasks | `/tasks` |
|
|
19
|
+
| `/analyze` | Cross-artifact consistency | `/analyze` |
|
|
20
|
+
| `/checklist` | Spec/plan quality checklist | `/checklist` |
|
|
21
|
+
| `/impl` | Execute implementation from a plan | `/impl from docs/sprint/Sprint-17/TASKS.md` |
|
|
22
|
+
| `/test` | Run tests and checks | `/test all` or `/test security` |
|
|
23
|
+
| `/debug` | 4-phase systematic debugging | `/debug login not working` |
|
|
24
|
+
| `/ui-ux` | Design systems and UX audits | `/ui-ux create design system` |
|
|
25
|
+
| `/deploy` | Safe deploy with verification | `/deploy staging` or `/deploy production` |
|
|
26
|
+
| `/context` | Generate repo context pack | `/context` |
|
|
27
|
+
| `/doc` | Write or update docs | `/doc update api index` |
|
|
28
|
+
| `/preview` | Manage local preview server | `/preview start` |
|
|
29
|
+
| `/status` | Show project status | `/status` |
|
|
30
|
+
| `/create` | Create a new application | `/create blog site` |
|
|
31
|
+
| `/brainstorm` | Explore ideas and options | `/brainstorm auth system` |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## How to Use
|
|
36
|
+
|
|
37
|
+
### 1. With Arguments (Direct)
|
|
38
|
+
```bash
|
|
39
|
+
/plan create JWT auth system
|
|
40
|
+
/engineer build e-commerce with Stripe checkout
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 2. Without Arguments (Interactive)
|
|
44
|
+
```bash
|
|
45
|
+
/plan
|
|
46
|
+
→ (via question tool) "What would you like to plan?"
|
|
47
|
+
→ You describe it
|
|
48
|
+
→ System executes
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 3. Full Flow
|
|
52
|
+
```bash
|
|
53
|
+
# 1. Specify
|
|
54
|
+
/specify add dark mode feature
|
|
55
|
+
→ Creates docs/requirements/<feature>/
|
|
56
|
+
→ STOP: "Proceed to clarify or plan?"
|
|
57
|
+
|
|
58
|
+
# 2. Clarify
|
|
59
|
+
/clarify
|
|
60
|
+
→ Resolves ambiguities in spec
|
|
61
|
+
→ STOP: "Proceed to plan?"
|
|
62
|
+
|
|
63
|
+
# 3. Plan
|
|
64
|
+
/plan add dark mode feature
|
|
65
|
+
→ Creates plan + auxiliary artifacts when applicable
|
|
66
|
+
→ STOP: "Review and confirm?"
|
|
67
|
+
|
|
68
|
+
# 4. Tasks
|
|
69
|
+
/tasks
|
|
70
|
+
→ Generates docs/sprint/Sprint-XX/TASKS.md
|
|
71
|
+
→ STOP: "Proceed to implement?"
|
|
72
|
+
|
|
73
|
+
# 5. Implement (after approval)
|
|
74
|
+
/impl from docs/sprint/Sprint-XX/TASKS.md
|
|
75
|
+
→ Executes plan tasks
|
|
76
|
+
→ STOP between phases (P0→P1→P2→P3)
|
|
77
|
+
|
|
78
|
+
# 6. Analyze + Checklist
|
|
79
|
+
/analyze
|
|
80
|
+
→ Validates spec/plan/tasks consistency
|
|
81
|
+
/checklist
|
|
82
|
+
→ Confirms readiness and gaps
|
|
83
|
+
|
|
84
|
+
# 7. Test
|
|
85
|
+
/test all
|
|
86
|
+
→ Runs all checks
|
|
87
|
+
→ Reports results
|
|
88
|
+
|
|
89
|
+
# 8. Deploy (if approved)
|
|
90
|
+
/deploy production
|
|
91
|
+
→ Pre-deploy checklist
|
|
92
|
+
→ STOP: "Confirm production deploy?"
|
|
93
|
+
→ Executes deploy
|
|
94
|
+
→ Post-deploy verification
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Hybrid Behavior
|
|
100
|
+
|
|
101
|
+
All commands follow a hybrid behavior:
|
|
102
|
+
|
|
103
|
+
1. **Show:** Load and explain the appropriate command protocol
|
|
104
|
+
2. **Ask (via question tool):** Mandatory STOP points for approval
|
|
105
|
+
3. **Execute:** Only after user confirmation
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## STOP Points
|
|
110
|
+
|
|
111
|
+
The system always pauses for approval at critical moments:
|
|
112
|
+
|
|
113
|
+
### `/plan`
|
|
114
|
+
> "Plan recorded in `docs/requirements/` and `docs/sprint/Sprint-XX/`. Review and confirm to proceed?"
|
|
115
|
+
|
|
116
|
+
### `/impl`
|
|
117
|
+
- Between each phase (P0, P1, P2, P3)
|
|
118
|
+
- At the end: "Run final verification?"
|
|
119
|
+
|
|
120
|
+
### `/deploy`
|
|
121
|
+
- Production requires explicit confirmation
|
|
122
|
+
- After deploy: "Confirm success?"
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## File Structure
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
.opencode/
|
|
130
|
+
└── commands/
|
|
131
|
+
├── analyze.md # Spec/plan/tasks analysis
|
|
132
|
+
├── brainstorm.md # Idea exploration
|
|
133
|
+
├── checklist.md # Spec/plan checklist
|
|
134
|
+
├── clarify.md # Spec clarification
|
|
135
|
+
├── context.md # Context pack generation
|
|
136
|
+
├── create.md # New app creation
|
|
137
|
+
├── doc.md # Documentation updates
|
|
138
|
+
├── engineer.md # Universal orchestrator
|
|
139
|
+
├── impl.md # Implementation command
|
|
140
|
+
├── plan.md # Planning command
|
|
141
|
+
├── preview.md # Preview management
|
|
142
|
+
├── specify.md # Feature specification
|
|
143
|
+
├── status.md # Status reporting
|
|
144
|
+
├── tasks.md # Task generation
|
|
145
|
+
├── test.md # Testing command
|
|
146
|
+
├── ui-ux.md # Design command
|
|
147
|
+
└── deploy.md # Deploy command
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
.opencode/
|
|
152
|
+
├── agents/ # Specialist agents
|
|
153
|
+
├── skills/ # Knowledge modules
|
|
154
|
+
└── scripts/ # Python validation scripts
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Command Features
|
|
160
|
+
|
|
161
|
+
### Placeholders
|
|
162
|
+
- `$ARGUMENTS` - All user arguments
|
|
163
|
+
- `$1`, `$2`, `$3` - Positional arguments
|
|
164
|
+
|
|
165
|
+
### Shell Integration
|
|
166
|
+
- `!command` - Inject shell output
|
|
167
|
+
- Example: `!git log --oneline -10`
|
|
168
|
+
|
|
169
|
+
### File References
|
|
170
|
+
- `@file` - Include file content
|
|
171
|
+
- Example: `@src/components/Button.tsx`
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Configuration
|
|
176
|
+
|
|
177
|
+
### Local (This Project)
|
|
178
|
+
Files in `.opencode/commands/` are available only in this project.
|
|
179
|
+
|
|
180
|
+
### Global (All Projects)
|
|
181
|
+
Copy to `~/.config/opencode/commands/` to use everywhere:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
cp -r .opencode/commands/* ~/.config/opencode/commands/
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Usage Examples
|
|
190
|
+
|
|
191
|
+
### Example 1: Simple Feature
|
|
192
|
+
```bash
|
|
193
|
+
# Plan
|
|
194
|
+
/plan add dark mode toggle
|
|
195
|
+
→ Updates docs artifacts
|
|
196
|
+
|
|
197
|
+
# Approve and implement
|
|
198
|
+
/impl from docs/sprint/Sprint-XX/TASKS.md
|
|
199
|
+
→ Executes tasks
|
|
200
|
+
|
|
201
|
+
# Test
|
|
202
|
+
/test coverage
|
|
203
|
+
→ 95% coverage, all passing
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Example 2: Complex System
|
|
207
|
+
```bash
|
|
208
|
+
# Orchestrate everything
|
|
209
|
+
/engineer build e-commerce with Stripe
|
|
210
|
+
→ Phase 1: Planning (project-planner)
|
|
211
|
+
→ STOP: "Proceed?"
|
|
212
|
+
→ Phase 2: Implementation (multiple agents)
|
|
213
|
+
→ STOP: "Verify?"
|
|
214
|
+
→ Phase 3: Verification (Phase X)
|
|
215
|
+
→ Project complete!
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Example 3: Debug
|
|
219
|
+
```bash
|
|
220
|
+
/debug users can't login after last update
|
|
221
|
+
→ Phase 1: Symptom Analysis
|
|
222
|
+
→ Phase 2: Information Gathering
|
|
223
|
+
→ Phase 3: Hypothesis Testing
|
|
224
|
+
→ Phase 4: Resolution
|
|
225
|
+
→ Bug fixed!
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Tips
|
|
231
|
+
|
|
232
|
+
1. **Use `/engineer` for complex tasks** - It coordinates multiple agents
|
|
233
|
+
2. **Use `/plan` first** - Always plan before implementing
|
|
234
|
+
3. **Do not skip STOPs** - Manual approvals ensure quality
|
|
235
|
+
4. **Keep plans small** - If > 10 tasks, split into parts
|
|
236
|
+
5. **Run `/test` often** - Catch issues early
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## 🆘 Troubleshooting
|
|
241
|
+
|
|
242
|
+
### "Command does not appear after typing /"
|
|
243
|
+
→ Restart the OpenCode TUI
|
|
244
|
+
|
|
245
|
+
### "Command not found"
|
|
246
|
+
→ Verify that `.opencode/commands/` exists
|
|
247
|
+
|
|
248
|
+
### "Python scripts do not run"
|
|
249
|
+
→ Ensure Python is installed and dependencies are satisfied
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## OpenKit Integration
|
|
254
|
+
|
|
255
|
+
These commands reuse:
|
|
256
|
+
- Specialist prompts (`.opencode/prompts/`)
|
|
257
|
+
- Skills (`.opencode/skills/`)
|
|
258
|
+
- Python validation scripts (`.opencode/scripts/`)
|
|
259
|
+
- Original rules and protocols
|
|
260
|
+
|
|
261
|
+
They are only adapted to the OpenCode command format.
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Additional Documentation
|
|
266
|
+
|
|
267
|
+
- **OpenKit Architecture:** `.opencode/ARCHITECTURE.md`
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## Ready to use!
|
|
272
|
+
|
|
273
|
+
Open the OpenCode TUI and type `/` to see all available commands.
|