chore: install openagent opencode

Signed-off-by: Dmytro Stanchiev <git@dmytros.dev>
This commit is contained in:
2026-04-07 11:31:26 -04:00
parent b4c03ff25e
commit c2263602c4
204 changed files with 38010 additions and 0 deletions

View File

@@ -0,0 +1,129 @@
<!-- Context: core/managing-tasks | Priority: high | Version: 1.0 | Updated: 2026-02-15 -->
# Guide: Managing Task Lifecycle
**Purpose**: Step-by-step workflow for JSON-driven task management
**Last Updated**: 2026-01-11
---
## Prerequisites
- TaskManager agent available
- Feature folder created in `.tmp/tasks/` (at project root)
---
## Workflow Overview
```
1. Initiation → TaskManager creates task.json + subtasks
2. Selection → Find eligible tasks (deps satisfied)
3. Execution → Working agent implements task
4. Verification → TaskManager validates completion
5. Archiving → Move to completed/ when done
```
---
## 1. Initiation (TaskManager)
Create feature folder and files:
```
.tmp/tasks/{feature-slug}/
├── task.json
├── subtask_01.json
├── subtask_02.json
└── subtask_03.json
```
Validate with: `task-cli.ts validate {feature}`
---
## 2. Task Selection
Find eligible tasks using CLI:
```bash
task-cli.ts next {feature} # All ready tasks
task-cli.ts parallel {feature} # Parallelizable only
```
Selection criteria:
- `status == "pending"`
- All `depends_on` tasks have `status == "completed"`
---
## 3. Execution (Working Agent)
When picking up task:
1. Read subtask JSON
2. Update status:
```json
{
"status": "in_progress",
"agent_id": "coder-agent",
"started_at": "2026-01-11T14:30:00Z"
}
```
3. Load `context_files` (lazy)
4. Implement `deliverables`
5. Add `completion_summary` (max 200 chars)
---
## 4. Verification (TaskManager)
After agent signals completion:
1. Check each `acceptance_criteria`
2. If all pass → Mark completed:
```bash
task-cli.ts complete {feature} {seq} "summary"
```
3. If fail → Keep in_progress, report failures
---
## 5. Archiving
When `completed_count == subtask_count`:
1. Update task.json: `status: "completed"`
2. Move folder: `.tmp/tasks/{slug}/` → `.tmp/tasks/completed/{slug}/`
---
## Status Ownership
| Status | Who Sets | When |
|--------|----------|------|
| pending | TaskManager | Initial creation |
| in_progress | Working agent | Picks up task |
| completed | TaskManager | After verification |
| blocked | Either | Dependency/issue found |
---
## CLI Commands Summary
| Command | Use Case |
|---------|----------|
| `status` | Quick overview |
| `next` | What to work on |
| `parallel` | Batch parallel work |
| `deps` | Understand blockers |
| `blocked` | Identify issues |
| `complete` | Mark task done |
| `validate` | Health check |
---
## Related
- `../standards/task-schema.md` - JSON field reference
- `splitting-tasks.md` - How to create subtasks
- `../lookup/task-commands.md` - Full CLI reference

View File

@@ -0,0 +1,115 @@
<!-- Context: core/splitting-tasks | Priority: high | Version: 1.0 | Updated: 2026-02-15 -->
# Guide: Splitting Features into Tasks
**Purpose**: How to decompose features into atomic subtasks
**Last Updated**: 2026-01-11
---
## Prerequisites
- Feature request understood
- Context bundle loaded (project standards, patterns)
---
## Steps
### 1. Identify Atomic Boundaries
Break feature into tasks that are:
- Completable in 1-2 hours
- Have single, clear outcome
- Testable independently
- Don't overlap with other tasks
**Bad**: "Implement authentication" (too big)
**Good**: "Create password hashing utility" (atomic)
---
### 2. Map Dependencies
For each task, ask:
- What must exist before this can start?
- What files/APIs does this need?
```
01 → no deps (can start immediately)
02 → depends_on: ["01"]
03 → depends_on: ["01", "02"]
```
---
### 3. Identify Parallel Tasks
Mark `parallel: true` when:
- Task doesn't modify shared files
- Task doesn't depend on runtime state from other tasks
- Multiple agents could work simultaneously
Example parallel tasks:
- Writing independent unit tests
- Creating isolated utility functions
- Documentation for separate features
---
### 4. Define Acceptance Criteria
Binary pass/fail conditions only:
- "JWT tokens signed with RS256" ✓
- "Tests pass" ✓
- "Code is clean" ✗ (subjective)
---
### 5. Specify Deliverables
Concrete files/endpoints:
- `src/auth/hash.ts`
- `POST /api/login`
- `tests/auth.test.ts`
---
### 6. Reference Context Files
Don't embed descriptions. Reference paths:
```json
"context_files": [
"(example: .opencode/context/development/backend/auth/jwt-patterns.md)"
]
```
---
## Verification Checklist
- [ ] Each task completable in 1-2 hours?
- [ ] Dependencies create valid execution order?
- [ ] Parallel tasks correctly identified?
- [ ] Acceptance criteria are binary?
- [ ] Deliverables are concrete files/endpoints?
---
## Common Mistakes
| Mistake | Fix |
|---------|-----|
| Task too big | Split into 2-3 smaller tasks |
| Circular deps | Re-order or merge tasks |
| Missing deps | Run `task-cli.ts validate` |
| Vague criteria | Make binary pass/fail |
---
## Related
- `../standards/task-schema.md` - JSON field reference
- `managing-tasks.md` - Lifecycle workflow
- `../lookup/task-commands.md` - CLI reference