aw-ecc 1.4.49 → 1.4.51
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/.codex/hooks/aw-post-tool-use.sh +12 -0
- package/.codex/hooks/aw-pre-tool-use.sh +6 -0
- package/.codex/hooks/aw-session-start.sh +32 -0
- package/.codex/hooks/aw-stop.sh +12 -0
- package/.codex/hooks/aw-user-prompt-submit.sh +18 -0
- package/.codex/hooks.json +62 -0
- package/commands/plan.md +13 -12
- package/package.json +1 -1
- package/skills/aw-plan/SKILL.md +23 -1
- package/skills/grill-with-docs/SKILL.md +23 -5
- package/skills/grill-with-docs/evals/eval-aw-docs-context-root.md +50 -0
- package/skills/using-aw-skills/SKILL.md +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# Capture stdin before invoking the non-blocking telemetry sidecar.
|
|
5
|
+
STDIN=$(cat)
|
|
6
|
+
|
|
7
|
+
TELEMETRY_HOOK="$HOME/.aw-ecc/scripts/hooks/aw-usage-post-tool-use.js"
|
|
8
|
+
if [[ -f "$TELEMETRY_HOOK" ]] && command -v node >/dev/null 2>&1; then
|
|
9
|
+
printf '%s' "$STDIN" | AW_HARNESS=codex node "$TELEMETRY_HOOK" >/dev/null 2>&1 || true
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
exit 0
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# aw-managed: codex-global-session-start
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
# Capture stdin so we can feed it to both telemetry and the AW router delegate.
|
|
6
|
+
STDIN=$(cat)
|
|
7
|
+
|
|
8
|
+
# Fire session_start telemetry (non-blocking, all output suppressed).
|
|
9
|
+
TELEMETRY_HOOK="$HOME/.aw-ecc/scripts/hooks/aw-usage-session-start.js"
|
|
10
|
+
if [[ -f "$TELEMETRY_HOOK" ]] && command -v node >/dev/null 2>&1; then
|
|
11
|
+
printf '%s' "$STDIN" | AW_HARNESS=codex node "$TELEMETRY_HOOK" >/dev/null 2>&1 || true
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
TARGETS=(
|
|
15
|
+
"$HOME/.aw_registry/platform/core/skills/using-aw-skills/hooks/session-start.sh"
|
|
16
|
+
"$HOME/.aw/.aw_registry/platform/core/skills/using-aw-skills/hooks/session-start.sh"
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
for target in "${TARGETS[@]}"; do
|
|
20
|
+
if [[ -f "$target" ]]; then
|
|
21
|
+
printf '%s' "$STDIN" | bash "$target"
|
|
22
|
+
exit $?
|
|
23
|
+
fi
|
|
24
|
+
done
|
|
25
|
+
|
|
26
|
+
CONTEXT="# AW Session Context
|
|
27
|
+
|
|
28
|
+
WARNING: AW using-aw-skills hook not found in ~/.aw_registry. Run aw init or aw pull platform."
|
|
29
|
+
|
|
30
|
+
JSON_CONTEXT=$(printf '%s' "$CONTEXT" | python3 -c 'import json, sys; print(json.dumps(sys.stdin.read()))')
|
|
31
|
+
|
|
32
|
+
echo "{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":${JSON_CONTEXT}}}"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# Capture stdin before invoking the non-blocking telemetry sidecar.
|
|
5
|
+
STDIN=$(cat)
|
|
6
|
+
|
|
7
|
+
TELEMETRY_HOOK="$HOME/.aw-ecc/scripts/hooks/aw-usage-stop.js"
|
|
8
|
+
if [[ -f "$TELEMETRY_HOOK" ]] && command -v node >/dev/null 2>&1; then
|
|
9
|
+
printf '%s' "$STDIN" | AW_HARNESS=codex node "$TELEMETRY_HOOK" >/dev/null 2>&1 || true
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
exit 0
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# Capture stdin so we can feed it to both telemetry and the reminder delegate.
|
|
5
|
+
STDIN=$(cat)
|
|
6
|
+
|
|
7
|
+
TELEMETRY_HOOK="$HOME/.aw-ecc/scripts/hooks/aw-usage-prompt-submit.js"
|
|
8
|
+
if [[ -f "$TELEMETRY_HOOK" ]] && command -v node >/dev/null 2>&1; then
|
|
9
|
+
printf '%s' "$STDIN" | AW_HARNESS=codex node "$TELEMETRY_HOOK" >/dev/null 2>&1 || true
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
TARGET="$HOME/.aw-ecc/scripts/hooks/session-start-rules-context.sh"
|
|
13
|
+
if [[ -f "$TARGET" ]]; then
|
|
14
|
+
printf '%s' "$STDIN" | bash "$TARGET"
|
|
15
|
+
exit $?
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
exit 0
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "*",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "bash \"$HOME/.codex/hooks/aw-session-start.sh\""
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"description": "Load AW routing context at session start"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"UserPromptSubmit": [
|
|
16
|
+
{
|
|
17
|
+
"hooks": [
|
|
18
|
+
{
|
|
19
|
+
"type": "command",
|
|
20
|
+
"command": "bash \"$HOME/.codex/hooks/aw-user-prompt-submit.sh\""
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"description": "Emit Codex prompt telemetry and inject compact AW routing reminders on each prompt"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"PreToolUse": [
|
|
27
|
+
{
|
|
28
|
+
"matcher": "*",
|
|
29
|
+
"hooks": [
|
|
30
|
+
{
|
|
31
|
+
"type": "command",
|
|
32
|
+
"command": "bash \"$HOME/.codex/hooks/aw-pre-tool-use.sh\""
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"description": "Reserved AW pre-tool-use phase for Codex home installs"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"PostToolUse": [
|
|
39
|
+
{
|
|
40
|
+
"matcher": "*",
|
|
41
|
+
"hooks": [
|
|
42
|
+
{
|
|
43
|
+
"type": "command",
|
|
44
|
+
"command": "bash \"$HOME/.codex/hooks/aw-post-tool-use.sh\""
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"description": "Emit Codex post-tool-use telemetry for supported Bash-backed events"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"Stop": [
|
|
51
|
+
{
|
|
52
|
+
"hooks": [
|
|
53
|
+
{
|
|
54
|
+
"type": "command",
|
|
55
|
+
"command": "bash \"$HOME/.codex/hooks/aw-stop.sh\""
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"description": "Emit Codex stop telemetry for response_completed events"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
package/commands/plan.md
CHANGED
|
@@ -66,18 +66,19 @@ Record `html_companion_artifacts` in `state.json` with `source_path`, `html_path
|
|
|
66
66
|
## Execution Rules
|
|
67
67
|
|
|
68
68
|
1. Classify the request into one primary mode first.
|
|
69
|
-
2.
|
|
70
|
-
3.
|
|
71
|
-
4. Use `to-
|
|
72
|
-
5.
|
|
73
|
-
6.
|
|
74
|
-
7.
|
|
75
|
-
8.
|
|
76
|
-
9.
|
|
77
|
-
10. Route approved
|
|
78
|
-
11.
|
|
79
|
-
12. When writing
|
|
80
|
-
13.
|
|
69
|
+
2. Always invoke `grill-with-docs` as the Decision Confidence Gate before writing artifacts, then follow its returned depth: proceed, ask one confirmation question, or run the full one-question-at-a-time interview.
|
|
70
|
+
3. Treat deadline, launch, production, customer-visible, multi-repo, Auth/DNS/CI/CD/permissions, tenant isolation, rollback, ownership, or non-measurable acceptance criteria as full-interview triggers unless repo evidence fully resolves them.
|
|
71
|
+
4. Use `to-prd` only when product scope must be frozen (`product` or `full` mode, or missing product assumptions); do not require a PRD for a technical request that is already well defined.
|
|
72
|
+
5. Use `to-issues` before `tasks.md` when the work needs a vertical-slice breakdown; feed those slices into `aw-tasks` rather than publishing tracker issues by default.
|
|
73
|
+
6. Operate in read-only planning mode until the artifacts are written.
|
|
74
|
+
7. Default to single-scope planning.
|
|
75
|
+
8. If the request is fuzzy, discovery-heavy, or too large for one spec, route internally through `aw-brainstorm` before technical planning.
|
|
76
|
+
9. Use existing artifacts as inputs when they are already sufficient.
|
|
77
|
+
10. Route approved technical direction through `aw-spec` before task planning.
|
|
78
|
+
11. Route approved specs through `aw-tasks` when execution-ready tasks are missing or stale.
|
|
79
|
+
12. When writing technical or task artifacts, make them concrete enough for build to proceed without re-planning file scope, validation, and task order.
|
|
80
|
+
13. When writing `tasks.md`, always include an explicit `## Spec Brief` section and organize the work into explicit phases.
|
|
81
|
+
14. Generate or explicitly record the HTML companion status before handoff.
|
|
81
82
|
|
|
82
83
|
## Planning Depth
|
|
83
84
|
|
package/package.json
CHANGED
package/skills/aw-plan/SKILL.md
CHANGED
|
@@ -42,7 +42,8 @@ This legacy heading maps to the detailed planning process below.
|
|
|
42
42
|
In `product` mode, start by having a conversation with the user. Think of it like a PM sitting down with a stakeholder — ask about scope, target users, success criteria, edge cases, and constraints. Listen to the answers. Follow up on anything vague. Keep going until the problem is genuinely clear. Only then move to writing artifacts.
|
|
43
43
|
In other modes, decide whether the request is already clear enough for direct planning or needs discovery first.
|
|
44
44
|
For raw concepts or product-shaping work, load `idea-refine` before freezing the direction.
|
|
45
|
-
|
|
45
|
+
Always route planning intake through `grill-with-docs` as the Decision Confidence Gate before writing artifacts.
|
|
46
|
+
Use adaptive depth: `clear` means state assumptions and proceed, `confirm` means ask one confirmation question, and `grill` means run the full one-question-at-a-time interview.
|
|
46
47
|
4. Plan in dependency order.
|
|
47
48
|
Perform an explicit architecture review before freezing the technical path.
|
|
48
49
|
Name the key assumptions, constraints, risks, and mitigations instead of leaving them implied.
|
|
@@ -78,6 +79,27 @@ Use the smallest correct internal route:
|
|
|
78
79
|
|
|
79
80
|
Do not collapse all of these responsibilities back into one vague planning pass.
|
|
80
81
|
|
|
82
|
+
## Decision Confidence Gate
|
|
83
|
+
|
|
84
|
+
Before writing planning artifacts, load `grill-with-docs` and use its returned depth to decide the next move.
|
|
85
|
+
|
|
86
|
+
- If `grill-with-docs` returns `clear`, state the key assumptions it accepted and proceed.
|
|
87
|
+
- If it returns `confirm`, ask its one recommended confirmation question and wait for the answer.
|
|
88
|
+
- If it returns `grill`, continue its one-question-at-a-time interview before freezing the plan.
|
|
89
|
+
|
|
90
|
+
Treat the request as full-interview depth when any trigger is present:
|
|
91
|
+
|
|
92
|
+
- deadline, launch, production, customer-visible, or executive/high-impact wording
|
|
93
|
+
- staging vs production, partial vs full rollout, rollback posture, or ownership is unclear
|
|
94
|
+
- acceptance criteria are not measurable enough to prove the plan is done
|
|
95
|
+
- terms are overloaded or likely to conflict with `CONTEXT.md`, ADRs, AW docs, repo docs, or code
|
|
96
|
+
- the ask spans multiple repos, teams, services, environments, or external systems
|
|
97
|
+
- Auth, DNS, CI/CD, permissions, tenant isolation, security, data migration, or public contract decisions are involved
|
|
98
|
+
- existing AW docs or repo evidence can answer facts but not the user's intent, risk tolerance, or business priority
|
|
99
|
+
|
|
100
|
+
Do not skip `grill-with-docs` only because code or PR evidence exists. Explore facts locally when possible, then ask the user only for the remaining decision.
|
|
101
|
+
Do not let `/aw:plan` choose a shortcut before `grill-with-docs` runs.
|
|
102
|
+
|
|
81
103
|
## Planning Modes
|
|
82
104
|
|
|
83
105
|
| Mode | Use when | Primary outputs |
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: grill-with-docs
|
|
3
|
-
description: Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.
|
|
3
|
+
description: Grilling session that challenges your plan against the existing domain model, AW planning context, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## When To Use
|
|
7
7
|
|
|
8
|
-
Use this inside
|
|
8
|
+
Use this inside every `/aw:plan` as the Decision Confidence Gate.
|
|
9
|
+
Its default job is to classify planning intake as `clear`, `confirm`, or `grill`, not to force a long interview every time.
|
|
10
|
+
|
|
11
|
+
High-impact requests should be grilled even when they sound clear on the surface if they hide decisions about staging vs production, rollout scope, ownership, Auth/DNS/CI/CD/permissions, tenant isolation, rollback, deadlines, or what counts as "live" or "done".
|
|
12
|
+
For low-risk, single-scope technical work, return `clear` with assumptions and proceed. If exactly one assumption controls the outcome, return `confirm` and ask one question with a recommended answer. If the problem is fuzzy, high-impact, domain language is overloaded, acceptance criteria are under-specified, or existing AW docs, repo docs, or code may contradict the user's mental model, return `grill` and run the full interview.
|
|
9
13
|
|
|
10
14
|
<what-to-do>
|
|
11
15
|
|
|
12
16
|
Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
In `grill` depth, ask questions one at a time, waiting for feedback on each question before continuing.
|
|
15
19
|
|
|
16
20
|
If a question can be answered by exploring the codebase, explore the codebase instead.
|
|
17
21
|
|
|
@@ -21,7 +25,19 @@ If a question can be answered by exploring the codebase, explore the codebase in
|
|
|
21
25
|
|
|
22
26
|
## Domain awareness
|
|
23
27
|
|
|
24
|
-
During codebase exploration, also look for existing documentation
|
|
28
|
+
During codebase exploration, also look for AW planning context and existing documentation.
|
|
29
|
+
|
|
30
|
+
### AW feature context
|
|
31
|
+
|
|
32
|
+
If `.aw_docs/` exists, resolve the active AW context before assuming the repo has no glossary or ADRs.
|
|
33
|
+
|
|
34
|
+
1. Look for an explicit feature slug in the prompt, current branch, PR title, current files, or conversation. If present, inspect `.aw_docs/features/<slug>/`.
|
|
35
|
+
2. If no explicit slug is present, search `.aw_docs/features/` for likely matches using the user's terms. Prefer folders with fresh `state.json`, `prd.md`, `design.md`, `spec.md`, `tasks.md`, `execution.md`, or `verification.md`.
|
|
36
|
+
3. If multiple feature folders plausibly match, name the candidates and ask one short selection question before continuing.
|
|
37
|
+
4. Read relevant AW feature files as planning memory. Markdown files remain the canonical agent-readable source; HTML sidecars are human-facing companions.
|
|
38
|
+
5. Use `state.json`, plan files, PR links, git remotes, and changed paths to identify the target implementation repo or repos. In a workspace that contains multiple repos, do not treat the workspace container root as the domain root.
|
|
39
|
+
|
|
40
|
+
AW docs do not replace domain docs. They tell you which feature and target repos to inspect. After resolving the AW feature context, inspect the target repo or bounded domain for `CONTEXT.md`, `CONTEXT-MAP.md`, and ADR folders.
|
|
25
41
|
|
|
26
42
|
### File structure
|
|
27
43
|
|
|
@@ -53,7 +69,9 @@ If a `CONTEXT-MAP.md` exists at the root, the repo has multiple contexts. The ma
|
|
|
53
69
|
│ └── docs/adr/
|
|
54
70
|
```
|
|
55
71
|
|
|
56
|
-
Create files lazily — only when you have something to write. If no `CONTEXT.md` exists, create one when the first term is resolved. If no `docs/adr/` exists, create it when the first ADR is needed.
|
|
72
|
+
Create files lazily — only when you have something to write. If no `CONTEXT.md` exists in the resolved target repo or bounded context, create one when the first term is resolved. If no `docs/adr/` or `docs/adrs/` exists in that target context, create it when the first ADR is needed.
|
|
73
|
+
|
|
74
|
+
Do not create `CONTEXT.md` or `docs/adr/` at a workspace container root just because they are missing there. If the root contains `.aw_docs/` plus multiple nested repos, first resolve the AW feature folder and target repo, then create or update docs in the target context.
|
|
57
75
|
|
|
58
76
|
## During the session
|
|
59
77
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Eval: AW Docs Context Root
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Verify `grill-with-docs` resolves AW feature context before assuming root-level `CONTEXT.md` or `docs/adr/` are missing.
|
|
6
|
+
|
|
7
|
+
## Scenario
|
|
8
|
+
|
|
9
|
+
Workspace layout:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
/workspace/
|
|
13
|
+
├── .aw_docs/
|
|
14
|
+
│ └── features/
|
|
15
|
+
│ └── teamofone-routines-agents-forward-plan/
|
|
16
|
+
│ ├── spec.md
|
|
17
|
+
│ ├── tasks.md
|
|
18
|
+
│ └── state.json
|
|
19
|
+
├── teamofone-monorepo/
|
|
20
|
+
│ ├── package.json
|
|
21
|
+
│ └── README.md
|
|
22
|
+
└── platform-devtools-backend/
|
|
23
|
+
├── package.json
|
|
24
|
+
└── README.md
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
No `CONTEXT.md`, `CONTEXT-MAP.md`, or `docs/adr/` exists at `/workspace/`.
|
|
28
|
+
|
|
29
|
+
User asks:
|
|
30
|
+
|
|
31
|
+
> Use grill-with-docs for the TeamOfOne routines and agents PRs. When we say Routine, is it saved configuration or executable workflow?
|
|
32
|
+
|
|
33
|
+
## Expected Behavior
|
|
34
|
+
|
|
35
|
+
The agent should:
|
|
36
|
+
|
|
37
|
+
- Inspect `.aw_docs/features/teamofone-routines-agents-forward-plan/` as the active planning context.
|
|
38
|
+
- Use `state.json`, `spec.md`, and `tasks.md` to identify likely target repos before declaring docs absent.
|
|
39
|
+
- Avoid saying the workspace has no glossary solely because `/workspace/CONTEXT.md` and `/workspace/docs/adr/` are absent.
|
|
40
|
+
- Avoid creating `/workspace/CONTEXT.md` or `/workspace/docs/adr/`.
|
|
41
|
+
- Say that durable context docs should be created only in the resolved target repo or bounded context after terms are agreed.
|
|
42
|
+
|
|
43
|
+
## Failure Modes
|
|
44
|
+
|
|
45
|
+
The eval fails if the agent:
|
|
46
|
+
|
|
47
|
+
- Treats `/workspace/` as the domain root without checking `.aw_docs/features/`.
|
|
48
|
+
- Ignores the AW feature folder.
|
|
49
|
+
- Creates or proposes root-level context docs in the workspace container.
|
|
50
|
+
- Uses only generic `CONTEXT.md` / `docs/adr/` discovery language.
|
|
@@ -191,7 +191,7 @@ Load across stages when context applies: `incremental-implementation`, `context-
|
|
|
191
191
|
|
|
192
192
|
| Skill | Load when |
|
|
193
193
|
|---|---|
|
|
194
|
-
| `grill-with-docs` | Inside `/aw:plan`
|
|
194
|
+
| `grill-with-docs` | Inside every `/aw:plan` as the Decision Confidence Gate. It classifies planning intake as `clear`, `confirm`, or `grill`: clear low-risk plans state assumptions and proceed, mostly-clear plans ask one confirmation question, and high-impact/fuzzy/hidden-decision/contradictory-docs plans run the full one-question-at-a-time grill. |
|
|
195
195
|
| `to-prd` | Inside `/aw:plan` for product/full mode or when missing product assumptions must be frozen into `prd.md`; do not require it for already-clear technical plans. |
|
|
196
196
|
| `to-issues` | Inside `/aw:plan` before `tasks.md` when a PRD/spec needs vertical tracer-bullet slices; remote issue publishing requires an explicit user request. |
|
|
197
197
|
| `tdd` | Inside `/aw:build` as a companion to `tdd-workflow` when behavior-test, mocking, or tracer-bullet judgement needs more depth. |
|