This repository uses Grite as the canonical task and memory system for both humans and agents.
- Use
--jsonfor all reads. - Do not run interactive commands (no editor prompts).
- Do not force-push
refs/grite/*. - On inconsistencies, run
grite doctor --jsonand follow the plan.
Run at the beginning of each session:
grite sync --pull --jsongrite issue list --state open --label agent:todo --jsongrite issue list --state open --label priority:P0 --json
Select exactly one issue at a time.
If multiple agents share the same .git directory, each agent must use a separate data directory. Set GRITE_HOME, --data-dir, or --actor <id> so the local DB is not shared between processes.
Before coding, post a plan comment:
Intended changes: <files/modules>
Tests: <commands>
Rollback: <strategy>
After each milestone, post a checkpoint comment:
- What changed
- Why
- Tests run
Acquire a lock when editing shared or risky areas:
grite lock acquire --resource "path:<FILE>" --ttl 15m --jsongrite lock renew --resource "path:<FILE>" --ttl 15m --jsongrite lock release --resource "path:<FILE>" --json
If a lock is unavailable, pick another issue or coordinate in comments.
Use the dependency DAG to find the right task to work on:
grite issue dep topo --state open --json— get tasks in dependency ordergrite issue dep list <ID> --json— see what this task depends ongrite issue dep list <ID> --reverse --json— see what's waiting on this taskgrite issue dep add <ID> --target <TARGET> --type depends_on --json— record a dependency you discover
Use the context store to understand and share codebase knowledge:
grite context index --json— index source files (incremental)grite context query "SymbolName" --json— find where a symbol is definedgrite context show <path> --json— understand a specific filegrite context set <key> <value> --json— record project knowledgegrite context project --json— read project knowledge
Before closing:
- Post verification notes (commands + expected output)
grite issue close <ID> --jsongrite sync --push --json