Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions migrate/plugins/migration-to-aws/atx/agent-advisor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# ATX Custom bundle — agent-advisor

The plugin keeps the **full** skill under `skills/agent-advisor/`, including the Migration Plan
stage that reads the sibling `gcp-to-aws` engine. ATX Custom has no sibling skills to read, so the
transformation published there must be self-contained.

Rather than fork the prose — which drifts, as this repo has learned more than once — the ATX
bundle is a **strict subset** of the canonical skill plus exactly one generated file:

```text
transformation_definition.md = preamble.md + skills/agent-advisor/SKILL.md (frontmatter stripped)
```

Every other file in the bundle is byte-identical to its canonical source. There is no second copy
of any instruction to keep in sync.

| File | Role |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `preamble.md` | The only ATX-specific text: executor differences (no interactive tools, no subagent dispatch, `${CLAUDE_PLUGIN_ROOT}` fallback), the headless input contract, the exit criteria, and the required `validation_summary.md` format |
| `manifest.txt` | Whitelist of canonical files that ship. A canonical file that is neither listed nor matched by an exclusion rule fails `atx:check` — new files must be classified, never silently dropped |

## Commands

```bash
mise run atx:build # write the bundle to .tmp/atx-bundle/agent-advisor/, then verify
mise run atx:check # verify only (part of `mise run lint`)
```

`atx:build` writes a directory of plain text and `.py` files with no build step and no install:
point whatever runs it at `transformation_definition.md` and give it that directory as the root every
relative path resolves against. Publishing to a transformation registry is a deliberate manual step,
and the registry's own CLI owns it — nothing in this repo does it for you.

## What `atx:check` guarantees

1. **Manifest ↔ canonical agree** — no dangling entries, no unclassified canonical files.
2. **No sibling-skill loads** — a resolvable path into another skill (`${CLAUDE_PLUGIN_ROOT}/skills/<other>`, `$GCP_BASE`) is an error everywhere except `references/phases/migration-plan/`, whose Step -1 capability gate resolves the stage to `not_applicable` when the engine is absent. This check is what makes "the ATX build does not depend on gcp-to-aws" a machine-verified property.
3. **The capability gate exists** — `migration-plan.md` must carry its marker, so the bundle degrades honestly instead of trying to read files that are not there.
4. **The phase graph closes inside the bundle** — every `_file:` fragment and `_advances_to:` target resolves within the shipped set.
5. **Runtime scripts load on a bare host** — no top-level third-party import. Lazy imports are reported as warnings, since they only bind on a code path that may be disabled (the live model probe) or provisioned by `uv`.

Warnings are tracked, not fatal: prose that names a sibling skill or a Claude Code slash command
still works, but it dangles for an ATX reader and should be reworded to be environment-neutral.
77 changes: 77 additions & 0 deletions migrate/plugins/migration-to-aws/atx/agent-advisor/manifest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# ATX bundle manifest — agent-advisor
#
# Paths are relative to skills/agent-advisor/. Every file listed here is copied
# BYTE-IDENTICAL into the ATX bundle; the bundle is a strict subset of the
# canonical skill plus one generated entry file (transformation_definition.md).
#
# A canonical file that is neither listed here nor matched by an exclusion rule
# in tools/atx-bundle/build.ts fails atx:check — new files must be classified.

