diff --git a/README.ja-JP.md b/README.ja-JP.md index db5329396..e3617e03b 100644 --- a/README.ja-JP.md +++ b/README.ja-JP.md @@ -4,7 +4,7 @@ [English](README.md) · [Português](README.pt-BR.md) · [简体中文](README.zh-CN.md) · **日本語** -**Claude Code、OpenCode、Gemini CLI、Codex、Copilot、Antigravity向けの軽量かつ強力なメタプロンプティング、コンテキストエンジニアリング、仕様駆動開発システム。** +**Claude Code、OpenCode、Gemini CLI、Codex、Copilot、Cursor、Windsurf、Antigravity、Augment向けの軽量かつ強力なメタプロンプティング、コンテキストエンジニアリング、仕様駆動開発システム。** **コンテキストロット(Claudeがコンテキストウィンドウを消費するにつれ品質が劣化する現象)を解決します。** diff --git a/README.ko-KR.md b/README.ko-KR.md index 23419e7ec..33eda0627 100644 --- a/README.ko-KR.md +++ b/README.ko-KR.md @@ -4,7 +4,7 @@ [English](README.md) · [Português](README.pt-BR.md) · [简体中文](README.zh-CN.md) · [日本語](README.ja-JP.md) · **한국어** -**Claude Code, OpenCode, Gemini CLI, Codex, Copilot, Cursor, Antigravity를 위한 가볍고 강력한 메타 프롬프팅, 컨텍스트 엔지니어링, 스펙 기반 개발 시스템.** +**Claude Code, OpenCode, Gemini CLI, Codex, Copilot, Cursor, Windsurf, Antigravity, Augment를 위한 가볍고 강력한 메타 프롬프팅, 컨텍스트 엔지니어링, 스펙 기반 개발 시스템.** **컨텍스트 rot를 해결합니다 — Claude의 컨텍스트 창이 채워질수록 품질이 저하되는 문제.** diff --git a/README.md b/README.md index ea29635e9..e870da27c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **English** · [Português](README.pt-BR.md) · [简体中文](README.zh-CN.md) · [日本語](README.ja-JP.md) · [한국어](README.ko-KR.md) -**A light-weight and powerful meta-prompting, context engineering and spec-driven development system for Claude Code, OpenCode, Gemini CLI, Codex, Copilot, Cursor, Windsurf, and Antigravity.** +**A light-weight and powerful meta-prompting, context engineering and spec-driven development system for Claude Code, OpenCode, Gemini CLI, Codex, Copilot, Cursor, Windsurf, Antigravity, and Augment.** **Solves context rot — the quality degradation that happens as Claude fills its context window.** @@ -84,15 +84,13 @@ npx get-shit-done-cc@latest ``` The installer prompts you to choose: -1. **Runtime** — Claude Code, OpenCode, Gemini, Codex, Copilot, Cursor, Windsurf, Antigravity, or all (interactive multi-select — pick multiple runtimes in a single install session) +1. **Runtime** — Claude Code, OpenCode, Gemini, Codex, Copilot, Cursor, Windsurf, Antigravity, Augment, or all (interactive multi-select — pick multiple runtimes in a single install session) 2. **Location** — Global (all projects) or local (current project only) Verify with: -- Claude Code / Gemini: `/gsd:help` -- OpenCode: `/gsd-help` +- Claude Code / Gemini / Copilot / Antigravity: `/gsd:help` +- OpenCode / Augment: `/gsd-help` - Codex: `$gsd-help` -- Copilot: `/gsd:help` -- Antigravity: `/gsd:help` > [!NOTE] > Claude Code 2.1.88+ and Codex install as skills (`skills/gsd-*/SKILL.md`). Older Claude Code versions use `commands/gsd/`. The installer handles this automatically. diff --git a/README.pt-BR.md b/README.pt-BR.md index bd2603b8a..01405c511 100644 --- a/README.pt-BR.md +++ b/README.pt-BR.md @@ -4,7 +4,7 @@ [English](README.md) · **Português** · [简体中文](README.zh-CN.md) · [日本語](README.ja-JP.md) -**Um sistema leve e poderoso de meta-prompting, engenharia de contexto e desenvolvimento orientado a especificação para Claude Code, OpenCode, Gemini CLI, Codex, Copilot, Cursor e Antigravity.** +**Um sistema leve e poderoso de meta-prompting, engenharia de contexto e desenvolvimento orientado a especificação para Claude Code, OpenCode, Gemini CLI, Codex, Copilot, Cursor, Windsurf, Antigravity e Augment.** **Resolve context rot — a degradação de qualidade que acontece conforme o Claude enche a janela de contexto.** diff --git a/bin/install.js b/bin/install.js index fef57a808..a17382dd2 100755 --- a/bin/install.js +++ b/bin/install.js @@ -67,6 +67,7 @@ const hasCopilot = args.includes('--copilot'); const hasAntigravity = args.includes('--antigravity'); const hasCursor = args.includes('--cursor'); const hasWindsurf = args.includes('--windsurf'); +const hasAugment = args.includes('--augment'); const hasSdk = args.includes('--sdk'); const hasBoth = args.includes('--both'); // Legacy flag, keeps working const hasAll = args.includes('--all'); @@ -75,7 +76,7 @@ const hasUninstall = args.includes('--uninstall') || args.includes('-u'); // Runtime selection - can be set by flags or interactive prompt let selectedRuntimes = []; if (hasAll) { - selectedRuntimes = ['claude', 'opencode', 'gemini', 'codex', 'copilot', 'antigravity', 'cursor', 'windsurf']; + selectedRuntimes = ['claude', 'opencode', 'gemini', 'codex', 'copilot', 'antigravity', 'cursor', 'windsurf', 'augment']; } else if (hasBoth) { selectedRuntimes = ['claude', 'opencode']; } else { @@ -87,6 +88,7 @@ if (hasAll) { if (hasAntigravity) selectedRuntimes.push('antigravity'); if (hasCursor) selectedRuntimes.push('cursor'); if (hasWindsurf) selectedRuntimes.push('windsurf'); + if (hasAugment) selectedRuntimes.push('augment'); } // WSL + Windows Node.js detection @@ -132,6 +134,7 @@ function getDirName(runtime) { if (runtime === 'antigravity') return '.agent'; if (runtime === 'cursor') return '.cursor'; if (runtime === 'windsurf') return '.windsurf'; + if (runtime === 'augment') return '.augment'; return '.claude'; } @@ -161,6 +164,7 @@ function getConfigDirFromHome(runtime, isGlobal) { } if (runtime === 'cursor') return "'.cursor'"; if (runtime === 'windsurf') return "'.windsurf'"; + if (runtime === 'augment') return "'.augment'"; return "'.claude'"; } @@ -269,6 +273,16 @@ function getGlobalDir(runtime, explicitDir = null) { return path.join(os.homedir(), '.windsurf'); } + if (runtime === 'augment') { + // Augment: --config-dir > AUGMENT_CONFIG_DIR > ~/.augment + if (explicitDir) { + return expandTilde(explicitDir); + } + if (process.env.AUGMENT_CONFIG_DIR) { + return expandTilde(process.env.AUGMENT_CONFIG_DIR); + } + return path.join(os.homedir(), '.augment'); + } // Claude Code: --config-dir > CLAUDE_CONFIG_DIR > ~/.claude if (explicitDir) { @@ -290,7 +304,7 @@ const banner = '\n' + '\n' + ' Get Shit Done ' + dim + 'v' + pkg.version + reset + '\n' + ' A meta-prompting, context engineering and spec-driven\n' + - ' development system for Claude Code, OpenCode, Gemini, Codex, Copilot, Antigravity, Cursor, and Windsurf by TÂCHES.\n'; + ' development system for Claude Code, OpenCode, Gemini, Codex, Copilot, Antigravity, Cursor, Windsurf, and Augment by TÂCHES.\n'; // Parse --config-dir argument function parseConfigDirArg() { @@ -328,7 +342,8 @@ if (hasUninstall) { // Show help if requested if (hasHelp) { - console.log(` ${yellow}Usage:${reset} npx get-shit-done-cc [options]\n\n ${yellow}Options:${reset}\n ${cyan}-g, --global${reset} Install globally (to config directory)\n ${cyan}-l, --local${reset} Install locally (to current directory)\n ${cyan}--claude${reset} Install for Claude Code only\n ${cyan}--opencode${reset} Install for OpenCode only\n ${cyan}--gemini${reset} Install for Gemini only\n ${cyan}--codex${reset} Install for Codex only\n ${cyan}--copilot${reset} Install for Copilot only\n ${cyan}--antigravity${reset} Install for Antigravity only\n ${cyan}--cursor${reset} Install for Cursor only\n ${cyan}--windsurf${reset} Install for Windsurf only\n ${cyan}--all${reset} Install for all runtimes\n ${cyan}--sdk${reset} Also install GSD SDK CLI (gsd-sdk)\n ${cyan}-u, --uninstall${reset} Uninstall GSD (remove all GSD files)\n ${cyan}-c, --config-dir ${reset} Specify custom config directory\n ${cyan}-h, --help${reset} Show this help message\n ${cyan}--force-statusline${reset} Replace existing statusline config\n\n ${yellow}Examples:${reset}\n ${dim}# Interactive install (prompts for runtime and location)${reset}\n npx get-shit-done-cc\n\n ${dim}# Install for Claude Code globally${reset}\n npx get-shit-done-cc --claude --global\n\n ${dim}# Install for Gemini globally${reset}\n npx get-shit-done-cc --gemini --global\n\n ${dim}# Install for Codex globally${reset}\n npx get-shit-done-cc --codex --global\n\n ${dim}# Install for Copilot globally${reset}\n npx get-shit-done-cc --copilot --global\n\n ${dim}# Install for Copilot locally${reset}\n npx get-shit-done-cc --copilot --local\n\n ${dim}# Install for Antigravity globally${reset}\n npx get-shit-done-cc --antigravity --global\n\n ${dim}# Install for Antigravity locally${reset}\n npx get-shit-done-cc --antigravity --local\n\n ${dim}# Install for Cursor globally${reset}\n npx get-shit-done-cc --cursor --global\n\n ${dim}# Install for Cursor locally${reset}\n npx get-shit-done-cc --cursor --local\n\n ${dim}# Install for Windsurf globally${reset}\n npx get-shit-done-cc --windsurf --global\n\n ${dim}# Install for Windsurf locally${reset}\n npx get-shit-done-cc --windsurf --local\n\n ${dim}# Install for all runtimes globally${reset}\n npx get-shit-done-cc --all --global\n\n ${dim}# Install to custom config directory${reset}\n npx get-shit-done-cc --codex --global --config-dir ~/.codex-work\n\n ${dim}# Install to current project only${reset}\n npx get-shit-done-cc --claude --local\n\n ${dim}# Uninstall GSD from Cursor globally${reset}\n npx get-shit-done-cc --cursor --global --uninstall\n\n ${yellow}Notes:${reset}\n The --config-dir option is useful when you have multiple configurations.\n It takes priority over CLAUDE_CONFIG_DIR / GEMINI_CONFIG_DIR / CODEX_HOME / COPILOT_CONFIG_DIR / ANTIGRAVITY_CONFIG_DIR / CURSOR_CONFIG_DIR / WINDSURF_CONFIG_DIR environment variables.\n`); + console.log(` ${yellow}Usage:${reset} npx get-shit-done-cc [options]\n\n ${yellow}Options:${reset}\n ${cyan}-g, --global${reset} Install globally (to config directory)\n ${cyan}-l, --local${reset} Install locally (to current directory)\n ${cyan}--claude${reset} Install for Claude Code only\n ${cyan}--opencode${reset} Install for OpenCode only\n ${cyan}--gemini${reset} Install for Gemini only\n ${cyan}--codex${reset} Install for Codex only\n ${cyan}--copilot${reset} Install for Copilot only\n ${cyan}--antigravity${reset} Install for Antigravity only\n ${cyan}--cursor${reset} Install for Cursor only\n ${cyan}--windsurf${reset} Install for Windsurf only + ${cyan}--augment${reset} Install for Augment only\n ${cyan}--all${reset} Install for all runtimes\n ${cyan}--sdk${reset} Also install GSD SDK CLI (gsd-sdk)\n ${cyan}-u, --uninstall${reset} Uninstall GSD (remove all GSD files)\n ${cyan}-c, --config-dir ${reset} Specify custom config directory\n ${cyan}-h, --help${reset} Show this help message\n ${cyan}--force-statusline${reset} Replace existing statusline config\n\n ${yellow}Examples:${reset}\n ${dim}# Interactive install (prompts for runtime and location)${reset}\n npx get-shit-done-cc\n\n ${dim}# Install for Claude Code globally${reset}\n npx get-shit-done-cc --claude --global\n\n ${dim}# Install for Gemini globally${reset}\n npx get-shit-done-cc --gemini --global\n\n ${dim}# Install for Codex globally${reset}\n npx get-shit-done-cc --codex --global\n\n ${dim}# Install for Copilot globally${reset}\n npx get-shit-done-cc --copilot --global\n\n ${dim}# Install for Copilot locally${reset}\n npx get-shit-done-cc --copilot --local\n\n ${dim}# Install for Antigravity globally${reset}\n npx get-shit-done-cc --antigravity --global\n\n ${dim}# Install for Antigravity locally${reset}\n npx get-shit-done-cc --antigravity --local\n\n ${dim}# Install for Cursor globally${reset}\n npx get-shit-done-cc --cursor --global\n\n ${dim}# Install for Cursor locally${reset}\n npx get-shit-done-cc --cursor --local\n\n ${dim}# Install for Windsurf globally${reset}\n npx get-shit-done-cc --windsurf --global\n\n ${dim}# Install for Windsurf locally${reset}\n npx get-shit-done-cc --windsurf --local\n\n ${dim}# Install for all runtimes globally${reset}\n npx get-shit-done-cc --all --global\n\n ${dim}# Install to custom config directory${reset}\n npx get-shit-done-cc --codex --global --config-dir ~/.codex-work\n\n ${dim}# Install to current project only${reset}\n npx get-shit-done-cc --claude --local\n\n ${dim}# Uninstall GSD from Cursor globally${reset}\n npx get-shit-done-cc --cursor --global --uninstall\n\n ${yellow}Notes:${reset}\n The --config-dir option is useful when you have multiple configurations.\n It takes priority over CLAUDE_CONFIG_DIR / GEMINI_CONFIG_DIR / CODEX_HOME / COPILOT_CONFIG_DIR / ANTIGRAVITY_CONFIG_DIR / CURSOR_CONFIG_DIR / WINDSURF_CONFIG_DIR / AUGMENT_CONFIG_DIR environment variables.\n`); process.exit(0); } @@ -1093,6 +1108,189 @@ function convertClaudeAgentToWindsurfAgent(content) { return `${cleanFrontmatter}\n${body}`; } +// --- Augment converters --- +// Augment (auggie CLI) uses a tool set similar to Cursor/Windsurf (VS Code-based). +// Config lives in .augment/ (local) and ~/.augment/ (global). + +const claudeToAugmentTools = { + Bash: 'launch-process', + Edit: 'str-replace-editor', + AskUserQuestion: null, + SlashCommand: null, + TodoWrite: 'add_tasks', +}; + +function convertAugmentToolName(claudeTool) { + if (claudeTool in claudeToAugmentTools) { + return claudeToAugmentTools[claudeTool]; + } + if (claudeTool.startsWith('mcp__')) { + return claudeTool; + } + const toolMapping = { + Read: 'view', + Write: 'save-file', + Glob: 'view', + Grep: 'grep', + Task: null, + WebSearch: 'web-search', + WebFetch: 'web-fetch', + }; + return toolMapping[claudeTool] || claudeTool; +} + +function convertSlashCommandsToAugmentSkillMentions(content) { + return content.replace(/gsd:/gi, 'gsd-'); +} + +function convertClaudeToAugmentMarkdown(content) { + let converted = convertSlashCommandsToAugmentSkillMentions(content); + converted = converted.replace(/\bBash\(/g, 'launch-process('); + converted = converted.replace(/\bEdit\(/g, 'str-replace-editor('); + converted = converted.replace(/\bRead\(/g, 'view('); + converted = converted.replace(/\bWrite\(/g, 'save-file('); + converted = converted.replace(/\bTodoWrite\(/g, 'add_tasks('); + converted = converted.replace(/\bAskUserQuestion\b/g, 'conversational prompting'); + // Replace subagent_type from Claude to Augment format + converted = converted.replace(/subagent_type="general-purpose"/g, 'subagent_type="generalPurpose"'); + converted = converted.replace(/\$ARGUMENTS\b/g, '{{GSD_ARGS}}'); + // Replace project-level Claude conventions with Augment equivalents + converted = converted.replace(/`\.\/CLAUDE\.md`/g, '`.augment/rules/`'); + converted = converted.replace(/\.\/CLAUDE\.md/g, '.augment/rules/'); + converted = converted.replace(/`CLAUDE\.md`/g, '`.augment/rules/`'); + converted = converted.replace(/\bCLAUDE\.md\b/g, '.augment/rules/'); + converted = converted.replace(/\.claude\/skills\//g, '.augment/skills/'); + // Remove Claude Code-specific bug workarounds before brand replacement + converted = converted.replace(/\*\*Known Claude Code bug \(classifyHandoffIfNeeded\):\*\*[^\n]*\n/g, ''); + converted = converted.replace(/- \*\*classifyHandoffIfNeeded false failure:\*\*[^\n]*\n/g, ''); + // Replace "Claude Code" brand references with "Augment" + converted = converted.replace(/\bClaude Code\b/g, 'Augment'); + return converted; +} + +function getAugmentSkillAdapterHeader(skillName) { + return ` +## A. Skill Invocation +- This skill is invoked when the user mentions \`${skillName}\` or describes a task matching this skill. +- Treat all user text after the skill mention as \`{{GSD_ARGS}}\`. +- If no arguments are present, treat \`{{GSD_ARGS}}\` as empty. + +## B. User Prompting +When the workflow needs user input, prompt the user conversationally: +- Present options as a numbered list in your response text +- Ask the user to reply with their choice +- For multi-select, ask for comma-separated numbers + +## C. Tool Usage +Use these Augment tools when executing GSD workflows: +- \`launch-process\` for running commands (terminal operations) +- \`str-replace-editor\` for editing existing files +- \`view\` for reading files and listing directories +- \`save-file\` for creating new files +- \`grep\` for searching code (or use MCP servers for advanced search) +- \`web-search\`, \`web-fetch\` for web queries +- \`add_tasks\`, \`view_tasklist\`, \`update_tasks\` for task management + +## D. Subagent Spawning +When the workflow needs to spawn a subagent: +- Use the built-in subagent spawning capability +- Define agent prompts in \`.augment/agents/\` directory +`; +} + +function convertClaudeCommandToAugmentSkill(content, skillName) { + const converted = convertClaudeToAugmentMarkdown(content); + const { frontmatter, body } = extractFrontmatterAndBody(converted); + let description = `Run GSD workflow ${skillName}.`; + if (frontmatter) { + const maybeDescription = extractFrontmatterField(frontmatter, 'description'); + if (maybeDescription) { + description = maybeDescription; + } + } + description = toSingleLine(description); + const shortDescription = description.length > 180 ? `${description.slice(0, 177)}...` : description; + const adapter = getAugmentSkillAdapterHeader(skillName); + + return `---\nname: ${yamlIdentifier(skillName)}\ndescription: ${yamlQuote(shortDescription)}\n---\n\n${adapter}\n\n${body.trimStart()}`; +} + +/** + * Convert Claude Code agent markdown to Augment agent format. + * Strips frontmatter fields Augment doesn't support (color, skills), + * converts tool references, and cleans up for Augment agents. + */ +function convertClaudeAgentToAugmentAgent(content) { + let converted = convertClaudeToAugmentMarkdown(content); + + const { frontmatter, body } = extractFrontmatterAndBody(converted); + if (!frontmatter) return converted; + + const name = extractFrontmatterField(frontmatter, 'name') || 'unknown'; + const description = extractFrontmatterField(frontmatter, 'description') || ''; + + const cleanFrontmatter = `---\nname: ${yamlIdentifier(name)}\ndescription: ${yamlQuote(toSingleLine(description))}\n---`; + + return `${cleanFrontmatter}\n${body}`; +} + +/** + * Copy Claude commands as Augment skills — one folder per skill with SKILL.md. + * Mirrors copyCommandsAsCursorSkills but uses Augment converters. + */ +function copyCommandsAsAugmentSkills(srcDir, skillsDir, prefix, pathPrefix, runtime) { + if (!fs.existsSync(srcDir)) { + return; + } + + fs.mkdirSync(skillsDir, { recursive: true }); + + // Remove previous GSD Augment skills to avoid stale command skills + const existing = fs.readdirSync(skillsDir, { withFileTypes: true }); + for (const entry of existing) { + if (entry.isDirectory() && entry.name.startsWith(`${prefix}-`)) { + fs.rmSync(path.join(skillsDir, entry.name), { recursive: true }); + } + } + + function recurse(currentSrcDir, currentPrefix) { + const entries = fs.readdirSync(currentSrcDir, { withFileTypes: true }); + + for (const entry of entries) { + const srcPath = path.join(currentSrcDir, entry.name); + if (entry.isDirectory()) { + recurse(srcPath, `${currentPrefix}-${entry.name}`); + continue; + } + + if (!entry.name.endsWith('.md')) { + continue; + } + + const baseName = entry.name.replace('.md', ''); + const skillName = `${currentPrefix}-${baseName}`; + const skillDir = path.join(skillsDir, skillName); + fs.mkdirSync(skillDir, { recursive: true }); + + let content = fs.readFileSync(srcPath, 'utf8'); + const globalClaudeRegex = /~\/\.claude\//g; + const globalClaudeHomeRegex = /\$HOME\/\.claude\//g; + const localClaudeRegex = /\.\/\.claude\//g; + const augmentDirRegex = /~\/\.augment\//g; + content = content.replace(globalClaudeRegex, pathPrefix); + content = content.replace(globalClaudeHomeRegex, pathPrefix); + content = content.replace(localClaudeRegex, `./${getDirName(runtime)}/`); + content = content.replace(augmentDirRegex, pathPrefix); + content = processAttribution(content, getCommitAttribution(runtime)); + content = convertClaudeCommandToAugmentSkill(content, skillName); + + fs.writeFileSync(path.join(skillDir, 'SKILL.md'), content); + } + } + + recurse(srcDir, prefix); +} + function convertSlashCommandsToCodexSkillMentions(content) { let converted = content.replace(/\/gsd:([a-z0-9-]+)/gi, (_, commandName) => { return `$gsd-${String(commandName).toLowerCase()}`; @@ -3199,6 +3397,7 @@ function copyWithPathReplacement(srcDir, destDir, pathPrefix, runtime, isCommand const isAntigravity = runtime === 'antigravity'; const isCursor = runtime === 'cursor'; const isWindsurf = runtime === 'windsurf'; + const isAugment = runtime === 'augment'; const dirName = getDirName(runtime); // Clean install: remove existing destination to prevent orphaned files @@ -3464,6 +3663,7 @@ function uninstall(isGlobal, runtime = 'claude') { const isAntigravity = runtime === 'antigravity'; const isCursor = runtime === 'cursor'; const isWindsurf = runtime === 'windsurf'; + const isAugment = runtime === 'augment'; const dirName = getDirName(runtime); // Get the target directory based on runtime and install type @@ -3483,6 +3683,7 @@ function uninstall(isGlobal, runtime = 'claude') { if (runtime === 'antigravity') runtimeLabel = 'Antigravity'; if (runtime === 'cursor') runtimeLabel = 'Cursor'; if (runtime === 'windsurf') runtimeLabel = 'Windsurf'; + if (runtime === 'augment') runtimeLabel = 'Augment'; console.log(` Uninstalling GSD from ${cyan}${runtimeLabel}${reset} at ${cyan}${locationLabel}${reset}\n`); @@ -4321,6 +4522,7 @@ function install(isGlobal, runtime = 'claude') { const isAntigravity = runtime === 'antigravity'; const isCursor = runtime === 'cursor'; const isWindsurf = runtime === 'windsurf'; + const isAugment = runtime === 'augment'; const dirName = getDirName(runtime); const src = path.join(__dirname, '..'); @@ -4352,6 +4554,7 @@ function install(isGlobal, runtime = 'claude') { if (isAntigravity) runtimeLabel = 'Antigravity'; if (isCursor) runtimeLabel = 'Cursor'; if (isWindsurf) runtimeLabel = 'Windsurf'; + if (isAugment) runtimeLabel = 'Augment'; console.log(` Installing for ${cyan}${runtimeLabel}${reset} to ${cyan}${locationLabel}${reset}\n`); @@ -4439,11 +4642,19 @@ function install(isGlobal, runtime = 'claude') { } else { failures.push('skills/gsd-*'); } + } else if (isAugment) { + const skillsDir = path.join(targetDir, 'skills'); + const gsdSrc = path.join(src, 'commands', 'gsd'); + copyCommandsAsAugmentSkills(gsdSrc, skillsDir, 'gsd', pathPrefix, runtime); + const installedSkillNames = listCodexSkillNames(skillsDir); + if (installedSkillNames.length > 0) { + console.log(` ${green}✓${reset} Installed ${installedSkillNames.length} skills to skills/`); + } else { + failures.push('skills/gsd-*'); + } } else if (isGemini) { - // Gemini: nested structure in commands/ directory (still supported) const commandsDir = path.join(targetDir, 'commands'); fs.mkdirSync(commandsDir, { recursive: true }); - const gsdSrc = path.join(src, 'commands', 'gsd'); const gsdDest = path.join(commandsDir, 'gsd'); copyWithPathReplacement(gsdSrc, gsdDest, pathPrefix, runtime, true, isGlobal); @@ -4530,6 +4741,8 @@ function install(isGlobal, runtime = 'claude') { content = convertClaudeAgentToCursorAgent(content); } else if (isWindsurf) { content = convertClaudeAgentToWindsurfAgent(content); + } else if (isAugment) { + content = convertClaudeAgentToAugmentAgent(content); } const destName = isCopilot ? entry.name.replace('.md', '.agent.md') : entry.name; fs.writeFileSync(path.join(agentsDest, destName), content); @@ -5142,9 +5355,10 @@ function promptRuntime(callback) { '5': 'copilot', '6': 'antigravity', '7': 'cursor', - '8': 'windsurf' + '8': 'windsurf', + '9': 'augment' }; - const allRuntimes = ['claude', 'opencode', 'gemini', 'codex', 'copilot', 'antigravity', 'cursor', 'windsurf']; + const allRuntimes = ['claude', 'opencode', 'gemini', 'codex', 'copilot', 'antigravity', 'cursor', 'windsurf', 'augment']; console.log(` ${yellow}Which runtime(s) would you like to install for?${reset}\n\n ${cyan}1${reset}) Claude Code ${dim}(~/.claude)${reset} ${cyan}2${reset}) OpenCode ${dim}(~/.config/opencode)${reset} - open source, free models @@ -5154,7 +5368,8 @@ function promptRuntime(callback) { ${cyan}6${reset}) Antigravity ${dim}(~/.gemini/antigravity)${reset} ${cyan}7${reset}) Cursor ${dim}(~/.cursor)${reset} ${cyan}8${reset}) Windsurf ${dim}(~/.windsurf)${reset} - ${cyan}9${reset}) All + ${cyan}9${reset}) Augment ${dim}(~/.augment)${reset} + ${cyan}10${reset}) All ${dim}Select multiple: 1,4,6 or 1 4 6${reset} `); @@ -5165,7 +5380,7 @@ function promptRuntime(callback) { const input = answer.trim() || '1'; // "All" shortcut - if (input === '9') { + if (input === '10') { callback(allRuntimes); return; } @@ -5323,6 +5538,10 @@ if (process.env.GSD_TEST_MODE) { convertClaudeCommandToWindsurfSkill, convertClaudeAgentToWindsurfAgent, copyCommandsAsWindsurfSkills, + convertClaudeToAugmentMarkdown, + convertClaudeCommandToAugmentSkill, + convertClaudeAgentToAugmentAgent, + copyCommandsAsAugmentSkills, writeManifest, reportLocalPatches, validateHookFields, diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index e8ca6f118..28a9eeda4 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -2,7 +2,7 @@ # GET SHIT DONE -**一个轻量级且强大的元提示、上下文工程和规格驱动开发系统,支持 Claude Code、OpenCode、Gemini CLI 和 Codex。** +**一个轻量级且强大的元提示、上下文工程和规格驱动开发系统,支持 Claude Code、OpenCode、Gemini CLI、Codex、Copilot、Cursor、Windsurf、Antigravity 和 Augment。** **解决上下文衰减 —— 即 Claude 填充上下文窗口时发生的质量退化问题。** diff --git a/tests/augment-conversion.test.cjs b/tests/augment-conversion.test.cjs new file mode 100644 index 000000000..7f810b323 --- /dev/null +++ b/tests/augment-conversion.test.cjs @@ -0,0 +1,171 @@ +/** + * Augment conversion regression tests. + * + * Ensures Augment frontmatter names are emitted as plain identifiers + * (without surrounding quotes), so Augment does not treat quotes as + * literal parts of skill/subagent names. + */ + +process.env.GSD_TEST_MODE = '1'; + +const { describe, test } = require('node:test'); +const assert = require('node:assert'); + +const { + convertClaudeCommandToAugmentSkill, + convertClaudeAgentToAugmentAgent, + convertClaudeToAugmentMarkdown, +} = require('../bin/install.js'); + +describe('convertClaudeCommandToAugmentSkill', () => { + test('writes unquoted Augment skill name in frontmatter', () => { + const input = `--- +name: quick +description: Execute a quick task +--- + + +Test body + +`; + + const result = convertClaudeCommandToAugmentSkill(input, 'gsd-quick'); + const nameMatch = result.match(/^name:\s*(.+)$/m); + + assert.ok(nameMatch, 'frontmatter contains name field'); + assert.strictEqual(nameMatch[1], 'gsd-quick', 'skill name is plain scalar'); + assert.ok(!result.includes('name: "gsd-quick"'), 'quoted skill name is not emitted'); + }); + + test('preserves slash for slash commands in markdown body', () => { + const input = `--- +name: gsd:plan-phase +description: Plan a phase +--- + +Next: +/gsd:execute-phase 17 +/gsd-help +gsd:progress +`; + + const result = convertClaudeCommandToAugmentSkill(input, 'gsd-plan-phase'); + // Slash commands: /gsd:execute-phase -> /gsd-execute-phase + assert.ok(result.includes('/gsd-execute-phase 17'), 'slash command gsd: -> gsd-'); + assert.ok(result.includes('/gsd-help'), '/gsd-help preserved'); + assert.ok(result.includes('gsd-progress'), 'bare gsd: -> gsd-'); + }); + + test('includes augment_skill_adapter block', () => { + const input = `--- +name: test +description: A test skill +--- + +Body content. +`; + + const result = convertClaudeCommandToAugmentSkill(input, 'gsd-test'); + assert.ok(result.includes(''), 'adapter header present'); + assert.ok(result.includes(''), 'adapter footer present'); + assert.ok(result.includes('launch-process'), 'launch-process tool mentioned'); + assert.ok(result.includes('str-replace-editor'), 'str-replace-editor tool mentioned'); + }); + + test('converts tool names to Augment format', () => { + const input = `--- +name: test +description: Test +--- + +Use Bash() to run commands. +Use Edit() to modify files. +Use Read() to view files. +`; + + const result = convertClaudeCommandToAugmentSkill(input, 'gsd-test'); + assert.ok(result.includes('launch-process('), 'Bash converted to launch-process'); + assert.ok(result.includes('str-replace-editor('), 'Edit converted to str-replace-editor'); + assert.ok(result.includes('view('), 'Read converted to view'); + }); +}); + +describe('convertClaudeAgentToAugmentAgent', () => { + test('converts agent frontmatter with unquoted name', () => { + const input = `--- +name: gsd-bugfix +description: "Fix bugs automatically" +tools: Read, Write, Edit, Bash +color: green +--- + + +You are a bug fixer. + +`; + + const result = convertClaudeAgentToAugmentAgent(input); + const nameMatch = result.match(/^name:\s*(.+)$/m); + + assert.ok(nameMatch, 'frontmatter contains name field'); + assert.strictEqual(nameMatch[1], 'gsd-bugfix', 'agent name is plain scalar'); + assert.ok(!result.includes('name: "gsd-bugfix"'), 'quoted agent name is not emitted'); + }); + + test('removes color and skills from frontmatter', () => { + const input = `--- +name: gsd-test +description: Test agent +color: blue +skills: + - some-skill +tools: Read, Write +--- + + +Test role + +`; + + const result = convertClaudeAgentToAugmentAgent(input); + + assert.ok(result.includes('name: gsd-test'), 'name preserved'); + assert.ok(result.includes('description:'), 'description preserved'); + assert.ok(!result.includes('color:'), 'color removed'); + assert.ok(!result.includes('skills:'), 'skills removed'); + }); + + test('replaces CLAUDE.md with .augment/rules/', () => { + const input = `--- +name: gsd-test +description: Test +--- + +See CLAUDE.md for details. +`; + + const result = convertClaudeAgentToAugmentAgent(input); + assert.ok(result.includes('.augment/rules/'), 'CLAUDE.md replaced with .augment/rules/'); + assert.ok(!result.includes('CLAUDE.md'), 'CLAUDE.md reference removed'); + }); +}); + +describe('convertClaudeToAugmentMarkdown', () => { + test('replaces Claude Code with Augment', () => { + const input = 'Use Claude Code tools for this task.'; + const result = convertClaudeToAugmentMarkdown(input); + assert.strictEqual(result, 'Use Augment tools for this task.'); + }); + + test('replaces .claude/skills/ with .augment/skills/', () => { + const input = 'Check .claude/skills/ for more info.'; + const result = convertClaudeToAugmentMarkdown(input); + assert.strictEqual(result, 'Check .augment/skills/ for more info.'); + }); + + test('normalizes gsd: to gsd-', () => { + const input = 'Run /gsd:new-project for new projects.'; + const result = convertClaudeToAugmentMarkdown(input); + assert.strictEqual(result, 'Run /gsd-new-project for new projects.'); + }); +}); \ No newline at end of file diff --git a/tests/multi-runtime-select.test.cjs b/tests/multi-runtime-select.test.cjs index b277437bf..b489c2dd8 100644 --- a/tests/multi-runtime-select.test.cjs +++ b/tests/multi-runtime-select.test.cjs @@ -25,9 +25,10 @@ const runtimeMap = { '5': 'copilot', '6': 'antigravity', '7': 'cursor', - '8': 'windsurf' + '8': 'windsurf', + '9': 'augment' }; -const allRuntimes = ['claude', 'opencode', 'gemini', 'codex', 'copilot', 'antigravity', 'cursor', 'windsurf']; +const allRuntimes = ['claude', 'opencode', 'gemini', 'codex', 'copilot', 'antigravity', 'cursor', 'windsurf', 'augment']; /** * Simulate the parsing logic from promptRuntime without requiring readline. @@ -36,7 +37,7 @@ const allRuntimes = ['claude', 'opencode', 'gemini', 'codex', 'copilot', 'antigr function parseRuntimeInput(input) { input = input.trim() || '1'; - if (input === '9') { + if (input === '10') { return allRuntimes; } @@ -78,8 +79,12 @@ describe('multi-runtime selection parsing', () => { assert.deepStrictEqual(parseRuntimeInput('8'), ['windsurf']); }); - test('choice 9 returns all runtimes', () => { - assert.deepStrictEqual(parseRuntimeInput('9'), allRuntimes); + test('single choice for augment', () => { + assert.deepStrictEqual(parseRuntimeInput('9'), ['augment']); + }); + + test('choice 10 returns all runtimes', () => { + assert.deepStrictEqual(parseRuntimeInput('10'), allRuntimes); }); test('empty input defaults to claude', () => { @@ -88,13 +93,13 @@ describe('multi-runtime selection parsing', () => { }); test('invalid choices are ignored, falls back to claude if all invalid', () => { - assert.deepStrictEqual(parseRuntimeInput('10'), ['claude']); + assert.deepStrictEqual(parseRuntimeInput('11'), ['claude']); assert.deepStrictEqual(parseRuntimeInput('0'), ['claude']); assert.deepStrictEqual(parseRuntimeInput('abc'), ['claude']); }); test('invalid choices mixed with valid are filtered out', () => { - assert.deepStrictEqual(parseRuntimeInput('1,10,4'), ['claude', 'codex']); + assert.deepStrictEqual(parseRuntimeInput('1,11,4'), ['claude', 'codex']); assert.deepStrictEqual(parseRuntimeInput('abc 3 xyz'), ['gemini']); }); @@ -110,7 +115,7 @@ describe('multi-runtime selection parsing', () => { }); describe('install.js source contains multi-select support', () => { - test('runtimeMap is defined with all 8 runtimes', () => { + test('runtimeMap is defined with all 9 runtimes', () => { for (const [key, name] of Object.entries(runtimeMap)) { assert.ok( installSrc.includes(`'${key}': '${name}'`),