{
  "markdown": "# gemini-augment\n\nGemini CLI extension that provides an explicit `/augment` command to rewrite raw prompts into stronger, more structured versions.\n\n## What it does\n\n`/augment <draft>` rewrites a raw prompt into a stronger, more structured instruction and then executes it.\n\nThe rewrite preserves the following behavior:\n\n- explicit invocation rather than automatic rewriting\n- intent-aware routing\n- auto-selection between plain rewrite and execution-contract modes\n- proportional structure for simple vs non-trivial tasks\n- Prompt Leverage terminology and guidance for context, constraints, verification, and done criteria\n- optional recent-conversation grounding when current chat context materially affects the rewrite\n- deterministic output normalization to strip wrappers, fences, and leading commentary\n- rewrite-then-execute flow so the command performs the task instead of stopping at the prompt\n\n## Files\n\n- `gemini-extension.json`: Gemini extension manifest and MCP server wiring\n- `GEMINI.md`: persistent extension context\n- `commands/augment.toml`: thin `/augment` command entrypoint\n- `src/`: TypeScript logic ported from `pi-augment`\n- `dist/`: compiled artifacts, including the bundled self-contained MCP runtime shipped with the extension\n\n## MCP tools\n\n- `prepare_augment_rewrite`: classifies the draft, resolves rewrite mode, captures workspace metadata, accepts optional recent conversation excerpts, and returns a deterministic rewrite specification\n- `normalize_augment_output`: strips wrappers such as `<execution_contract>`, markdown fences, and leading commentary so the final output is clean\n\n## Install\n\n```bash\ngemini extensions install https://github.com/minhtri2710/gemini-augment\n```\n\nRestart Gemini CLI or reload commands as needed.\n\n## Install for local development\n\nFrom the extension directory:\n\n```bash\ngemini extensions link .\n```\n\nRestart Gemini CLI or reload commands as needed.\n\nFor verification during development:\n\n```bash\nnpm run build\nnpm run smoke-test\n```\n\n## Release\n\nBefore cutting a version:\n\n```bash\nnpm run typecheck\nnpm run build\nnpm test\nnpm run smoke-test\n```\n\nThen update `package.json`, `gemini-extension.json`, and `CHANGELOG.md` together so the published version and release notes stay aligned.\n\nRun `npm run build` before publishing so the bundled `dist/index.js` shipped to Gemini stays in sync with the source.\n\n## Usage\n\n```text\n/augment fix the login bug where users get redirected to 404\n```\n\n```text\n/augment explain how model routing works in this codebase\n```\n\n```text\n/augment sửa lỗi redirect sau khi đăng nhập và chạy test\n```\n\nIf the current chat contains relevant context, `/augment` can use a few short recent excerpts as grounding. If the draft is already self-contained or the surrounding conversation is not relevant, the rewrite should fall back to the draft and workspace context only.\n\nWhen the draft is not in English, `/augment` should keep the original user wording as the source of truth. If needed, it may supply a short English working gloss internally via `analysisDraft` to improve intent classification and rewrite quality, but it should not replace the original draft before calling `prepare_augment_rewrite`.\n\n`/augment` now treats the normalized rewritten prompt as an internal execution instruction. In normal use, it should do the work and return the outcome rather than echoing the rewritten prompt back to the user.\n\n## How it works\n\nThe extension uses Gemini CLI custom commands plus a TypeScript MCP server:\n\n- the rewrite happens inside Gemini CLI via `/augment`\n- deterministic augmentation logic lives in TypeScript\n- the rewritten prompt is normalized and used as the execution instruction for the same turn\n- the command can include workspace context such as current directory, git branch, and short relevant conversation excerpts\n\nFor normal `/augment <draft>` usage, the extension should follow the deterministic MCP rewrite flow, then execute the normalized rewrite using the built-in Prompt Leverage guidance in `src/`.\n",
  "bytes": 4026,
  "sha": "188b9a1af577b8797ea3e2c8930c7779958e2762b54ce2e0ecf0e79646e39f2e",
  "repo_slug": "minhtri2710/gemini-augment",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_minhtri2710_gemini_augment_7812ab7d/readme"
}