references/decision-refs/agentcore.md
references/decision-refs/batch.md
references/decision-refs/cost-levers.md
references/decision-refs/ecs.md
references/decision-refs/eks.md
references/decision-refs/freshness.md
references/decision-refs/lambda-microvms.md
references/decision-refs/lambda.md
references/decision-refs/managed-alternatives.md
references/decision-refs/model-selection.md
references/decision-refs/poc-shapes.md
references/decision-refs/temporal.md
references/decision-refs/workload-classes.md
references/diagram/build-diagram.md
references/handoff/handoff-migration.md
references/models/anthropic-bedrock-2026-07-21.json
references/models/openai-bedrock-2026-07-21.json
references/output-templates/recommendation-doc.md
references/phases/add-capabilities/add-capabilities-assemble.md
references/phases/add-capabilities/add-capabilities.md
references/phases/clarify/clarify-assemble.md
references/phases/clarify/clarify-business.md
references/phases/clarify/clarify-technical.md
references/phases/clarify/clarify.md
references/phases/confirm/confirm-assemble.md
references/phases/confirm/confirm.md
references/phases/design/design-assemble.md
references/phases/design/design.md
references/phases/discover/discover-assemble.md
references/phases/discover/discover.md
references/phases/estimate/estimate-assemble.md
references/phases/estimate/estimate.md
references/phases/generate/generate-assemble.md
references/phases/generate/generate-report.md
references/phases/generate/generate.md
references/phases/intake/intake-assemble.md
references/phases/intake/intake.md
references/phases/migration-plan/migration-plan-assemble.md
references/phases/migration-plan/migration-plan-gcp-constraints.md
references/phases/migration-plan/migration-plan.md
references/phases/model-recommend/model-recommend-assemble.md
references/phases/model-recommend/model-recommend.md
references/phases/poc/poc-assemble.md
references/phases/poc/poc-report.md
references/phases/poc/poc.md
references/report-help-banner.md
references/report-shell.md
references/runtimes/agentcore.json
references/runtimes/ecs.json
references/runtimes/eks.json
references/runtimes/lambda_microvms.json
references/runtimes/lambda.json
references/vendored/dsl/INTERPRETER.md
references/vendored/README.md
scripts/anthropic_model_recommendation.py
scripts/build_diagram.py
scripts/model_recommendation.py
scripts/openai_model_recommendation.py
scripts/pyproject.toml
scripts/schemas/model-recommendation-input.json
scripts/schemas/model-recommendation.json
scripts/schemas/model-verification.json
scripts/schemas/scoring-result.json
scripts/scoring.py
scripts/uv.lock
scripts/verify_model_path.py
SKILL.md
scripts/schemas/seed.json
97 changes: 97 additions & 0 deletions migrate/plugins/migration-to-aws/atx/agent-advisor/preamble.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# AWS Agent Advisor — ATX Custom transformation

This transformation runs an **advisory** flow: it reads the target repository and produces a set
of assessment documents. It is **not** a code rewrite. A run that modifies application source is
a failed run, even if the application still builds.

The instructions after this preamble are the skill's own contract (`SKILL.md` and the phase files
it loads). This preamble records only what differs in the ATX execution environment. Where the two
disagree, **this preamble wins**.

## Environment contract

1. **No interactive tools.** There is no `AskUserQuestion` tool and no human to answer. Wherever a
phase file says to ask the user, resolve the value instead:
- Read `.agent-advisor/seed.json` if the repository provides one, then `CLAUDE.md` /
`AGENTS.md` at the repository root.
- If a needed value is in neither, append the question and the value you assumed — with the
reason — to `.agent-advisor/UNANSWERED.md`, and continue.
- Never block waiting for input, and never invent a requirement that contradicts a value you
were given.
2. **No subagent dispatch.** Any phase whose frontmatter declares `_exec: { _agent: ... }`
(currently only Estimate) runs **inline** in this session. Its fragments and assembler execute
exactly as written; only the isolation is dropped.
3. **`${CLAUDE_PLUGIN_ROOT}` does not resolve.** Use the fallback that `SKILL.md` documents: every
path is relative to this transformation's own directory — `./scripts/...`,
`./references/runtimes/...`, `./references/decision-refs/...`, `./references/phases/...`.
4. **Scoring comes from the engine, never from your judgement.** Run `scripts/scoring.py` and
`scripts/model_recommendation.py` exactly as the phase files instruct. Prefer `uv run`; if `uv`
is not installed, invoke them with `python3` — all six runtime scripts are standard-library
only. Hand-written scores are a failed run.
5. **MCP servers are optional here.** The `awsknowledge` and `temporal-docs` servers may be absent.
Take the documented fallback path (cached values plus an honest freshness note per
`references/decision-refs/freshness.md`) as the **normal** path, not an exception.
6. **The full Migration Plan stage is unavailable in this bundle**, but the POC is not.
The plan is generated by a sibling engine that does not ship here, so that stage resolves to
`not_applicable` (marked `migration_plan_unavailable = "engine_absent"`) with a note to the
user. The POC gate is still offered, and the POC is **design-backed** — built from
`design.json` and labelled "not plan-backed". Everything through the recommendation is
unaffected.
7. **Gate answers come from the run, not from a person.** Both optional gates (Migration Plan,
POC) are decided by `.agent-advisor/seed.json` under a `gates` key — e.g.
`{"gates": {"poc": "accept"}}`. When the seed is silent, **decline** both gates and finish
after the recommendation. Never decide a gate on the user's behalf beyond that default.
8. **Do not touch AWS unless the repository explicitly authorises it.** No deployments and no live
Bedrock model probe by default; `verification.probe_status` stays `not_run` and account
availability stays provisional.

