@ksuchoi216/ahe 0.1.2 → 0.1.7
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/ahe-shared/config.yaml +8 -0
- package/.codex/hooks/ahe-hook.js +163 -105
- package/.codex/skills/ahe-compression/SKILL.md +97 -0
- package/.codex/skills/ahe-compression/agents/openai.yaml +6 -0
- package/.codex/skills/ahe-compression/scripts/check-harness-size.sh +109 -0
- package/.codex/skills/ahe-conversator/SKILL.md +44 -0
- package/.codex/skills/ahe-harness/SKILL.md +115 -0
- package/.codex/skills/ahe-init/SKILL.md +16 -23
- package/.codex/skills/ahe-reviewer/SKILL.md +35 -0
- package/.codex/skills/ahe-solver/SKILL.md +24 -0
- package/.codex/skills/ahe-thinker/SKILL.md +80 -0
- package/README.md +29 -192
- package/bin/ahe +61 -4
- package/package.json +4 -3
- package/.codex/skills/ahe-conversation/SKILL.md +0 -73
- package/.codex/skills/ahe-spec/SKILL.md +0 -63
- package/.codex/skills/ahe-thinking/SKILL.md +0 -88
- package/.codex/skills/ahe-update/SKILL.md +0 -66
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ahe-harness
|
|
3
|
+
description: Internal AHE harness workflow for managing product docs, instructions, feature tracking, session artifacts, todo sync, and compression-aware maintenance.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AHE Harness
|
|
7
|
+
|
|
8
|
+
This is an internal AHE workflow skill, not a user-facing command.
|
|
9
|
+
|
|
10
|
+
Do not treat `$ahe-harness` as a user command.
|
|
11
|
+
Use it when `ahe-thinker` or another worker decides that harness artifacts must
|
|
12
|
+
be created, updated, reconciled, or compressed.
|
|
13
|
+
|
|
14
|
+
## Command Workflow: ahe-harness
|
|
15
|
+
|
|
16
|
+
### Harness Inspection
|
|
17
|
+
|
|
18
|
+
- Read `docs/PRODUCT.md` if it exists.
|
|
19
|
+
- Read `docs/INSTRUCTIONS.md` if it exists.
|
|
20
|
+
- Read `AGENTS.md`, `feature-list.json`, `PROGRESS.md`, `SESSION-HANDOFF.md`,
|
|
21
|
+
and `docs/todo.md` when they exist.
|
|
22
|
+
- Read `.ahe/process_status.json` when it exists.
|
|
23
|
+
- Treat `docs/PRODUCT.md` as the canonical source of truth and
|
|
24
|
+
`feature-list.json` as a derived tracker.
|
|
25
|
+
|
|
26
|
+
### Harness Decision Paths
|
|
27
|
+
|
|
28
|
+
- Clarify product goal, scope, and success criteria when `docs/PRODUCT.md`
|
|
29
|
+
needs to change.
|
|
30
|
+
- Clarify project instructions when `docs/INSTRUCTIONS.md` needs to change.
|
|
31
|
+
- Clarify what next feature or goal should be tracked when the next work item is
|
|
32
|
+
unclear.
|
|
33
|
+
- `docs/PRODUCT.md` is the canonical home for product specification details collected during `ahe init`.
|
|
34
|
+
- Write product behavior, scope, requirements, success criteria, and workflow details into `docs/PRODUCT.md`.
|
|
35
|
+
- `docs/PRODUCT.md` is the canonical source of truth. Concrete feature items for `feature-list.json` must be derived from it only after it has been populated.
|
|
36
|
+
- Do not move product specification details into `AGENTS.md`.
|
|
37
|
+
- Update only the relevant docs among `docs/PRODUCT.md` and
|
|
38
|
+
`docs/INSTRUCTIONS.md`.
|
|
39
|
+
- If the user is adding new work, append it into the last `## TODO` section of
|
|
40
|
+
`docs/todo.md`, create that section when needed, and update
|
|
41
|
+
`feature-list.json`.
|
|
42
|
+
- Apply the queued `docs/todo.md` content to `docs/PRODUCT.md`.
|
|
43
|
+
- Remove the applied content from `docs/todo.md` because that todo content is
|
|
44
|
+
already reflected in `docs/PRODUCT.md`.
|
|
45
|
+
- Update `feature-list.json` to derive the specific feature items from the updated `docs/PRODUCT.md`.
|
|
46
|
+
- Update `PROGRESS.md`.
|
|
47
|
+
- Update `SESSION-HANDOFF.md`.
|
|
48
|
+
- For `ahe compress feature-list`, replace old completed feature entries with one summarized done feature.
|
|
49
|
+
- Keep the summarized feature valid for the existing schema by preserving its
|
|
50
|
+
own `id`, `name`, `description`, `dependencies`, `status`, and short
|
|
51
|
+
evidence.
|
|
52
|
+
- Preserve unfinished, blocked, or active feature items in full detail.
|
|
53
|
+
- Reconcile `feature-list.json` against `docs/PRODUCT.md` after compression.
|
|
54
|
+
- If no new feature can be derived from `docs/PRODUCT.md`, call `ahe-conversator` to ask what next feature, product direction, or goal should be tracked.
|
|
55
|
+
- Call `ahe-reviewer` directly when code or progress evidence must be checked
|
|
56
|
+
before updating harness files.
|
|
57
|
+
|
|
58
|
+
### Harness Completion
|
|
59
|
+
|
|
60
|
+
- Keep `feature-list.json` valid JSON.
|
|
61
|
+
- Do not create backup copies when compressing harness history.
|
|
62
|
+
- Keep `PROGRESS.md` focused on current work, decisions that still matter,
|
|
63
|
+
blockers, and recent verification evidence.
|
|
64
|
+
- Keep `SESSION-HANDOFF.md` focused on the next-session startup path.
|
|
65
|
+
- Keep `.ahe/process_status.json` aligned with the active workflow.
|
|
66
|
+
|
|
67
|
+
## Clarification Rule
|
|
68
|
+
|
|
69
|
+
When the next harness step is not clear, follow the `ahe-thinker` protocol first. If `ahe-thinker` finds missing information, follow the `ahe-conversator` protocol. Ask again recursively using a Codex-supported structured response request, provide 2-3 meaningful mutually exclusive options
|
|
70
|
+
when possible, and allow custom input when predefined options are not enough.
|
|
71
|
+
|
|
72
|
+
### User Response Target
|
|
73
|
+
|
|
74
|
+
- Collect the product, instruction, tracking, or next-feature details required
|
|
75
|
+
to update harness artifacts safely.
|
|
76
|
+
|
|
77
|
+
### Questions to Ask
|
|
78
|
+
|
|
79
|
+
- Ask who the product is for and what problem it solves when product intent is
|
|
80
|
+
unclear.
|
|
81
|
+
- Ask what behavior, scope boundaries, and success criteria should be
|
|
82
|
+
documented.
|
|
83
|
+
- Ask what rule, practice, or guideline belongs in `docs/INSTRUCTIONS.md`.
|
|
84
|
+
- Ask what work should be added next when `docs/PRODUCT.md` does not imply a new
|
|
85
|
+
feature safely.
|
|
86
|
+
|
|
87
|
+
### Clarification Criteria
|
|
88
|
+
|
|
89
|
+
- The answer must be concrete enough to update the relevant harness files
|
|
90
|
+
without guessing.
|
|
91
|
+
- The answer must describe actionable work, the affected area, and the intended
|
|
92
|
+
outcome when queuing a todo item.
|
|
93
|
+
|
|
94
|
+
### Re-ask When
|
|
95
|
+
|
|
96
|
+
- Ask again when the answer is vague, contradictory, or incomplete.
|
|
97
|
+
- Ask again when the response names a topic without enough detail to update the
|
|
98
|
+
harness safely.
|
|
99
|
+
|
|
100
|
+
## Session Tracking and Handoff Sync
|
|
101
|
+
|
|
102
|
+
### Tracking Update Rules
|
|
103
|
+
|
|
104
|
+
- Update `.ahe/process_status.json` at workflow start.
|
|
105
|
+
- Update `.ahe/process_status.json` after every answered question.
|
|
106
|
+
- Refresh `updated_at` every time workflow state changes.
|
|
107
|
+
- Keep `current_command`, `current_step`, and `workflow_complete` aligned with the active workflow state.
|
|
108
|
+
- Keep the `files` status map aligned with the actual workspace files.
|
|
109
|
+
|
|
110
|
+
### Progress and Handoff Content Requirements
|
|
111
|
+
|
|
112
|
+
- Update `PROGRESS.md` whenever the active feature, workflow status, blockers, or verification state changes.
|
|
113
|
+
- Update `SESSION-HANDOFF.md` whenever the current objective, completed work, important files, verification evidence, or recommended next step changes.
|
|
114
|
+
- PROGRESS.md must reflect the current active feature and latest completed work.
|
|
115
|
+
- SESSION-HANDOFF.md must leave the next Codex session with a concrete startup path.
|
|
@@ -23,42 +23,35 @@ Use this skill when the user invokes `$ahe-init`.
|
|
|
23
23
|
- Treat exact `ahe init` as a possible new start request.
|
|
24
24
|
- If no AHE-managed harness files exist, start initialization normally without asking a restart-scope question.
|
|
25
25
|
- If any AHE-managed harness file already exists, read the existing files first.
|
|
26
|
-
- When existing harness files are present, summarize the current project purpose and product specification state, then ask what restart scope the user wants before
|
|
27
|
-
- Do not
|
|
26
|
+
- When existing harness files are present, summarize the current project purpose and product specification state, then ask what restart scope the user wants before removing, overwriting, or refreshing existing harness files.
|
|
27
|
+
- Do not remove, overwrite, or refresh existing harness files until the restart scope is clear.
|
|
28
28
|
- Interpret the restart scope from the user's free-form answer; examples are guidance only and must not limit valid answers.
|
|
29
29
|
- If the answer says `purpose`, full restart, or equivalent, `purpose` means restart the whole harness from the project purpose.
|
|
30
|
-
- If the answer says `product`, product spec, or equivalent, `product` means preserve the project purpose in `AGENTS.md
|
|
31
|
-
- If the answer names a narrower custom scope, preserve unrelated harness files and restart only the named scope
|
|
30
|
+
- If the answer says `product`, product spec, or equivalent, `product` means preserve the project purpose in `AGENTS.md` and restart product specification work in `docs/PRODUCT.md`.
|
|
31
|
+
- If the answer names a narrower custom scope, preserve unrelated harness files and restart only the named scope.
|
|
32
32
|
- If `AGENTS.md` already exists, ask the user whether the current `AGENTS.md` is right.
|
|
33
33
|
- If the current `AGENTS.md` is not right or does not exist, ask for the purpose of this project.
|
|
34
34
|
- If `AGENTS.md` does not exist, copy `AGENTS.md` from `.codex/ahe-shared/templates/`.
|
|
35
35
|
- Update only the `PROJECT_PURPOSE` portion of `AGENTS.md`.
|
|
36
36
|
- Keep `AGENTS.md` limited to the project purpose and base agent settings.
|
|
37
37
|
- Do not put product specification details in `AGENTS.md`.
|
|
38
|
-
- Send product behavior, scope, requirements, success criteria, and workflow details to `ahe-
|
|
38
|
+
- Send product behavior, scope, requirements, success criteria, and workflow details to `ahe-harness` so they are written in `docs/PRODUCT.md` first.
|
|
39
39
|
- Generating an empty `feature-list.json` from a template is allowed, but do not write concrete feature items until `docs/PRODUCT.md` is populated.
|
|
40
40
|
- Ask whether the project language is Python using a Codex-supported structured response request with meaningful options and custom input.
|
|
41
41
|
- If the user answers that the project language is not Python, ask again: "Which language do you use?".
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
- Copy the `docs/` folder into the backup directory when it exists.
|
|
50
|
-
- Remove the previous `docs/PRODUCT.md` and `docs/INSTRUCTIONS.md` when the chosen restart scope includes product specification after backup.
|
|
51
|
-
- Remove the previous `PROGRESS.md` when the chosen restart scope includes progress tracking after backup.
|
|
52
|
-
- Remove the previous `SESSION-HANDOFF.md` when the chosen restart scope includes session handoff after backup.
|
|
53
|
-
- Remove the previous `feature-list.json` when the chosen restart scope includes feature tracking after backup.
|
|
54
|
-
- After backup, remove only the files included in the chosen restart scope before continuing the new start flow.
|
|
42
|
+
- Do not create backup copies of the replaced harness files.
|
|
43
|
+
- When a restart scope replaces prior harness history, summarize the replaced harness history in the refreshed tracking artifacts instead of creating backups.
|
|
44
|
+
- Remove the previous `docs/PRODUCT.md` and `docs/INSTRUCTIONS.md` when the chosen restart scope includes product specification.
|
|
45
|
+
- Remove the previous `PROGRESS.md` when the chosen restart scope includes progress tracking.
|
|
46
|
+
- Remove the previous `SESSION-HANDOFF.md` when the chosen restart scope includes session handoff.
|
|
47
|
+
- Remove the previous `feature-list.json` when the chosen restart scope includes feature tracking.
|
|
48
|
+
- Remove only the files included in the chosen restart scope before continuing the new start flow.
|
|
55
49
|
- Find all template files under `.codex/ahe-shared/templates/`.
|
|
56
50
|
- Ignore `AGENTS.md` and `PRODUCT.md` when copying template files.
|
|
57
51
|
- Before copying a template file into the workspace root, check whether the target file already exists and ask for explicit overwrite confirmation when needed.
|
|
58
|
-
- Execute the following
|
|
52
|
+
- Execute the following two steps sequentially, updating the progress status (`current_step` in `.ahe/process_status.json`):
|
|
59
53
|
1. complete the embedded init setup work (status: "ahe-init")
|
|
60
|
-
2. call "ahe-
|
|
61
|
-
3. call "ahe-update" (status: "ahe-update")
|
|
54
|
+
2. call "ahe-harness" (status: "ahe-harness")
|
|
62
55
|
|
|
63
56
|
### Harness Generation
|
|
64
57
|
|
|
@@ -71,7 +64,7 @@ Use this skill when the user invokes `$ahe-init`.
|
|
|
71
64
|
|
|
72
65
|
## Clarification Rule
|
|
73
66
|
|
|
74
|
-
When the next setup step is not clear, follow the `ahe-
|
|
67
|
+
When the next setup step is not clear, follow the `ahe-thinker` protocol first. If `ahe-thinker` finds missing information, follow the `ahe-conversator` protocol. Ask again recursively using a Codex-supported structured response request, provide 2-3 meaningful mutually exclusive options when possible, and allow custom input when predefined options are not enough.
|
|
75
68
|
|
|
76
69
|
### User Response Target
|
|
77
70
|
|
|
@@ -91,7 +84,7 @@ When the next setup step is not clear, follow the `ahe-thinking` protocol first.
|
|
|
91
84
|
- The answer must be specific enough to update `PROJECT_PURPOSE`.
|
|
92
85
|
- The answer must make it clear whether initialization should continue with the current `AGENTS.md` or with a new purpose.
|
|
93
86
|
- The answer must clearly identify whether Python guidance applies.
|
|
94
|
-
- The answer must make the restart scope clear when existing harness files must be
|
|
87
|
+
- The answer must make the restart scope clear when existing harness files must be replaced.
|
|
95
88
|
- The answer must make overwrite intent explicit for existing template targets.
|
|
96
89
|
- The answer must resolve any setup choice that blocks the next workflow step.
|
|
97
90
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ahe-reviewer
|
|
3
|
+
description: Internal AHE review workflow for understanding repo code, harness files, and CodeGraph context before another agent acts.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AHE Reviewer
|
|
7
|
+
|
|
8
|
+
This is an internal AHE workflow skill, not a user-facing command.
|
|
9
|
+
|
|
10
|
+
Do not treat `$ahe-reviewer` as a user command.
|
|
11
|
+
Use it when `ahe-thinker` or another worker needs evidence from code or harness
|
|
12
|
+
state before deciding what to do next.
|
|
13
|
+
|
|
14
|
+
## Review Scope
|
|
15
|
+
|
|
16
|
+
- Inspect repo code, harness files, verification history, and feature progress.
|
|
17
|
+
- If `.codegraph/` exists, prefer `.codegraph` or CodeGraph-backed review
|
|
18
|
+
context when available.
|
|
19
|
+
- Check `AGENTS.md`, `docs/PRODUCT.md`, `docs/INSTRUCTIONS.md`,
|
|
20
|
+
`feature-list.json`, `PROGRESS.md`, `SESSION-HANDOFF.md`, and `docs/todo.md`
|
|
21
|
+
when the question is about harness state.
|
|
22
|
+
|
|
23
|
+
## Handoffs
|
|
24
|
+
|
|
25
|
+
- Report findings back to `ahe-thinker` by default.
|
|
26
|
+
- Call `ahe-harness` directly when review finds harness drift, stale tracking,
|
|
27
|
+
or Product.md / feature-list mismatches.
|
|
28
|
+
- Call `ahe-conversator` only when the missing information must come from the
|
|
29
|
+
user.
|
|
30
|
+
|
|
31
|
+
## Output
|
|
32
|
+
|
|
33
|
+
- State what was reviewed.
|
|
34
|
+
- State the relevant evidence or mismatch.
|
|
35
|
+
- State the recommended next agent.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ahe-solver
|
|
3
|
+
description: Internal AHE feature-solving workflow for dividing, planning, and solving feature work after the active goal is clear enough.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AHE Solver
|
|
7
|
+
|
|
8
|
+
This is an internal AHE workflow skill, not a user-facing command.
|
|
9
|
+
|
|
10
|
+
Do not treat `$ahe-solver` as a user command.
|
|
11
|
+
Use it when `ahe-thinker` decides that the next job is building or planning a
|
|
12
|
+
feature.
|
|
13
|
+
|
|
14
|
+
## Command Workflow: ahe-solver
|
|
15
|
+
|
|
16
|
+
- Read the active feature context from `docs/PRODUCT.md`, `feature-list.json`,
|
|
17
|
+
`PROGRESS.md`, and any relevant code files.
|
|
18
|
+
- Divide broad work into smaller problems when useful.
|
|
19
|
+
- Plan each smaller problem before implementation.
|
|
20
|
+
- Call `ahe-reviewer` when repo or code understanding is needed.
|
|
21
|
+
- Call `ahe-conversator` when feature requirements, scope, or success criteria
|
|
22
|
+
are still unclear.
|
|
23
|
+
- Report the solved step, remaining work, and recommended next agent back to
|
|
24
|
+
`ahe-thinker`.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ahe-thinker
|
|
3
|
+
description: Internal AHE orchestration protocol for routing exact `ahe` and explicit `ahe <query>` requests through the AHE agent network.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AHE Thinker
|
|
7
|
+
|
|
8
|
+
This is an internal AHE workflow skill, not a user-facing command.
|
|
9
|
+
|
|
10
|
+
Do not treat `$ahe-thinker` as a user command.
|
|
11
|
+
Use it as the central decision layer for AHE work.
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
- Judge what is missing before another agent acts.
|
|
16
|
+
- Judge the active `project`, `feature`, or `sub-feature`.
|
|
17
|
+
- Decide which of `Why`, `What`, and `How` are still missing.
|
|
18
|
+
- Choose the next internal agent: `ahe-reviewer`, `ahe-conversator`,
|
|
19
|
+
`ahe-harness`, or `ahe-solver`.
|
|
20
|
+
- Receive each agent result, reassess the state, and decide the next step.
|
|
21
|
+
|
|
22
|
+
## Routing Inputs
|
|
23
|
+
|
|
24
|
+
- Exact `ahe` means continue existing harness work.
|
|
25
|
+
- Exact `ahe init`, exact `ahe-init`, and exact `$ahe-init` stay on the
|
|
26
|
+
`$ahe-init` path.
|
|
27
|
+
- Explicit `ahe <query>` means route the query through `ahe-thinker`.
|
|
28
|
+
- Broad non-prefixed prompts must not activate AHE.
|
|
29
|
+
|
|
30
|
+
## Size Preflight
|
|
31
|
+
|
|
32
|
+
- Before reading full harness files, run
|
|
33
|
+
`sh .codex/skills/ahe-compression/scripts/check-harness-size.sh`.
|
|
34
|
+
- If the detector exits with `COMPRESSION_REQUIRED` or code `2`, call
|
|
35
|
+
`ahe-compression` before normal routing.
|
|
36
|
+
- Do not read oversized harness files wholesale before compression routing is
|
|
37
|
+
settled.
|
|
38
|
+
|
|
39
|
+
## Decision Rules
|
|
40
|
+
|
|
41
|
+
- For a `project`, require `Why`, `What`, and `How` by default.
|
|
42
|
+
- For a `feature` or `sub-feature`, require only the minimum of `Why`, `What`,
|
|
43
|
+
and `How` needed to proceed safely.
|
|
44
|
+
- If the need is understanding repo code, harness drift, progress evidence, or
|
|
45
|
+
CodeGraph context, call `ahe-reviewer`.
|
|
46
|
+
- If the need is user clarification, call `ahe-conversator`.
|
|
47
|
+
- If the need is updating harness artifacts, product docs, feature tracking,
|
|
48
|
+
todo sync, or compression of completed history, call `ahe-harness`.
|
|
49
|
+
- If the need is solving or decomposing feature work, call `ahe-solver`.
|
|
50
|
+
|
|
51
|
+
## Interaction Model
|
|
52
|
+
|
|
53
|
+
- `ahe-thinker` is centered, but direct worker-to-worker calls are allowed when
|
|
54
|
+
they are the obvious next step.
|
|
55
|
+
- Typical loops:
|
|
56
|
+
- `ahe-thinker -> ahe-reviewer -> ahe-thinker`
|
|
57
|
+
- `ahe-thinker -> ahe-harness -> ahe-thinker`
|
|
58
|
+
- `ahe-thinker -> ahe-conversator -> ahe-thinker`
|
|
59
|
+
- `ahe-thinker -> ahe-solver -> ahe-thinker`
|
|
60
|
+
- Allowed direct handoffs include:
|
|
61
|
+
- `ahe-harness -> ahe-conversator`
|
|
62
|
+
- `ahe-solver -> ahe-reviewer`
|
|
63
|
+
- `ahe-reviewer -> ahe-harness`
|
|
64
|
+
- Every handoff must state the goal, reason, relevant files or context, and the
|
|
65
|
+
expected result.
|
|
66
|
+
|
|
67
|
+
## Broad Intent Routing
|
|
68
|
+
|
|
69
|
+
- Use `ahe-reviewer` for review-first requests.
|
|
70
|
+
- Use `ahe-harness` for product, instructions, progress, feature-list, todo, or
|
|
71
|
+
compression maintenance.
|
|
72
|
+
- Use `ahe-solver` for feature implementation planning or execution work.
|
|
73
|
+
- Use `ahe-conversator` when no safe next step exists without user input.
|
|
74
|
+
|
|
75
|
+
## Completion
|
|
76
|
+
|
|
77
|
+
- Continue to the next skill or next unfinished feature until the active unit is
|
|
78
|
+
resolved.
|
|
79
|
+
- Keep `docs/PRODUCT.md` as the canonical contract and `feature-list.json` as a
|
|
80
|
+
derived tracker.
|
package/README.md
CHANGED
|
@@ -1,204 +1,41 @@
|
|
|
1
1
|
# Awesome Harness Engineering (AHE)
|
|
2
2
|
|
|
3
|
-
AHE
|
|
3
|
+
AHE installs Codex skills that manage harness files through chat. The public
|
|
4
|
+
entrypoints stay small: use `ahe init` to start or reset harness work, `ahe` to
|
|
5
|
+
continue existing work, and `ahe <query>` for explicit AHE requests such as
|
|
6
|
+
`ahe compress feature-list`.
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## 1. Installation
|
|
8
|
-
|
|
9
|
-
### Quick Start (Recommended)
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npx --yes --package=@ksuchoi216/ahe ahe install
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### Global Install
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm install -g @ksuchoi216/ahe
|
|
19
|
-
ahe install
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
### Local Development
|
|
23
|
-
|
|
24
|
-
After cloning the repository:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
npx --yes --package=file:. ahe install
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### CLI Commands
|
|
31
|
-
|
|
32
|
-
| Command | Description |
|
|
33
|
-
|---|---|
|
|
34
|
-
| `ahe install` | Install AHE skills into `.codex/` |
|
|
35
|
-
| `ahe install --force` | Overwrite existing installation |
|
|
36
|
-
| `ahe install --backup` | Backup existing installation before overwriting |
|
|
37
|
-
| `ahe uninstall` | Remove all AHE skills, shared assets, and hooks |
|
|
38
|
-
| `ahe doctor` | Check installation health and integrity |
|
|
39
|
-
| `ahe version` | Print the current version |
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## 2. How to Use
|
|
44
|
-
|
|
45
|
-
AHE works inside **Codex chat**. After installing via the terminal, open Codex chat in your workspace and type one of the commands below.
|
|
46
|
-
|
|
47
|
-
### Chat Commands
|
|
48
|
-
|
|
49
|
-
| Command | What it does |
|
|
50
|
-
|---|---|
|
|
51
|
-
| `ahe init` | **Start a new harness.** Creates harness skeleton files, asks about your project, and writes the product specification. |
|
|
52
|
-
| `ahe` | **Continue existing work.** Inspects the current state, reports status, decides the next step, and keeps working. |
|
|
53
|
-
|
|
54
|
-
> **Note:** Only exact commands trigger AHE. Normal messages like "explain ahe" or "what does ahe do" will not start any workflow.
|
|
55
|
-
|
|
56
|
-
### Typical Workflow
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
# Step 1: Install AHE skills into your project
|
|
60
|
-
$ ahe install
|
|
61
|
-
|
|
62
|
-
# Step 2: Open Codex chat and initialize the harness
|
|
63
|
-
> ahe init
|
|
64
|
-
→ AHE asks about your project purpose, language, tech stack, constraints...
|
|
65
|
-
→ Creates AGENTS.md, feature-list.json, PROGRESS.md, docs/PRODUCT.md, etc.
|
|
66
|
-
|
|
67
|
-
# Step 3: Continue working — just type "ahe"
|
|
68
|
-
> ahe
|
|
69
|
-
→ AHE inspects the harness state and prints a status report
|
|
70
|
-
→ Picks the next unfinished feature or asks for missing info
|
|
71
|
-
→ Works on it, then updates tracking artifacts
|
|
72
|
-
|
|
73
|
-
# Step 4: Keep iterating
|
|
74
|
-
> ahe
|
|
75
|
-
→ Reports progress, moves to the next feature
|
|
76
|
-
→ Repeat until all features are done
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## 3. How It Works
|
|
82
|
-
|
|
83
|
-
### Skills Overview
|
|
84
|
-
|
|
85
|
-
AHE is composed of five internal skills that coordinate automatically:
|
|
8
|
+
## Installed Skills
|
|
86
9
|
|
|
87
10
|
| Skill | Role |
|
|
88
|
-
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
```mermaid
|
|
98
|
-
flowchart TD
|
|
99
|
-
Install["<b>Terminal</b><br/>ahe install"] --> Chat["Open Codex chat<br/>in the workspace"]
|
|
100
|
-
|
|
101
|
-
Chat --> Command{"What did you type?"}
|
|
102
|
-
Command -->|"ahe init"| Init["<b>ahe-init</b><br/>New-start workflow"]
|
|
103
|
-
Command -->|"ahe"| Router["<b>AHE Router</b><br/>Inspect harness & print status"]
|
|
104
|
-
Command -->|"other message"| Noop["No AHE workflow triggered"]
|
|
105
|
-
|
|
106
|
-
Router --> Classify{"Classify harness state"}
|
|
107
|
-
Classify -->|"Not enough spec"| Init
|
|
108
|
-
Classify -->|"Building features"| Feature["Continue next<br/>unfinished feature"]
|
|
109
|
-
Classify -->|"All completed"| AskNext["Ask user for<br/>the next task"]
|
|
110
|
-
|
|
111
|
-
Init --> Step1["<b>Step 1:</b> Setup<br/>AGENTS.md + templates"]
|
|
112
|
-
Step1 --> Step2["<b>Step 2: ahe-spec</b><br/>Write PRODUCT.md<br/>and INSTRUCTIONS.md"]
|
|
113
|
-
Step2 --> Step3["<b>Step 3: ahe-update</b><br/>Sync feature-list.json<br/>and PROGRESS.md"]
|
|
114
|
-
Step3 --> Done["Harness ready ✓"]
|
|
115
|
-
|
|
116
|
-
Feature --> Thinking["<b>ahe-thinking</b><br/>Check Why / What / How"]
|
|
117
|
-
Thinking --> Clear{"Clear enough<br/>to proceed?"}
|
|
118
|
-
Clear -->|"No"| Convo["<b>ahe-conversation</b><br/>Ask one focused question"]
|
|
119
|
-
Convo --> UserAnswer["User answers"]
|
|
120
|
-
UserAnswer --> Thinking
|
|
121
|
-
Clear -->|"Yes"| Execute["Execute the<br/>next safe step"]
|
|
122
|
-
Execute --> Update["<b>ahe-update</b><br/>Sync tracking artifacts"]
|
|
123
|
-
Update --> Done2["Ready for next<br/><code>ahe</code> command ✓"]
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### Detailed Steps
|
|
127
|
-
|
|
128
|
-
#### `ahe init` — New Start
|
|
129
|
-
|
|
130
|
-
1. Scans the workspace for existing harness files.
|
|
131
|
-
2. If files exist, asks the user what scope to restart (full restart, product-only, or custom).
|
|
132
|
-
3. Backs up affected files to `.ahe/backups/`.
|
|
133
|
-
4. Asks about project purpose, language, and tech stack.
|
|
134
|
-
5. Deploys template files (`AGENTS.md`, `PROGRESS.md`, `SESSION-HANDOFF.md`, `feature-list.json`, `init.sh`).
|
|
135
|
-
6. Calls **ahe-spec** → writes `docs/PRODUCT.md` and `docs/INSTRUCTIONS.md`.
|
|
136
|
-
7. Calls **ahe-update** → derives features and syncs tracking artifacts.
|
|
137
|
-
|
|
138
|
-
#### `ahe` — Continue Work
|
|
139
|
-
|
|
140
|
-
1. Hook injects the AHE router directive into the agent context.
|
|
141
|
-
2. Router inspects all harness files and prints a status table.
|
|
142
|
-
3. Classifies the current state:
|
|
143
|
-
- **"Not enough spec"** → routes to `ahe-init` to fill gaps.
|
|
144
|
-
- **"Building features"** → picks the next unfinished feature from `feature-list.json`.
|
|
145
|
-
- **"All completed"** → asks the user for the next task.
|
|
146
|
-
4. **ahe-thinking** checks clarity (Why / What / How) for the current work unit.
|
|
147
|
-
5. If unclear → **ahe-conversation** asks exactly one question, then re-evaluates.
|
|
148
|
-
6. If clear → executes the next safe step.
|
|
149
|
-
7. **ahe-update** syncs all tracking artifacts at the end.
|
|
150
|
-
|
|
151
|
-
#### Execution Loop
|
|
152
|
-
|
|
153
|
-
The core loop repeats until the work unit is done:
|
|
154
|
-
|
|
155
|
-
```
|
|
156
|
-
thinking → conversation (if needed) → execution → thinking
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
---
|
|
160
|
-
|
|
161
|
-
## Project Structure
|
|
162
|
-
|
|
163
|
-
After `ahe install`, the following structure is added to your workspace:
|
|
11
|
+
| --- | --- |
|
|
12
|
+
| `ahe-init` | New-start workflow that prepares the workspace and hands product/tracking work to `ahe-harness`. |
|
|
13
|
+
| `ahe-thinker` | Centered internal router that judges what is missing and chooses the next agent. |
|
|
14
|
+
| `ahe-reviewer` | Review agent for repo code, harness state, and CodeGraph context. |
|
|
15
|
+
| `ahe-conversator` | Clarification agent for recursive user conversation. |
|
|
16
|
+
| `ahe-harness` | Harness-management agent for product docs, instructions, feature tracking, todo sync, and compression-aware maintenance. |
|
|
17
|
+
| `ahe-solver` | Feature-solving agent that divides and plans implementation work. |
|
|
18
|
+
| `ahe-compression` | Internal helper that detects oversized harness files before broad reads. |
|
|
164
19
|
|
|
165
|
-
|
|
166
|
-
your-project/
|
|
167
|
-
├── .codex/
|
|
168
|
-
│ ├── skills/
|
|
169
|
-
│ │ ├── ahe-init/ # New-start workflow skill
|
|
170
|
-
│ │ ├── ahe-conversation/ # Internal question protocol
|
|
171
|
-
│ │ ├── ahe-thinking/ # Internal decision engine
|
|
172
|
-
│ │ ├── ahe-spec/ # Specification writer
|
|
173
|
-
│ │ └── ahe-update/ # Tracking artifact syncer
|
|
174
|
-
│ ├── ahe-shared/
|
|
175
|
-
│ │ ├── templates/ # Harness file templates
|
|
176
|
-
│ │ └── schemas/ # Validation schemas
|
|
177
|
-
│ └── hooks/
|
|
178
|
-
│ ├── hooks.json # Chat command trigger patterns
|
|
179
|
-
│ └── ahe-hook.js # Hook script that injects directives
|
|
180
|
-
```
|
|
20
|
+
## Routing Model
|
|
181
21
|
|
|
182
|
-
|
|
22
|
+
The internal model is centered but flexible:
|
|
183
23
|
|
|
184
|
-
|
|
185
|
-
your-project/
|
|
186
|
-
├── docs/
|
|
187
|
-
│ ├── PRODUCT.md # Product specification (source of truth)
|
|
188
|
-
│ └── INSTRUCTIONS.md # Implementation instructions
|
|
189
|
-
├── .ahe/
|
|
190
|
-
│ └── process_status.json # Workflow state persistence
|
|
191
|
-
├── AGENTS.md # Project objectives and agent rules
|
|
192
|
-
├── feature-list.json # Feature state tracker (derived from PRODUCT.md)
|
|
193
|
-
├── PROGRESS.md # Session continuity log
|
|
194
|
-
├── SESSION-HANDOFF.md # Handoff notes between sessions
|
|
195
|
-
└── init.sh # Standard startup/verification script
|
|
196
|
-
```
|
|
24
|
+
`query -> ahe-thinker -> ahe-reviewer | ahe-conversator | ahe-harness | ahe-solver`
|
|
197
25
|
|
|
198
|
-
|
|
26
|
+
- `ahe-thinker` is the center of judgment.
|
|
27
|
+
- Worker agents can call each other directly when that is the logical next
|
|
28
|
+
action.
|
|
29
|
+
- Typical direct handoffs are `ahe-harness -> ahe-conversator`,
|
|
30
|
+
`ahe-solver -> ahe-reviewer`, and `ahe-reviewer -> ahe-harness`.
|
|
199
31
|
|
|
200
|
-
|
|
32
|
+
## Query Examples
|
|
201
33
|
|
|
202
|
-
|
|
34
|
+
- `ahe`
|
|
35
|
+
- `ahe init`
|
|
36
|
+
- `ahe compress feature-list`
|
|
37
|
+
- `ahe update product spec`
|
|
38
|
+
- `ahe add dashboard export feature`
|
|
203
39
|
|
|
204
|
-
|
|
40
|
+
Only exact `ahe`, exact `ahe init`, exact `ahe-init`, exact `$ahe-init`, and
|
|
41
|
+
explicit `ahe <query>` activate the hook. Broad non-prefixed prompts do not.
|