AGENTS.md
This is an alternative CLI for the git-bug library. Invoke REQUIRED SKILL superpowers when working on features in this application.
This is a Jujutsu-managed repository. Agents must use jj commands (jj st, jj diff, jj new, jj commit, jj describe, jj abandon, etc.) to inspect history and to commit or alter repository state. Do NOT use git commit, git stash, git worktree, or other git commands that move HEAD, create commits, or rewrite refs: bypassing jj forks the change graph and orphans jj’s working-copy snapshots. Read-only git commands (git show <sha>, git diff <a> <b>, git log) are acceptable for inspection only.
The bug application uses Cobra for handling subcommands. Always recommend the minimum nesting of subcommands to accomplish the goal so that the API is easier for users to understand. GOOD: bug new. BAD: bug issue new = too many levels of subcommands.
Use TDD. Break up large files into smaller, cohesive units that implement an operation, i.e., one file for each subcommand, with shared functionality in a separate file that deals with a particular entity type, such as an issue, comment, or identity.
Use descriptive error messages meant for the user – THINK = what steps does the user need to take to accomplish the command successfully. Provide guidance on what to do next, not details about the internal structure of the application.
The application uses two different APIs - one suitable for a human = bug new, bug edit, bug comment, bug read, etc. These should be lenient and help the user achieve their intent. There is a separate API nested under bug agent that has similar functionality but is more strict, suitable for use by an agent to collaborate with the user. When new features are added, update README.md with instructions for the human and SKILL.md with instructions for the agent. Updates to SKILL.md must specify a minimum version number (e.g. (since v1.0.0)) for each new feature, so agents can run bug version to check whether the installed binary supports it.