| name | implement-tickets |
| description | Use when you are asked to implement tickets (tasks/epics) created in `tk` |
Verification.
Verify tk is installed first or STOP.
Workflow
- Use
tk dep tree <id> to get all tickets associated with the specified task/epic.
If the ticket is a super-epic (has links but empty dep tree), use tk show <id> to
find its linked child epics and implement them in dependency order instead.
- Pick the first task that we can implement that is not blocked
- Follow the Sub-task workflow below, ensure to launch these as sub-agents so they
have isolated context. Do not launch parallel sub-agents if they will modify
files, as they will conflict. Use seqential unless the task is nullipotent
(e.g. explore, run tests, etc).
- If the the task is successful move on to the next ticket, if not report back to
user with suggestions on how to proceed. Suggestions cannot be "skip the work".
- If we have exhausted all tickets STOP
Sub-task workflow
Used for implementing a single task.
- Start a sub agent with the sub-agent rules below, do not start parallel
agents unless nullipontent.
- Use
tk show <id> to read a tickets contents
- Implement the ticket within the sub agent
- If succesful
tk close the ticket
- If shortcuts are taken create new tickets associated with the parent
ticket documenting shortcuts, rationale and potential remediations.
- If unsuccessful make sure the ticket remains open and report the user.
Sub-agent rules
You are to implement the ticket as specified, you must first gather context
if the context is useful add comments to the ticket with tk add-note {id} [text]
you must follow these rules.
- NEVER "Simplify" tests, they are the source of truth for correctness.
- When writing language tests (tests in test/unit) do not "fix them" if you
believe the syntax to be correct, you are masking bugs.
- NEVER Assume failures are a "pre-existing condition". If you need to prove
this to yourself, stash your changes and run
just ci
- NEVER decide that the work is "too complex", a "deep refactor" or "large change"
and take shortcuts. If you cannot complete the task, provide suggetions on
how to decompose it to the user.
- NEVER use shortcuts in implementation, this is false progress.
- NEVER keep something for "backwards compatability" unless explictly asked to.
- ALWAYS use existing functions and helpers, do not create duplicates.
- Use your tools,
ast-grep, just, rg, lldb etc; your default tools suck.
- If
just unit (vole test) is failing, NEVER grep output if running >1 times
you often fail to locate the issue without seeing full output.
- If you need a tool to help with the task, build it (script,
just recipe, etc).
- If the tool is useful for future tasks, add it to
just agent.
- Use
vole inspect [ast|vir|ir|mir] file.vole to see how code is represented at
each compiler stage. Write a small .vole snippet and inspect it to understand
the shape of data you're working with before modifying lowering or codegen.
Limits
- Functions should be no longer than ~80 lines, if they are, break them apart.
- Functions should have no more than 5 arguments, if they need more, re-consider
the design, or use a struct to pass in context.
- Files should be no longer than ~1000 lines, if they are, break them apart.
Completing work
- Add a unit test, to
test/unit if adding language features
- Add a sema test to
test/sema if adding sema features
- Before declaring success
just pre-commit must pass. You do not need to run
just ci if just pre-commit passes
- NEVER ignore clippy warnings, this is a sign of bad code
- If successful, run
/simplify on your changes to check for reuse, quality,
and efficiency issues. Fix anything it finds.
- If cleaning up after
/simplify, verify again with just pre-commit
- If task and code-review successful, commit the work to
git.