@ksuchoi216/ahe 0.1.6 → 0.1.10

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.
Files changed (49) hide show
  1. package/README.md +82 -214
  2. package/bin/ahe +34 -231
  3. package/package.json +8 -4
  4. package/packages/ahe-antigravity/bin/ahe-antigravity +325 -0
  5. package/packages/ahe-antigravity/package.json +7 -0
  6. package/packages/ahe-antigravity/skills/ahe-git/SKILL.md +35 -0
  7. package/packages/ahe-antigravity/skills/ahe-ship/SKILL.md +28 -0
  8. package/packages/ahe-antigravity/skills/ahe-ship/scripts/post-ship-hook.sh +12 -0
  9. package/packages/ahe-codex/.codex/agents/ahe-harness-manager.toml +19 -0
  10. package/{.codex → packages/ahe-codex/.codex}/ahe-shared/templates/AGENTS.md +11 -10
  11. package/{.codex/ahe-shared/templates/PRODUCT.md → packages/ahe-codex/.codex/ahe-shared/templates/product.md} +1 -1
  12. package/packages/ahe-codex/.codex/hooks/ahe-hook.js +296 -0
  13. package/packages/ahe-codex/.codex/skills/ahe/SKILL.md +34 -0
  14. package/packages/ahe-codex/.codex/skills/ahe-compress/SKILL.md +120 -0
  15. package/{.codex/skills/ahe-compression → packages/ahe-codex/.codex/skills/ahe-compress}/agents/openai.yaml +1 -1
  16. package/{.codex/skills/ahe-compression → packages/ahe-codex/.codex/skills/ahe-compress}/scripts/check-harness-size.sh +18 -6
  17. package/packages/ahe-codex/.codex/skills/ahe-compress/scripts/detect_stale_tests.py +30 -0
  18. package/packages/ahe-codex/.codex/skills/ahe-converse/SKILL.md +44 -0
  19. package/packages/ahe-codex/.codex/skills/ahe-feature/SKILL.md +25 -0
  20. package/packages/ahe-codex/.codex/skills/ahe-fix/SKILL.md +59 -0
  21. package/packages/ahe-codex/.codex/skills/ahe-fix/scripts/write_fix_plan.py +108 -0
  22. package/packages/ahe-codex/.codex/skills/ahe-git/SKILL.md +34 -0
  23. package/packages/ahe-codex/.codex/skills/ahe-harness/SKILL.md +128 -0
  24. package/packages/ahe-codex/.codex/skills/ahe-harness-checker/SKILL.md +46 -0
  25. package/{.codex/skills/ahe-init → packages/ahe-codex/.codex/skills/ahe-new}/SKILL.md +41 -37
  26. package/packages/ahe-codex/.codex/skills/ahe-overview/SKILL.md +119 -0
  27. package/packages/ahe-codex/.codex/skills/ahe-review/SKILL.md +43 -0
  28. package/packages/ahe-codex/.codex/skills/ahe-ship/SKILL.md +58 -0
  29. package/packages/ahe-codex/.codex/skills/ahe-ship/agents/openai.yaml +4 -0
  30. package/packages/ahe-codex/.codex/skills/ahe-ship/scripts/write_plan.py +107 -0
  31. package/packages/ahe-codex/.codex/skills/ahe-solve/SKILL.md +30 -0
  32. package/packages/ahe-codex/.codex/skills/ahe-think/SKILL.md +114 -0
  33. package/packages/ahe-codex/bin/ahe-codex +398 -0
  34. package/packages/ahe-codex/package.json +7 -0
  35. package/.codex/hooks/ahe-hook.js +0 -236
  36. package/.codex/skills/ahe-compression/SKILL.md +0 -97
  37. package/.codex/skills/ahe-conversation/SKILL.md +0 -73
  38. package/.codex/skills/ahe-spec/SKILL.md +0 -63
  39. package/.codex/skills/ahe-thinking/SKILL.md +0 -104
  40. package/.codex/skills/ahe-update/SKILL.md +0 -66
  41. /package/{.codex → packages/ahe-codex/.codex}/ahe-shared/config.yaml +0 -0
  42. /package/{.codex → packages/ahe-codex/.codex}/ahe-shared/schemas/feature-list-schema.json +0 -0
  43. /package/{.codex → packages/ahe-codex/.codex}/ahe-shared/schemas/process_status.schema.json +0 -0
  44. /package/{.codex → packages/ahe-codex/.codex}/ahe-shared/templates/INSTRUCTIONS.md +0 -0
  45. /package/{.codex → packages/ahe-codex/.codex}/ahe-shared/templates/feature-list.json +0 -0
  46. /package/{.codex → packages/ahe-codex/.codex}/ahe-shared/templates/init.sh +0 -0
  47. /package/{.codex/ahe-shared/templates/PROGRESS.md → packages/ahe-codex/.codex/ahe-shared/templates/progress.md} +0 -0
  48. /package/{.codex/ahe-shared/templates/SESSION-HANDOFF.md → packages/ahe-codex/.codex/ahe-shared/templates/session-handoff.md} +0 -0
  49. /package/{.codex → packages/ahe-codex/.codex}/hooks/hooks.json +0 -0
