@ksuchoi216/ahe 0.1.7 → 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.
- package/README.md +62 -19
- 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 +296 -0
- package/packages/ahe-codex/.codex/skills/ahe/SKILL.md +34 -0
- package/{.codex/skills/ahe-compression → packages/ahe-codex/.codex/skills/ahe-compress}/SKILL.md +39 -16
- package/{.codex/skills/ahe-compression → packages/ahe-codex/.codex/skills/ahe-compress}/agents/openai.yaml +1 -1
- package/{.codex/skills/ahe-compression → packages/ahe-codex/.codex/skills/ahe-compress}/scripts/check-harness-size.sh +18 -6
- package/packages/ahe-codex/.codex/skills/ahe-compress/scripts/detect_stale_tests.py +30 -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-fix/SKILL.md +59 -0
- package/packages/ahe-codex/.codex/skills/ahe-fix/scripts/write_fix_plan.py +108 -0
- package/packages/ahe-codex/.codex/skills/ahe-git/SKILL.md +34 -0
- package/packages/ahe-codex/.codex/skills/ahe-harness/SKILL.md +128 -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 +32 -21
- package/packages/ahe-codex/.codex/skills/ahe-overview/SKILL.md +119 -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 +114 -0
- package/packages/ahe-codex/bin/ahe-codex +398 -0
- package/packages/ahe-codex/package.json +7 -0
- package/.codex/hooks/ahe-hook.js +0 -195
- 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/config.yaml +0 -0
- /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,84 @@
|
|
|
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
|
-
continue existing work,
|
|
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 `ahe new` to start or reset harness work,
|
|
5
|
+
`ahe` to continue existing work, `ahe ship` to save the latest plan (in Codex) or refresh and execute a saved plan (in Antigravity),
|
|
6
|
+
`ahe fix` to create a `.plans` fix plan, and
|
|
7
|
+
`ahe <query>` or `<query> ahe` for explicit AHE requests such as `ahe compress`
|
|
8
|
+
or `compress ahe`. For a detailed in-chat explanation of the AHE architecture and workflows, use `ahe-overview`.
|
|
9
|
+
|
|
10
|
+
## Core Command Workflows
|
|
11
|
+
|
|
12
|
+
Here are intuitive flow examples for the primary AHE commands. While `ahe`, `ahe-new`, `ahe-ship`, and `ahe-fix` are the explicit commands, you can also use conversational queries (e.g., `ahe add dashboard export feature`) which are automatically routed.
|
|
13
|
+
|
|
14
|
+
### `ahe new` Flow
|
|
15
|
+
1. **Empty Workspace**: You have a new or existing repo that needs AHE.
|
|
16
|
+
2. **ahe-new calling**: You type `ahe new` in Codex.
|
|
17
|
+
3. **Initialization**: It prepares the workspace, creates templates, and hands off to `ahe-harness` to sync your 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 fix` Flow
|
|
25
|
+
1. **Error Encountered**: A test fails or intent changes after execution.
|
|
26
|
+
2. **ahe-fix calling**: You type `ahe fix` (or `ahe fix stale tests`) in Codex.
|
|
27
|
+
3. **Fix Plan Creation**: It generates a dedicated fix plan in `.plans/` ready for Antigravity to refresh and execute.
|
|
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-
|
|
38
|
+
| `ahe` | Top-level user-facing continuation skill that routes exact `ahe` and `ahe` query forms through `ahe-think`. |
|
|
39
|
+
| `ahe-new` | New-start workflow that prepares the workspace and hands product/tracking work to `ahe-harness`. |
|
|
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. |
|
|
16
43
|
| `ahe-harness` | Harness-management agent for product docs, instructions, feature tracking, todo sync, and compression-aware maintenance. |
|
|
17
|
-
| `ahe-
|
|
18
|
-
| `ahe-
|
|
44
|
+
| `ahe-feature` | Internal helper for deriving feature-list entries from product context. |
|
|
45
|
+
| `ahe-fix` | Independent fix planner that writes `.plans/{plan_name}.md` for errors or changed user intent. |
|
|
46
|
+
| `ahe-solve` | Feature-solving agent that divides and plans implementation work. |
|
|
47
|
+
| `ahe-compress` | Internal helper that detects oversized harness files before broad reads. |
|
|
48
|
+
| `ahe-overview` | Explains the AHE concept, entrypoints, and main workflows in chat with Mermaid diagrams. |
|
|
49
|
+
| `ahe-ship` | In Codex: saves Plan Mode plan to `.plans/`. In Antigravity: refreshes and executes exactly one plan from `.plans/`. |
|
|
19
50
|
|
|
20
51
|
## Routing Model
|
|
21
52
|
|
|
22
|
-
The
|
|
53
|
+
The Codex-side model is centered but flexible:
|
|
23
54
|
|
|
24
|
-
`
|
|
55
|
+
- exact `ahe` -> `ahe-think` -> `ahe-review | ahe-converse | ahe-harness | ahe-solve`
|
|
56
|
+
- `ahe <query>` or `<query> ahe` -> `ahe-think` -> `ahe-review | ahe-converse | ahe-harness | ahe-solve`
|
|
57
|
+
- exact `ahe new` -> dedicated new-start workflow first, then `ahe-harness`
|
|
58
|
+
- exact `ahe ship` -> independent plan-export workflow (Codex) or execution workflow (Antigravity)
|
|
59
|
+
- exact `ahe fix`, `ahe fix <query>`, or `<query> ahe fix` -> independent fix-plan workflow
|
|
25
60
|
|
|
26
|
-
- `ahe-
|
|
61
|
+
- `ahe-think` is the center of judgment.
|
|
27
62
|
- Worker agents can call each other directly when that is the logical next
|
|
28
63
|
action.
|
|
29
|
-
- Typical direct handoffs are `ahe-harness -> ahe-
|
|
30
|
-
`ahe-
|
|
64
|
+
- Typical direct handoffs are `ahe-harness -> ahe-converse`,
|
|
65
|
+
`ahe-solve -> ahe-review`, and `ahe-review -> ahe-harness`.
|
|
31
66
|
|
|
32
67
|
## Query Examples
|
|
33
68
|
|
|
34
69
|
- `ahe`
|
|
35
|
-
- `ahe
|
|
36
|
-
- `ahe
|
|
70
|
+
- `ahe new`
|
|
71
|
+
- `ahe ship`
|
|
72
|
+
- `ahe fix`
|
|
73
|
+
- `ahe fix stale tests`
|
|
74
|
+
- `stale tests ahe fix`
|
|
75
|
+
- `ahe compress`
|
|
76
|
+
- `compress ahe`
|
|
37
77
|
- `ahe update product spec`
|
|
38
78
|
- `ahe add dashboard export feature`
|
|
39
79
|
|
|
40
|
-
Only exact `ahe`, exact `ahe
|
|
41
|
-
|
|
80
|
+
Only exact `ahe`, exact `ahe new`, exact `ahe-new`, exact `$ahe-new`, and
|
|
81
|
+
exact `ahe ship`, exact `ahe-ship`, exact `$ahe-ship`, exact `ahe fix`, exact
|
|
82
|
+
exact `ahe-fix`, exact `$ahe-fix`, `ahe fix <query>`, `<query> ahe fix`,
|
|
83
|
+
`ahe-overview`, `ahe <query>`, and `<query> ahe` activate the hook.
|
|
84
|
+
Middle mentions that do 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.10",
|
|
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
|
+
}
|