@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/bin/ahe CHANGED
@@ -19,12 +19,16 @@ readonly PACKAGE_ROOT="$(CDPATH= cd -- "${SCRIPT_DIR}/.." && pwd)"
19
19
  readonly SOURCE_SKILLS_DIR="${PACKAGE_ROOT}/.codex/skills"
20
20
  readonly SOURCE_SHARED_DIR="${PACKAGE_ROOT}/.codex/ahe-shared"
21
21
  readonly SOURCE_HOOKS_DIR="${PACKAGE_ROOT}/.codex/hooks"
22
+ readonly AHE_CONFIG_BLOCK_START="# BEGIN AHE MANAGED CONFIG"
23
+ readonly AHE_CONFIG_BLOCK_END="# END AHE MANAGED CONFIG"
22
24
  readonly MANAGED_SKILLS=(
23
25
  "ahe-init"
24
- "ahe-conversation"
25
- "ahe-thinking"
26
- "ahe-spec"
27
- "ahe-update"
26
+ "ahe-compression"
27
+ "ahe-conversator"
28
+ "ahe-harness"
29
+ "ahe-reviewer"
30
+ "ahe-solver"
31
+ "ahe-thinker"
28
32
  )
29
33
 
30
34
  usage() {
@@ -48,6 +52,48 @@ backup_existing_installation() {
48
52
  mv "${target_dir}" "${backup_root}/${backup_name}-${timestamp}"
49
53
  }
50
54
 
55
+ cleanup_ahe_config_entries() {
56
+ local config_path="$1"
57
+ local temp_path=""
58
+
59
+ if [ ! -f "${config_path}" ]; then
60
+ return 0
61
+ fi
62
+
63
+ temp_path="${config_path}.ahe-cleanup"
64
+ awk -v block_start="${AHE_CONFIG_BLOCK_START}" -v block_end="${AHE_CONFIG_BLOCK_END}" '
65
+ function is_ahe_header(line) {
66
+ return line ~ /^\[agents\."?ahe[-_][^]]*"?\]$/ ||
67
+ line ~ /^\[hooks\.state\."ahe[^"]*"\]$/ ||
68
+ line ~ /^\[plugins\."?ahe[^]]*"?\]$/ ||
69
+ line ~ /^\[plugins\."@ksuchoi216\/ahe[^"]*"\]$/
70
+ }
71
+
72
+ $0 == block_start {
73
+ skip = 1
74
+ next
75
+ }
76
+
77
+ $0 == block_end {
78
+ skip = 0
79
+ next
80
+ }
81
+
82
+ /^\[/ {
83
+ if (is_ahe_header($0)) {
84
+ skip = 1
85
+ next
86
+ }
87
+ skip = 0
88
+ }
89
+
90
+ skip != 1 {
91
+ print
92
+ }
93
+ ' "${config_path}" > "${temp_path}"
94
+ mv "${temp_path}" "${config_path}"
95
+ }
96
+
51
97
  install_skill() {
52
98
  local force="false"
53
99
  local backup="false"
@@ -82,10 +128,13 @@ install_skill() {
82
128
  local target_skills_dir="${PWD}/.codex/skills"
83
129
  local target_shared_dir="${PWD}/.codex/ahe-shared"
84
130
  local target_hooks_dir="${PWD}/.codex/hooks"
131
+ local target_config_path="${PWD}/.codex/config.toml"
85
132
  local backup_dir="${PWD}/.codex/_backups"
86
133
  local skill_name=""
87
134
  local skill_target=""
88
135
 
136
+ cleanup_ahe_config_entries "${target_config_path}"
137
+
89
138
  for skill_name in "${MANAGED_SKILLS[@]}"; do
90
139
  skill_target="${target_skills_dir}/${skill_name}"
91
140
 
@@ -152,6 +201,7 @@ Next:
152
201
  1. Open Codex chat in this workspace.
153
202
  2. Use \`ahe init\` for a new start.
154
203
  3. Use exact \`ahe\` to continue existing harness work.
204
+ 4. Use \`ahe <query>\` for explicit AHE requests such as \`ahe compress feature-list\`.
155
205
  EOF
156
206
  }
157
207
 
@@ -168,6 +218,11 @@ doctor() {
168
218
  fi
169
219
  done
170
220
 
221
+ if [ ! -f "${target_shared_dir}/config.yaml" ]; then
222
+ printf 'Missing: %s/config.yaml\n' "${target_shared_dir}" >&2
223
+ exit 1
224
+ fi
225
+
171
226
  if [ ! -d "${target_shared_dir}/templates" ]; then
172
227
  printf 'Missing: %s/templates\n' "${target_shared_dir}" >&2
173
228
  exit 1
@@ -190,6 +245,7 @@ uninstall_skill() {
190
245
  local target_skills_dir="${PWD}/.codex/skills"
191
246
  local target_shared_dir="${PWD}/.codex/ahe-shared"
192
247
  local target_hooks_dir="${PWD}/.codex/hooks"
248
+ local target_config_path="${PWD}/.codex/config.toml"
193
249
  local skill_name=""
194
250
 
195
251
  echo "Uninstalling AHE skills from ${PWD}/.codex..."
@@ -200,6 +256,7 @@ uninstall_skill() {
200
256
 
201
257
  rm -rf "${target_shared_dir}"
202
258
  rm -rf "${target_hooks_dir}"
259
+ cleanup_ahe_config_entries "${target_config_path}"
203
260
 
204
261
  echo "AHE skills uninstalled successfully."
205
262
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ksuchoi216/ahe",
3
- "version": "0.1.2",
3
+ "version": "0.1.7",
4
4
  "description": "Codex chat workflow skill installer for Awesome Harness Engineering",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -10,7 +10,8 @@
10
10
  },
11
11
  "scripts": {
12
12
  "test": "pytest tests/ -x",
13
- "prepublishOnly": "npm run test"
13
+ "prepublishOnly": "npm run test",
14
+ "postinstall": "echo \"\" && echo \"Awesome Harness Engineering CLI installed!\" && echo \"To install the skills in your project, run: ahe install\" && echo \"\" && echo \"If you wish to uninstall later, run: npm uninstall -g @ksuchoi216/ahe\""
14
15
  },
15
16
  "repository": {
16
17
  "type": "git",
@@ -30,4 +31,4 @@
30
31
  ".codex/"
31
32
  ],
32
33
  "license": "MIT"
33
- }
34
+ }
@@ -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.
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,88 +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
- - If `docs/PRODUCT.md` or `docs/INSTRUCTIONS.md` is missing or empty, classify the state as
60
- `harness engineering not enough` and prioritize product/instructions specification work.
61
- - `docs/PRODUCT.md` and `docs/INSTRUCTIONS.md` form the required harness contract. `docs/PRODUCT.md` is the product/specification source of truth, and
62
- `feature-list.json` is a derived tracker. Do not write specific feature items
63
- to `feature-list.json` until `docs/PRODUCT.md` and `docs/INSTRUCTIONS.md` are established.
64
- - If other harness essentials are missing or inconsistent, classify the state as
65
- `harness engineering not enough` and continue the harness-building workflow.
66
- - If the harness exists and there is unfinished tracked work, classify the
67
- state as `in the middle of building features` and continue the first safe
68
- unfinished feature.
69
- - If tracked work is complete and no obvious essential harness gap remains,
70
- classify the state as `completed all` and ask for the next task.
71
-
72
- ## Conversation Handoff
73
-
74
- If clarity is missing, call `ahe-conversation` with the exact missing `Why`,
75
- `What`, or `How`.
76
-
77
- - Explain which unit is blocked.
78
- - Explain what answer will unlock the next action.
79
- - Ask for only the minimum missing detail.
80
- - When the path is clear, continue to the next skill or next unfinished feature.
81
-
82
- ## Execution Loop
83
-
84
- Follow this loop whenever AHE is routing or continuing work:
85
-
86
- `thinking -> conversation if needed -> execution -> thinking`
87
-
88
- 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.