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,152 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: aw-build
|
|
3
|
-
description: Build approved work from `.aw_docs/features/<feature_slug>/` artifacts in thin, reversible increments with org-standard validation and handoff discipline.
|
|
4
|
-
trigger: User requests implementation of approved work, or a compatible `/aw:execute` request needs to route to the canonical build stage.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# AW Build
|
|
8
|
-
|
|
9
|
-
## Overview
|
|
10
|
-
|
|
11
|
-
`aw-build` owns implementation only.
|
|
12
|
-
It turns approved work into the smallest correct code, config, docs, or migration changes, continues through the full approved build scope in thin slices, and then hands off to test or review instead of self-certifying success.
|
|
13
|
-
|
|
14
|
-
## When to Use
|
|
15
|
-
|
|
16
|
-
- approved implementation artifacts already exist
|
|
17
|
-
- the request is to code, configure, migrate, or document an approved change
|
|
18
|
-
- a bug was already investigated and now needs a concrete fix
|
|
19
|
-
- a legacy `/aw:execute` request arrives
|
|
20
|
-
|
|
21
|
-
Do not use for vague ideation, unclear bugs, or release-only work.
|
|
22
|
-
|
|
23
|
-
## Workflow
|
|
24
|
-
|
|
25
|
-
1. Intake the approved inputs.
|
|
26
|
-
Load `spec.md`, `tasks.md`, and any relevant design or PRD context.
|
|
27
|
-
If the plan has a critical gap, route back to `aw-plan`.
|
|
28
|
-
2. Select the smallest correct build mode.
|
|
29
|
-
Choose `code`, `infra`, `docs`, `migration`, or `config`.
|
|
30
|
-
3. Resolve the execution topology before editing.
|
|
31
|
-
Default to sequential slice execution.
|
|
32
|
-
Use bounded parallel fan-out only when the approved plan marks disjoint `parallel_candidate` slices, names `parallel_group` and `parallel_write_scope`, and supplies or accepts the default `max_parallel_subagents: 3`.
|
|
33
|
-
4. Slice the work before editing.
|
|
34
|
-
Use `../../references/build-increments.md` to keep changes thin, reversible, and rollback-friendly.
|
|
35
|
-
For multi-file or high-risk work, load `incremental-implementation`.
|
|
36
|
-
5. Build one slice or one bounded parallel wave at a time.
|
|
37
|
-
For behavior changes, require RED-GREEN or a concrete failing signal.
|
|
38
|
-
Use `../../references/testing-patterns.md` when test structure needs support.
|
|
39
|
-
6. Continue through the approved build scope.
|
|
40
|
-
Keep moving slice-to-slice until the approved implementation scope for this stage is complete or the next unsatisfied need is no longer build.
|
|
41
|
-
Do not stop after the first passing slice if more approved build slices remain.
|
|
42
|
-
Only pause early for an explicit blocker, a requested checkpoint, or a real approval boundary already present in the artifacts.
|
|
43
|
-
7. Apply org standards during the slice.
|
|
44
|
-
Respect `.aw_rules`, relevant platform playbooks, and the resolved GHL baseline.
|
|
45
|
-
When context quality or scope focus is degrading, load `context-engineering`.
|
|
46
|
-
For frontend work, load `../../references/frontend-quality-checklist.md`.
|
|
47
|
-
For non-trivial UI work, load `frontend-ui-engineering`.
|
|
48
|
-
For interface changes, load `../../references/interface-stability.md` and `api-and-interface-design`.
|
|
49
|
-
For deprecation, removal, or migration slices, load `deprecation-and-migration`.
|
|
50
|
-
8. Record evidence and boundaries.
|
|
51
|
-
Note what changed, what did not change, which slices or parallel waves are complete, which build slices still remain, and which checks were run.
|
|
52
|
-
When the approved tasks are grouped into phases, record phase transitions explicitly: which phase completed, which phase is now active, and what remains in later phases.
|
|
53
|
-
Use `../../references/git-save-points.md` when the work needs explicit save-point discipline.
|
|
54
|
-
For meaningful completed slices, create focused save-point commits.
|
|
55
|
-
For non-trivial commit boundaries, branch hygiene, or worktree isolation, load `git-workflow-and-versioning`.
|
|
56
|
-
9. Hand off cleanly.
|
|
57
|
-
If build scope is complete, route to `aw-test` for QA proof or `aw-review` when the work needs findings, governance, or readiness decisions.
|
|
58
|
-
If the work is blocked mid-build, name the blocker, the last completed slice, and the smallest safe next action instead of stopping with a vague pause.
|
|
59
|
-
|
|
60
|
-
## Completion Contract
|
|
61
|
-
|
|
62
|
-
Build is complete only when one of these is true:
|
|
63
|
-
|
|
64
|
-
- the approved implementation scope for the current stage is complete and written down
|
|
65
|
-
- a blocker prevents the next approved build slice and that blocker is named explicitly
|
|
66
|
-
|
|
67
|
-
A successful slice is a checkpoint, not an automatic terminal state.
|
|
68
|
-
|
|
69
|
-
Every build handoff must make these things obvious:
|
|
70
|
-
|
|
71
|
-
- what approved inputs were used
|
|
72
|
-
- which phases were completed, if the approved plan used phases
|
|
73
|
-
- which phase is current or next, if phased execution is still in flight
|
|
74
|
-
- which slices were completed
|
|
75
|
-
- whether work ran sequentially or in bounded parallel waves
|
|
76
|
-
- which build slices remain, if any
|
|
77
|
-
- which validation was run
|
|
78
|
-
- which save-point commits were created
|
|
79
|
-
- which exact next command should run next
|
|
80
|
-
|
|
81
|
-
Meaningful completed build slices must create save-point commits in git-capable workspaces.
|
|
82
|
-
If a slice cannot support a clean save-point commit, that is a planning problem and the slice should usually be merged with its dependent follow-up before build treats it as complete.
|
|
83
|
-
Parallel build fan-out must stay within the planned `max_parallel_subagents` cap, which defaults to `3` when the plan does not justify another number.
|
|
84
|
-
|
|
85
|
-
## Common Rationalizations
|
|
86
|
-
|
|
87
|
-
| Rationalization | Reality |
|
|
88
|
-
|---|---|
|
|
89
|
-
| "This is small enough to do in one big patch." | Small tasks still benefit from thin slices and explicit validation. |
|
|
90
|
-
| "I'll add tests after the code is working." | If the behavior is testable, failure-first proof should lead the change. |
|
|
91
|
-
| "Frontend changes don't need special handling." | Responsive behavior, accessibility, and design-system compliance are part of the work. |
|
|
92
|
-
| "I can just clean up adjacent code too." | Scope creep makes rollback and review harder. |
|
|
93
|
-
|
|
94
|
-
## Red Flags
|
|
95
|
-
|
|
96
|
-
- a slice touches unrelated files
|
|
97
|
-
- a passing slice is treated as stage completion even though planned build work remains
|
|
98
|
-
- tests are hand-waved instead of run or explicitly declared unavailable
|
|
99
|
-
- the diff is large enough that rollback is unclear
|
|
100
|
-
- interface changes are made without boundary validation
|
|
101
|
-
- bugfix code appears before the failing signal is concrete
|
|
102
|
-
|
|
103
|
-
## State File
|
|
104
|
-
|
|
105
|
-
`state.json` should record at least:
|
|
106
|
-
|
|
107
|
-
- `feature_slug`
|
|
108
|
-
- `stage: "build"`
|
|
109
|
-
- `mode`
|
|
110
|
-
- `status`
|
|
111
|
-
- written artifacts
|
|
112
|
-
- inputs used
|
|
113
|
-
- files changed
|
|
114
|
-
- `completed_phases` when the approved plan used phases
|
|
115
|
-
- `current_phase` for the active or next build phase when phase sequencing exists
|
|
116
|
-
- completed slices
|
|
117
|
-
- remaining slices
|
|
118
|
-
- parallel execution mode and cap when parallel build fan-out was used
|
|
119
|
-
- validation commands
|
|
120
|
-
- `save_point_commits`
|
|
121
|
-
- blockers or concerns
|
|
122
|
-
- recommended next commands
|
|
123
|
-
|
|
124
|
-
## Verification
|
|
125
|
-
|
|
126
|
-
Before leaving build, confirm:
|
|
127
|
-
|
|
128
|
-
- [ ] the change came from approved inputs or a clearly approved direct technical request
|
|
129
|
-
- [ ] the work was split into thin, reversible increments when non-trivial
|
|
130
|
-
- [ ] behavior changes have failing-signal evidence or a clear explanation of why not
|
|
131
|
-
- [ ] the approved build scope is either complete or blocked explicitly
|
|
132
|
-
- [ ] relevant org standards, platform playbooks, and `.aw_rules` were applied
|
|
133
|
-
- [ ] parallel execution, if used, stayed within the planned worker cap and disjoint write scopes
|
|
134
|
-
- [ ] phased plans, if used, recorded phase completion plus the next phase transition
|
|
135
|
-
- [ ] meaningful completed slices produced recorded save-point commits
|
|
136
|
-
- [ ] `execution.md` and `state.json` are updated
|
|
137
|
-
|
|
138
|
-
## Final Output Shape
|
|
139
|
-
|
|
140
|
-
Always end with:
|
|
141
|
-
|
|
142
|
-
- `Mode`
|
|
143
|
-
- `Approved Inputs`
|
|
144
|
-
- `Parallelization`
|
|
145
|
-
- `Phase Progress`
|
|
146
|
-
- `Completed Slices`
|
|
147
|
-
- `Remaining Build Scope`
|
|
148
|
-
- `Changes`
|
|
149
|
-
- `Validation`
|
|
150
|
-
- `Save Points`
|
|
151
|
-
- `Blockers`
|
|
152
|
-
- `Next`
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cases": [
|
|
3
|
-
{
|
|
4
|
-
"id": "backend-approved-slice",
|
|
5
|
-
"request": "Implement the approved Communities moderation API change in thin slices.",
|
|
6
|
-
"buildMode": "code",
|
|
7
|
-
"expectedFollowupStages": ["aw-test", "aw-review"],
|
|
8
|
-
"expectedArtifacts": ["execution.md", "state.json"],
|
|
9
|
-
"expectedSupportingSkills": ["platform-services:development", "incremental-implementation"]
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"id": "frontend-ui-slice",
|
|
13
|
-
"request": "Take the approved Communities feed MFA UI change forward and update the app accordingly.",
|
|
14
|
-
"buildMode": "code",
|
|
15
|
-
"expectedFollowupStages": ["aw-test", "aw-review"],
|
|
16
|
-
"expectedArtifacts": ["execution.md", "state.json"],
|
|
17
|
-
"expectedSupportingSkills": ["platform-frontend:vue-development", "highrise-ui-governance", "frontend-ui-engineering"]
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"id": "migration-slice",
|
|
21
|
-
"request": "Apply the approved migration slice without widening scope.",
|
|
22
|
-
"buildMode": "migration",
|
|
23
|
-
"expectedFollowupStages": ["aw-test", "aw-review"],
|
|
24
|
-
"expectedArtifacts": ["execution.md", "state.json"],
|
|
25
|
-
"expectedSupportingSkills": ["platform-data:migration-patterns", "deprecation-and-migration"]
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: aw-debug
|
|
3
|
-
description: Internal debugging helper that drives reproduction, root-cause isolation, confirming probes, and guarded repair.
|
|
4
|
-
trigger: Internal only. Invoked by aw-investigate, aw-build, aw-test, or aw-review when failure remains uncertain.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# AW Debug
|
|
8
|
-
|
|
9
|
-
## Overview
|
|
10
|
-
|
|
11
|
-
`aw-debug` is the internal debugging playbook.
|
|
12
|
-
It keeps bug work from devolving into guess-and-patch behavior.
|
|
13
|
-
|
|
14
|
-
## When to Use
|
|
15
|
-
|
|
16
|
-
- the failure is real but the cause is still uncertain
|
|
17
|
-
- multiple fix attempts already happened
|
|
18
|
-
- alerts or regressions need a concrete next probe
|
|
19
|
-
|
|
20
|
-
## Workflow
|
|
21
|
-
|
|
22
|
-
1. Capture a reproduction or equivalent failure signal.
|
|
23
|
-
2. Define expected vs actual behavior.
|
|
24
|
-
3. Identify the smallest plausible fault surface.
|
|
25
|
-
4. Run the next confirming probe.
|
|
26
|
-
5. Update the hypothesis based on evidence, not intuition.
|
|
27
|
-
6. Only then hand back to investigation, build, test, or review.
|
|
28
|
-
|
|
29
|
-
Use `../../references/debug-triage.md` for the stable checklist.
|
|
30
|
-
|
|
31
|
-
## Common Rationalizations
|
|
32
|
-
|
|
33
|
-
| Rationalization | Reality |
|
|
34
|
-
|---|---|
|
|
35
|
-
| "I already know the likely fix." | Likely is not confirmed. |
|
|
36
|
-
| "Another patch is faster than another probe." | Repeated speculative fixes usually waste more time. |
|
|
37
|
-
|
|
38
|
-
## Red Flags
|
|
39
|
-
|
|
40
|
-
- third fix attempt without new evidence
|
|
41
|
-
- patch size grows while root cause stays vague
|
|
42
|
-
- reproduction disappears and the team starts guessing from memory
|
|
43
|
-
|
|
44
|
-
## Verification
|
|
45
|
-
|
|
46
|
-
- [ ] a reproduction or equivalent failure signal exists
|
|
47
|
-
- [ ] expected vs actual behavior is explicit
|
|
48
|
-
- [ ] the next probe or likely cause is evidence-backed
|
|
49
|
-
- [ ] no speculative repair is treated as root-cause understanding
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: aw-deploy
|
|
3
|
-
description: Turn reviewed work into one requested release outcome with explicit GHL provider resolution and deterministic release artifacts.
|
|
4
|
-
trigger: Test and review passed and the user requests PR creation, branch handoff, or deployment.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# AW Deploy
|
|
8
|
-
|
|
9
|
-
## Overview
|
|
10
|
-
|
|
11
|
-
`aw-deploy` owns release action only.
|
|
12
|
-
It should not reopen planning or implementation.
|
|
13
|
-
|
|
14
|
-
## When to Use
|
|
15
|
-
|
|
16
|
-
- reviewed work needs a PR
|
|
17
|
-
- reviewed work should remain on a branch
|
|
18
|
-
- reviewed work should go to staging or production
|
|
19
|
-
|
|
20
|
-
Do not use for launch discipline or end-to-end orchestration.
|
|
21
|
-
|
|
22
|
-
## Workflow
|
|
23
|
-
|
|
24
|
-
1. Confirm the evidence gate.
|
|
25
|
-
The required QA and review outputs must exist.
|
|
26
|
-
2. Select one release path.
|
|
27
|
-
PR, branch, staging, or production.
|
|
28
|
-
3. Resolve the org-standard mechanism.
|
|
29
|
-
Use the repo archetype and resolved baseline profile to choose provider and mechanism.
|
|
30
|
-
Load `ci-cd-and-automation` for gate ordering, preview/deploy automation, and rollback-aware pipeline expectations.
|
|
31
|
-
For releases that retire or migrate legacy paths, load `deprecation-and-migration`.
|
|
32
|
-
4. Execute or record the blocker.
|
|
33
|
-
Complete the selected release action end-to-end for the chosen mode.
|
|
34
|
-
External failure should still yield deterministic `release.md` evidence.
|
|
35
|
-
5. Hand off to `aw-ship` when requested.
|
|
36
|
-
Use `aw-ship` for rollout safety, rollback readiness, and closeout.
|
|
37
|
-
|
|
38
|
-
## Completion Contract
|
|
39
|
-
|
|
40
|
-
Deploy is complete only when one of these is true:
|
|
41
|
-
|
|
42
|
-
- the selected release action finished and was recorded clearly
|
|
43
|
-
- the release action is blocked and the blocker is recorded clearly
|
|
44
|
-
|
|
45
|
-
Every deploy handoff must make these things obvious:
|
|
46
|
-
|
|
47
|
-
- which release mode was selected
|
|
48
|
-
- which provider and mechanism were resolved
|
|
49
|
-
- what evidence or links were produced
|
|
50
|
-
- what rollback path is currently known
|
|
51
|
-
- which exact next command should run next
|
|
52
|
-
|
|
53
|
-
## Common Rationalizations
|
|
54
|
-
|
|
55
|
-
| Rationalization | Reality |
|
|
56
|
-
|---|---|
|
|
57
|
-
| "Deploy can also handle launch closeout." | Release action and launch discipline are related but distinct. |
|
|
58
|
-
| "I'll just guess the staging mechanism." | Unknown deployment config must fail closed. |
|
|
59
|
-
|
|
60
|
-
## Red Flags
|
|
61
|
-
|
|
62
|
-
- deploy runs without clear test and review evidence
|
|
63
|
-
- provider or mechanism is guessed
|
|
64
|
-
- deploy silently turns into release orchestration
|
|
65
|
-
|
|
66
|
-
## State File
|
|
67
|
-
|
|
68
|
-
`state.json` should record at least:
|
|
69
|
-
|
|
70
|
-
- `feature_slug`
|
|
71
|
-
- `stage: "deploy"`
|
|
72
|
-
- `mode`
|
|
73
|
-
- `status`
|
|
74
|
-
- written artifacts
|
|
75
|
-
- provider
|
|
76
|
-
- resolved mechanism
|
|
77
|
-
- build or release links
|
|
78
|
-
- execution evidence
|
|
79
|
-
- rollback path
|
|
80
|
-
- blockers
|
|
81
|
-
- recommended next commands
|
|
82
|
-
|
|
83
|
-
## Verification
|
|
84
|
-
|
|
85
|
-
- [ ] one release action was selected explicitly
|
|
86
|
-
- [ ] provider and mechanism came from repo archetype and baseline resolution
|
|
87
|
-
- [ ] `release.md` and `state.json` are updated
|
|
88
|
-
- [ ] handoff to `aw-ship` is clear when launch discipline is still needed
|
|
89
|
-
|
|
90
|
-
## Final Output Shape
|
|
91
|
-
|
|
92
|
-
Always end with:
|
|
93
|
-
|
|
94
|
-
- `Selected Mode`
|
|
95
|
-
- `Provider`
|
|
96
|
-
- `Resolved Mechanism`
|
|
97
|
-
- `Build Links`
|
|
98
|
-
- `Execution Evidence`
|
|
99
|
-
- `Rollback Path`
|
|
100
|
-
- `Outcome`
|
|
101
|
-
- `Next`
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cases": [
|
|
3
|
-
{
|
|
4
|
-
"id": "pr-creation",
|
|
5
|
-
"request": "Create a PR for this reviewed work.",
|
|
6
|
-
"releasePath": "pr",
|
|
7
|
-
"expectedArtifacts": ["release.md", "state.json"],
|
|
8
|
-
"expectedSupportingSkills": ["ci-cd-and-automation"]
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"id": "service-staging",
|
|
12
|
-
"request": "Deploy this verified Communities moderation API service to staging.",
|
|
13
|
-
"releasePath": "staging",
|
|
14
|
-
"expectedArtifacts": ["release.md", "state.json"],
|
|
15
|
-
"expectedSupportingSkills": ["platform-infra:staging-deploy", "platform-infra:deployment-strategies", "platform-infra:production-readiness"]
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"id": "mfa-staging",
|
|
19
|
-
"request": "Deploy this verified Communities feed MFA to staging.",
|
|
20
|
-
"releasePath": "staging",
|
|
21
|
-
"expectedArtifacts": ["release.md", "state.json"],
|
|
22
|
-
"expectedSupportingSkills": ["deploy-versioned-mfa", "platform-infra:staging-deploy", "platform-infra:production-readiness"]
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"id": "release-automation",
|
|
26
|
-
"request": "Set up the release automation, preview gates, and rollback path for this service deployment.",
|
|
27
|
-
"releasePath": "deployment-automation",
|
|
28
|
-
"expectedArtifacts": ["release.md", "state.json"],
|
|
29
|
-
"expectedSupportingSkills": ["ci-cd-and-automation"]
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: aw-execute
|
|
3
|
-
description: Compatibility skill for the older execute stage. Follow aw-build as the canonical implementation behavior.
|
|
4
|
-
trigger: Internal compatibility only. Invoked when older docs, habits, or commands still reference aw-execute.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# AW Execute
|
|
8
|
-
|
|
9
|
-
## Overview
|
|
10
|
-
|
|
11
|
-
`aw-execute` is a compatibility layer.
|
|
12
|
-
The canonical implementation stage is now `aw-build`.
|
|
13
|
-
|
|
14
|
-
## When to Use
|
|
15
|
-
|
|
16
|
-
- a legacy `/aw:execute` request arrives
|
|
17
|
-
- an older doc or test still refers to execute semantics
|
|
18
|
-
|
|
19
|
-
Do not create a separate execute-specific workflow.
|
|
20
|
-
|
|
21
|
-
## Workflow
|
|
22
|
-
|
|
23
|
-
1. Route to `aw-build`.
|
|
24
|
-
2. Preserve the same artifact discipline:
|
|
25
|
-
- `execution.md`
|
|
26
|
-
- `state.json`
|
|
27
|
-
3. Preserve the same continuation and downstream handoff:
|
|
28
|
-
- complete the current build scope or block it explicitly
|
|
29
|
-
- `aw-test`
|
|
30
|
-
- `aw-review`
|
|
31
|
-
|
|
32
|
-
## Common Rationalizations
|
|
33
|
-
|
|
34
|
-
| Rationalization | Reality |
|
|
35
|
-
|---|---|
|
|
36
|
-
| "Execute can stay different from build for now." | Dual semantics create drift and confusion. |
|
|
37
|
-
|
|
38
|
-
## Red Flags
|
|
39
|
-
|
|
40
|
-
- execute-specific behavior diverges from build
|
|
41
|
-
- old naming is used to bypass the new stage model
|
|
42
|
-
|
|
43
|
-
## Verification
|
|
44
|
-
|
|
45
|
-
- [ ] the request was routed to `aw-build`
|
|
46
|
-
- [ ] the current build scope was completed or blocked explicitly
|
|
47
|
-
- [ ] artifact and handoff behavior stayed consistent with the canonical build stage
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# Mode: Code — TDD Execution
|
|
2
|
-
|
|
3
|
-
## Iron Law
|
|
4
|
-
|
|
5
|
-
> **Every [code] task follows TDD. No exceptions. No rationalizations.**
|
|
6
|
-
|
|
7
|
-
## Red-Green-Refactor Cycle
|
|
8
|
-
|
|
9
|
-
### 1. RED — Write the test first
|
|
10
|
-
|
|
11
|
-
- Write a failing test that describes the expected behavior.
|
|
12
|
-
- Run the test. It MUST fail. If it passes, the test is wrong or the behavior already exists.
|
|
13
|
-
- The test defines the contract. Implementation serves the test.
|
|
14
|
-
|
|
15
|
-
### 2. GREEN — Write minimal code to pass
|
|
16
|
-
|
|
17
|
-
- Write the simplest implementation that makes the test pass.
|
|
18
|
-
- Do not add features, optimizations, or "nice-to-haves" at this stage.
|
|
19
|
-
- Run the test. It MUST pass.
|
|
20
|
-
|
|
21
|
-
### 3. REFACTOR — Clean up without changing behavior
|
|
22
|
-
|
|
23
|
-
- Extract helpers, rename variables, reduce duplication.
|
|
24
|
-
- Run tests after every refactor step. They MUST still pass.
|
|
25
|
-
- Stop refactoring when the code is clean and readable.
|
|
26
|
-
|
|
27
|
-
## Rules
|
|
28
|
-
|
|
29
|
-
- **Test file per source file** — `feature.service.ts` gets `feature.service.spec.ts`.
|
|
30
|
-
- **Descriptive test names** — `it('should return empty array when no features exist for locationId')`.
|
|
31
|
-
- **No mocking internals** — Mock boundaries (HTTP, database, external services), not internal functions.
|
|
32
|
-
- **Coverage gate** — 80% minimum. Check with `npm run test:cov` or equivalent.
|
|
33
|
-
- **No skipped tests** — `it.skip` and `xit` are not allowed in committed code.
|
|
34
|
-
- **Platform logger** — Use `@platform-core/logger`, never `console.*`.
|
|
35
|
-
- **DTO validation** — Every `@Body()` parameter has a class-validator DTO.
|
|
36
|
-
- **Error handling** — Every async call has explicit error handling.
|
|
37
|
-
|
|
38
|
-
## Rationalization Table
|
|
39
|
-
|
|
40
|
-
| Rationalization | Why It Is Wrong |
|
|
41
|
-
|---|---|
|
|
42
|
-
| "I'll write tests after" | You will not. And the code will be shaped for implementation, not testability. |
|
|
43
|
-
| "This is too simple to test" | Simple code breaks too. The test documents the contract. |
|
|
44
|
-
| "Tests slow me down" | Tests slow you down now. Bugs slow you down forever. |
|
|
45
|
-
| "I'll just test the happy path" | Errors happen on unhappy paths. Test both. |
|
|
46
|
-
| "The integration test covers it" | Integration tests are slow and broad. Unit tests are fast and precise. |
|
|
47
|
-
| "I know this works" | Prove it. Run the test. |
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Mode: Docs — Write, Review, Commit
|
|
2
|
-
|
|
3
|
-
## Process
|
|
4
|
-
|
|
5
|
-
### 1. Write
|
|
6
|
-
|
|
7
|
-
- Write the documentation in the appropriate location.
|
|
8
|
-
- Follow existing documentation style and format in the repo.
|
|
9
|
-
- Include code examples where they aid understanding.
|
|
10
|
-
- Keep language clear, concise, and direct.
|
|
11
|
-
|
|
12
|
-
### 2. Self-Review Checklist
|
|
13
|
-
|
|
14
|
-
Before committing documentation:
|
|
15
|
-
|
|
16
|
-
- [ ] **Accuracy** — All technical details are correct and verified against the code.
|
|
17
|
-
- [ ] **Completeness** — All public APIs, config options, and workflows are documented.
|
|
18
|
-
- [ ] **Examples** — Code examples compile/run and match current API signatures.
|
|
19
|
-
- [ ] **Links** — All internal links resolve. No broken references.
|
|
20
|
-
- [ ] **Formatting** — Consistent heading levels, code block languages, and list styles.
|
|
21
|
-
- [ ] **No stale content** — Removed or updated references to deprecated features.
|
|
22
|
-
- [ ] **Audience** — Written for the target reader (developer, operator, end user).
|
|
23
|
-
|
|
24
|
-
### 3. Commit
|
|
25
|
-
|
|
26
|
-
- Commit documentation changes with `docs:` prefix.
|
|
27
|
-
- If docs accompany code changes, include in the same PR.
|
|
28
|
-
- Update the table of contents or index if one exists.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Mode: Infra — Dry-Run First
|
|
2
|
-
|
|
3
|
-
## Core Principle
|
|
4
|
-
|
|
5
|
-
> **Never apply infrastructure changes directly. Validate first, deploy via Jenkins.**
|
|
6
|
-
|
|
7
|
-
## Process
|
|
8
|
-
|
|
9
|
-
### 1. Validate
|
|
10
|
-
|
|
11
|
-
- Run `helm lint` for Helm chart changes.
|
|
12
|
-
- Run `terraform plan` for Terraform changes.
|
|
13
|
-
- Run `docker build` to verify Dockerfile changes.
|
|
14
|
-
- Review the diff carefully before proceeding.
|
|
15
|
-
|
|
16
|
-
### 2. Dry-Run
|
|
17
|
-
|
|
18
|
-
- `terraform plan -out=tfplan` — Review every resource change.
|
|
19
|
-
- `helm template` — Render and inspect the full manifest.
|
|
20
|
-
- `helm diff upgrade` — Compare current state with proposed changes.
|
|
21
|
-
|
|
22
|
-
### 3. Deploy via Jenkins
|
|
23
|
-
|
|
24
|
-
- **Never** run `kubectl apply`, `helm install`, or `terraform apply` directly.
|
|
25
|
-
- Use Jenkins shared library functions for all deployments.
|
|
26
|
-
- Trigger deployments via Jenkins pipeline, not CLI.
|
|
27
|
-
|
|
28
|
-
### 4. Verify
|
|
29
|
-
|
|
30
|
-
- Check pod status after deployment.
|
|
31
|
-
- Verify health probes are responding.
|
|
32
|
-
- Check logs for startup errors.
|
|
33
|
-
- Confirm the change is reflected in the running system.
|
|
34
|
-
|
|
35
|
-
## Platform Rules
|
|
36
|
-
|
|
37
|
-
- **Resource requests** — Set `resources.requests` for every container. Limits auto-calculated for servers.
|
|
38
|
-
- **Health probes** — Configure for every deployment (default path `/` on port 6050).
|
|
39
|
-
- **No CPU limits = requests** — Never set CPU limits equal to CPU requests (causes throttling).
|
|
40
|
-
- **No secrets in Helm** — Use GCP Secret Manager, not Helm values or ConfigMaps.
|
|
41
|
-
- **No KEDA** — KEDA is deprecated. Use `peakLoad.peakLoadMinReplicas` instead.
|
|
42
|
-
- **Pin image tags** — Never use `latest`. Use specific digest or semver.
|
|
43
|
-
- **Graceful shutdown** — `terminationGracePeriodSeconds` >= 30 seconds.
|
|
44
|
-
- **Terraform managed** — All GCP resources via Terraform. No manual console changes.
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# Mode: Migration — Staged Rollout
|
|
2
|
-
|
|
3
|
-
## Process
|
|
4
|
-
|
|
5
|
-
### 1. Script
|
|
6
|
-
|
|
7
|
-
- Write the migration script. It MUST be **idempotent** — running it twice produces the same result.
|
|
8
|
-
- Use `up()` and `down()` functions (or equivalent) for forward and rollback.
|
|
9
|
-
- Include validation checks that confirm the migration was applied correctly.
|
|
10
|
-
- Test the migration against a copy of production data (or realistic test data).
|
|
11
|
-
|
|
12
|
-
### 2. Rollback
|
|
13
|
-
|
|
14
|
-
- Every migration MUST have a rollback path.
|
|
15
|
-
- Write the rollback script before applying the migration.
|
|
16
|
-
- Test the rollback independently.
|
|
17
|
-
- Document the rollback procedure in the migration file header.
|
|
18
|
-
|
|
19
|
-
### 3. Validate
|
|
20
|
-
|
|
21
|
-
- Run the migration in a test/staging environment first.
|
|
22
|
-
- Verify data integrity after migration.
|
|
23
|
-
- Check that dependent queries still work with the new schema.
|
|
24
|
-
- Confirm indexes are in place before queries execute.
|
|
25
|
-
|
|
26
|
-
### 4. Commit
|
|
27
|
-
|
|
28
|
-
- Commit migration files with `migration:` or `feat:` prefix.
|
|
29
|
-
- Include the rollback script in the same commit.
|
|
30
|
-
- Document the migration in the PR description.
|
|
31
|
-
|
|
32
|
-
## Rules
|
|
33
|
-
|
|
34
|
-
### Indexes
|
|
35
|
-
|
|
36
|
-
- **Deploy indexes BEFORE** deploying schema or query changes that use them.
|
|
37
|
-
- Use `background: true` for index creation (or rely on MongoDB 4.2+ default).
|
|
38
|
-
- Add compound indexes for multi-field queries — avoid multiple single-field indexes.
|
|
39
|
-
- Scope all MongoDB queries by `locationId` (compound index required).
|
|
40
|
-
|
|
41
|
-
### Fields
|
|
42
|
-
|
|
43
|
-
- New fields MUST have default values or be nullable — never break existing documents.
|
|
44
|
-
- Remove fields in two phases: (1) stop writing, (2) remove after migration window.
|
|
45
|
-
- Never rename fields in a single migration — add new, migrate data, remove old.
|
|
46
|
-
|
|
47
|
-
### Secrets
|
|
48
|
-
|
|
49
|
-
- Never store secrets in migration scripts.
|
|
50
|
-
- Use environment variables or GCP Secret Manager for connection strings.
|
|
51
|
-
- Never log sensitive data during migration (PII, credentials, tokens).
|
|
52
|
-
|
|
53
|
-
### Data Safety
|
|
54
|
-
|
|
55
|
-
- Back up the collection/table before running destructive migrations.
|
|
56
|
-
- Use transactions where available for multi-document updates.
|
|
57
|
-
- Set reasonable batch sizes for bulk operations — avoid OOM.
|
|
58
|
-
- Log progress for long-running migrations (every N records).
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Worker Role: Implementer
|
|
2
|
-
|
|
3
|
-
## Objective
|
|
4
|
-
|
|
5
|
-
Own one bounded task unit from the approved AW execution inputs.
|
|
6
|
-
Change only the smallest correct file set for that unit.
|
|
7
|
-
|
|
8
|
-
## Inputs
|
|
9
|
-
|
|
10
|
-
- approved feature inputs from `.aw_docs/features/<feature_slug>/`
|
|
11
|
-
- current task-unit bundle
|
|
12
|
-
- repo-local AW execution contract
|
|
13
|
-
|
|
14
|
-
## Required Behavior
|
|
15
|
-
|
|
16
|
-
1. confirm the task-unit goal and file scope
|
|
17
|
-
2. capture the RED or failure-first signal when behavior changes
|
|
18
|
-
3. implement the smallest correct GREEN change
|
|
19
|
-
4. record handoff notes for spec and quality review
|
|
20
|
-
5. stop when the task unit is complete or blocked
|
|
21
|
-
|
|
22
|
-
## Hard Gates
|
|
23
|
-
|
|
24
|
-
- do not widen the write scope without naming why
|
|
25
|
-
- do not skip runnable tests silently
|
|
26
|
-
- do not mark the task done without concrete notes for the next review roles
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Worker Role: Parallel Worker
|
|
2
|
-
|
|
3
|
-
## Objective
|
|
4
|
-
|
|
5
|
-
Execute one task unit that has already been marked `parallel_candidate` with a disjoint write scope.
|
|
6
|
-
The orchestrator should keep active parallel workers within the configured cap, which defaults to `3`.
|
|
7
|
-
|
|
8
|
-
## Inputs
|
|
9
|
-
|
|
10
|
-
- current task-unit bundle
|
|
11
|
-
- declared disjoint write scope
|
|
12
|
-
- repo-local AW execution contract
|
|
13
|
-
|
|
14
|
-
## Required Behavior
|
|
15
|
-
|
|
16
|
-
1. stay inside the declared write scope
|
|
17
|
-
2. keep notes concise so the merge-back step can reconcile outputs cleanly
|
|
18
|
-
3. stop immediately if the work crosses into another worker's files
|
|
19
|
-
|
|
20
|
-
## Hard Gates
|
|
21
|
-
|
|
22
|
-
- do not edit shared files outside the declared scope
|
|
23
|
-
- do not claim a task unit is parallel-safe if overlap was discovered during execution
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Worker Role: Quality Reviewer
|
|
2
|
-
|
|
3
|
-
## Objective
|
|
4
|
-
|
|
5
|
-
Check maintainability, reliability, and stage readiness for one completed task unit.
|
|
6
|
-
|
|
7
|
-
## Inputs
|
|
8
|
-
|
|
9
|
-
- implementer handoff notes
|
|
10
|
-
- spec review outcome
|
|
11
|
-
- current task-unit bundle
|
|
12
|
-
|
|
13
|
-
## Required Behavior
|
|
14
|
-
|
|
15
|
-
1. inspect the changed files and local validation notes
|
|
16
|
-
2. flag maintainability or reliability issues that would block handoff
|
|
17
|
-
3. state `pass`, `pass_with_notes`, or `fail`
|
|
18
|
-
4. hand back the smallest concrete repair scope when failing
|
|
19
|
-
|
|
20
|
-
## Hard Gates
|
|
21
|
-
|
|
22
|
-
- do not reopen planning
|
|
23
|
-
- do not wave through unresolved reliability or validation gaps
|