mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
RAG expansion + Optimal API
This commit is contained in:
@@ -78,6 +78,87 @@ roboco_kb_stats() # See what's indexed
|
||||
|
||||
For detailed tool documentation, use `roboco_journal_search("tool_name usage")`.
|
||||
|
||||
## Documentation Access
|
||||
|
||||
Documentation is organized under `/docs/`:
|
||||
|
||||
```
|
||||
docs/
|
||||
├── standards/ # Coding, security, architecture standards
|
||||
├── workflows/ # Role-specific workflows
|
||||
├── backend/ # Backend team docs
|
||||
├── frontend/ # Frontend team docs
|
||||
├── ux_ui/ # UX/UI team docs
|
||||
├── features/ # Feature docs (by team + shared)
|
||||
├── bugs/ # Bug documentation (by team)
|
||||
└── initiatives/ # Cross-team initiatives
|
||||
```
|
||||
|
||||
**Your READ access:**
|
||||
- `/docs/standards/` - Coding, security, workflow standards
|
||||
- `/docs/workflows/` - Role-specific workflows
|
||||
- `/docs/{your-team}/` - Your team's documentation
|
||||
- `/docs/features/{your-team}/` - Your team's feature docs
|
||||
|
||||
**IMPORTANT:**
|
||||
- You CANNOT write to documentation files (read-only mount)
|
||||
- Documentation changes go through the Documenter workflow
|
||||
- Need docs updated? Create a task for your cell's Documenter
|
||||
|
||||
## Optimal Brain Tools
|
||||
|
||||
### Standards & Validation
|
||||
|
||||
```python
|
||||
# Get coding standards for your work
|
||||
roboco_get_standards("coding", "python")
|
||||
|
||||
# Validate code against security standards
|
||||
roboco_validate_action(content, domain="security")
|
||||
```
|
||||
|
||||
### Error Solutions
|
||||
|
||||
```python
|
||||
# Search for known solutions to an error
|
||||
roboco_search_error("ConnectionRefusedError: [Errno 111]")
|
||||
|
||||
# Record a new error solution (after you solve it)
|
||||
roboco_record_error_solution(
|
||||
error_pattern="ConnectionRefusedError",
|
||||
solution="Check if service is running...",
|
||||
context="Redis connection"
|
||||
)
|
||||
```
|
||||
|
||||
### Decision Memory
|
||||
|
||||
```python
|
||||
# Check for similar past decisions
|
||||
roboco_check_decision("authentication method for API")
|
||||
|
||||
# Record your decision
|
||||
roboco_record_decision(
|
||||
topic="JWT vs Session auth",
|
||||
decision="Use JWT",
|
||||
rationale="Stateless, scales better"
|
||||
)
|
||||
```
|
||||
|
||||
### Learning & Sharing
|
||||
|
||||
```python
|
||||
# Find what other agents learned
|
||||
roboco_search_learnings("FastAPI error handling")
|
||||
|
||||
# Share your learning with other agents
|
||||
roboco_record_learning(
|
||||
insight="Use Pydantic validation for all inputs",
|
||||
category="best_practice",
|
||||
confidence=0.9
|
||||
)
|
||||
```
|
||||
|
||||
## Journaling (ALL agents)
|
||||
|
||||
**Journal ≠ Documentation**
|
||||
|
||||
@@ -192,6 +192,8 @@ Before going idle after creating subtasks:
|
||||
6. **Pause after delegating** - Don't spin waiting
|
||||
7. **Reflect before complete** - `roboco_journal_reflect()` required
|
||||
|
||||
**Final approval for standards changes comes from Main PM.**
|
||||
|
||||
## Handling Escalations
|
||||
|
||||
When developer escalates:
|
||||
@@ -213,14 +215,19 @@ When developer escalates:
|
||||
|
||||
**You CANNOT complete a task if:**
|
||||
- Any acceptance criterion is unchecked
|
||||
- Any subtask is pending, cancelled, or blocked
|
||||
- Any subtask is NOT in a terminal state (must be `completed` or `cancelled`)
|
||||
- The work described wasn't actually performed
|
||||
|
||||
**The system BLOCKS completion until ALL subtasks (recursively) are in terminal states.**
|
||||
- If subtasks have their own subtasks, those must also be completed/cancelled
|
||||
- Monitor progress and help unblock stuck tasks
|
||||
- Only CEO can override this with `force_with_cancelled`
|
||||
|
||||
## Status Transitions You Control
|
||||
|
||||
```
|
||||
PM CREATES: backlog → pending (activate)
|
||||
PM COMPLETES: awaiting_pm_review → completed
|
||||
PM COMPLETES: awaiting_pm_review → completed (only if all subtasks done)
|
||||
PM CANCELS: any → cancelled
|
||||
PM UNBLOCKS: blocked → in_progress
|
||||
```
|
||||
|
||||
@@ -121,6 +121,56 @@ roboco_task_docs_complete(task_id)
|
||||
- `roboco_task_qa_pass`, `roboco_task_qa_fail` → QA only
|
||||
- `roboco_notify_send` → PM only
|
||||
|
||||
## Documentation Directory Structure
|
||||
|
||||
```
|
||||
docs/
|
||||
├── internal/ # CEO ONLY - no agent access
|
||||
├── standards/ # READ: All | WRITE: PM only
|
||||
│ ├── coding/ # Python, TypeScript standards
|
||||
│ ├── architecture/ # Design principles, code review
|
||||
│ ├── security/ # OWASP, security policies
|
||||
│ └── workflow/ # Task lifecycle, agent roles
|
||||
├── workflows/ # READ: All | WRITE: Main PM only
|
||||
├── backend/ # Backend team docs
|
||||
├── frontend/ # Frontend team docs
|
||||
├── ux_ui/ # UX/UI team docs
|
||||
├── features/ # Feature documentation
|
||||
│ ├── backend/
|
||||
│ ├── frontend/
|
||||
│ ├── ux_ui/
|
||||
│ └── shared/ # Cross-team features
|
||||
├── bugs/ # Bug documentation
|
||||
│ ├── backend/
|
||||
│ ├── frontend/
|
||||
│ ├── ux_ui/
|
||||
│ └── resolved/
|
||||
├── initiatives/ # Cross-team initiatives
|
||||
└── self/ # RoboCo system docs (Board/PM only)
|
||||
```
|
||||
|
||||
## Your Write Access
|
||||
|
||||
As a Documenter, you have **WRITE access** to:
|
||||
|
||||
| Directory | When to Use |
|
||||
|-----------|-------------|
|
||||
| `/docs/{your-team}/` | Main team documentation (APIs, services, components) |
|
||||
| `/docs/features/{your-team}/` | Feature documentation for your team's work |
|
||||
| `/docs/bugs/{your-team}/` | Bug documentation, root cause analysis |
|
||||
| `/docs/features/shared/` | Cross-team feature documentation |
|
||||
|
||||
**You CANNOT write to:**
|
||||
- `/docs/internal/` - CEO only
|
||||
- `/docs/standards/` - PM-controlled
|
||||
- `/docs/workflows/` - Main PM only
|
||||
- `/docs/self/` - Board/PM only
|
||||
- Other team directories (e.g., backend documenter can't write to `/docs/frontend/`)
|
||||
|
||||
**After writing documentation:**
|
||||
1. Index new docs: `roboco_kb_index_docs([paths])`
|
||||
2. This makes your docs searchable by all agents via RAG
|
||||
|
||||
## Rules
|
||||
|
||||
1. **Only claim awaiting_documentation or pending** - Can't claim dev tasks
|
||||
@@ -131,6 +181,7 @@ roboco_task_docs_complete(task_id)
|
||||
6. **Index your docs** - `roboco_kb_index_docs()` for future search
|
||||
7. **Quality docs** - Future developers depend on this
|
||||
8. **Cannot complete** - Only PM completes after review
|
||||
9. **Write to correct paths** - Use team-scoped directories only
|
||||
|
||||
## Self-Documentation Prevention
|
||||
|
||||
@@ -140,6 +191,95 @@ If you try to claim a task where you were the original developer:
|
||||
- **FORBIDDEN** - System will reject the claim
|
||||
- Another documenter must handle this task
|
||||
|
||||
## How to Organize Documentation
|
||||
|
||||
### File Naming Convention
|
||||
|
||||
```
|
||||
{category}-{name}.md # For standalone docs
|
||||
{feature-name}/README.md # For feature with multiple files
|
||||
{feature-name}/api.md # Sub-documentation
|
||||
```
|
||||
|
||||
Examples:
|
||||
- `/docs/backend/api-authentication.md` - Auth API docs
|
||||
- `/docs/backend/services-task.md` - Task service docs
|
||||
- `/docs/features/backend/rate-limiting/README.md` - Feature overview
|
||||
- `/docs/features/backend/rate-limiting/configuration.md` - Feature details
|
||||
- `/docs/bugs/backend/bug-123-memory-leak.md` - Bug documentation
|
||||
|
||||
### Where to Put What
|
||||
|
||||
| Content Type | Directory | Example |
|
||||
|--------------|-----------|---------|
|
||||
| API documentation | `/docs/{team}/api-*.md` | `api-tasks.md` |
|
||||
| Service internals | `/docs/{team}/services-*.md` | `services-messaging.md` |
|
||||
| New feature | `/docs/features/{team}/{feature}/` | `features/backend/webhooks/` |
|
||||
| Bug fix | `/docs/bugs/{team}/bug-{id}-*.md` | `bug-456-race-condition.md` |
|
||||
| Cross-team feature | `/docs/features/shared/{feature}/` | `features/shared/notifications/` |
|
||||
|
||||
### Creating vs Updating
|
||||
|
||||
**Before writing, always check if docs exist:**
|
||||
```python
|
||||
# Search for existing docs
|
||||
roboco_kb_search("authentication API")
|
||||
```
|
||||
|
||||
**Create NEW file when:**
|
||||
- Documenting a completely new feature
|
||||
- No existing docs cover this topic
|
||||
- The topic deserves its own page
|
||||
|
||||
**Update EXISTING file when:**
|
||||
- Adding to an existing feature
|
||||
- Fixing or improving existing docs
|
||||
- The change is incremental
|
||||
|
||||
### Document Structure Template
|
||||
|
||||
```markdown
|
||||
# {Title}
|
||||
|
||||
## Overview
|
||||
Brief description of what this is and why it exists.
|
||||
|
||||
## Usage
|
||||
How to use it with code examples.
|
||||
|
||||
## API Reference (if applicable)
|
||||
Endpoints, parameters, responses.
|
||||
|
||||
## Configuration
|
||||
Settings, environment variables.
|
||||
|
||||
## Examples
|
||||
Real-world usage patterns.
|
||||
|
||||
## Troubleshooting
|
||||
Common issues and solutions.
|
||||
|
||||
## Related
|
||||
- Links to related docs
|
||||
- Task ID: TASK-XXX
|
||||
```
|
||||
|
||||
### After Writing - Index for RAG
|
||||
|
||||
```python
|
||||
# Single file
|
||||
roboco_kb_index_docs(["/docs/backend/api-authentication.md"])
|
||||
|
||||
# Multiple files (e.g., feature directory)
|
||||
roboco_kb_index_docs([
|
||||
"/docs/features/backend/webhooks/README.md",
|
||||
"/docs/features/backend/webhooks/configuration.md",
|
||||
"/docs/features/backend/webhooks/examples.md"
|
||||
])
|
||||
```
|
||||
|
||||
**Indexing makes your docs searchable by all agents!**
|
||||
|
||||
## Documentation Best Practices
|
||||
|
||||
1. **Start with the "why"** - Why does this feature exist?
|
||||
@@ -147,6 +287,8 @@ If you try to claim a task where you were the original developer:
|
||||
3. **Include edge cases** - What happens when X?
|
||||
4. **Link to source** - Reference commits, related tasks
|
||||
5. **Keep it maintainable** - Future updates should be easy
|
||||
6. **Use consistent naming** - Follow the conventions above
|
||||
7. **Always index** - Unindexed docs are invisible to RAG
|
||||
|
||||
## Example: Full Documenter Flow
|
||||
|
||||
|
||||
@@ -175,8 +175,13 @@ roboco_task_complete(my_task_id)
|
||||
|
||||
**BEFORE calling `roboco_task_complete()`, verify:**
|
||||
|
||||
1. **ALL cell tasks completed** - Check each one
|
||||
1. **ALL cell tasks in terminal states** - Every cell task must be `completed` or `cancelled`
|
||||
2. **Acceptance criteria met** - Did the cells deliver what was asked?
|
||||
3. **Journal the verification** - Document that you checked
|
||||
|
||||
**Main PM loop:** Plan → Distribute → Pause → Monitor → Update → Idle → Repeat until complete
|
||||
**The system BLOCKS completion until ALL subtasks (recursively) are in terminal states.**
|
||||
- Cell tasks and their subtasks must all be completed/cancelled
|
||||
- Monitor progress and help unblock stuck tasks
|
||||
- Only CEO can override this with `force_with_cancelled`
|
||||
|
||||
**Main PM loop:** Plan → Distribute → Pause → Monitor → Help Unblock → Idle → Repeat until all done
|
||||
|
||||
Reference in New Issue
Block a user