{"id":35690887,"url":"https://github.com/markjaquith/agency","last_synced_at":"2026-02-12T22:09:47.688Z","repository":{"id":328366284,"uuid":"1091379470","full_name":"markjaquith/agency","owner":"markjaquith","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-11T18:42:23.000Z","size":896,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-12T03:02:24.638Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markjaquith.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-11-07T00:00:41.000Z","updated_at":"2026-02-11T18:42:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/markjaquith/agency","commit_stats":null,"previous_names":["markjaquith/agency"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/markjaquith/agency","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markjaquith%2Fagency","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markjaquith%2Fagency/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markjaquith%2Fagency/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markjaquith%2Fagency/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markjaquith","download_url":"https://codeload.github.com/markjaquith/agency/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markjaquith%2Fagency/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29383031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T22:07:52.078Z","status":"ssl_error","status_checked_at":"2026-02-12T22:07:49.026Z","response_time":55,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-05T23:11:27.421Z","updated_at":"2026-02-12T22:09:47.671Z","avatar_url":"https://github.com/markjaquith.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @markjaquith/agency\n\nSmuggle project-level LLM instruction into any Git repo. Plan your tasks. Commit your plans. Execute your plans using Opencode. Filter those plans out out your PRs.\n\n## Installation\n\n```bash\nbun install -g @markjaquith/agency\n```\n\n## Primary Commands\n\n### `agency task \u003cbranch-name\u003e`\n\nCreate a new feature branch from the latest `origin/main` and initialize `AGENTS.md` and `TASK.md` files using the template you've set for this repo. Commits smuggled files and lands you on that branch.\n\n**Options:**\n\n- `--from \u003cbranch\u003e` - Branch from a specific branch instead of `origin/main`\n- `--from-current` - Initialize on current branch instead of creating a new one\n- `--continue` - Continue a task by copying agency files to a new branch (after PR merge)\n\n**Examples:**\n\n```bash\nagency task my-feature              # Create 'my-feature' from latest origin/main\nagency task my-feature --from dev   # Create 'my-feature' from 'dev' branch\nagency task --from-current          # Initialize on current branch (no new branch)\nagency task --continue my-feature-v2 # Continue task on new branch after PR merge\n```\n\n### `agency edit`\n\nOpen `TASK.md` in the system editor for editing. Nice if you have to paste in large amounts of context.\n\n### `agency work`\n\nLaunch Opencode to work on the current task defined in `TASK.md`. All your context will be loaded.\n\n### `agency loop`\n\nRun a Ralph Wiggum loop over the current `TASK.md`.\nThe command repeatedly invokes `opencode run` in isolated iterations, committing progress after each loop, until all tasks are complete or a maximum loop count is reached.\n\nWhen all work is finished, the loop terminates and outputs `\u003cpromise\u003eCOMPLETE\u003c/promise\u003e`.\n\n**Options:**\n\n- `--min-loops \u003cn\u003e` - Run at least `n` iterations, even if tasks complete earlier\n- `--max-loops \u003cn\u003e` - Stop after `n` iterations even if tasks remain\n\n**Example:**\n\n```bash\nagency loop --max-loops 10\n```\n\n### `agency emit [base-branch]`\n\nCreate an emit branch with smuggled files reverted to their merge-base state (removes additions/modifications to those files made on feature branch). Default branch name is current branch with `--PR` suffix.\n\n### `agency push [base-branch]`\n\nRuns `agency emit`, pushes the branch, and then switches back to the source branch.\n\n**Options:**\n\n- `--pr` - Open GitHub PR in browser after pushing (requires `gh` CLI)\n- `--force` - Force push to remote if branch has diverged\n- `--branch \u003cname\u003e` - Custom name for emit branch\n\n### `agency merge`\n\nRuns `agency emit`, and then merges the PR back into the base branch locally.\n\n**Options:**\n\n- `--squash` - Use squash merge instead of regular merge (stages changes, requires manual commit)\n- `--push` - Push the base branch to origin after merging\n\n## Other Commands\n\n### `agency template use [template]`\n\nSet which template to use for this repository. Shows interactive selection if no template name provided. Saves to `.git/config`.\n\n### `agency template save \u003cfiles...\u003e`\n\nSave the specified files back to the configured template directory (so they will be used for future `agency task` commands).\n\n### `agency base get`\n\nGet the base branch for the current feature branch.\n\n### `agency base set \u003cbranch\u003e`\n\nSet the base branch for the current feature branch.\n\n### `agency switch`\n\nToggle between source branch and emit branch. If on an emit branch (e.g., `foo--PR`), switches to source branch (e.g., `foo`). If on source branch and emit branch exists, switches to emit branch.\n\n### `agency source`\n\nSwitch to the source branch for the current emit branch.\n\n## Requirements\n\n- [Bun](https://bun.sh) \u003e= 1.0.0 (recommended)\n- TypeScript ^5\n\n## Development\n\nTo install dependencies:\n\n```bash\nbun install\n```\n\nTo run:\n\n```bash\nbun run index.ts\n```\n\n### Git Hooks\n\nThis project uses [hk](https://github.com/jdx/hk) for git hook management. The configuration is in `hk.pkl`.\n\nTo install the git hooks:\n\n```bash\nhk install\n```\n\n**Pre-commit hook runs:**\n\n- Prettier formatting\n- Knip (unused code detection)\n- TypeScript type checking\n\n**Commit-msg hook validates:**\n\n- Conventional commits format\n- Commit message history\n\n**Pre-push hook runs the same checks as pre-commit.**\n\nNote: Tests are intentionally excluded from git hooks as they are slow. Run them manually with `bun test`.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkjaquith%2Fagency","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkjaquith%2Fagency","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkjaquith%2Fagency/lists"}