Update agents file
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
---
|
||||
id: reviewing-agent
|
||||
name: Reviewing Agent
|
||||
description: Reviews tickets in the reviewing column of the Worklane kanban board and adds a comment with findings, improvement instructions, code quality rating, and acceptance criteria match rating
|
||||
category: code-review
|
||||
type: standard
|
||||
version: 1.0.0
|
||||
author: ilya
|
||||
mode: primary
|
||||
temperature: 0.1
|
||||
tools:
|
||||
bash: true
|
||||
read: true
|
||||
glob: true
|
||||
grep: true
|
||||
permissions:
|
||||
bash:
|
||||
"sudo *": "deny"
|
||||
skill:
|
||||
"worklane_kanban": "allow"
|
||||
"testing-skill": "allow"
|
||||
---
|
||||
|
||||
# Reviewing Agent
|
||||
|
||||
This agent reviews tickets in the `reviewing` status of the Worklane kanban board. It reads the ticket details, examines the implementation, and adds a structured comment with ratings and improvement suggestions.
|
||||
|
||||
## Process
|
||||
|
||||
### 1. Get ticket information
|
||||
|
||||
If a ticket is specified (by UUID prefix or title), use it directly. Otherwise, list the tickets in the `reviewing` column:
|
||||
|
||||
```bash
|
||||
worklane ls reviewing
|
||||
```
|
||||
|
||||
Show the full ticket details:
|
||||
|
||||
```bash
|
||||
worklane show <ticket-id-or-title>
|
||||
```
|
||||
|
||||
### 2. Examine the implementation
|
||||
|
||||
Read the relevant source files that were modified as part of the ticket's implementation. Use `glob` and `grep` to find the appropriate files. Read and analyze the implementation details.
|
||||
|
||||
### 3. Evaluate against acceptance criteria
|
||||
|
||||
Compare the implementation against each acceptance criterium from the ticket. For each criterium, determine if it is met and note any issues.
|
||||
|
||||
### 4. Evaluate code quality
|
||||
|
||||
Assess the implementation against these code quality dimensions:
|
||||
|
||||
- **Correctness**: Does the code work as intended?
|
||||
- **Style**: Does it follow the project's coding conventions (see AGENTS.md)?
|
||||
- **Structure**: Is the code well-organized and maintainable?
|
||||
- **Completeness**: Is the implementation thorough (edge cases, error handling)?
|
||||
|
||||
### 5. Add a review comment
|
||||
|
||||
Add a comment to the ticket using `worklane comment` with the following structured format:
|
||||
|
||||
```markdown
|
||||
## Review Rating
|
||||
|
||||
### Code Quality: <rating>/10
|
||||
- <list specifics: what was good, what needs improvement>
|
||||
|
||||
### Acceptance Criteria Match: <rating>/10
|
||||
- <criterium 1>: met/not met - notes
|
||||
- <criterium 2>: met/not met - notes
|
||||
|
||||
### Implementation Issues Found:
|
||||
- <list any issues>
|
||||
|
||||
### Improvement Instructions:
|
||||
1. <specific instruction>
|
||||
2. <specific instruction>
|
||||
```
|
||||
|
||||
**Ratings:**
|
||||
- Code Quality: Rate the overall code quality (1-10) based on the four dimensions above
|
||||
- Acceptance Criteria Match: Rate how well the implementation fulfills all acceptance criteria (1-10)
|
||||
- Use `worklane comment <ticket-id-or-title> "<comment>"` to add the comment (escape any special characters in the comment body)
|
||||
|
||||
### 6. Recommend next steps
|
||||
|
||||
After adding the comment, recommend whether the ticket should:
|
||||
- Move to `done` if implementation is satisfactory
|
||||
- Stay in `reviewing` for another round of changes
|
||||
- Be moved back to `committed` if significant rework is needed
|
||||
@@ -1,46 +1,55 @@
|
||||
# AGENTS.md
|
||||
|
||||
## Project Structure
|
||||
- `src/main.rs` - All application logic (init, add, ls, show, mv commands)
|
||||
- `src/main.rs` - All application logic
|
||||
- `src/command.rs` - CLI argument definitions using clap derive
|
||||
- `tests/` - Integration tests using `assert_cmd` and `assert_fs`
|
||||
- Ticket files stored as `.md` in `.worklane/<status>/` directories
|
||||
|
||||
## Commands
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `worklane init` | Creates `.worklane/` with backlog, committed, reviewing, done directories |
|
||||
| `worklane add` | Creates a ticket in backlog with `--title`, `--description`, `--acceptance`, `--plan`, `--tags`, `--due`, `--owner` flags |
|
||||
| `worklane ls` | Lists tickets, optionally filtered by `--status` |
|
||||
| `worklane show <id>` | Shows ticket by UUID prefix or title |
|
||||
| `worklane mv <id> --status <target> [-f]` | Moves ticket between statuses. Default: forward only, one stage at a time. `-f` bypasses both restrictions |
|
||||
| `worklane comment <ticket> <body>` | Adds a comment to a ticket by UUID or title |
|
||||
|
||||
## Ticket File Format
|
||||
Filenames: `<uuid_v4>_<slug>.md`
|
||||
Metadata fields parsed: `ID`, `Tags`, `Due`, `Owner`, `Created At`, `Status`
|
||||
- Filenames: `<uuid_v4>_<slug>.md`
|
||||
- Metadata fields parsed by `parse_ticket_field()`: `ID`, `Tags`, `Due`, `Owner`, `Created At`, `Status`
|
||||
- Format: `**Field Name**: value`
|
||||
- Ticket structure: `# Title` → `## Description` → `## Acceptance Criteria` → `## Implementation Plan` → `## Metadata`
|
||||
- Comments stored in `.worklane/comments/<ticket_uuid>/<timestamp>.md` with `**Comment**`, `**Author**`, `**Time**` fields
|
||||
|
||||
## Status Workflow
|
||||
`backlog` -> `committed` -> `reviewing` -> `done`
|
||||
`backlog` → `committed` → `reviewing` → `done`
|
||||
|
||||
## Testing
|
||||
Run: `cargo test`
|
||||
- Run: `cargo test`
|
||||
- Tests use `assert_cmd` and `assert_fs` for CLI testing
|
||||
- `setup_worklane()` creates temp `.worklane/` with all four status folders pre-created
|
||||
- `create_ticket()` writes fully-formed markdown files directly (no `--` separator for positional args in test commands)
|
||||
|
||||
Tests create temporary `.worklane` directories with all four status folders pre-created via `setup_worklane()`. Ticket helper `create_ticket()` writes fully-formed markdown files directly.
|
||||
## Coding Guidelines
|
||||
|
||||
## Key Implementation Notes
|
||||
- No database or index - tickets resolved by scanning all status directories
|
||||
- `resolve_ticket()` matches by UUID prefix (8+ chars), title substring, or filename substring
|
||||
- Ambiguous searches (multiple matches) exit with list of options
|
||||
- Ticket metadata uses `**Field**:` format for parsing
|
||||
- Color output uses ANSI escape codes in `content_trim_colored()`
|
||||
### Rust Style
|
||||
- Use `if matches!(expr, Variant)` instead of `if let Some(Variant) = expr` for enum variant matching
|
||||
- Use `if let Some(x) = expr` instead of `if let Some(Some(x)) = expr` — drop unnecessary nesting
|
||||
- Prefer explicit `match` over `unwrap_or_default()` for clarity
|
||||
- Use `unwrap_or_else(|| expr)` for lazy defaults, `unwrap_or(val)` for eager defaults
|
||||
- Use `anyhow!()` with context strings that include identifying info (e.g. UUID, title) not bare values
|
||||
|
||||
## Agent workflow
|
||||
### Color and Output
|
||||
- Use `color_text()` helper for colored output — it respects `should_use_colors()` (terminal detection)
|
||||
- Color codes are defined in `get_color()`: red (31), cyan (36), orange (33), green (32), grey (90)
|
||||
- Reset color with `\x1b[0m` after colored text
|
||||
- Bold uses `\x1b[1;35m` (magenta bold)
|
||||
- Always test color output works correctly in both terminal and pipe modes
|
||||
|
||||
- When working on a ticket use `worklane show [ticketID]` to read the ticket.
|
||||
- If the ticket status says backlog, move it to committed using `worklane mv --status committed [ticketID]`.
|
||||
- Use `worklane comment [ticketID] "[body]"` to leave notes on tickets (e.g. "LGTM", "needs fixes", "blocked on X")
|
||||
- Use git to commit your changes. The commit message should follow the format: `([ticketID]) [short description of changes]`
|
||||
- If further changes are made later, use --fixup to commit them
|
||||
- When your changes meet the acceptance criteria and the code compiles, move the ticket to reviewing using `worklane mv --status reviewing [ticketID]`
|
||||
- When the ticket is approved, move it to done using `worklane mv --status done [ticketID]`
|
||||
### Code Organization
|
||||
- Colorization functions (`colorize_line`, `colorize_metadata`, `colorize_ordered`, `content_trim_colored`) handle markdown formatting
|
||||
- `resolve_ticket()` scans all status directories — it's the single source for ticket lookup by UUID prefix, title, or filename
|
||||
- `parse_ticket_field()` handles extracting metadata values from markdown format
|
||||
|
||||
### Ticket Resolution
|
||||
- `resolve_ticket()` returns `(status, title, content)` tuple
|
||||
- Priority: exact UUID prefix (8+ chars) > title substring > filename substring
|
||||
- Ambiguous matches (multiple results) print options and exit(1)
|
||||
- Never return empty strings for required fields — use `_Not set_` or `_None_` as defaults
|
||||
|
||||
### Git Workflow
|
||||
- Commit format: `([ticketID]) [short description]`
|
||||
- Use `--fixup` for incremental changes
|
||||
- Test before moving to reviewing status
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
# Worklane
|
||||
|
||||
Worklane is a local Kanban flow for agentic software development.
|
||||
|
||||
## Commands
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `worklane init` | Creates `.worklane/` with backlog, committed, reviewing, done directories |
|
||||
| `worklane add` | Creates a ticket in backlog with `--title`, `--description`, `--acceptance`, `--plan`, `--tags`, `--due`, `--owner` flags |
|
||||
| `worklane ls` | Lists tickets, optionally filtered by `--status` |
|
||||
| `worklane show <id>` | Shows ticket by UUID prefix (8+ chars) or title substring |
|
||||
| `worklane mv <id> --status <target> [-f]` | Moves ticket between statuses. Default: forward only, one stage at a time. `-f` bypasses both restrictions |
|
||||
| `worklane comment <ticket> <body>` | Adds a comment to a ticket by UUID or title |
|
||||
|
||||
Reference in New Issue
Block a user