-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Stage 3: Standard markdown integrations — 19 agents migrated to plugin architecture #2038
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d0df42e
Stage 3: Standard markdown integrations — 19 agents migrated to plugi…
mnriem 499ae8b
Address PR review: fix repo root detection and no-op test
mnriem 85bc4e5
Fix REPO_ROOT priority: prefer .specify walk-up over git root
mnriem a107958
Guard git call with try/catch in PowerShell scripts
mnriem 260f76e
Rename hyphenated package dirs to valid Python identifiers
mnriem 9a2cb8f
Reuse CommandRegistrar path rewriting in process_template()
mnriem 51c7063
Promote _rewrite_project_relative_paths to public API
mnriem 83e4fe1
Broaden TestRegistrarKeyAlignment to cover all integration keys
mnriem File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| """Amp CLI integration.""" | ||
|
|
||
| from ..base import MarkdownIntegration | ||
|
|
||
|
|
||
| class AmpIntegration(MarkdownIntegration): | ||
| key = "amp" | ||
| config = { | ||
| "name": "Amp", | ||
| "folder": ".agents/", | ||
| "commands_subdir": "commands", | ||
| "install_url": "https://ampcode.com/manual#install", | ||
| "requires_cli": True, | ||
| } | ||
| registrar_config = { | ||
| "dir": ".agents/commands", | ||
| "format": "markdown", | ||
| "args": "$ARGUMENTS", | ||
| "extension": ".md", | ||
| } | ||
| context_file = "AGENTS.md" |
23 changes: 23 additions & 0 deletions
23
src/specify_cli/integrations/amp/scripts/update-context.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # update-context.ps1 — Amp integration: create/update AGENTS.md | ||
| # | ||
| # Thin wrapper that delegates to the shared update-agent-context script. | ||
| # Activated in Stage 7 when the shared script uses integration.json dispatch. | ||
| # | ||
| # Until then, this delegates to the shared script as a subprocess. | ||
|
|
||
| $ErrorActionPreference = 'Stop' | ||
|
|
||
| # Derive repo root from script location (walks up to find .specify/) | ||
| $scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition | ||
| $repoRoot = try { git rev-parse --show-toplevel 2>$null } catch { $null } | ||
| # If git did not return a repo root, or the git root does not contain .specify, | ||
| # fall back to walking up from the script directory to find the initialized project root. | ||
| if (-not $repoRoot -or -not (Test-Path (Join-Path $repoRoot '.specify'))) { | ||
| $repoRoot = $scriptDir | ||
| $fsRoot = [System.IO.Path]::GetPathRoot($repoRoot) | ||
| while ($repoRoot -and $repoRoot -ne $fsRoot -and -not (Test-Path (Join-Path $repoRoot '.specify'))) { | ||
| $repoRoot = Split-Path -Parent $repoRoot | ||
| } | ||
| } | ||
|
|
||
| & "$repoRoot/.specify/scripts/powershell/update-agent-context.ps1" -AgentType amp |
28 changes: 28 additions & 0 deletions
28
src/specify_cli/integrations/amp/scripts/update-context.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #!/usr/bin/env bash | ||
| # update-context.sh — Amp integration: create/update AGENTS.md | ||
| # | ||
| # Thin wrapper that delegates to the shared update-agent-context script. | ||
| # Activated in Stage 7 when the shared script uses integration.json dispatch. | ||
| # | ||
| # Until then, this delegates to the shared script as a subprocess. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| # Derive repo root from script location (walks up to find .specify/) | ||
| _script_dir="$(cd "$(dirname "$0")" && pwd)" | ||
| _root="$_script_dir" | ||
| while [ "$_root" != "/" ] && [ ! -d "$_root/.specify" ]; do _root="$(dirname "$_root")"; done | ||
| if [ -z "${REPO_ROOT:-}" ]; then | ||
| if [ -d "$_root/.specify" ]; then | ||
| REPO_ROOT="$_root" | ||
| else | ||
| git_root="$(git rev-parse --show-toplevel 2>/dev/null || true)" | ||
| if [ -n "$git_root" ] && [ -d "$git_root/.specify" ]; then | ||
| REPO_ROOT="$git_root" | ||
| else | ||
| REPO_ROOT="$_root" | ||
| fi | ||
| fi | ||
| fi | ||
|
|
||
| exec "$REPO_ROOT/.specify/scripts/bash/update-agent-context.sh" amp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| """Auggie CLI integration.""" | ||
|
|
||
| from ..base import MarkdownIntegration | ||
|
|
||
|
|
||
| class AuggieIntegration(MarkdownIntegration): | ||
| key = "auggie" | ||
| config = { | ||
| "name": "Auggie CLI", | ||
| "folder": ".augment/", | ||
| "commands_subdir": "commands", | ||
| "install_url": "https://docs.augmentcode.com/cli/setup-auggie/install-auggie-cli", | ||
| "requires_cli": True, | ||
| } | ||
| registrar_config = { | ||
| "dir": ".augment/commands", | ||
| "format": "markdown", | ||
| "args": "$ARGUMENTS", | ||
| "extension": ".md", | ||
| } | ||
| context_file = ".augment/rules/specify-rules.md" |
23 changes: 23 additions & 0 deletions
23
src/specify_cli/integrations/auggie/scripts/update-context.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # update-context.ps1 — Auggie CLI integration: create/update .augment/rules/specify-rules.md | ||
| # | ||
| # Thin wrapper that delegates to the shared update-agent-context script. | ||
| # Activated in Stage 7 when the shared script uses integration.json dispatch. | ||
| # | ||
| # Until then, this delegates to the shared script as a subprocess. | ||
|
|
||
| $ErrorActionPreference = 'Stop' | ||
|
|
||
| # Derive repo root from script location (walks up to find .specify/) | ||
| $scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition | ||
| $repoRoot = try { git rev-parse --show-toplevel 2>$null } catch { $null } | ||
| # If git did not return a repo root, or the git root does not contain .specify, | ||
| # fall back to walking up from the script directory to find the initialized project root. | ||
| if (-not $repoRoot -or -not (Test-Path (Join-Path $repoRoot '.specify'))) { | ||
| $repoRoot = $scriptDir | ||
| $fsRoot = [System.IO.Path]::GetPathRoot($repoRoot) | ||
| while ($repoRoot -and $repoRoot -ne $fsRoot -and -not (Test-Path (Join-Path $repoRoot '.specify'))) { | ||
| $repoRoot = Split-Path -Parent $repoRoot | ||
| } | ||
| } | ||
|
|
||
| & "$repoRoot/.specify/scripts/powershell/update-agent-context.ps1" -AgentType auggie |
28 changes: 28 additions & 0 deletions
28
src/specify_cli/integrations/auggie/scripts/update-context.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #!/usr/bin/env bash | ||
| # update-context.sh — Auggie CLI integration: create/update .augment/rules/specify-rules.md | ||
| # | ||
| # Thin wrapper that delegates to the shared update-agent-context script. | ||
| # Activated in Stage 7 when the shared script uses integration.json dispatch. | ||
| # | ||
| # Until then, this delegates to the shared script as a subprocess. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| # Derive repo root from script location (walks up to find .specify/) | ||
| _script_dir="$(cd "$(dirname "$0")" && pwd)" | ||
| _root="$_script_dir" | ||
| while [ "$_root" != "/" ] && [ ! -d "$_root/.specify" ]; do _root="$(dirname "$_root")"; done | ||
| if [ -z "${REPO_ROOT:-}" ]; then | ||
| if [ -d "$_root/.specify" ]; then | ||
| REPO_ROOT="$_root" | ||
| else | ||
| git_root="$(git rev-parse --show-toplevel 2>/dev/null || true)" | ||
| if [ -n "$git_root" ] && [ -d "$git_root/.specify" ]; then | ||
| REPO_ROOT="$git_root" | ||
| else | ||
| REPO_ROOT="$_root" | ||
| fi | ||
| fi | ||
| fi | ||
|
|
||
| exec "$REPO_ROOT/.specify/scripts/bash/update-agent-context.sh" auggie |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.