@@ -1,97 +0,0 @@
1
- ---
2
- name: ahe-compression
3
- description: Internal AHE compression workflow for detecting oversized harness-engineering files and compacting them before AHE thinking reads or routes large context. Use when AGENTS.md, docs/PRODUCT.md, docs/INSTRUCTIONS.md, feature-list.json, PROGRESS.md, SESSION-HANDOFF.md, docs/todo.md, or other AHE harness artifacts have too many lines or waste context.
4
- ---
5
-
6
- # AHE Compression
7
-
8
- This is an internal AHE workflow skill, not a user-facing command.
9
-
10
- Do not treat `$ahe-compression` as a user command.
11
- Use it after `ahe-thinking` decides that harness context is too large to read
12
- efficiently.
13
-
14
- ## Size Detection
15
-
16
- Run the deterministic line-count preflight before reading full harness files:
17
-
18
- ```bash
19
- sh .codex/skills/ahe-compression/scripts/check-harness-size.sh
20
- ```
21
-
22
- The script checks these AHE-managed files when they exist:
23
-
24
- - `AGENTS.md`
25
- - `docs/PRODUCT.md`
26
- - `docs/INSTRUCTIONS.md`
27
- - `feature-list.json`
28
- - `PROGRESS.md`
29
- - `SESSION-HANDOFF.md`
30
- - `docs/todo.md`
31
-
32
- Default thresholds are configured in `.codex/ahe-shared/config.yaml`:
33
-
34
- - `agent_md`: 80
35
- - `product_md`: 180
36
- - `instructions_md`: 180
37
- - `feature_list_json`: 180
38
- - `progress_md`: 180
39
- - `session_handoff_md`: 180
40
- - `todo_md`: 180
41
- - `total`: 750 (combined harness context limit)
42
-
43
- Override thresholds only when the workspace has an explicit local rule using environment variables (e.g., `AHE_AGENT_MD_LIMIT`, `AHE_FILE_LINE_LIMIT`, `AHE_TOTAL_LINE_LIMIT`):
44
-
45
- ```bash
46
- AHE_AGENT_MD_LIMIT=100 AHE_TOTAL_LINE_LIMIT=900 sh .codex/skills/ahe-compression/scripts/check-harness-size.sh
47
- ```
48
-
49
- Exit code meanings:
50
-
51
- - `0`: no compression needed.
52
- - `2`: compression needed.
53
- - Output ending in `COMPRESSION_REQUIRED`: compression needed.
54
- - Any other nonzero code: detector failed; fall back to `wc -l` on the same
55
- file set and continue the decision manually.
56
-
57
- ## Compression Decision
58
-
59
- - If the detector exits `2`, compress before normal AHE routing continues.
60
- - If only one file exceeds the per-file threshold, compress that file first.
61
- - If total harness context exceeds the total threshold, compress the largest
62
- AHE-managed files until the total is under the threshold.
63
- - If `AGENTS.md` is oversized, obey the local `AGENTS.md` instructions before
64
- editing it. Compress only sections that local rules allow. If no section is
65
- safely editable, report the blocker and compress other harness files instead.
66
- - Do not read an oversized file wholesale after detection. Read headings,
67
- current-status sections, JSON keys, or bounded line ranges needed to preserve
68
- behavior.
69
-
70
- ## Compression Rules
71
-
72
- - Preserve active requirements, current decisions, incomplete work, blockers,
73
- dependencies, and verification evidence.
74
- - Preserve required headers and file formats for `PROGRESS.md`,
75
- `SESSION-HANDOFF.md`, `feature-list.json`, and `AGENTS.md`.
76
- - Keep `feature-list.json` valid JSON. Shorten old completed-feature evidence,
77
- but preserve each feature `id`, `name`, `description`, `dependencies`,
78
- `status`, and current unfinished details.
79
- - Keep `docs/PRODUCT.md` and `docs/INSTRUCTIONS.md` as the current harness
80
- contract. Remove duplicate historical wording only when the active contract
81
- remains clear.
82
- - Keep `PROGRESS.md` focused on current status, recent completed work,
83
- decisions that still matter, blockers, and latest verification.
84
- - Keep `SESSION-HANDOFF.md` focused on the startup path for the next session,
85
- important files, open questions, and current verification status.
86
- - Back up material before deleting substantial historical context by moving it
87
- under `.ahe/backups/compression-YYYYMMDD-HHMMSS/` when that context may still
88
- be useful.
89
-
90
- ## Completion
91
-
92
- - Re-run the size detector after compression.
93
- - Run JSON validation when `feature-list.json` changed.
94
- - Run the repository's normal harness verification command when compression
95
- changed tracked harness files.
96
- - Update `PROGRESS.md` and `SESSION-HANDOFF.md` with the compression evidence
97
- when they changed or when compression affects the active workflow.
@@ -1,73 +0,0 @@
1
- ---
2
- name: ahe-conversation
3
- description: Internal AHE protocol for recursive clarification, conversation state, and resume-aware workflow guidance.
4
- ---
5
-
6
- # AHE Conversation
7
-
8
- This is an internal AHE protocol skill, not a user-facing command.
9
-
10
- Do not treat `$ahe-conversation` as a user command.
11
- Use it only when another AHE workflow skill needs more conversation before it can
12
- continue safely.
13
- Use it after `ahe-thinking` identifies a missing decision or missing `Why`,
14
- `What`, or `How`.
15
-
16
- ## When to Converse
17
-
18
- Start or continue an AHE conversation when the missing answer materially changes
19
- one of these:
20
-
21
- - Project purpose or target user.
22
- - Product behavior, scope, success criteria, or out-of-scope boundaries.
23
- - Implementation instructions, architecture direction, or verification commands.
24
- - Harness file ownership, overwrite behavior, or reset behavior.
25
- - `.ahe/process_status.json`, `PROGRESS.md`, or `SESSION-HANDOFF.md` state.
26
- - The next workflow step when several valid paths are possible.
27
- - The missing `Why`, `What`, or `How` for the current `project`, `feature`, or
28
- `sub-feature`.
29
-
30
- If the missing detail can be inferred safely from existing files, infer
31
- conservatively and record the assumption in the active workflow artifact.
32
-
33
- ## Conversation Protocol
34
-
35
- - Inspect relevant existing files before asking.
36
- - Let `ahe-thinking` judge what is missing before you ask.
37
- - Explain the decision point briefly when context helps the user answer.
38
- - Ask exactly one question at a time.
39
- - Use a Codex-supported structured response request when meaningful options exist.
40
- - Provide 2-3 mutually exclusive options when useful, and allow custom input when
41
- predefined options are not enough.
42
- - Keep each question specific to the active AHE workflow.
43
- - Think through what the answer will unlock before asking.
44
- - Ask again when the answer is vague, off-topic, contradictory, or incomplete
45
- according to the calling skill's clarification criteria.
46
- - Continue until the calling workflow has enough information to act.
47
- - Do not expand the scope of questioning beyond the missing detail that
48
- `ahe-thinking` identified.
49
-
50
- ## State Persistence
51
-
52
- Before pausing for user input, update `.ahe/process_status.json` when it exists
53
- or when the active workflow uses it:
54
-
55
- - Set the active command or skill name.
56
- - Set `workflow_complete` to `false`.
57
- - Set `current_step` to the pending question, decision point, or missing field.
58
- - Refresh `updated_at`.
59
- - Preserve already collected project and product data.
60
-
61
- Update `PROGRESS.md` and `SESSION-HANDOFF.md` when the pending conversation
62
- changes the active workflow state, blocks completion, or affects the next
63
- session's startup path.
64
-
65
- ## Resume Protocol
66
-
67
- When resuming after the user answers:
68
-
69
- - Read `.ahe/process_status.json` and the relevant workflow artifacts.
70
- - Summarize the already collected data briefly.
71
- - Identify the missing field or decision that is still blocking progress.
72
- - Ask the next focused question, or continue the calling workflow when the
73
- answer satisfies its clarification criteria.
@@ -1,63 +0,0 @@
1
- ---
2
- name: ahe-spec
3
- description: Internal AHE specification workflow for updating product and instructions docs.
4
- ---
5
-
6
- # AHE Spec
7
-
8
- This is an internal AHE workflow skill, not a user-facing command.
9
-
10
- Do not treat `$ahe-spec` as a user command.
11
- Use it after `ahe-thinking` decides that specification work must continue.
12
-
13
- ## Command Workflow: ahe-spec
14
-
15
- ### Spec Inspection
16
-
17
- - Read `docs/PRODUCT.md` if it exists.
18
- - Read `docs/INSTRUCTIONS.md` if it exists.
19
- - Read `AGENTS.md`, `feature-list.json`, `PROGRESS.md`, and `SESSION-HANDOFF.md`.
20
-
21
- ### Sequential Spec Conversation Flow
22
-
23
- - `docs/PRODUCT.md` is the canonical home for product specification details collected during `ahe init`.
24
- - Clarify product goal, scope, and success criteria when `docs/PRODUCT.md` needs to change.
25
- - Clarify project instructions when `docs/INSTRUCTIONS.md` needs to change. If `docs/INSTRUCTIONS.md` is missing, create it from `.codex/ahe-shared/templates/INSTRUCTIONS.md` first, then ask what additional instructions belong under `## CAN CHANGE INSTRUCTIONS`.
26
- - Draft the relevant specification updates in chat and ask for user approval.
27
- - Ask recursively for more detail until the affected specification areas are clear and approved.
28
-
29
- ### Spec Completion
30
-
31
- - Write product behavior, scope, requirements, success criteria, and workflow details into `docs/PRODUCT.md`.
32
- - `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.
33
- - Do not move product specification details into `AGENTS.md`.
34
- - Update only the relevant docs among `docs/PRODUCT.md` and `docs/INSTRUCTIONS.md`.
35
- - When updating `docs/INSTRUCTIONS.md`, only allow additions/removals/edits to instructions inside `## CAN CHANGE INSTRUCTIONS`; preserve `## MUST NOT CHANGE INSTRUCTIONS`.
36
- - Update `.ahe/process_status.json`.
37
- - Update `PROGRESS.md` and `SESSION-HANDOFF.md` when specification changes affect active work.
38
-
39
- ## Clarification Rule
40
-
41
- When the next specification step is not clear, follow the `ahe-thinking` protocol first. If `ahe-thinking` finds missing information, follow the `ahe-conversation` 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.
42
-
43
- ### User Response Target
44
-
45
- - Collect the product or instructions details required to update the relevant specification docs.
46
-
47
- ### Questions to Ask
48
-
49
- - Ask who the product is for and what problem it solves when product intent is unclear.
50
- - Ask what behavior, scope boundaries, and success criteria should be documented.
51
- - Ask what rule, practice, or guideline should be documented as an instruction.
52
-
53
- ### Clarification Criteria
54
-
55
- - The answer must identify the target user, product goal, main behavior, scope, and success signal when product details are changing.
56
- - The answer must describe any instruction and its practical meaning clearly enough that another engineer can follow it.
57
- - The answer must be concrete enough to update the relevant specification docs without guessing missing intent.
58
-
59
- ### Re-ask When
60
-
61
- - Ask again when the answer is vague, contradictory, or incomplete.
62
- - Ask again when the response gives features without explaining the user goal or success criteria.
63
- - Ask again when the response names an instruction topic without the actual rule.
@@ -1,104 +0,0 @@
1
- ---
2
- name: ahe-thinking
3
- description: Internal AHE orchestration protocol for deciding what to clarify, what to execute, and what to do next.
4
- ---
5
-
6
- # AHE Thinking
7
-
8
- This is an internal AHE protocol skill, not a user-facing command.
9
-
10
- Do not treat `$ahe-thinking` as a user command.
11
- Use it before and between AHE workflow actions when the next safe step is not
12
- already obvious.
13
-
14
- ## Purpose
15
-
16
- - Judge what is missing before another AHE workflow acts.
17
- - Decide whether the current unit is clear enough to execute safely.
18
- - Call `ahe-conversation` only when clarification is still needed.
19
- - Continue to the next skill or next unfinished feature when the path is clear.
20
-
21
- ## Units of Work
22
-
23
- Inspect the current unit as `project`, `feature`, or `sub-feature`.
24
-
25
- - `project`: overall goal, target user, expected outcome, and delivery
26
- direction.
27
- - `feature`: one concrete capability or work item under the project.
28
- - `sub-feature`: one smaller capability or step under a feature.
29
-
30
- ## Clarity Judgment
31
-
32
- Judge the current unit against `Why`, `What`, and `How`.
33
-
34
- - `Why`: why this unit matters, what problem it solves, or what purpose it
35
- serves.
36
- - `What`: what result, behavior, or output should be built.
37
- - `How`: how the work should be approached when methodology or architecture
38
- matters.
39
-
40
- ### Project Rule
41
-
42
- For a `project`, require `Why`, `What`, and `How` by default before moving
43
- forward.
44
-
45
- ### Feature Rule
46
-
47
- For a `feature` or `sub-feature`, require only the minimum needed to proceed
48
- safely.
49
-
50
- - If the feature is already clear from the project context, do not ask all
51
- three again.
52
- - If only the result is missing, ask only `What`.
53
- - If the feature goal is clear but the implementation direction is risky or
54
- materially different, ask `How`.
55
- - If the feature exists but its purpose is unclear, ask `Why`.
56
-
57
- ## Next-Step Decision
58
-
59
- - Before reading full harness files, decide whether compression is needed.
60
- Run `sh .codex/skills/ahe-compression/scripts/check-harness-size.sh` when the
61
- script exists (which checks against configurable thresholds in `.codex/ahe-shared/config.yaml`),
62
- or fall back to `wc -l` over `AGENTS.md`, `docs/PRODUCT.md`, `docs/INSTRUCTIONS.md`,
63
- `feature-list.json`, `PROGRESS.md`, `SESSION-HANDOFF.md`, and `docs/todo.md`.
64
- - If the detector reports `COMPRESSION_REQUIRED` or exits with code `2`, call
65
- `ahe-compression` before normal routing. Do not spend context reading the
66
- oversized files wholesale first.
67
- - If `docs/PRODUCT.md` or `docs/INSTRUCTIONS.md` is missing or empty, classify the state as
68
- `harness engineering not enough` and prioritize product/instructions specification work.
69
- - `docs/PRODUCT.md` and `docs/INSTRUCTIONS.md` form the required harness contract. `docs/PRODUCT.md` is the product/specification source of truth, and
70
- `feature-list.json` is a derived tracker. Do not write specific feature items
71
- to `feature-list.json` until `docs/PRODUCT.md` and `docs/INSTRUCTIONS.md` are established.
72
- - If other harness essentials are missing or inconsistent, classify the state as
73
- `harness engineering not enough` and continue the harness-building workflow.
74
- - If the harness exists and there is unfinished tracked work, classify the
75
- state as `in the middle of building features` and continue the first safe
76
- unfinished feature.
77
- - If tracked work is complete and no obvious essential harness gap remains,
78
- classify the state as `completed all` and ask for the next task.
79
-
80
- ## Broad User Intent Routing
81
-
82
- When the user provides a broad natural-language work intent (e.g., "add features", "update spec"), use their original prompt to determine the exact path:
83
- - Route **product/spec changes** to `ahe-spec`.
84
- - Route **instruction changes** to `ahe-spec`.
85
- - Route **feature/todo tracking** to `ahe-update`.
86
- - Route **unclear AHE work** to `ahe-conversation` and ask exactly one detail question before editing if the request is vague.
87
-
88
- ## Conversation Handoff
89
-
90
- If clarity is missing, call `ahe-conversation` with the exact missing `Why`,
91
- `What`, or `How`.
92
-
93
- - Explain which unit is blocked.
94
- - Explain what answer will unlock the next action.
95
- - Ask for only the minimum missing detail.
96
- - When the path is clear, continue to the next skill or next unfinished feature.
97
-
98
- ## Execution Loop
99
-
100
- Follow this loop whenever AHE is routing or continuing work:
101
-
102
- `thinking -> conversation if needed -> execution -> thinking`
103
-
104
- After execution, reassess the active unit before choosing the next step.
@@ -1,66 +0,0 @@
1
- ---
2
- name: ahe-update
3
- description: Internal AHE workflow for synchronizing tracked work and handoff artifacts.
4
- ---
5
-
6
- # AHE Update
7
-
8
- This is an internal AHE workflow skill, not a user-facing command.
9
-
10
- Do not treat `$ahe-update` as a user command.
11
- Use it after `ahe-thinking` decides that tracked harness work should be synchronized.
12
-
13
- ## Command Workflow: ahe-update
14
-
15
- - Read `feature-list.json`.
16
- - Read `PROGRESS.md` if it exists.
17
- - Read `SESSION-HANDOFF.md`.
18
- - Read `docs/todo.md` when it exists.
19
- - If the user is adding new work, clarify the todo item, append it under the last `## TODO` section in `docs/todo.md`, and create that section when it does not exist.
20
- - Apply the queued `docs/todo.md` content to `docs/PRODUCT.md`. If `docs/PRODUCT.md` does not exist, create it.
21
- - Remove the applied content from `docs/todo.md` because that todo content was already applied in `docs/PRODUCT.md`.
22
- - Update `feature-list.json` to derive the specific feature items from the updated `docs/PRODUCT.md`.
23
- - Update `PROGRESS.md`.
24
- - Update `SESSION-HANDOFF.md`.
25
-
26
- ## Clarification Rule
27
-
28
- When the next update step is not clear, follow the `ahe-thinking` protocol first. If `ahe-thinking` finds missing information, follow the `ahe-conversation` 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.
29
-
30
- ### User Response Target
31
-
32
- - Collect either an actionable todo entry to queue or a clear instruction to synchronize the existing queued work.
33
-
34
- ### Questions to Ask
35
-
36
- - Ask what work needs to be done when the user is adding a new todo item.
37
- - Ask which file, feature area, or workflow the todo affects.
38
- - Ask what outcome or completion signal the todo should capture.
39
- - Ask whether the user wants to queue new work, apply queued work, or do both when that is unclear.
40
-
41
- ### Clarification Criteria
42
-
43
- - The answer must describe actionable work, the affected area, and the intended outcome when queuing a todo item.
44
- - The answer must be clear enough to decide whether to queue work, apply queued work, or do both.
45
-
46
- ### Re-ask When
47
-
48
- - Ask again when the answer is too broad, off-topic, or only names a topic without describing the work.
49
- - Ask again when dependencies, affected area, intended outcome, or update action are still unclear.
50
-
51
- ## Session Tracking and Handoff Sync
52
-
53
- ### Tracking Update Rules
54
-
55
- - Update `.ahe/process_status.json` at workflow start.
56
- - Update `.ahe/process_status.json` after every answered question.
57
- - Refresh `updated_at` every time workflow state changes.
58
- - Keep `current_command`, `current_step`, and `workflow_complete` aligned with the active workflow state.
59
- - Keep the `files` status map aligned with the actual workspace files.
60
-
61
- ### Progress and Handoff Content Requirements
62
-
63
- - Update `PROGRESS.md` whenever the active feature, workflow status, blockers, or verification state changes.
64
- - Update `SESSION-HANDOFF.md` whenever the current objective, completed work, important files, verification evidence, or recommended next step changes.
65
- - PROGRESS.md must reflect the current active feature and latest completed work.
66
- - SESSION-HANDOFF.md must leave the next Codex session with a concrete startup path.