@ksuchoi216/ahe 0.1.7 → 0.1.12
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/README.md +57 -20
- package/bin/ahe +34 -233
- package/package.json +7 -4
- package/packages/ahe-antigravity/bin/ahe-antigravity +325 -0
- package/packages/ahe-antigravity/package.json +7 -0
- package/packages/ahe-antigravity/skills/ahe-git/SKILL.md +35 -0
- package/packages/ahe-antigravity/skills/ahe-ship/SKILL.md +28 -0
- package/packages/ahe-antigravity/skills/ahe-ship/scripts/post-ship-hook.sh +12 -0
- package/packages/ahe-codex/.codex/agents/ahe-harness-manager.toml +19 -0
- package/{.codex → packages/ahe-codex/.codex}/ahe-shared/templates/AGENTS.md +11 -10
- package/{.codex/ahe-shared/templates/PRODUCT.md → packages/ahe-codex/.codex/ahe-shared/templates/product.md} +1 -1
- package/packages/ahe-codex/.codex/hooks/ahe-hook.js +249 -0
- package/packages/ahe-codex/.codex/skills/ahe/SKILL.md +36 -0
- package/packages/ahe-codex/.codex/skills/ahe-clean/SKILL.md +67 -0
- package/{.codex/skills/ahe-conversator → packages/ahe-codex/.codex/skills/ahe-converse}/SKILL.md +6 -6
- package/packages/ahe-codex/.codex/skills/ahe-feature/SKILL.md +25 -0
- package/packages/ahe-codex/.codex/skills/ahe-git/SKILL.md +34 -0
- package/packages/ahe-codex/.codex/skills/ahe-harness/SKILL.md +129 -0
- package/packages/ahe-codex/.codex/skills/ahe-harness-checker/SKILL.md +46 -0
- package/{.codex/skills/ahe-init → packages/ahe-codex/.codex/skills/ahe-new}/SKILL.md +36 -21
- package/packages/ahe-codex/.codex/skills/ahe-overview/SKILL.md +96 -0
- package/packages/ahe-codex/.codex/skills/ahe-review/SKILL.md +43 -0
- package/packages/ahe-codex/.codex/skills/ahe-ship/SKILL.md +58 -0
- package/packages/ahe-codex/.codex/skills/ahe-ship/agents/openai.yaml +4 -0
- package/packages/ahe-codex/.codex/skills/ahe-ship/scripts/write_plan.py +107 -0
- package/packages/ahe-codex/.codex/skills/ahe-solve/SKILL.md +30 -0
- package/packages/ahe-codex/.codex/skills/ahe-think/SKILL.md +125 -0
- package/packages/ahe-codex/bin/ahe-codex +398 -0
- package/packages/ahe-codex/package.json +7 -0
- package/.codex/ahe-shared/config.yaml +0 -8
- package/.codex/hooks/ahe-hook.js +0 -195
- package/.codex/skills/ahe-compression/SKILL.md +0 -97
- package/.codex/skills/ahe-compression/agents/openai.yaml +0 -6
- package/.codex/skills/ahe-compression/scripts/check-harness-size.sh +0 -109
- package/.codex/skills/ahe-harness/SKILL.md +0 -115
- package/.codex/skills/ahe-reviewer/SKILL.md +0 -35
- package/.codex/skills/ahe-solver/SKILL.md +0 -24
- package/.codex/skills/ahe-thinker/SKILL.md +0 -80
- /package/{.codex → packages/ahe-codex/.codex}/ahe-shared/schemas/feature-list-schema.json +0 -0
- /package/{.codex → packages/ahe-codex/.codex}/ahe-shared/schemas/process_status.schema.json +0 -0
- /package/{.codex → packages/ahe-codex/.codex}/ahe-shared/templates/INSTRUCTIONS.md +0 -0
- /package/{.codex → packages/ahe-codex/.codex}/ahe-shared/templates/feature-list.json +0 -0
- /package/{.codex → packages/ahe-codex/.codex}/ahe-shared/templates/init.sh +0 -0
- /package/{.codex/ahe-shared/templates/PROGRESS.md → packages/ahe-codex/.codex/ahe-shared/templates/progress.md} +0 -0
- /package/{.codex/ahe-shared/templates/SESSION-HANDOFF.md → packages/ahe-codex/.codex/ahe-shared/templates/session-handoff.md} +0 -0
- /package/{.codex → packages/ahe-codex/.codex}/hooks/hooks.json +0 -0
package/README.md
CHANGED
|
@@ -1,41 +1,78 @@
|
|
|
1
1
|
# Awesome Harness Engineering (AHE)
|
|
2
2
|
|
|
3
|
-
AHE installs Codex skills that manage harness files through chat. The
|
|
4
|
-
entrypoints stay small: use `ahe
|
|
5
|
-
|
|
6
|
-
`ahe
|
|
3
|
+
AHE installs global Codex and Antigravity skills that manage harness files through chat. The repository uses a one-package, two-internal-packages layout (`packages/ahe-codex` and `packages/ahe-antigravity`) shipped as a single npm package. The
|
|
4
|
+
public entrypoints stay small: use exact `ahe` for bootstrap or continuation,
|
|
5
|
+
`ahe ship` to save the latest plan (in Codex) or refresh and execute a saved plan (in Antigravity),
|
|
6
|
+
and `ahe git` for safe git orchestration. Use `ahe <query>` or `<query> ahe`
|
|
7
|
+
for explicit AHE requests such as `ahe update product spec` or `ahe stale tests`.
|
|
8
|
+
For a detailed in-chat explanation of the AHE architecture and workflows, use the helper `ahe-overview`.
|
|
9
|
+
|
|
10
|
+
## Core Command Workflows
|
|
11
|
+
|
|
12
|
+
Here are intuitive flow examples for the primary AHE commands. The public work-routing surface is `ahe`, `ahe-ship`, and `ahe-git`; conversational queries such as `ahe add dashboard export feature` are routed through `ahe`.
|
|
13
|
+
|
|
14
|
+
### `ahe` Bootstrap Flow
|
|
15
|
+
1. **Empty Workspace**: You have a new or existing repo that needs AHE.
|
|
16
|
+
2. **ahe calling**: You type `ahe` or `ahe new` in Codex.
|
|
17
|
+
3. **Initialization**: `ahe-think` detects the missing harness, calls internal `ahe-new`, and then hands off to `ahe-harness` to sync product docs.
|
|
18
|
+
|
|
19
|
+
### `ahe ship` Flow
|
|
20
|
+
1. **plan mode in codex**: Generate an implementation plan inside Codex.
|
|
21
|
+
2. **ahe-ship calling in codex**: If in Plan Mode, the Codex host exits Plan Mode and replays the command. Outside Plan Mode, Codex saves the plan to `.plans/` and stops.
|
|
22
|
+
3. **ahe-ship calling in antigravity**: Antigravity refreshes the saved plan against current code, executes it, and cleans it up.
|
|
23
|
+
|
|
24
|
+
### `ahe` Follow-Up Flow
|
|
25
|
+
1. **Error Encountered**: A test fails or intent changes after execution.
|
|
26
|
+
2. **ahe query**: You type `ahe stale tests` or another explicit follow-up request in Codex.
|
|
27
|
+
3. **Normal Routing**: `ahe-think` treats that request as ordinary AHE work and routes it to the right internal worker.
|
|
28
|
+
|
|
29
|
+
### General `ahe` Flow
|
|
30
|
+
1. **Ongoing Work**: You need to implement a feature or update docs.
|
|
31
|
+
2. **ahe calling**: You type `ahe` or a specific query like `ahe update product spec` in Codex.
|
|
32
|
+
3. **Automatic Routing**: `ahe-think` evaluates your request and automatically routes it to the right agent (like `ahe-solve` or `ahe-harness`).
|
|
7
33
|
|
|
8
34
|
## Installed Skills
|
|
9
35
|
|
|
10
36
|
| Skill | Role |
|
|
11
37
|
| --- | --- |
|
|
12
|
-
| `ahe
|
|
13
|
-
| `ahe-
|
|
14
|
-
| `ahe-
|
|
15
|
-
| `ahe-
|
|
16
|
-
| `ahe-
|
|
17
|
-
| `ahe-
|
|
18
|
-
| `ahe-
|
|
38
|
+
| `ahe` | Top-level user-facing continuation skill that routes exact `ahe` and `ahe` query forms through `ahe-think`. |
|
|
39
|
+
| `ahe-new` | Internal bootstrap workflow that `ahe-think` calls when the workspace has no usable harness yet. |
|
|
40
|
+
| `ahe-think` | Centered internal router that judges what is missing and chooses the next agent. |
|
|
41
|
+
| `ahe-review` | Review agent for repo code, harness state, and CodeGraph context. |
|
|
42
|
+
| `ahe-converse` | Clarification agent for recursive user conversation. |
|
|
43
|
+
| `ahe-harness` | Harness-management agent for product docs, instructions, feature tracking, and todo sync. |
|
|
44
|
+
| `ahe-feature` | Internal helper for deriving feature-list entries from product context. |
|
|
45
|
+
| `ahe-solve` | Feature-solving agent that divides and plans implementation work. |
|
|
46
|
+
| `ahe-overview` | Helper skill that explains the AHE concept, entrypoints, and main workflows in chat. |
|
|
47
|
+
| `ahe-ship` | In Codex: saves Plan Mode plan to `.plans/`. In Antigravity: refreshes and executes exactly one plan from `.plans/`. |
|
|
48
|
+
| `ahe-git` | Independent git orchestration workflow for safe fetch, review, and commit handling. |
|
|
19
49
|
|
|
20
50
|
## Routing Model
|
|
21
51
|
|
|
22
|
-
The
|
|
52
|
+
The Codex-side model is centered but flexible:
|
|
23
53
|
|
|
24
|
-
`
|
|
54
|
+
- exact `ahe` -> `ahe-think` -> `ahe-review | ahe-converse | ahe-harness | ahe-solve`
|
|
55
|
+
- `ahe <query>` or `<query> ahe` -> `ahe-think` -> `ahe-review | ahe-converse | ahe-harness | ahe-solve`
|
|
56
|
+
- `ahe-think` may call internal `ahe-new` when the workspace needs bootstrap or restart handling
|
|
57
|
+
- exact `ahe ship` -> independent plan-export workflow (Codex) or execution workflow (Antigravity)
|
|
58
|
+
- exact `ahe git` -> independent git workflow
|
|
25
59
|
|
|
26
|
-
- `ahe-
|
|
60
|
+
- `ahe-think` is the center of judgment.
|
|
27
61
|
- Worker agents can call each other directly when that is the logical next
|
|
28
62
|
action.
|
|
29
|
-
- Typical direct handoffs are `ahe-harness -> ahe-
|
|
30
|
-
`ahe-
|
|
63
|
+
- Typical direct handoffs are `ahe-harness -> ahe-converse`,
|
|
64
|
+
`ahe-solve -> ahe-review`, and `ahe-review -> ahe-harness`.
|
|
31
65
|
|
|
32
66
|
## Query Examples
|
|
33
67
|
|
|
34
68
|
- `ahe`
|
|
35
|
-
- `ahe
|
|
36
|
-
- `ahe
|
|
69
|
+
- `ahe new`
|
|
70
|
+
- `ahe ship`
|
|
71
|
+
- `ahe stale tests`
|
|
37
72
|
- `ahe update product spec`
|
|
38
73
|
- `ahe add dashboard export feature`
|
|
39
74
|
|
|
40
|
-
Only exact `ahe`, exact `ahe
|
|
41
|
-
|
|
75
|
+
Only exact `ahe`, exact `ahe ship`, exact `ahe-ship`, exact `$ahe-ship`,
|
|
76
|
+
exact `ahe git`, exact `ahe-git`, exact `$ahe-git`, `ahe-overview`,
|
|
77
|
+
`ahe <query>`, and `<query> ahe` activate the hook. Middle mentions that do
|
|
78
|
+
not fit those command shapes do not.
|
package/bin/ahe
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
|
-
readonly VERSION="0.1.
|
|
4
|
+
readonly VERSION="0.1.7"
|
|
5
5
|
SCRIPT_PATH="${BASH_SOURCE[0]}"
|
|
6
6
|
|
|
7
7
|
while [ -L "${SCRIPT_PATH}" ]; do
|
|
@@ -16,20 +16,6 @@ done
|
|
|
16
16
|
|
|
17
17
|
readonly SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "${SCRIPT_PATH}")" && pwd)"
|
|
18
18
|
readonly PACKAGE_ROOT="$(CDPATH= cd -- "${SCRIPT_DIR}/.." && pwd)"
|
|
19
|
-
readonly SOURCE_SKILLS_DIR="${PACKAGE_ROOT}/.codex/skills"
|
|
20
|
-
readonly SOURCE_SHARED_DIR="${PACKAGE_ROOT}/.codex/ahe-shared"
|
|
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"
|
|
24
|
-
readonly MANAGED_SKILLS=(
|
|
25
|
-
"ahe-init"
|
|
26
|
-
"ahe-compression"
|
|
27
|
-
"ahe-conversator"
|
|
28
|
-
"ahe-harness"
|
|
29
|
-
"ahe-reviewer"
|
|
30
|
-
"ahe-solver"
|
|
31
|
-
"ahe-thinker"
|
|
32
|
-
)
|
|
33
19
|
|
|
34
20
|
usage() {
|
|
35
21
|
cat <<'EOF'
|
|
@@ -41,224 +27,42 @@ Usage:
|
|
|
41
27
|
EOF
|
|
42
28
|
}
|
|
43
29
|
|
|
44
|
-
|
|
45
|
-
local
|
|
46
|
-
|
|
47
|
-
local backup_name="$3"
|
|
48
|
-
local timestamp
|
|
30
|
+
dispatch() {
|
|
31
|
+
local command="$1"
|
|
32
|
+
shift
|
|
49
33
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
mv "${target_dir}" "${backup_root}/${backup_name}-${timestamp}"
|
|
53
|
-
}
|
|
34
|
+
local codex_bin="${PACKAGE_ROOT}/packages/ahe-codex/bin/ahe-codex"
|
|
35
|
+
local antigravity_bin="${PACKAGE_ROOT}/packages/ahe-antigravity/bin/ahe-antigravity"
|
|
54
36
|
|
|
55
|
-
|
|
56
|
-
local
|
|
57
|
-
local temp_path=""
|
|
37
|
+
local codex_status=0
|
|
38
|
+
local antigravity_status=0
|
|
58
39
|
|
|
59
|
-
if [
|
|
60
|
-
|
|
40
|
+
if [ "${command}" != "doctor" ]; then
|
|
41
|
+
echo "=== Dispatching to ahe-codex ==="
|
|
61
42
|
fi
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
|
|
97
|
-
install_skill() {
|
|
98
|
-
local force="false"
|
|
99
|
-
local backup="false"
|
|
100
|
-
|
|
101
|
-
while [ "$#" -gt 0 ]; do
|
|
102
|
-
case "$1" in
|
|
103
|
-
--force)
|
|
104
|
-
force="true"
|
|
105
|
-
;;
|
|
106
|
-
--backup)
|
|
107
|
-
backup="true"
|
|
108
|
-
;;
|
|
109
|
-
*)
|
|
110
|
-
printf 'Unknown install option: %s\n' "$1" >&2
|
|
111
|
-
usage >&2
|
|
112
|
-
exit 1
|
|
113
|
-
;;
|
|
114
|
-
esac
|
|
115
|
-
shift
|
|
116
|
-
done
|
|
117
|
-
|
|
118
|
-
if [ ! -d "${SOURCE_SKILLS_DIR}" ]; then
|
|
119
|
-
printf 'Packaged skill files are missing: %s\n' "${SOURCE_SKILLS_DIR}" >&2
|
|
120
|
-
exit 1
|
|
43
|
+
if [ -x "${codex_bin}" ]; then
|
|
44
|
+
"${codex_bin}" "${command}" "$@" || codex_status=$?
|
|
45
|
+
else
|
|
46
|
+
echo "Warning: ahe-codex script not found or not executable at ${codex_bin}"
|
|
47
|
+
codex_status=1
|
|
121
48
|
fi
|
|
122
49
|
|
|
123
|
-
if [
|
|
124
|
-
|
|
125
|
-
|
|
50
|
+
if [ "${command}" != "doctor" ]; then
|
|
51
|
+
echo ""
|
|
52
|
+
echo "=== Dispatching to ahe-antigravity ==="
|
|
53
|
+
else
|
|
54
|
+
echo ""
|
|
126
55
|
fi
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
local backup_dir="${PWD}/.codex/_backups"
|
|
133
|
-
local skill_name=""
|
|
134
|
-
local skill_target=""
|
|
135
|
-
|
|
136
|
-
cleanup_ahe_config_entries "${target_config_path}"
|
|
137
|
-
|
|
138
|
-
for skill_name in "${MANAGED_SKILLS[@]}"; do
|
|
139
|
-
skill_target="${target_skills_dir}/${skill_name}"
|
|
140
|
-
|
|
141
|
-
if [ -e "${skill_target}" ]; then
|
|
142
|
-
if [ "${backup}" = "true" ]; then
|
|
143
|
-
backup_existing_installation "${skill_target}" "${backup_dir}" "${skill_name}"
|
|
144
|
-
elif [ "${force}" != "true" ]; then
|
|
145
|
-
cat <<EOF >&2
|
|
146
|
-
AHE skill is already installed at:
|
|
147
|
-
${skill_target}
|
|
148
|
-
|
|
149
|
-
Re-run with --force to overwrite or --backup to move the existing install aside first.
|
|
150
|
-
EOF
|
|
151
|
-
exit 1
|
|
152
|
-
else
|
|
153
|
-
rm -rf "${skill_target}"
|
|
154
|
-
fi
|
|
155
|
-
fi
|
|
156
|
-
done
|
|
157
|
-
|
|
158
|
-
if [ -e "${target_shared_dir}" ]; then
|
|
159
|
-
if [ "${backup}" = "true" ]; then
|
|
160
|
-
backup_existing_installation "${target_shared_dir}" "${backup_dir}" "ahe-shared"
|
|
161
|
-
elif [ "${force}" = "true" ]; then
|
|
162
|
-
rm -rf "${target_shared_dir}"
|
|
163
|
-
else
|
|
164
|
-
cat <<EOF >&2
|
|
165
|
-
AHE shared assets are already installed at:
|
|
166
|
-
${target_shared_dir}
|
|
167
|
-
|
|
168
|
-
Re-run with --force to overwrite or --backup to move the existing install aside first.
|
|
169
|
-
EOF
|
|
170
|
-
exit 1
|
|
171
|
-
fi
|
|
56
|
+
if [ -x "${antigravity_bin}" ]; then
|
|
57
|
+
"${antigravity_bin}" "${command}" "$@" || antigravity_status=$?
|
|
58
|
+
else
|
|
59
|
+
echo "Warning: ahe-antigravity script not found or not executable at ${antigravity_bin}"
|
|
60
|
+
antigravity_status=1
|
|
172
61
|
fi
|
|
173
62
|
|
|
174
|
-
if [ -
|
|
175
|
-
|
|
176
|
-
backup_existing_installation "${target_hooks_dir}" "${backup_dir}" "hooks"
|
|
177
|
-
elif [ "${force}" = "true" ]; then
|
|
178
|
-
rm -rf "${target_hooks_dir}"
|
|
179
|
-
else
|
|
180
|
-
cat <<EOF >&2
|
|
181
|
-
AHE hooks are already installed at:
|
|
182
|
-
${target_hooks_dir}
|
|
183
|
-
|
|
184
|
-
Re-run with --force to overwrite or --backup to move the existing install aside first.
|
|
185
|
-
EOF
|
|
186
|
-
exit 1
|
|
187
|
-
fi
|
|
63
|
+
if [ "${codex_status}" -ne 0 ] || [ "${antigravity_status}" -ne 0 ]; then
|
|
64
|
+
return 1
|
|
188
65
|
fi
|
|
189
|
-
|
|
190
|
-
mkdir -p "${target_skills_dir}"
|
|
191
|
-
for skill_name in "${MANAGED_SKILLS[@]}"; do
|
|
192
|
-
cp -R "${SOURCE_SKILLS_DIR}/${skill_name}" "${target_skills_dir}/${skill_name}"
|
|
193
|
-
done
|
|
194
|
-
cp -R "${SOURCE_SHARED_DIR}" "${target_shared_dir}"
|
|
195
|
-
cp -R "${SOURCE_HOOKS_DIR}" "${target_hooks_dir}"
|
|
196
|
-
|
|
197
|
-
cat <<EOF
|
|
198
|
-
AHE Codex skill installed.
|
|
199
|
-
|
|
200
|
-
Next:
|
|
201
|
-
1. Open Codex chat in this workspace.
|
|
202
|
-
2. Use \`ahe init\` for a new start.
|
|
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\`.
|
|
205
|
-
EOF
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
doctor() {
|
|
209
|
-
local target_skills_dir="${PWD}/.codex/skills"
|
|
210
|
-
local target_shared_dir="${PWD}/.codex/ahe-shared"
|
|
211
|
-
local target_hooks_dir="${PWD}/.codex/hooks"
|
|
212
|
-
local skill_name=""
|
|
213
|
-
|
|
214
|
-
for skill_name in "${MANAGED_SKILLS[@]}"; do
|
|
215
|
-
if [ ! -f "${target_skills_dir}/${skill_name}/SKILL.md" ]; then
|
|
216
|
-
printf 'Missing: %s/%s/SKILL.md\n' "${target_skills_dir}" "${skill_name}" >&2
|
|
217
|
-
exit 1
|
|
218
|
-
fi
|
|
219
|
-
done
|
|
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
|
-
|
|
226
|
-
if [ ! -d "${target_shared_dir}/templates" ]; then
|
|
227
|
-
printf 'Missing: %s/templates\n' "${target_shared_dir}" >&2
|
|
228
|
-
exit 1
|
|
229
|
-
fi
|
|
230
|
-
|
|
231
|
-
if [ ! -d "${target_shared_dir}/schemas" ]; then
|
|
232
|
-
printf 'Missing: %s/schemas\n' "${target_shared_dir}" >&2
|
|
233
|
-
exit 1
|
|
234
|
-
fi
|
|
235
|
-
|
|
236
|
-
if [ ! -f "${target_hooks_dir}/hooks.json" ]; then
|
|
237
|
-
printf 'Missing: %s/hooks.json\n' "${target_hooks_dir}" >&2
|
|
238
|
-
exit 1
|
|
239
|
-
fi
|
|
240
|
-
|
|
241
|
-
printf 'AHE skill installation looks healthy.\n'
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
uninstall_skill() {
|
|
245
|
-
local target_skills_dir="${PWD}/.codex/skills"
|
|
246
|
-
local target_shared_dir="${PWD}/.codex/ahe-shared"
|
|
247
|
-
local target_hooks_dir="${PWD}/.codex/hooks"
|
|
248
|
-
local target_config_path="${PWD}/.codex/config.toml"
|
|
249
|
-
local skill_name=""
|
|
250
|
-
|
|
251
|
-
echo "Uninstalling AHE skills from ${PWD}/.codex..."
|
|
252
|
-
|
|
253
|
-
for skill_name in "${MANAGED_SKILLS[@]}"; do
|
|
254
|
-
rm -rf "${target_skills_dir}/${skill_name}"
|
|
255
|
-
done
|
|
256
|
-
|
|
257
|
-
rm -rf "${target_shared_dir}"
|
|
258
|
-
rm -rf "${target_hooks_dir}"
|
|
259
|
-
cleanup_ahe_config_entries "${target_config_path}"
|
|
260
|
-
|
|
261
|
-
echo "AHE skills uninstalled successfully."
|
|
262
66
|
}
|
|
263
67
|
|
|
264
68
|
main() {
|
|
@@ -268,21 +72,18 @@ main() {
|
|
|
268
72
|
fi
|
|
269
73
|
|
|
270
74
|
local command="$1"
|
|
271
|
-
|
|
272
|
-
|
|
75
|
+
|
|
273
76
|
case "${command}" in
|
|
274
|
-
install)
|
|
275
|
-
|
|
276
|
-
;;
|
|
277
|
-
uninstall)
|
|
278
|
-
uninstall_skill
|
|
279
|
-
;;
|
|
280
|
-
doctor)
|
|
281
|
-
doctor
|
|
77
|
+
install|uninstall|doctor)
|
|
78
|
+
dispatch "$@"
|
|
282
79
|
;;
|
|
283
80
|
version)
|
|
284
81
|
printf '%s\n' "${VERSION}"
|
|
285
82
|
;;
|
|
83
|
+
-h|--help|help)
|
|
84
|
+
usage
|
|
85
|
+
exit 0
|
|
86
|
+
;;
|
|
286
87
|
*)
|
|
287
88
|
printf 'Unknown command: %s\n' "${command}" >&2
|
|
288
89
|
usage >&2
|
package/package.json
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ksuchoi216/ahe",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "Codex chat workflow skill installer for Awesome Harness Engineering",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
+
"workspaces": [
|
|
9
|
+
"packages/*"
|
|
10
|
+
],
|
|
8
11
|
"bin": {
|
|
9
12
|
"ahe": "./bin/ahe"
|
|
10
13
|
},
|
|
11
14
|
"scripts": {
|
|
12
15
|
"test": "pytest tests/ -x",
|
|
13
16
|
"prepublishOnly": "npm run test",
|
|
14
|
-
"postinstall": "echo \"\" && echo \"Awesome Harness Engineering CLI installed!\" && echo \"To install the skills
|
|
17
|
+
"postinstall": "echo \"\" && echo \"Awesome Harness Engineering CLI installed!\" && echo \"To install the skills, run: ahe install\" && echo \"\" && echo \"If you wish to uninstall later, run: npm uninstall -g @ksuchoi216/ahe\""
|
|
15
18
|
},
|
|
16
19
|
"repository": {
|
|
17
20
|
"type": "git",
|
|
@@ -28,7 +31,7 @@
|
|
|
28
31
|
"author": "ksuchoi216",
|
|
29
32
|
"files": [
|
|
30
33
|
"bin/",
|
|
31
|
-
"
|
|
34
|
+
"packages/"
|
|
32
35
|
],
|
|
33
36
|
"license": "MIT"
|
|
34
|
-
}
|
|
37
|
+
}
|