aw-ecc 1.4.31 → 1.4.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex/hooks/aw-post-tool-use.sh +8 -2
- package/.codex/hooks/aw-session-start.sh +11 -4
- package/.codex/hooks/aw-stop.sh +8 -2
- package/.codex/hooks/aw-user-prompt-submit.sh +10 -2
- package/.codex/hooks.json +8 -8
- package/.cursor/INSTALL.md +7 -5
- package/.cursor/hooks/adapter.js +41 -4
- package/.cursor/hooks/after-agent-response.js +62 -0
- package/.cursor/hooks/before-submit-prompt.js +7 -1
- package/.cursor/hooks/post-tool-use-failure.js +21 -0
- package/.cursor/hooks/post-tool-use.js +39 -0
- package/.cursor/hooks/shared/aw-phase-definitions.js +53 -0
- package/.cursor/hooks/shared/aw-phase-runner.js +3 -1
- package/.cursor/hooks/subagent-start.js +22 -4
- package/.cursor/hooks/subagent-stop.js +18 -1
- package/.cursor/hooks.json +23 -2
- package/.opencode/package.json +1 -1
- package/AGENTS.md +3 -3
- package/README.md +5 -5
- package/commands/adk.md +52 -0
- package/commands/build.md +22 -9
- package/commands/deploy.md +12 -0
- package/commands/execute.md +9 -0
- package/commands/feature.md +333 -0
- package/commands/investigate.md +18 -5
- package/commands/plan.md +23 -9
- package/commands/publish.md +65 -0
- package/commands/review.md +12 -0
- package/commands/ship.md +12 -0
- package/commands/test.md +12 -0
- package/commands/verify.md +9 -0
- package/hooks/hooks.json +36 -0
- package/manifests/install-components.json +8 -0
- package/manifests/install-modules.json +83 -0
- package/manifests/install-profiles.json +7 -0
- package/package.json +1 -1
- package/scripts/ci/validate-rules.js +51 -0
- package/scripts/cursor-aw-home/hooks.json +23 -2
- package/scripts/cursor-aw-hooks/adapter.js +41 -4
- package/scripts/cursor-aw-hooks/before-submit-prompt.js +7 -1
- package/scripts/hooks/aw-usage-commit-created.js +32 -0
- package/scripts/hooks/aw-usage-post-tool-use-failure.js +56 -0
- package/scripts/hooks/aw-usage-post-tool-use.js +242 -0
- package/scripts/hooks/aw-usage-prompt-submit.js +112 -0
- package/scripts/hooks/aw-usage-session-start.js +48 -0
- package/scripts/hooks/aw-usage-stop.js +182 -0
- package/scripts/hooks/aw-usage-telemetry-send.js +84 -0
- package/scripts/hooks/cost-tracker.js +3 -23
- package/scripts/hooks/shared/aw-phase-definitions.js +53 -0
- package/scripts/hooks/shared/aw-phase-runner.js +3 -1
- package/scripts/lib/aw-hook-contract.js +2 -2
- package/scripts/lib/aw-pricing.js +306 -0
- package/scripts/lib/aw-usage-telemetry.js +472 -0
- package/scripts/lib/codex-hook-config.js +8 -8
- package/scripts/lib/cursor-hook-config.js +25 -10
- package/scripts/lib/install-targets/codex-home.js +7 -0
- package/scripts/lib/install-targets/cursor-project.js +3 -0
- package/scripts/lib/install-targets/helpers.js +20 -3
- package/skills/aw-adk/SKILL.md +317 -0
- package/skills/aw-adk/agents/analyzer.md +113 -0
- package/skills/aw-adk/agents/comparator.md +113 -0
- package/skills/aw-adk/agents/grader.md +115 -0
- package/skills/aw-adk/assets/eval_review.html +76 -0
- package/skills/aw-adk/eval-viewer/generate_review.py +164 -0
- package/skills/aw-adk/eval-viewer/viewer.html +181 -0
- package/skills/aw-adk/evals/eval-colocated-placement.md +84 -0
- package/skills/aw-adk/evals/eval-create-agent.md +90 -0
- package/skills/aw-adk/evals/eval-create-command.md +98 -0
- package/skills/aw-adk/evals/eval-create-eval.md +89 -0
- package/skills/aw-adk/evals/eval-create-rule.md +99 -0
- package/skills/aw-adk/evals/eval-create-skill.md +97 -0
- package/skills/aw-adk/evals/eval-delete-agent.md +79 -0
- package/skills/aw-adk/evals/eval-delete-command.md +89 -0
- package/skills/aw-adk/evals/eval-delete-rule.md +86 -0
- package/skills/aw-adk/evals/eval-delete-skill.md +90 -0
- package/skills/aw-adk/evals/eval-meta-eval-coverage.md +78 -0
- package/skills/aw-adk/evals/eval-meta-eval-determinism.md +81 -0
- package/skills/aw-adk/evals/eval-meta-eval-false-pass.md +81 -0
- package/skills/aw-adk/evals/eval-score-accuracy.md +95 -0
- package/skills/aw-adk/evals/eval-type-redirect.md +68 -0
- package/skills/aw-adk/evals/evals.json +96 -0
- package/skills/aw-adk/references/artifact-wiring.md +162 -0
- package/skills/aw-adk/references/cross-ide-mapping.md +71 -0
- package/skills/aw-adk/references/eval-placement-guide.md +183 -0
- package/skills/aw-adk/references/external-resources.md +75 -0
- package/skills/aw-adk/references/getting-started.md +66 -0
- package/skills/aw-adk/references/registry-structure.md +152 -0
- package/skills/aw-adk/references/rubric-agent.md +36 -0
- package/skills/aw-adk/references/rubric-command.md +36 -0
- package/skills/aw-adk/references/rubric-eval.md +36 -0
- package/skills/aw-adk/references/rubric-meta-eval.md +132 -0
- package/skills/aw-adk/references/rubric-rule.md +36 -0
- package/skills/aw-adk/references/rubric-skill.md +36 -0
- package/skills/aw-adk/references/schemas.md +222 -0
- package/skills/aw-adk/references/template-agent.md +251 -0
- package/skills/aw-adk/references/template-command.md +279 -0
- package/skills/aw-adk/references/template-eval.md +176 -0
- package/skills/aw-adk/references/template-rule.md +119 -0
- package/skills/aw-adk/references/template-skill.md +123 -0
- package/skills/aw-adk/references/type-classifier.md +98 -0
- package/skills/aw-adk/references/writing-good-agents.md +227 -0
- package/skills/aw-adk/references/writing-good-commands.md +258 -0
- package/skills/aw-adk/references/writing-good-evals.md +271 -0
- package/skills/aw-adk/references/writing-good-rules.md +214 -0
- package/skills/aw-adk/references/writing-good-skills.md +159 -0
- package/skills/aw-adk/scripts/aggregate-benchmark.py +190 -0
- package/skills/aw-adk/scripts/lint-artifact.sh +211 -0
- package/skills/aw-adk/scripts/score-artifact.sh +179 -0
- package/skills/aw-adk/scripts/trigger-eval.py +192 -0
- package/skills/aw-build/SKILL.md +19 -2
- package/skills/aw-deploy/SKILL.md +65 -3
- package/skills/aw-design/SKILL.md +156 -0
- package/skills/aw-design/references/highrise-tokens.md +394 -0
- package/skills/aw-design/references/micro-interactions.md +76 -0
- package/skills/aw-design/references/prompt-template.md +160 -0
- package/skills/aw-design/references/quality-checklist.md +70 -0
- package/skills/aw-design/references/self-review.md +497 -0
- package/skills/aw-design/references/stitch-workflow.md +127 -0
- package/skills/aw-feature/SKILL.md +293 -0
- package/skills/aw-investigate/SKILL.md +17 -0
- package/skills/aw-plan/SKILL.md +34 -3
- package/skills/aw-publish/SKILL.md +300 -0
- package/skills/aw-publish/evals/eval-confirmation-gate.md +60 -0
- package/skills/aw-publish/evals/eval-intent-detection.md +111 -0
- package/skills/aw-publish/evals/eval-push-modes.md +67 -0
- package/skills/aw-publish/evals/eval-rules-push.md +60 -0
- package/skills/aw-publish/evals/evals.json +29 -0
- package/skills/aw-publish/references/push-modes.md +38 -0
- package/skills/aw-review/SKILL.md +88 -9
- package/skills/aw-rules-review/SKILL.md +124 -0
- package/skills/aw-rules-review/agents/openai.yaml +3 -0
- package/skills/aw-rules-review/scripts/generate-review-template.mjs +323 -0
- package/skills/aw-ship/SKILL.md +16 -0
- package/skills/aw-spec/SKILL.md +15 -0
- package/skills/aw-tasks/SKILL.md +15 -0
- package/skills/aw-test/SKILL.md +16 -0
- package/skills/aw-yolo/SKILL.md +4 -0
- package/skills/diagnose/SKILL.md +121 -0
- package/skills/diagnose/scripts/hitl-loop.template.sh +41 -0
- package/skills/finish-only-when-green/SKILL.md +265 -0
- package/skills/grill-me/SKILL.md +24 -0
- package/skills/grill-with-docs/SKILL.md +92 -0
- package/skills/grill-with-docs/adr-format.md +47 -0
- package/skills/grill-with-docs/context-format.md +67 -0
- package/skills/improve-codebase-architecture/SKILL.md +75 -0
- package/skills/improve-codebase-architecture/deepening.md +37 -0
- package/skills/improve-codebase-architecture/interface-design.md +44 -0
- package/skills/improve-codebase-architecture/language.md +53 -0
- package/skills/local-ghl-setup-from-screenshot/SKILL.md +538 -0
- package/skills/tdd/SKILL.md +115 -0
- package/skills/tdd/deep-modules.md +33 -0
- package/skills/tdd/interface-design.md +31 -0
- package/skills/tdd/mocking.md +59 -0
- package/skills/tdd/refactoring.md +10 -0
- package/skills/tdd/tests.md +61 -0
- package/skills/to-issues/SKILL.md +62 -0
- package/skills/to-prd/SKILL.md +75 -0
- package/skills/using-aw-skills/SKILL.md +170 -237
- package/skills/using-aw-skills/hooks/session-start.sh +11 -41
- package/skills/zoom-out/SKILL.md +24 -0
- package/.cursor/rules/common-agents.md +0 -53
- package/.cursor/rules/common-aw-routing.md +0 -43
- package/.cursor/rules/common-coding-style.md +0 -52
- package/.cursor/rules/common-development-workflow.md +0 -33
- package/.cursor/rules/common-git-workflow.md +0 -28
- package/.cursor/rules/common-hooks.md +0 -34
- package/.cursor/rules/common-patterns.md +0 -35
- package/.cursor/rules/common-performance.md +0 -59
- package/.cursor/rules/common-security.md +0 -33
- package/.cursor/rules/common-testing.md +0 -33
- package/.cursor/skills/api-and-interface-design/SKILL.md +0 -75
- package/.cursor/skills/article-writing/SKILL.md +0 -85
- package/.cursor/skills/aw-brainstorm/SKILL.md +0 -115
- package/.cursor/skills/aw-build/SKILL.md +0 -152
- package/.cursor/skills/aw-build/evals/build-stage-cases.json +0 -28
- package/.cursor/skills/aw-debug/SKILL.md +0 -49
- package/.cursor/skills/aw-deploy/SKILL.md +0 -101
- package/.cursor/skills/aw-deploy/evals/deploy-stage-cases.json +0 -32
- package/.cursor/skills/aw-execute/SKILL.md +0 -47
- package/.cursor/skills/aw-execute/references/mode-code.md +0 -47
- package/.cursor/skills/aw-execute/references/mode-docs.md +0 -28
- package/.cursor/skills/aw-execute/references/mode-infra.md +0 -44
- package/.cursor/skills/aw-execute/references/mode-migration.md +0 -58
- package/.cursor/skills/aw-execute/references/worker-implementer.md +0 -26
- package/.cursor/skills/aw-execute/references/worker-parallel-worker.md +0 -23
- package/.cursor/skills/aw-execute/references/worker-quality-reviewer.md +0 -23
- package/.cursor/skills/aw-execute/references/worker-spec-reviewer.md +0 -23
- package/.cursor/skills/aw-execute/scripts/build-worker-bundle.js +0 -229
- package/.cursor/skills/aw-finish/SKILL.md +0 -111
- package/.cursor/skills/aw-investigate/SKILL.md +0 -109
- package/.cursor/skills/aw-plan/SKILL.md +0 -368
- package/.cursor/skills/aw-prepare/SKILL.md +0 -118
- package/.cursor/skills/aw-review/SKILL.md +0 -118
- package/.cursor/skills/aw-ship/SKILL.md +0 -115
- package/.cursor/skills/aw-spec/SKILL.md +0 -104
- package/.cursor/skills/aw-tasks/SKILL.md +0 -138
- package/.cursor/skills/aw-test/SKILL.md +0 -118
- package/.cursor/skills/aw-verify/SKILL.md +0 -51
- package/.cursor/skills/aw-yolo/SKILL.md +0 -111
- package/.cursor/skills/browser-testing-with-devtools/SKILL.md +0 -81
- package/.cursor/skills/bun-runtime/SKILL.md +0 -84
- package/.cursor/skills/ci-cd-and-automation/SKILL.md +0 -71
- package/.cursor/skills/code-simplification/SKILL.md +0 -74
- package/.cursor/skills/content-engine/SKILL.md +0 -88
- package/.cursor/skills/context-engineering/SKILL.md +0 -74
- package/.cursor/skills/deprecation-and-migration/SKILL.md +0 -75
- package/.cursor/skills/documentation-and-adrs/SKILL.md +0 -75
- package/.cursor/skills/documentation-lookup/SKILL.md +0 -90
- package/.cursor/skills/frontend-slides/SKILL.md +0 -184
- package/.cursor/skills/frontend-slides/STYLE_PRESETS.md +0 -330
- package/.cursor/skills/frontend-ui-engineering/SKILL.md +0 -68
- package/.cursor/skills/git-workflow-and-versioning/SKILL.md +0 -75
- package/.cursor/skills/idea-refine/SKILL.md +0 -84
- package/.cursor/skills/incremental-implementation/SKILL.md +0 -75
- package/.cursor/skills/investor-materials/SKILL.md +0 -96
- package/.cursor/skills/investor-outreach/SKILL.md +0 -76
- package/.cursor/skills/market-research/SKILL.md +0 -75
- package/.cursor/skills/mcp-server-patterns/SKILL.md +0 -67
- package/.cursor/skills/nextjs-turbopack/SKILL.md +0 -44
- package/.cursor/skills/performance-optimization/SKILL.md +0 -77
- package/.cursor/skills/security-and-hardening/SKILL.md +0 -70
- package/.cursor/skills/using-aw-skills/SKILL.md +0 -290
- package/.cursor/skills/using-aw-skills/evals/skill-trigger-cases.tsv +0 -25
- package/.cursor/skills/using-aw-skills/evals/test-skill-triggers.sh +0 -171
- package/.cursor/skills/using-aw-skills/hooks/hooks.json +0 -9
- package/.cursor/skills/using-aw-skills/hooks/session-start.sh +0 -67
- package/.cursor/skills/using-platform-skills/SKILL.md +0 -163
- package/.cursor/skills/using-platform-skills/evals/platform-selection-cases.json +0 -52
- /package/.cursor/rules/{golang-coding-style.md → golang-coding-style.mdc} +0 -0
- /package/.cursor/rules/{golang-hooks.md → golang-hooks.mdc} +0 -0
- /package/.cursor/rules/{golang-patterns.md → golang-patterns.mdc} +0 -0
- /package/.cursor/rules/{golang-security.md → golang-security.mdc} +0 -0
- /package/.cursor/rules/{golang-testing.md → golang-testing.mdc} +0 -0
- /package/.cursor/rules/{kotlin-coding-style.md → kotlin-coding-style.mdc} +0 -0
- /package/.cursor/rules/{kotlin-hooks.md → kotlin-hooks.mdc} +0 -0
- /package/.cursor/rules/{kotlin-patterns.md → kotlin-patterns.mdc} +0 -0
- /package/.cursor/rules/{kotlin-security.md → kotlin-security.mdc} +0 -0
- /package/.cursor/rules/{kotlin-testing.md → kotlin-testing.mdc} +0 -0
- /package/.cursor/rules/{php-coding-style.md → php-coding-style.mdc} +0 -0
- /package/.cursor/rules/{php-hooks.md → php-hooks.mdc} +0 -0
- /package/.cursor/rules/{php-patterns.md → php-patterns.mdc} +0 -0
- /package/.cursor/rules/{php-security.md → php-security.mdc} +0 -0
- /package/.cursor/rules/{php-testing.md → php-testing.mdc} +0 -0
- /package/.cursor/rules/{python-coding-style.md → python-coding-style.mdc} +0 -0
- /package/.cursor/rules/{python-hooks.md → python-hooks.mdc} +0 -0
- /package/.cursor/rules/{python-patterns.md → python-patterns.mdc} +0 -0
- /package/.cursor/rules/{python-security.md → python-security.mdc} +0 -0
- /package/.cursor/rules/{python-testing.md → python-testing.mdc} +0 -0
- /package/.cursor/rules/{swift-coding-style.md → swift-coding-style.mdc} +0 -0
- /package/.cursor/rules/{swift-hooks.md → swift-hooks.mdc} +0 -0
- /package/.cursor/rules/{swift-patterns.md → swift-patterns.mdc} +0 -0
- /package/.cursor/rules/{swift-security.md → swift-security.mdc} +0 -0
- /package/.cursor/rules/{swift-testing.md → swift-testing.mdc} +0 -0
- /package/.cursor/rules/{typescript-coding-style.md → typescript-coding-style.mdc} +0 -0
- /package/.cursor/rules/{typescript-hooks.md → typescript-hooks.mdc} +0 -0
- /package/.cursor/rules/{typescript-patterns.md → typescript-patterns.mdc} +0 -0
- /package/.cursor/rules/{typescript-security.md → typescript-security.mdc} +0 -0
- /package/.cursor/rules/{typescript-testing.md → typescript-testing.mdc} +0 -0
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: security-and-hardening
|
|
3
|
-
description: Hardens code and system boundaries against misuse. Use when working with authentication, user input, secrets, external integrations, sensitive data, or any new trust boundary.
|
|
4
|
-
origin: ECC
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Security And Hardening
|
|
8
|
-
|
|
9
|
-
## Overview
|
|
10
|
-
|
|
11
|
-
Security is boundary work.
|
|
12
|
-
This skill makes the agent classify trust boundaries, harden them deliberately, and prove the risky paths were reviewed rather than assumed safe.
|
|
13
|
-
|
|
14
|
-
## When to Use
|
|
15
|
-
|
|
16
|
-
- adding or changing authentication or authorization
|
|
17
|
-
- handling user input, uploads, webhooks, or external API traffic
|
|
18
|
-
- working with secrets, tokens, session state, or encryption
|
|
19
|
-
- storing or transmitting sensitive or regulated data
|
|
20
|
-
- introducing a new integration, endpoint, or background execution path
|
|
21
|
-
|
|
22
|
-
**When NOT to use**
|
|
23
|
-
|
|
24
|
-
- purely local changes with no user, network, secret, or boundary impact
|
|
25
|
-
|
|
26
|
-
## Workflow
|
|
27
|
-
|
|
28
|
-
1. Classify the boundaries first.
|
|
29
|
-
Identify:
|
|
30
|
-
- external input boundaries
|
|
31
|
-
- authz and identity boundaries
|
|
32
|
-
- data storage boundaries
|
|
33
|
-
- outbound trust boundaries
|
|
34
|
-
2. Harden the entry points.
|
|
35
|
-
Validate input, apply authn/authz, enforce tenant or ownership scoping, and reject malformed or over-broad requests early.
|
|
36
|
-
3. Protect secrets and configuration.
|
|
37
|
-
Use `../../references/security-checklist.md`.
|
|
38
|
-
Secrets must stay out of source, logs, screenshots, and error payloads.
|
|
39
|
-
4. Reduce abuse and blast radius.
|
|
40
|
-
Add rate limits, safe defaults, least privilege, error handling, and logging that helps operators without leaking sensitive data.
|
|
41
|
-
5. Review dependencies and operational posture.
|
|
42
|
-
Check whether packages, headers, storage settings, or integration modes introduce known risk.
|
|
43
|
-
6. Prove the risky path was considered.
|
|
44
|
-
Name what was hardened, what remains risky, and what follow-up work is still required.
|
|
45
|
-
|
|
46
|
-
## Common Rationalizations
|
|
47
|
-
|
|
48
|
-
| Rationalization | Reality |
|
|
49
|
-
|---|---|
|
|
50
|
-
| "It's internal, so the security bar is lower." | Internal paths still become attack surfaces and privilege boundaries. |
|
|
51
|
-
| "The framework handles that automatically." | Framework defaults help, but boundary ownership still belongs to the implementation. |
|
|
52
|
-
| "We'll secure it after the happy path works." | Security debt compounds quickly once an interface is already in use. |
|
|
53
|
-
| "Nobody will hit that edge case." | Attackers and accidental misuse both live in edge cases. |
|
|
54
|
-
|
|
55
|
-
## Red Flags
|
|
56
|
-
|
|
57
|
-
- trust boundaries are unclear or unnamed
|
|
58
|
-
- secrets appear in code, logs, or test fixtures
|
|
59
|
-
- auth exists without authorization checks
|
|
60
|
-
- outbound integrations accept overly broad input or destination control
|
|
61
|
-
|
|
62
|
-
## Verification
|
|
63
|
-
|
|
64
|
-
After hardening, confirm:
|
|
65
|
-
|
|
66
|
-
- [ ] the relevant trust boundaries are explicit
|
|
67
|
-
- [ ] input, auth, and secret handling were reviewed deliberately
|
|
68
|
-
- [ ] abusive or malformed requests fail safely
|
|
69
|
-
- [ ] logs and errors avoid leaking sensitive data
|
|
70
|
-
- [ ] remaining security risks or follow-ups are documented
|
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: using-aw-skills
|
|
3
|
-
description: Session-start skill-first routing for the AW SDLC surface. Select the smallest correct AW skill stack before any substantive response, then load deeper stage, domain, and org-standard detail on demand.
|
|
4
|
-
trigger: Every session start. Loaded automatically via session-start hook.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Using AW Skills
|
|
8
|
-
|
|
9
|
-
## Overview
|
|
10
|
-
|
|
11
|
-
This skill is the thin router for the AW SDLC surface.
|
|
12
|
-
Its job is to:
|
|
13
|
-
|
|
14
|
-
- choose the smallest correct public route
|
|
15
|
-
- choose the smallest correct AW skill stack
|
|
16
|
-
- stop generic commentary until the stage is clear
|
|
17
|
-
- load deeper references only when they materially change the decision
|
|
18
|
-
|
|
19
|
-
Keep this file small.
|
|
20
|
-
Stage behavior belongs in stage skills.
|
|
21
|
-
Long examples, checklists, and loading guidance belong in shared references.
|
|
22
|
-
|
|
23
|
-
This means the file should optimize for one thing first:
|
|
24
|
-
|
|
25
|
-
- make the right next skill obvious
|
|
26
|
-
|
|
27
|
-
## When to Use
|
|
28
|
-
|
|
29
|
-
- at session start
|
|
30
|
-
- before any substantive response
|
|
31
|
-
- whenever the request might map to planning, building, investigating, testing, reviewing, deploying, or shipping work
|
|
32
|
-
- whenever the user gives a vague request and the right stage still has to be selected
|
|
33
|
-
|
|
34
|
-
Do not skip this skill just because the work looks small.
|
|
35
|
-
|
|
36
|
-
## Skill Discovery
|
|
37
|
-
|
|
38
|
-
When a task arrives, identify the current delivery phase and load the smallest correct route:
|
|
39
|
-
|
|
40
|
-
```text
|
|
41
|
-
Task arrives
|
|
42
|
-
│
|
|
43
|
-
├── Vague idea, spec, or task breakdown? ───────→ /aw:plan
|
|
44
|
-
├── Approved change to implement? ──────────────→ /aw:build
|
|
45
|
-
├── Bug, alert, or unclear runtime failure? ────→ /aw:investigate
|
|
46
|
-
├── Need QA proof or regression evidence? ──────→ /aw:test
|
|
47
|
-
├── Need findings or readiness decision? ───────→ /aw:review
|
|
48
|
-
├── Need one concrete release action? ──────────→ /aw:deploy
|
|
49
|
-
├── Need launch or rollout closeout? ───────────→ /aw:ship
|
|
50
|
-
└── Need one-run end-to-end automation? ───────→ aw-yolo
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Then load the supporting craft and domain skills that sharpen that route.
|
|
54
|
-
If the work is in a real GHL domain, load `using-platform-skills` next.
|
|
55
|
-
|
|
56
|
-
## Public Surface
|
|
57
|
-
|
|
58
|
-
The public surface stays intentionally small.
|
|
59
|
-
The canonical routes are the stages shown in the discovery flow above:
|
|
60
|
-
|
|
61
|
-
- `/aw:plan`, `/aw:build`, `/aw:test`, `/aw:review`, `/aw:deploy`, `/aw:ship`
|
|
62
|
-
- `/aw:investigate`
|
|
63
|
-
|
|
64
|
-
Default delivery flow:
|
|
65
|
-
|
|
66
|
-
- `/aw:plan` -> `/aw:build` -> `/aw:test` -> `/aw:review` -> `/aw:deploy` -> `/aw:ship`
|
|
67
|
-
|
|
68
|
-
Conditional route:
|
|
69
|
-
|
|
70
|
-
- `/aw:investigate`
|
|
71
|
-
|
|
72
|
-
`/aw:investigate` is a first-class route for bugs, alerts, regressions, and unclear root cause.
|
|
73
|
-
It should not be treated as a mandatory phase in every request.
|
|
74
|
-
|
|
75
|
-
Compatibility entrypoints remain available during migration:
|
|
76
|
-
|
|
77
|
-
- `/aw:execute` -> `/aw:build`
|
|
78
|
-
- `/aw:verify` -> `/aw:test`, `/aw:review`, or the smallest correct combined verification flow
|
|
79
|
-
|
|
80
|
-
There is also one explicit internal power workflow:
|
|
81
|
-
|
|
82
|
-
- `aw-yolo`
|
|
83
|
-
|
|
84
|
-
`aw-yolo` is for clearly end-to-end requests where the user wants one-run automation.
|
|
85
|
-
It should not become the default route for normal stage-specific work.
|
|
86
|
-
When it is selected, begin at the first unsatisfied stage rather than restarting the lifecycle from the top.
|
|
87
|
-
|
|
88
|
-
## Core Operating Behaviors
|
|
89
|
-
|
|
90
|
-
These behaviors apply across every route.
|
|
91
|
-
|
|
92
|
-
### 1. Surface Assumptions
|
|
93
|
-
|
|
94
|
-
Name assumptions that materially change scope, architecture, rollout, or verification.
|
|
95
|
-
If an assumption could change the selected route, say it early.
|
|
96
|
-
|
|
97
|
-
### 2. Manage Confusion Actively
|
|
98
|
-
|
|
99
|
-
If the request, spec, code, or baseline disagree:
|
|
100
|
-
|
|
101
|
-
1. stop
|
|
102
|
-
2. name the contradiction
|
|
103
|
-
3. state the tradeoff or blocking question
|
|
104
|
-
4. do not guess through it
|
|
105
|
-
|
|
106
|
-
### 3. Push Back With Concrete Tradeoffs
|
|
107
|
-
|
|
108
|
-
If an approach creates obvious risk, complexity, or rollout danger:
|
|
109
|
-
|
|
110
|
-
- say so directly
|
|
111
|
-
- name the downside
|
|
112
|
-
- propose the smallest safer alternative
|
|
113
|
-
|
|
114
|
-
### 4. Enforce Simplicity
|
|
115
|
-
|
|
116
|
-
Prefer the smallest route and the smallest supporting skill stack.
|
|
117
|
-
Do not turn a single-stage task into a hidden multi-stage workflow.
|
|
118
|
-
|
|
119
|
-
### 5. Maintain Scope Discipline
|
|
120
|
-
|
|
121
|
-
Touch only the stage and supporting context required for the current request.
|
|
122
|
-
Do not reopen planning, implementation, or release work without a reason.
|
|
123
|
-
|
|
124
|
-
### 6. Verify, Don't Assume
|
|
125
|
-
|
|
126
|
-
Every route must eventually produce evidence, not just confidence.
|
|
127
|
-
Proof belongs in the right stage artifact, not only in narration.
|
|
128
|
-
|
|
129
|
-
## Always-On Activation
|
|
130
|
-
|
|
131
|
-
Before any substantive response, this router must select the smallest correct AW skill stack and matching public route.
|
|
132
|
-
|
|
133
|
-
- explicit user command -> honor that command and load the mapped AW stage skill first
|
|
134
|
-
- clear process need -> load the needed internal process skill first
|
|
135
|
-
- otherwise choose the smallest correct AW primary stage skill and matching public route by intent
|
|
136
|
-
- only after the required AW skills are selected, load deeper domain skills or ask clarifying questions
|
|
137
|
-
|
|
138
|
-
Do not start with generic implementation, review, or deploy advice before skill selection.
|
|
139
|
-
Do not leave the active skill stack or matching route implicit for non-trivial work.
|
|
140
|
-
|
|
141
|
-
## The Rule
|
|
142
|
-
|
|
143
|
-
If there is even a small chance that an AW process skill, stage skill, or required domain skill applies, load it before responding.
|
|
144
|
-
|
|
145
|
-
Questions count.
|
|
146
|
-
Clarifying questions count.
|
|
147
|
-
Quick exploration counts.
|
|
148
|
-
|
|
149
|
-
The AW public command is the user-facing projection of the selected primary stage skill.
|
|
150
|
-
|
|
151
|
-
## Skill Priority
|
|
152
|
-
|
|
153
|
-
When multiple AW skills could apply, use this order:
|
|
154
|
-
|
|
155
|
-
1. process skills first:
|
|
156
|
-
- `aw-brainstorm`
|
|
157
|
-
- `aw-debug`
|
|
158
|
-
- `aw-prepare`
|
|
159
|
-
- `aw-yolo`
|
|
160
|
-
2. primary stage skills second:
|
|
161
|
-
- `aw-plan`
|
|
162
|
-
- `aw-build`
|
|
163
|
-
- `aw-investigate`
|
|
164
|
-
- `aw-test`
|
|
165
|
-
- `aw-review`
|
|
166
|
-
- `aw-deploy`
|
|
167
|
-
- `aw-ship`
|
|
168
|
-
3. domain and cross-cutting skills third
|
|
169
|
-
|
|
170
|
-
The selected public route should reflect the primary stage skill, not hide it.
|
|
171
|
-
|
|
172
|
-
## Route Selection
|
|
173
|
-
|
|
174
|
-
Use one primary route unless the user explicitly asks for end-to-end orchestration.
|
|
175
|
-
|
|
176
|
-
For route examples, explicit routing priority, and scope guardrails, see [`../../references/route-selection-patterns.md`](../../references/route-selection-patterns.md).
|
|
177
|
-
|
|
178
|
-
## Failure Modes to Avoid
|
|
179
|
-
|
|
180
|
-
These patterns look productive, but they create routing drift:
|
|
181
|
-
|
|
182
|
-
1. answering quickly before selecting a route
|
|
183
|
-
2. treating exploration as exempt from routing
|
|
184
|
-
3. choosing `/aw:investigate` for every bug, even when the fix is already known
|
|
185
|
-
4. treating `aw-yolo` as the default because it feels convenient
|
|
186
|
-
5. reopening planning during `build` without a real blocker
|
|
187
|
-
6. silently implementing during `test` or `review`
|
|
188
|
-
7. loading every domain skill "just in case"
|
|
189
|
-
8. giving a confident answer without evidence or stage artifacts
|
|
190
|
-
|
|
191
|
-
## Cross-Cutting Engineering Skills
|
|
192
|
-
|
|
193
|
-
After the primary stage is selected, load the portable craft skill that best sharpens the work:
|
|
194
|
-
|
|
195
|
-
- `idea-refine`
|
|
196
|
-
- `context-engineering`
|
|
197
|
-
- `incremental-implementation`
|
|
198
|
-
- `frontend-ui-engineering`
|
|
199
|
-
- `api-and-interface-design`
|
|
200
|
-
- `browser-testing-with-devtools`
|
|
201
|
-
- `code-simplification`
|
|
202
|
-
- `security-and-hardening`
|
|
203
|
-
- `performance-optimization`
|
|
204
|
-
- `git-workflow-and-versioning`
|
|
205
|
-
- `ci-cd-and-automation`
|
|
206
|
-
- `deprecation-and-migration`
|
|
207
|
-
- `documentation-and-adrs`
|
|
208
|
-
|
|
209
|
-
Load them because they improve the selected stage, not because they create a new public route.
|
|
210
|
-
For domain families, cross-cutting guidance, and org-standard loading, see [`../../references/domain-skill-loading.md`](../../references/domain-skill-loading.md).
|
|
211
|
-
|
|
212
|
-
## Platform Skill Loading
|
|
213
|
-
|
|
214
|
-
After the primary AW route is known, use `using-platform-skills` when GHL platform behavior materially affects the stage.
|
|
215
|
-
|
|
216
|
-
- backend and worker work -> `platform-services:*`
|
|
217
|
-
- frontend and design-system work -> `platform-frontend:*` plus `platform-design:*`
|
|
218
|
-
- data and migrations -> `platform-data:*`
|
|
219
|
-
- infra and deploy paths -> `platform-infra:*`
|
|
220
|
-
- test systems and QA governance -> `platform-sdet:*`
|
|
221
|
-
- review depth and readiness -> `platform-review:*`
|
|
222
|
-
- product context and business behavior -> `platform-product:*`
|
|
223
|
-
|
|
224
|
-
Use `using-platform-skills` to decide the first supporting platform skills for the selected stage.
|
|
225
|
-
|
|
226
|
-
## Context Loading
|
|
227
|
-
|
|
228
|
-
Load context in the smallest order that reduces uncertainty without flooding the session.
|
|
229
|
-
Start with repo-local contracts and approved AW artifacts before broad code search or domain docs.
|
|
230
|
-
|
|
231
|
-
See [`../../references/context-loading-and-intake.md`](../../references/context-loading-and-intake.md).
|
|
232
|
-
|
|
233
|
-
## Org Standards Always On
|
|
234
|
-
|
|
235
|
-
When the selected stage falls inside a resolved baseline profile, the stage must honor:
|
|
236
|
-
|
|
237
|
-
- `defaults/aw-sdlc/baseline-profiles.yml`
|
|
238
|
-
- relevant platform playbooks
|
|
239
|
-
- relevant `.aw_rules`
|
|
240
|
-
|
|
241
|
-
Frontend work should still inherit HighRise, accessibility, responsive, and review expectations.
|
|
242
|
-
Release work should still inherit governance, rollback, and evidence expectations.
|
|
243
|
-
See [`../../references/domain-skill-loading.md`](../../references/domain-skill-loading.md).
|
|
244
|
-
|
|
245
|
-
## Skill Rules
|
|
246
|
-
|
|
247
|
-
1. Check for an applicable AW route before starting real work.
|
|
248
|
-
2. Use one primary route unless the user explicitly asks for end-to-end orchestration.
|
|
249
|
-
3. Load process skills before stage skills when the process itself changes the right path.
|
|
250
|
-
4. Load domain and craft skills only after the primary route is clear.
|
|
251
|
-
5. Load `using-platform-skills` when a GHL platform family materially changes the work.
|
|
252
|
-
6. When in doubt between diagnosis and implementation, choose `/aw:investigate` only if root cause is still unclear.
|
|
253
|
-
7. When in doubt between a normal route and `aw-yolo`, prefer the normal route.
|
|
254
|
-
|
|
255
|
-
## Typical Sequences
|
|
256
|
-
|
|
257
|
-
For a normal feature:
|
|
258
|
-
|
|
259
|
-
```text
|
|
260
|
-
/aw:plan -> /aw:build -> /aw:test -> /aw:review -> /aw:deploy -> /aw:ship
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
For a bug with unclear root cause:
|
|
264
|
-
|
|
265
|
-
```text
|
|
266
|
-
/aw:investigate -> /aw:build -> /aw:test -> /aw:review
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
For a release-ready change that only needs rollout work:
|
|
270
|
-
|
|
271
|
-
```text
|
|
272
|
-
/aw:deploy -> /aw:ship
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
For explicit one-run automation:
|
|
276
|
-
|
|
277
|
-
```text
|
|
278
|
-
aw-yolo -> [smallest correct internal stage sequence]
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
## Verification
|
|
282
|
-
|
|
283
|
-
Before moving past routing, confirm:
|
|
284
|
-
|
|
285
|
-
- [ ] the smallest correct AW skill stack was selected first
|
|
286
|
-
- [ ] the public route matches the actual stage intent
|
|
287
|
-
- [ ] `/aw:investigate` was only chosen when diagnosis is actually required
|
|
288
|
-
- [ ] org-standard playbooks and `.aw_rules` are loaded when the baseline requires them
|
|
289
|
-
- [ ] the task is not being silently broadened into extra stages
|
|
290
|
-
- [ ] `aw-yolo` is used only when the user explicitly asked for end-to-end automation
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# mode prompt expected_pattern description expected_route primary_skill supporting_skills
|
|
2
|
-
quick For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Create the implementation spec for the approved Communities moderation API contract. Do not make me write a PRD first. plan;aw-plan;platform-services Backend planning intent selects aw-plan plus backend domain support plan aw-plan platform-services:development
|
|
3
|
-
quick For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Help me refine this idea for an AI-powered renewal reminder flow before we write the spec. plan;aw-plan;idea-refine Fuzzy concept should still resolve to aw-plan while loading idea-refine first plan aw-plan idea-refine
|
|
4
|
-
quick For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Design a stable API contract for the approved webhook retry interface change. plan;aw-plan;api-and-interface-design Contract-first planning should resolve to aw-plan with api-and-interface-design support plan aw-plan api-and-interface-design
|
|
5
|
-
quick For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Investigate this Communities moderation worker retry failure and tell me the likely fault surface before patching. investigate;aw-investigate;grafana Backend investigate intent selects aw-investigate plus runtime triage support investigate aw-investigate platform-infra:grafana
|
|
6
|
-
quick For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Deploy this verified Communities feed MFA to staging. deploy;aw-deploy;deploy-versioned-mfa;staging-deploy Frontend deploy intent selects aw-deploy plus versioned MFA deploy support deploy aw-deploy deploy-versioned-mfa,platform-infra:staging-deploy,platform-infra:production-readiness
|
|
7
|
-
quick For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Test this UI fix in the browser and inspect the DOM, console, and network requests. test;aw-test;browser-testing-with-devtools Browser-runtime proof should resolve to aw-test with DevTools support test aw-test browser-testing-with-devtools
|
|
8
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Take the approved Communities moderation API change forward and make the required code updates in the moderation queue path. build;aw-build;platform-services;development Backend build intent selects aw-build plus backend development support build aw-build platform-services:development,quality-gate-coder
|
|
9
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Simplify this already-working handler without changing behavior and keep the diff easy to review. build;aw-build;code-simplification Simplification work should stay in build while loading the simplification craft skill build aw-build code-simplification
|
|
10
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Harden this callback boundary and close the obvious trust and validation gaps. build;aw-build;security-and-hardening Hardening work should route to aw-build with security craft support build aw-build security-and-hardening
|
|
11
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Measure why this page is slow, optimize the hot path, and keep the change bounded. build;aw-build;performance-optimization Measure-first optimization should route to aw-build with performance craft support build aw-build performance-optimization
|
|
12
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Make this implementation in clean save points and keep the branch history reviewable. build;aw-build;git-workflow-and-versioning Git hygiene during implementation should stay in aw-build with git workflow support build aw-build git-workflow-and-versioning
|
|
13
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Test the repaired Communities moderation API change and prove the regression guard still holds. test;aw-test;quality-gates Test intent selects aw-test plus quality-gate support test aw-test platform-sdet:quality-gates
|
|
14
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Review this Communities moderation API PR and tell me if it is ready for staging. review;aw-review;code-review-pr;quality-gates Backend review intent selects aw-review plus review and quality gates review aw-review platform-review:code-review-pr,platform-sdet:quality-gates
|
|
15
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Record why we chose this queueing model and update the docs the next engineer will need. review;aw-review;documentation-and-adrs Decision-capture work should resolve to aw-review with docs-and-adrs support review aw-review documentation-and-adrs
|
|
16
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Take this Communities moderation API change through PR creation and staging version deployment. ship;aw-ship;code-review-pr;staging-deploy Backend ship intent selects aw-ship plus review and deploy support ship aw-ship platform-review:code-review-pr,platform-infra:staging-deploy,platform-infra:production-readiness
|
|
17
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Create the implementation spec for the approved Communities feed MFA change. plan;aw-plan;vue-development;design Frontend planning intent selects aw-plan plus frontend/design domain support plan aw-plan platform-design:system,platform-frontend:vue-development
|
|
18
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Plan the migration off the legacy webhook endpoint and show the deprecation path before we remove anything. plan;aw-plan;deprecation-and-migration Migration planning should resolve to aw-plan with deprecation support plan aw-plan deprecation-and-migration
|
|
19
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Take the approved Communities feed MFA UI change forward and update the app accordingly. build;aw-build;highrise;vue-development Frontend build intent selects aw-build plus UI implementation support build aw-build platform-frontend:vue-development,highrise-ui-governance,quality-gate-coder
|
|
20
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Test the approved Communities feed MFA UI change for responsive and accessibility regressions. test;aw-test;a11y-review;quality-gates Frontend test intent selects aw-test plus accessibility and quality-gate support test aw-test platform-frontend:a11y-review,platform-sdet:quality-gates
|
|
21
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Review this Communities feed MFA PR and tell me if it is ready for staging. review;aw-review;code-review-pr;a11y-review;design Frontend review intent selects aw-review plus review, design, and accessibility support review aw-review platform-review:code-review-pr,platform-design:review,platform-frontend:a11y-review,platform-sdet:quality-gates
|
|
22
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Deploy this verified Communities moderation API service to staging. deploy;aw-deploy;staging-deploy;production-readiness Backend deploy intent selects aw-deploy plus staging deploy support deploy aw-deploy platform-infra:staging-deploy,platform-infra:deployment-strategies,platform-infra:production-readiness
|
|
23
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Set up the release automation, preview gates, and rollback path for this service deployment. deploy;aw-deploy;ci-cd-and-automation Release-automation work should resolve to aw-deploy with CI/CD craft support deploy aw-deploy ci-cd-and-automation
|
|
24
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Take this Communities feed MFA change through PR creation and staging version deployment. ship;aw-ship;deploy-versioned-mfa;staging-deploy Frontend ship intent selects aw-ship plus versioned MFA deploy support ship aw-ship deploy-versioned-mfa,platform-infra:staging-deploy,platform-infra:production-readiness
|
|
25
|
-
full For the request below, answer with the primary AW public stage, the primary AW stage skill, and the first supporting platform skills you would load. Request: Prepare the launch checklist, rollback notes, and monitoring plan for this release. ship;aw-ship;documentation-and-adrs;ci-cd-and-automation Launch-closeout work should stay in aw-ship with docs and CI/CD support ship aw-ship documentation-and-adrs,ci-cd-and-automation
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Test harness for verifying SDLC skill auto-triggering across AI CLIs.
|
|
3
|
-
# Public AW surface under test: /aw:plan, /aw:build, /aw:investigate,
|
|
4
|
-
# /aw:test, /aw:review, /aw:deploy, and /aw:ship.
|
|
5
|
-
|
|
6
|
-
set -uo pipefail
|
|
7
|
-
|
|
8
|
-
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
9
|
-
RESULTS_DIR="$SCRIPT_DIR/results"
|
|
10
|
-
CASES_FILE="$SCRIPT_DIR/skill-trigger-cases.tsv"
|
|
11
|
-
DEFAULT_WORKSPACE_DIR="$(cd "$SCRIPT_DIR/../../.." && pwd)"
|
|
12
|
-
WORKSPACE_DIR="${WORKSPACE_DIR:-$DEFAULT_WORKSPACE_DIR}"
|
|
13
|
-
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
|
|
14
|
-
MAX_TURNS=3
|
|
15
|
-
QUICK_MODE=false
|
|
16
|
-
|
|
17
|
-
mkdir -p "$RESULTS_DIR"
|
|
18
|
-
|
|
19
|
-
RED='\033[0;31m'
|
|
20
|
-
GREEN='\033[0;32m'
|
|
21
|
-
YELLOW='\033[0;33m'
|
|
22
|
-
BLUE='\033[0;34m'
|
|
23
|
-
NC='\033[0m'
|
|
24
|
-
|
|
25
|
-
run_with_timeout() {
|
|
26
|
-
local secs="$1"
|
|
27
|
-
shift
|
|
28
|
-
if command -v gtimeout &>/dev/null; then
|
|
29
|
-
gtimeout "$secs" "$@"
|
|
30
|
-
else
|
|
31
|
-
perl -e "
|
|
32
|
-
alarm $secs;
|
|
33
|
-
\$SIG{ALRM} = sub { kill 9, \$pid; exit 124 };
|
|
34
|
-
\$pid = fork;
|
|
35
|
-
if (\$pid == 0) { exec @ARGV; }
|
|
36
|
-
waitpid \$pid, 0;
|
|
37
|
-
exit \$? >> 8;
|
|
38
|
-
" "$@"
|
|
39
|
-
fi
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
load_test_cases() {
|
|
43
|
-
local mode_filter="$1"
|
|
44
|
-
local -n out_cases="$2"
|
|
45
|
-
|
|
46
|
-
if [ ! -f "$CASES_FILE" ]; then
|
|
47
|
-
echo "Missing cases file: $CASES_FILE" >&2
|
|
48
|
-
exit 1
|
|
49
|
-
fi
|
|
50
|
-
|
|
51
|
-
while IFS=$'\t' read -r mode prompt expected_pattern description expected_route primary_skill supporting_skills; do
|
|
52
|
-
if [ -z "${mode:-}" ] || [[ "$mode" == \#* ]]; then
|
|
53
|
-
continue
|
|
54
|
-
fi
|
|
55
|
-
|
|
56
|
-
if [ "$mode_filter" = "quick" ] && [ "$mode" != "quick" ]; then
|
|
57
|
-
continue
|
|
58
|
-
fi
|
|
59
|
-
|
|
60
|
-
out_cases+=("$prompt|$expected_pattern|$description|$expected_route|$primary_skill|$supporting_skills")
|
|
61
|
-
done < "$CASES_FILE"
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
run_prompt() {
|
|
65
|
-
local cli="$1"
|
|
66
|
-
local prompt="$2"
|
|
67
|
-
local output_file="$3"
|
|
68
|
-
|
|
69
|
-
cd "$WORKSPACE_DIR"
|
|
70
|
-
|
|
71
|
-
case "$cli" in
|
|
72
|
-
claude)
|
|
73
|
-
run_with_timeout 120 claude -p "$prompt" \
|
|
74
|
-
--output-format text \
|
|
75
|
-
--max-turns "$MAX_TURNS" \
|
|
76
|
-
> "$output_file" 2>&1 || true
|
|
77
|
-
;;
|
|
78
|
-
codex)
|
|
79
|
-
run_with_timeout 120 codex exec --skip-git-repo-check --sandbox read-only "$prompt" \
|
|
80
|
-
> "$output_file" 2>&1 || true
|
|
81
|
-
;;
|
|
82
|
-
cursor)
|
|
83
|
-
run_with_timeout 120 cursor -p "$prompt" > "$output_file" 2>&1 || true
|
|
84
|
-
;;
|
|
85
|
-
opencode)
|
|
86
|
-
run_with_timeout 120 opencode -p "$prompt" > "$output_file" 2>&1 || true
|
|
87
|
-
;;
|
|
88
|
-
*)
|
|
89
|
-
echo "Unknown CLI: $cli" > "$output_file"
|
|
90
|
-
return 1
|
|
91
|
-
;;
|
|
92
|
-
esac
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
check_skill_triggered() {
|
|
96
|
-
local output_file="$1"
|
|
97
|
-
local expected_pattern="$2"
|
|
98
|
-
|
|
99
|
-
if [ ! -f "$output_file" ] || [ ! -s "$output_file" ]; then
|
|
100
|
-
echo "no_output"
|
|
101
|
-
return
|
|
102
|
-
fi
|
|
103
|
-
|
|
104
|
-
local content
|
|
105
|
-
content=$(cat "$output_file")
|
|
106
|
-
|
|
107
|
-
local grep_pattern="${expected_pattern//;/|}"
|
|
108
|
-
if echo "$content" | grep -qiE "$grep_pattern"; then
|
|
109
|
-
echo "triggered"
|
|
110
|
-
return
|
|
111
|
-
fi
|
|
112
|
-
|
|
113
|
-
if echo "$content" | grep -qiE "using.*skill|invoking.*skill|Skill\(skill:|I'm using the"; then
|
|
114
|
-
echo "skill_invoked_different"
|
|
115
|
-
return
|
|
116
|
-
fi
|
|
117
|
-
|
|
118
|
-
if echo "$content" | grep -qi "max turns"; then
|
|
119
|
-
echo "max_turns_hit"
|
|
120
|
-
return
|
|
121
|
-
fi
|
|
122
|
-
|
|
123
|
-
if [ ${#content} -gt 50 ]; then
|
|
124
|
-
echo "responded_no_skill"
|
|
125
|
-
return
|
|
126
|
-
fi
|
|
127
|
-
|
|
128
|
-
echo "no_response"
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
run_test() {
|
|
132
|
-
local cli="$1"
|
|
133
|
-
local prompt="$2"
|
|
134
|
-
local expected_pattern="$3"
|
|
135
|
-
local description="$4"
|
|
136
|
-
local test_id="$5"
|
|
137
|
-
|
|
138
|
-
local output_file="$RESULTS_DIR/${cli}_${test_id}_${TIMESTAMP}.txt"
|
|
139
|
-
|
|
140
|
-
printf " [%d] %-45s " "$test_id" "$description"
|
|
141
|
-
|
|
142
|
-
run_prompt "$cli" "$prompt" "$output_file"
|
|
143
|
-
|
|
144
|
-
local result
|
|
145
|
-
result=$(check_skill_triggered "$output_file" "$expected_pattern")
|
|
146
|
-
|
|
147
|
-
case "$result" in
|
|
148
|
-
triggered)
|
|
149
|
-
printf "${GREEN}PASS${NC}\n"
|
|
150
|
-
return 0
|
|
151
|
-
;;
|
|
152
|
-
skill_invoked_different)
|
|
153
|
-
printf "${YELLOW}PARTIAL${NC} — different skill invoked\n"
|
|
154
|
-
return 0
|
|
155
|
-
;;
|
|
156
|
-
max_turns_hit)
|
|
157
|
-
printf "${YELLOW}PARTIAL${NC} — hit max turns (tried to use tools)\n"
|
|
158
|
-
return 0
|
|
159
|
-
;;
|
|
160
|
-
responded_no_skill)
|
|
161
|
-
printf "${RED}FAIL${NC} — responded without skill\n"
|
|
162
|
-
head -c 100 "$output_file" 2>/dev/null | tr '\n' ' '
|
|
163
|
-
echo ""
|
|
164
|
-
return 1
|
|
165
|
-
;;
|
|
166
|
-
no_response|no_output)
|
|
167
|
-
printf "${RED}FAIL${NC} — no output\n"
|
|
168
|
-
return 1
|
|
169
|
-
;;
|
|
170
|
-
esac
|
|
171
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
-
LOCAL_ROOT=""
|
|
6
|
-
SEARCH_ROOT="$SCRIPT_DIR"
|
|
7
|
-
while [[ "$SEARCH_ROOT" != "/" ]]; do
|
|
8
|
-
if [[ -f "$SEARCH_ROOT/skills/using-aw-skills/SKILL.md" ]]; then
|
|
9
|
-
LOCAL_ROOT="$SEARCH_ROOT"
|
|
10
|
-
break
|
|
11
|
-
fi
|
|
12
|
-
SEARCH_ROOT="$(dirname "$SEARCH_ROOT")"
|
|
13
|
-
done
|
|
14
|
-
|
|
15
|
-
AW_REGISTRY_ROOT=""
|
|
16
|
-
SEARCH_ROOT="$SCRIPT_DIR"
|
|
17
|
-
while [[ "$SEARCH_ROOT" != "/" ]]; do
|
|
18
|
-
if [[ -d "$SEARCH_ROOT/.aw_registry" ]]; then
|
|
19
|
-
AW_REGISTRY_ROOT="$SEARCH_ROOT/.aw_registry"
|
|
20
|
-
break
|
|
21
|
-
fi
|
|
22
|
-
if [[ "$(basename "$SEARCH_ROOT")" == ".aw_registry" ]]; then
|
|
23
|
-
AW_REGISTRY_ROOT="$SEARCH_ROOT"
|
|
24
|
-
break
|
|
25
|
-
fi
|
|
26
|
-
SEARCH_ROOT="$(dirname "$SEARCH_ROOT")"
|
|
27
|
-
done
|
|
28
|
-
|
|
29
|
-
if [[ -z "$LOCAL_ROOT" && -z "$AW_REGISTRY_ROOT" ]]; then
|
|
30
|
-
echo '{"hookSpecificOutput": {"hookEventName": "SessionStart", "additionalContext": "WARNING: .aw_registry not found. AW skills unavailable."}}'
|
|
31
|
-
exit 0
|
|
32
|
-
fi
|
|
33
|
-
|
|
34
|
-
CONTEXT="# AW Session Context
|
|
35
|
-
|
|
36
|
-
## First Response Rule
|
|
37
|
-
Before any substantive response, select the smallest correct AW skill stack from the repo-local router.
|
|
38
|
-
Honor an explicit AW command and its mapped stage skill first.
|
|
39
|
-
Otherwise choose the needed process skill, primary stage skill, and matching route by intent, then load deeper domain skills.
|
|
40
|
-
Do not start with generic implementation, review, or deploy advice before skill selection.
|
|
41
|
-
|
|
42
|
-
## Primary Routes
|
|
43
|
-
- /aw:plan -> ideas, specs, task breakdown, architecture direction
|
|
44
|
-
- /aw:build -> approved implementation work
|
|
45
|
-
- /aw:investigate -> bugs, alerts, or unclear runtime failures
|
|
46
|
-
- /aw:test -> QA proof and regression evidence
|
|
47
|
-
- /aw:review -> findings, risk review, and readiness
|
|
48
|
-
- /aw:deploy -> rollout or release execution
|
|
49
|
-
- /aw:ship -> release closeout and final handoff
|
|
50
|
-
|
|
51
|
-
## Compatibility Routes
|
|
52
|
-
- /aw:execute -> compatibility route; resolve to /aw:build
|
|
53
|
-
- /aw:verify -> compatibility route; resolve to /aw:test or /aw:review
|
|
54
|
-
|
|
55
|
-
## Router Source
|
|
56
|
-
Use skills/using-aw-skills/SKILL.md as the repo-local router.
|
|
57
|
-
Load domain, platform, and craft skills only after the smallest correct AW route is selected."
|
|
58
|
-
|
|
59
|
-
# --- Output in Claude Code hookSpecificOutput format ---
|
|
60
|
-
# Escape for JSON: newlines, quotes, backslashes
|
|
61
|
-
JSON_CONTEXT=$(printf '%s' "$CONTEXT" | python3 -c '
|
|
62
|
-
import sys, json
|
|
63
|
-
content = sys.stdin.read()
|
|
64
|
-
print(json.dumps(content))
|
|
65
|
-
' 2>/dev/null || printf '%s' "$CONTEXT" | sed 's/\\/\\\\/g; s/"/\\"/g; s/\t/\\t/g' | awk '{printf "%s\\n", $0}')
|
|
66
|
-
|
|
67
|
-
echo "{\"hookSpecificOutput\": {\"hookEventName\": \"SessionStart\", \"additionalContext\": ${JSON_CONTEXT}}}"
|