{
  "markdown": "# SWE\n\nSWE is a Go-native smallest-correct-change runtime for AI coding agents,\ndelivered as one static binary with no runtime dependencies.\n\nThe important split is intentional:\n\n- Go handles mode state, configuration, lifecycle hooks, host detection, and output protocols.\n- Markdown holds the agent instructions and skills because that is what coding agents consume.\n\nThis keeps the lifecycle runtime native to Go without pretending that\ninstruction assets should become Go source.\n\n## What it does\n\nBefore code is written, SWE walks a short ladder: skip speculative work, reuse\nwhat exists, prefer the standard library, prefer native platform behavior,\nreuse installed dependencies, and only then write the minimum implementation.\nIt does not trade away validation, data-loss protection, security,\naccessibility, or a runnable check for non-trivial logic.\n\nModes:\n\n| Mode | Behavior |\n|------|----------|\n| `lite` | Build the request and mention the lazier alternative. |\n| `full` | Enforce the complete ladder. Default. |\n| `ultra` | Prefer deletion and challenge speculative requirements. |\n| `review` | Review only for over-engineering. Session-only. |\n| `off` | Inject nothing. |\n\n## Install\n\nGo 1.22 or newer is required to build the binary:\n\n```bash\ngo install github.com/bittahcriminal/SWE/cmd/swe@latest\n```\n\nMake sure the Go bin directory is on the non-interactive shell `PATH`; hooks\ninvoke `swe` directly.\n\n### Codex\n\n```bash\ncodex plugin marketplace add bittahcriminal/SWE\ncodex plugin add swe@swe\n```\n\n### Claude Code\n\n```bash\n/plugin marketplace add bittahcriminal/SWE\n/plugin install swe@swe\n```\n\n### GitHub Copilot CLI\n\n```bash\ncopilot plugin marketplace add bittahcriminal/SWE\ncopilot plugin install swe@swe\n```\n\nCopilot installs SWE from its GitHub-hosted marketplace and loads its skills\nand native lifecycle hooks.\n\n### Gemini CLI\n\n```bash\ngemini extensions install https://github.com/bittahcriminal/SWE --auto-update\n```\n\nGemini installs SWE as an extension, including its skills, `/swe` and\n`/swe-review` commands, and session-start context hook.\n\n### OpenCode\n\n```bash\nswe install opencode\n```\n\nThe Go installer adds a managed SWE block to the global OpenCode `AGENTS.md`\nand installs SWE-owned skills and commands under `~/.config/opencode/`. It\npreserves unrelated rules and is safe to run again when updating SWE. Set\n`XDG_CONFIG_HOME` to use a different configuration root.\n\nStart a new host session after installation. Qoder users can copy the template\nunder [`hooks/qoder-hooks.json`](hooks/qoder-hooks.json).\n\nInstruction-only agents can copy [`AGENTS.md`](AGENTS.md) into a repository or\nuser-level agent configuration.\n\n## CLI\n\n```text\nswe instructions [lite|full|ultra|review]  print the embedded ruleset\nswe mode [MODE]                            read or set host-scoped session mode\nswe default [MODE]                         read or persist the startup mode\nswe status [--badge]                       inspect state or print [SWE:MODE]\nswe install opencode [--config-dir PATH]   install global OpenCode integration\nswe hook session-start                     lifecycle hook entrypoint\nswe hook prompt-submit                     lifecycle hook entrypoint; reads JSON\nswe hook subagent-start                    lifecycle hook entrypoint; reads JSON\n```\n\nHook-based hosts accept `/swe lite|full|ultra|off`, `/swe default <mode>`, and\n`/swe-review`. Gemini and OpenCode expose turn-scoped `/swe\n[lite|full|ultra]` and `/swe-review` commands. Codex skill invocations use\n`@swe` and `@swe-review`. The standalone phrases `stop swe` and `normal mode`\ndeactivate hook-based sessions.\n\n## Configuration\n\nResolution order for the startup default:\n\n1. `SWE_DEFAULT_MODE`\n2. `defaultMode` in `~/.config/swe/config.json`\n3. `full`\n\nOn Windows the config file lives at `%APPDATA%\\swe\\config.json`; setting\n`XDG_CONFIG_HOME` overrides the base directory on every platform.\n\nSession state is isolated by host: Codex uses `PLUGIN_DATA`, Copilot uses\n`COPILOT_PLUGIN_DATA`, Gemini uses `~/.gemini`, Qoder uses `~/.qoder`, and\nClaude uses `CLAUDE_CONFIG_DIR` or `~/.claude`.\n\nSet `SWE_SUBAGENT_MATCHER` to a case-insensitive regular expression to limit\nsubagent injection by `agent_type`. Unset means every subagent. Invalid or\nmissing metadata fails open and injects the rules so the mode is never silently\nlost.\n\n## Scope and compatibility\n\nThe Go runtime covers the portable core:\n\n- Claude Code, Codex, Copilot CLI, Gemini CLI, and Qoder hook output formats\n- default and session mode persistence\n- mode commands and standalone deactivation\n- subagent context propagation and optional matching\n- embedded main and review rules\n- installable skills for review, audit, debt, gain, and help\n- a cross-platform status badge via `swe status --badge`\n- a Go-powered global installer for OpenCode rules, skills, and commands\n\nOpenCode loads SWE through its native rules, skills, and command directories;\nit does not expose SWE's lifecycle mode state. Pi and Hermes require\nhost-specific JavaScript or Python plugin APIs, so use\n`swe instructions <mode>` as their host-neutral integration point.\n\n## Development\n\n```bash\ngofmt -w .\ngo test ./...\ngo test -race ./...\ngo vet ./...\ngo build ./cmd/swe\n```\n\nThe implementation uses only the Go standard library. CI tests Linux, macOS,\nand Windows.\n\n## License\n\nSWE is an independent project released under the MIT License. See\n[`NOTICE`](NOTICE) for project status and [`LICENSE`](LICENSE) for the license\nterms and retained copyright notices.\n",
  "bytes": 5503,
  "sha": "e1a690cd531f5d4f229df10d685ae4d5b8e655803047bedeede8fda6a4d21936",
  "repo_slug": "bittahcriminal/swe",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_bittahcriminal_swe_94c0115f/readme"
}