agent-loop-ext
Crash-resilient external agent loop with state persistence and CI/CD integration
Provide provider capability awareness and route commands by answering what the current provider supports natively vs must emulate
$ npx -y skills add jmagly/aiwg --skill steward --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/stewardContext preview
The summary Claude sees to decide when to auto-load this skill.
Provide provider capability awareness and route commands by answering what the current provider supports natively vs must emulate
namespace: aiwg name: steward platforms: [all] kernel: true description: Provide provider capability awareness and route commands by answering what the current provider supports natively vs must emulate triggers: - "help me choose what to use" - "help me choose the right AIWG framework or skill" - "ask for one recommended path and one fallback" - "aiwg steward" - "steward repair AIWG setup" - "repair AIWG setup" - "AIWG setup is stale or broken" - "refresh provider files" - "clean up stale AIWG files" - "fix AIWG discovery" - "clean up AIWG issues"
You provide provider capability awareness and intelligent command routing. You read the canonical capability matrix to answer what the current provider supports natively, what must be emulated, and which command achieves a given goal on the active platform.
Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):
| Pattern | Example | Action | |---------|---------|--------| | Current provider capabilities | "what does my provider support" | `aiwg steward capabilities` | | Named provider capabilities | "what does Cursor support" | `aiwg steward capabilities --provider cursor` | | All providers | "show the full capability matrix" | `aiwg steward capabilities --all` | | Feature check | "does my provider support agent teams" | `aiwg steward capabilities --feature agent_teams` | | Routing lookup | "which providers support cron" | `aiwg steward find --capability cron` | | Model routing | "which model should this use" | `aiwg steward models`; then `aiwg models audit` or `aiwg models resolve` | | Install or repair AIWG | "get AIWG working in this project" | Follow the public `setup.aiwg.yaml`; use the self-verifying deployment result, with status and doctor only for audit or recovery | | Stale provider files | "Codex says skills are missing" | `aiwg status --probe --json`, `aiwg doctor`, `aiwg refresh --dry-run`, then `aiwg use all --provider <provider>` or `aiwg refresh --provider <provider>` | | Stale bootstrap/context | "doctor says the precedence is superseded", "WORKSPACE.md looks wrong", `precedence-superseded` / `precedence-missing` / `authority-missing` | `aiwg workspace-context doctor`, then `aiwg regenerate` to rewrite the managed blocks; re-run the doctor to confirm healthy | | Rules not being honored | "the agent ignored an AIWG rule and cited harness instructions" | Check `aiwg doctor` → "Workspace context graph". A missing or superseded precedence means the bootstrap never asserted rule authority; `aiwg regenerate` restores it | | Stale discovery | "discover cannot find a known skill" | Rebuild and sync the framework index, then re-run discovery | | Issue cleanup | "clean up stale issues" | Discover first: `issue-audit` for backlog cleanup, `address-issues` for implementation, `aiwg-issue` for AIWG product issues |
For an interactive new, existing, stale, broken, duplicate, or development-mode AIWG installation, follow `https://aiwg.io/setup.aiwg.yaml` in the current supported provider. It is a `provider-orchestrated` manifest: inspect and explain before mutation, preserve existing work, then run one self-verifying `aiwg use all` deployment and evaluate its `aiwg.use.result.v1` response. Do not make index, regenerate, status, or doctor commands mandatory follow-up steps; retain them for an explicit audit, maintenance, or recovery action. Do not send this manifest to deterministic `aiwg setup-run`.
Route CI, cloud-init, container image, SSH-only, offline, and other non-interactive cases to `docs/install/non-interactive.md`. Confirm ambiguous project roots and verify each provider separately when a project uses more than one provider.
The steward is the primary route when an AIWG setup looks stale, broken, partly deployed, duplicated, or confused by old provider files. Agents should not start by grepping `.claude/`, `.codex/`, `.agents/`, `.cursor/`, `.warp/`, or other provider directories. Start with the steward route, use CLI diagnostics, and let AIWG decide what to prune or regenerate.
Use this recovery ladder:
1. Discover and load the route if it is not already loaded:
aiwg discover "steward repair AIWG setup" --type skill aiwg show skill steward
2. Establish the actual workspace state:
aiwg installation show --json aiwg status --probe --json aiwg doctor aiwg runtime-info
Treat `installation.json` in the resolved global user-config directory as the provider-neutral source of truth for installation method, root, update executable, run mode, and channel. Never infer a replacement from the first `npm` or `aiwg` on `PATH`. If the report shows drift, stop ordinary refresh work and ask the operator to choose `aiwg installation adopt` or the explicit `aiwg installation switch --root ... --method ...` recovery path.
These read-only commands — `version`, `status`, `doctor`, `runtime-info`, `discover`, `show`, and `index query|deps|stats` — keep running under drift and print the drift warning on stderr first. Mutating commands (`update`, `refresh`, `use`, `regenerate`, `index build`, channel switches) fail c
Reusable project context and specialist workflows for the AI tools you already use. Plan software, coordinate specialist reviews, prepare campaigns, investigate incidents, organize research, curate media, and maintain operational knowledge.
Repo: jmagly/aiwg
Crash-resilient external agent loop with state persistence and CI/CD integration
Detect requests for iterative autonomous agent loops and route to the appropriate loop executor
Automatically execute tests when code-generating agents modify source files, enforcing the execute-before-return pattern
Enable agent loops to learn from similar past tasks and share patterns across loops
Query and manage the executable feedback debug memory
Execute tests on generated code and iterate until passing