## Output contract

Write every artifact under `.agent-advisor/<run-id>/` in the target repository. Leave them in
place — do not clean up the run directory. Application source must be byte-identical when you
finish.

Exit criteria — all of:

`context-signals.json`, `answers.json`, `scoring-result.json`, `model-recommendation-input.json`,
`model-recommendation.json`, `confirm.json`, `design.json`, `estimate.json`, `diagram.md`,
`recommendation.md`, `mini-brief.md`, `recommendation-report.html`

## Required validation summary format

**Your FINAL MESSAGE of the run must be exactly the block below — nothing before it, nothing after
it.** Benchmark harnesses capture that final message verbatim as `validation_summary.md` and grade
it against this structure, so a friendly free-form wrap-up scores zero even when every criterion
actually passed. Do not summarise, do not add findings, do not add pleasantries: emit the block.

Also write the same block to `$RUN_DIR/validation_summary.md` so the result is auditable from the
run directory itself.

The structure, in both places: composed of `## OVERALL STATUS`, `## EXIT CRITERIA RESULTS`, and
`## UNMET CRITERIA` exactly as follows:

```markdown
## OVERALL STATUS: COMPLETE

## EXIT CRITERIA RESULTS

- **Criterion:** <name>
**Status:** PASS
**Evidence:** <file path or command output>

- **Criterion:** <name>
**Status:** FAIL
**Evidence:** <what was found instead>

## UNMET CRITERIA

<one bullet per FAIL above, or "None." when every criterion passed>
```

`## OVERALL STATUS:` takes `COMPLETE` only when every criterion is PASS; otherwise `INCOMPLETE`.
One entry per exit-criteria artifact plus one per validation command that ran.

---

<!-- The canonical SKILL.md follows. Everything below this line is copied verbatim from
skills/agent-advisor/SKILL.md by tools/atx-bundle/build.ts — do not edit it here. -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ANTHROPIC_API_KEY=replace-me
ANTHROPIC_MODEL=claude-3-7-sonnet-latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.agent-advisor/
.agent-advisor-*/
.env
.pytest_cache/
.venv/
__pycache__/
*.pyc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Agent Advisor Test Context

This repository is a static migration-assessment fixture for `agent-advisor`.
Do not rewrite the source application unless the user explicitly asks.

## Workload

- Existing Anthropic customer-support agent using the first-party Messages API.
- Source model: `claude-3-7-sonnet-latest`.
- Sessions normally last 10-20 minutes.
- Traffic is bursty, with fewer than 20 concurrent sessions.
- The application uses a custom tool loop and Anthropic platform features.
- The team prefers low operational overhead and has no Kubernetes requirement.

## Model Requirements

- Preserve the Anthropic Messages API for the first migration.
- Priority: balanced.
- Required capabilities: tool use and extended thinking.
- Required context: at most 200,000 tokens.
- Expected output: at most 16,000 tokens.
- No Bedrock Guardrails, invocation logging, or multi-model Converse requirement.
- Hypothetical target region: `us-east-1`.

## AWS Access

The user does not have a target AWS account yet. Claude Code's own authentication
does not count as a customer target account. Do not run AWS CLI commands or a live
model probe. Keep account availability provisional and verification `not_run`.

## Test Boundary

Run the recommendation flow and generate its local assessment artifacts. Do not
deploy resources. At optional Migration Plan or POC gates, wait for the user's
explicit choice.
Loading
Loading