@uzysjung/agent-harness 26.164.0 → 26.166.0
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.ko.md +18 -12
- package/README.md +18 -12
- package/dist/{chunk-X7NSQHXL.js → chunk-AHAAF4HS.js} +77 -12
- package/dist/{chunk-X7NSQHXL.js.map → chunk-AHAAF4HS.js.map} +1 -1
- package/dist/index.js +1231 -733
- package/dist/index.js.map +1 -1
- package/dist/trust-tier-drift.js +1 -1
- package/package.json +1 -1
- package/templates/{antigravity/AGENTS.md.template → AGENTS.md.template} +14 -2
- package/templates/codex/README.md +6 -5
- package/templates/codex/config.toml.template +0 -11
- package/templates/opencode/README.md +1 -2
- package/templates/codex/AGENTS.md.template +0 -31
- package/templates/opencode/AGENTS.md.template +0 -23
package/README.ko.md
CHANGED
|
@@ -14,13 +14,13 @@ Claude Code나 Codex에 규칙을 계속 덧붙여 왔다면 한 번쯤 겪어
|
|
|
14
14
|
|
|
15
15
|
uzys-agent-harness는 에이전트를 규칙 목록으로 묶지 않는다. 대신 네 가지 철학으로 에이전트가 일하는 환경을 만든다.
|
|
16
16
|
|
|
17
|
-
### 1. 모델이
|
|
17
|
+
### 1. 모델이 좋아질 때 막히지 않도록 만든다
|
|
18
18
|
|
|
19
|
-
"이건 해라, 저건 하지 마라"를 늘어놓지 않고, 무엇을 기준으로 판단할지와 넘으면 안 되는 선을 알려 준다. 예를 들어 "모든 변경에 테스트를 붙여라" 대신 "변경이 미치는 영향과 되돌리는 비용을 보고 검증 깊이를 정하라"고 알려 준다. 모델이 스스로 잘하게 된 일은 지시에서 뺀다.
|
|
19
|
+
"이건 해라, 저건 하지 마라"를 늘어놓지 않고, 무엇을 기준으로 판단할지와 넘으면 안 되는 선을 알려 준다. 예를 들어 "모든 변경에 테스트를 붙여라" 대신 "변경이 미치는 영향과 되돌리는 비용을 보고 검증 깊이를 정하라"고 알려 준다. 모델이 스스로 잘하게 된 일은 지시에서 뺀다. 새 모델이 나와도 옛 규칙이 그 능력을 가로막지 않게 하려는 것이고, 내 프로젝트에서 낡은 지시를 찾아 줄여 주는 스킬도 함께 들어 있다.
|
|
20
20
|
|
|
21
21
|
### 2. 방향과 경계가 있으면 에이전트는 스스로 더 멀리 간다
|
|
22
22
|
|
|
23
|
-
일을 맡기기 전에 프로젝트가 가야 할 방향, 이번 작업의 완료 기준, 넘으면 안 되는 선부터 정한다. 기준이 있으니 에이전트는 해 보고, 기준에 비춰 확인하고, 고치는 과정을 스스로 되풀이한다. 단계마다
|
|
23
|
+
일을 맡기기 전에 프로젝트가 가야 할 방향, 이번 작업의 완료 기준, 넘으면 안 되는 선부터 정한다. 기준이 있으니 에이전트는 해 보고, 기준에 비춰 확인하고, 고치는 과정을 스스로 되풀이한다. 단계마다 일일이 지시해야 하는 일을 줄이고, 사람에게는 사람이 정해야 할 것만 묻게 하려는 것이다.
|
|
24
24
|
|
|
25
25
|
### 3. 하네스는 늘 가볍게 유지한다
|
|
26
26
|
|
|
@@ -28,9 +28,9 @@ uzys-agent-harness는 에이전트를 규칙 목록으로 묶지 않는다. 대
|
|
|
28
28
|
|
|
29
29
|
### 4. 여러 관점과 여러 에이전트로 속도, 비용, 품질을 맞춘다
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
스스로 하는 점검과 독립 검토를 나눈다. 중요한 변경은 결과물을 만들지 않은 다른 에이전트가 검토하고, 개발 트랙에는 여러 사용자 입장(페르소나)에서 결과물을 따져 보는 스킬도 들어간다. 선택 스킬을 더하면 작업마다 어울리는 모델과 추론 강도를 골라 가벼운 일은 빠르고 싸게, 중요한 일은 꼼꼼하게 처리하고, 다른 회사의 모델에게 의견을 물을 수도 있다.
|
|
32
32
|
|
|
33
|
-
이 네 가지를 담은 룰과 스킬, 그리고 프로젝트 스택에 맞는 외부 스킬(공식
|
|
33
|
+
이 네 가지를 담은 룰과 스킬, 그리고 프로젝트 스택에 맞는 외부 스킬(공식 저장소이거나, 출처와 인기도, 설치 경로를 확인해 고른 것)을 명령 하나로 설치한다. 내 `CLAUDE.md`에는 주석으로 표시한 블록 하나만 붙고 나머지는 건드리지 않는다. 지울 때도 `CLAUDE.md`나 `.mcp.json` 같은 공용 파일에서는 하네스가 넣은 부분만 빠진다. Claude Code, Codex, OpenCode, Antigravity에서 쓸 수 있고, 파일 편집을 막는 훅과 검토 에이전트는 Claude Code에서 동작한다.
|
|
34
34
|
|
|
35
35
|
## 지금 설치하기
|
|
36
36
|
|
|
@@ -48,13 +48,13 @@ npx -y @uzysjung/agent-harness
|
|
|
48
48
|
1/5 Tracks 만들려는 것을 고른다(개발 스택 또는 업무 종류). 맞는 항목이 미리 체크된다
|
|
49
49
|
2/5 CLI claude / codex / opencode / antigravity 중 하나 이상을 고른다
|
|
50
50
|
3/5 Install items 미리 체크된 항목을 보고 빼거나 더한다
|
|
51
|
-
4/5 Confirm 요약과,
|
|
51
|
+
4/5 Confirm 요약과, 하네스가 매 세션 더하는 지시의 토큰 추정치를 확인한다
|
|
52
52
|
5/5 Installing
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
트랙을 고르면 그에 맞는 룰과 스킬, 외부 도구가 미리 체크된다. 어디까지나 추천이다. 3단계에서 무엇을 넣고 뺄지는 모두 직접 정하면 되고, 트랙을 여러 개 골라도 된다. 마법사 없이 설치할 때도 `--with <id>`와 `--without <id>`로 똑같이 고를 수 있다.
|
|
56
56
|
|
|
57
|
-
설치가 끝나면 같은 폴더에서 AI 코딩 도구를 연다. 첫 세션부터 룰과
|
|
57
|
+
설치가 끝나면 같은 폴더에서 AI 코딩 도구를 연다. 첫 세션부터 룰과 스킬을 읽는다. Codex는 이 폴더를 신뢰(Trust and continue)해야 프로젝트 설정(MCP와 훅)까지 켜진다.
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
60
|
claude # 또는 codex / opencode / agy(Antigravity)
|
|
@@ -102,11 +102,11 @@ CI, 컨테이너, 스크립트처럼 마법사를 띄울 수 없는 곳에서는
|
|
|
102
102
|
|
|
103
103
|
### 경계는 이유와 함께 알려 주고, 강제로 막는 것은 최소로 한다
|
|
104
104
|
|
|
105
|
-
넘으면 안 되는 선은 분명히 적는다. 되돌리기 어려운 삭제나 배포, 여러 사람이 함께 쓰는 저장소나 데이터베이스에 기록하는 일은 맡긴 범위를 벗어나면 먼저 묻게 한다. 맡긴 범위 안의 일은 매번 묻지 않고 끝까지 하도록 한다. 강제로 막는 장치는 두 가지뿐이다. 하나는 Claude Code
|
|
105
|
+
넘으면 안 되는 선은 분명히 적는다. 되돌리기 어려운 삭제나 배포, 여러 사람이 함께 쓰는 저장소나 데이터베이스에 기록하는 일은 맡긴 범위를 벗어나면 먼저 묻게 한다. 맡긴 범위 안의 일은 매번 묻지 않고 끝까지 하도록 한다. 강제로 막는 장치는 두 가지뿐이다. 하나는 Claude Code가 파일 편집 도구로 `.env`, lock 파일, 인증서를 고치지 못하게 막는 훅이다. 셸 명령으로 바꾸거나 내용을 읽는 것까지 막는 장치는 아니다. 다른 하나는 직접 한 번 실행하면 GitHub 기본 브랜치에 보호 규칙을 걸어 주는 스크립트다.
|
|
106
106
|
|
|
107
107
|
### 모델이 잘하게 된 일은 지시에서 뺀다
|
|
108
108
|
|
|
109
|
-
매 세션 읽는 지시는 그만큼 컨텍스트를 차지한다. 예전 모델의 약점을 메우려던 지시는 더 나은 모델에게 방해가 되기도 한다. 그래서 설치할 때는 고른 항목 때문에 매 세션
|
|
109
|
+
매 세션 읽는 지시는 그만큼 컨텍스트를 차지한다. 예전 모델의 약점을 메우려던 지시는 더 나은 모델에게 방해가 되기도 한다. 그래서 설치할 때는 고른 항목 때문에 하네스가 매 세션 더하는 지시가 몇 토큰쯤인지 추정해 먼저 보여 준다. 외부 스킬은 이 숫자에 들어가지 않는다. 설치한 뒤에는 `audit-harness-fit` 스킬이 내 프로젝트에서 더는 필요 없는 지시나 똑같은 확인을 되풀이하게 만드는 절차를 찾아, 고칠 곳을 알려 준다.
|
|
110
110
|
|
|
111
111
|
### 만드는 에이전트와 검사하는 에이전트를 나눈다
|
|
112
112
|
|
|
@@ -156,7 +156,7 @@ your-project/
|
|
|
156
156
|
|
|
157
157
|
## 지원하는 스택과 함께 제공하는 스킬
|
|
158
158
|
|
|
159
|
-
트랙은 개발 스택이나 업무 종류별로 묶어 둔 시작 구성이다. 표의 위쪽 9개가 개발 트랙, 아래쪽 3개가 업무 트랙이다. 트랙을 고르면 아래 외부 스킬과 도구가 미리 체크된다. 미리 체크되는 것은 모두 공식
|
|
159
|
+
트랙은 개발 스택이나 업무 종류별로 묶어 둔 시작 구성이다. 표의 위쪽 9개가 개발 트랙, 아래쪽 3개가 업무 트랙이다. 트랙을 고르면 아래 외부 스킬과 도구가 미리 체크된다. 미리 체크되는 것은 모두 공식 저장소이거나, 출처와 인기도, 설치 경로를 확인해 고른 저장소다. 내용의 안전성이나 결과물의 품질까지 보증하지는 않는다([SECURITY.md](SECURITY.md)).
|
|
160
160
|
|
|
161
161
|
| 트랙 | 스택 | 미리 체크되는 외부 스킬·도구 |
|
|
162
162
|
|---|---|---|
|
|
@@ -208,9 +208,15 @@ MCP 서버도 함께 들어간다. 모든 트랙에 `context7`(최신 라이브
|
|
|
208
208
|
|
|
209
209
|
| 지금 이렇게 하고 있다면 | 이 하네스와 다른 점 |
|
|
210
210
|
|---|---|
|
|
211
|
-
| `CLAUDE.md`나 `AGENTS.md`를 직접 쓴다 | 그 파일은 그대로 둔다. 하네스는 주석으로 표시한 블록 하나만 붙이고 나머지는 건드리지 않는다. 대신 파일 하나로는 할 수 없는 것을 더해 준다. Claude Code에서
|
|
211
|
+
| `CLAUDE.md`나 `AGENTS.md`를 직접 쓴다 | 그 파일은 그대로 둔다. 하네스는 주석으로 표시한 블록 하나만 붙이고 나머지는 건드리지 않는다. 대신 파일 하나로는 할 수 없는 것을 더해 준다. Claude Code에서 보호 파일 편집을 막는 훅과 만드는 에이전트와 따로 있는 검사 에이전트, 그리고 업데이트가 하네스가 넣은 것만 바꾸게 하는 설치 기록이다. |
|
|
212
212
|
| 마켓플레이스에서 스킬을 골라 쓴다 | 스킬 하나만 필요하면 그것만 받으면 된다. `npx skills add uzysjung/uzys-agent-harness --skill <id> -a claude-code` (id 목록은 `--list`나 [skills.sh](https://skills.sh/uzysjung/uzys-agent-harness)에서 볼 수 있다). 설치 마법사는 스킬 목록만으로는 채울 수 없는 것, 곧 매 세션 읽는 룰과 훅, 서브에이전트, 그리고 이것들을 최신으로 유지하는 설치 기록을 위한 것이다. |
|
|
213
|
-
| 룰이 많은 다른 하네스를 쓴다 | 매 세션 읽는
|
|
213
|
+
| 룰이 많은 다른 하네스를 쓴다 | 매 세션 읽는 룰은 짧은 것 몇 개로 두고 긴 절차는 필요할 때만 읽게 한다. 설치 전에 그 지시의 토큰 추정치를 보여 준다. 정해진 순서대로 개발하는 방식이 필요하면 외부 워크플로 키트인 `openspec`이나 `bmad-method`를 더하면 된다. 둘 다 선택이며 [WORKFLOWS.md](docs/WORKFLOWS.md)에 비교해 두었다. |
|
|
214
|
+
|
|
215
|
+
## 이 하네스가 맞지 않는 경우
|
|
216
|
+
|
|
217
|
+
- **정해진 절차를 그대로 따르게 해야 할 때.** 이 하네스는 절차 대신 판단 기준을 주고 결정은 모델에게 맡긴다. 감사나 규제 때문에 단계가 고정돼야 한다면 `openspec`이나 `bmad-method` 같은 워크플로 키트를 더하거나, 그 절차를 직접 규칙으로 쓰는 편이 맞다.
|
|
218
|
+
- **판단을 맡기기 어려운 작은 모델을 쓸 때.** 기준만 주는 지시는 모델이 그 기준으로 스스로 판단할 수 있을 때 힘을 낸다.
|
|
219
|
+
- **효과를 숫자로 확인한 뒤에 쓰고 싶을 때.** 이 프로젝트의 테스트는 설치와 파일 처리가 맞게 되는지를 검증한다. 하네스를 쓸 때와 안 쓸 때의 개발 성과를 비교한 측정 결과는 아직 없다.
|
|
214
220
|
|
|
215
221
|
## 문서
|
|
216
222
|
|
package/README.md
CHANGED
|
@@ -14,13 +14,13 @@ If you have kept adding rules to Claude Code or Codex, you have probably run int
|
|
|
14
14
|
|
|
15
15
|
uzys-agent-harness doesn't tie the agent down with a list of rules. It builds the agent's working environment on four ideas.
|
|
16
16
|
|
|
17
|
-
### 1.
|
|
17
|
+
### 1. Built so better models aren't held back
|
|
18
18
|
|
|
19
|
-
Instead of piling up dos and don'ts, it tells the agent what to base its judgment on and which lines it must not cross. For example, instead of "add tests to every change," it says "decide how deeply to verify based on the change's impact and the cost of undoing it." Instructions for things the model now does well on its own come out.
|
|
19
|
+
Instead of piling up dos and don'ts, it tells the agent what to base its judgment on and which lines it must not cross. For example, instead of "add tests to every change," it says "decide how deeply to verify based on the change's impact and the cost of undoing it." Instructions for things the model now does well on its own come out. The aim is that when a new model arrives, old rules don't stand in the way of what it can do, and a skill is included that finds stale instructions in your own project so you can trim them.
|
|
20
20
|
|
|
21
21
|
### 2. With a direction and limits, the agent goes further on its own
|
|
22
22
|
|
|
23
|
-
Before work is handed over, the project's direction, the task's definition of done, and the lines not to cross are set first. With those to check against, the agent tries, checks its work, and fixes it, again and again, on its own.
|
|
23
|
+
Before work is handed over, the project's direction, the task's definition of done, and the lines not to cross are set first. With those to check against, the agent tries, checks its work, and fixes it, again and again, on its own. The aim is to cut down on step-by-step direction and to have the agent ask you only about the decisions that are yours.
|
|
24
24
|
|
|
25
25
|
### 3. The harness stays light
|
|
26
26
|
|
|
@@ -28,9 +28,9 @@ Every instruction the agent reads each session takes up context, and as they pil
|
|
|
28
28
|
|
|
29
29
|
### 4. Several viewpoints and several agents balance speed, cost, and quality
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Self-checks and independent review are kept apart. Important changes are reviewed by an agent that didn't build them, and dev tracks also get a skill that examines the work from several user perspectives (personas). With the optional skills, each task gets a fitting model and reasoning effort, light work fast and cheap and important work done carefully, and a model from another vendor can give a second opinion.
|
|
32
32
|
|
|
33
|
-
One command installs the rules and skills that carry these four ideas, plus third-party skills for your stack (from official repositories or
|
|
33
|
+
One command installs the rules and skills that carry these four ideas, plus third-party skills for your stack (from official repositories, or picked after checking their source, popularity, and install path). Your `CLAUDE.md` gets one block marked with comments and nothing else is touched. On uninstall, shared files such as `CLAUDE.md` and `.mcp.json` lose only the harness's part. Works with Claude Code, Codex, OpenCode, and Antigravity; the hook that blocks file edits and the reviewer agent run on Claude Code.
|
|
34
34
|
|
|
35
35
|
## Install it now
|
|
36
36
|
|
|
@@ -48,13 +48,13 @@ The wizard has five steps:
|
|
|
48
48
|
1/5 Tracks what you are building (a dev stack or a kind of work). Items that fit are pre-checked
|
|
49
49
|
2/5 CLI one or more of claude / codex / opencode / antigravity
|
|
50
50
|
3/5 Install items review the pre-checked items; drop or add anything
|
|
51
|
-
4/5 Confirm a summary, and
|
|
51
|
+
4/5 Confirm a summary, and an estimate of the tokens the harness adds per session
|
|
52
52
|
5/5 Installing
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
Picking a track pre-checks the rules, skills, and external tools that fit it. That is only a recommendation. At step 3 you decide everything that goes in or stays out, and you can pick more than one track. Without the wizard, `--with <id>` and `--without <id>` make the same choices.
|
|
56
56
|
|
|
57
|
-
Then open your AI coding tool in the same folder. The rules and skills
|
|
57
|
+
Then open your AI coding tool in the same folder. The rules and skills are read from the first session. On Codex, the project settings (MCP and hooks) turn on only after you trust the folder ("Trust and continue"):
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
60
|
claude # or codex / opencode / agy (Antigravity)
|
|
@@ -102,11 +102,11 @@ Instead of prescribing a method, the harness first says what done looks like. Th
|
|
|
102
102
|
|
|
103
103
|
### Limits come with reasons, and very few are enforced
|
|
104
104
|
|
|
105
|
-
Hard limits are written down plainly. Destructive actions, deployments, and writes to anything other people share, such as a repository or a database, need your approval when they go beyond the work you handed over. Routine work inside that scope is meant to go ahead without repeated check-ins. Only two things are enforced mechanically: on Claude Code, a hook
|
|
105
|
+
Hard limits are written down plainly. Destructive actions, deployments, and writes to anything other people share, such as a repository or a database, need your approval when they go beyond the work you handed over. Routine work inside that scope is meant to go ahead without repeated check-ins. Only two things are enforced mechanically: on Claude Code, a hook stops the file-edit tools from changing `.env`, lock files, and certificates (it does not stop shell commands from changing them, or anything from reading them), and a bundled script, when you run it once, puts protection rules on your GitHub default branch.
|
|
106
106
|
|
|
107
107
|
### What the model now does well comes out of the instructions
|
|
108
108
|
|
|
109
|
-
Every instruction read each session takes up context, and instructions written for an older model's weak spots can get in a newer model's way. So before you install, the wizard shows how many tokens
|
|
109
|
+
Every instruction read each session takes up context, and instructions written for an older model's weak spots can get in a newer model's way. So before you install, the wizard shows an estimate of how many tokens the harness's instructions add to every session. Third-party skills are not counted in that number. After you install, the `audit-harness-fit` skill finds instructions your project no longer needs, and procedures that make the agent check the same thing over and over, then suggests what to change.
|
|
110
110
|
|
|
111
111
|
### The agent that builds is not the one that checks
|
|
112
112
|
|
|
@@ -149,7 +149,7 @@ Plugins are a Claude Code feature, so only Claude Code gets them. Rules and skil
|
|
|
149
149
|
|
|
150
150
|
## Supported stacks and the skills that come with them
|
|
151
151
|
|
|
152
|
-
A track is a starting setup for a dev stack or a kind of work: the top nine rows are dev tracks, the bottom three are work tracks. Picking a track pre-checks the external skills and tools below. Everything pre-checked comes from an official repository or one
|
|
152
|
+
A track is a starting setup for a dev stack or a kind of work: the top nine rows are dev tracks, the bottom three are work tracks. Picking a track pre-checks the external skills and tools below. Everything pre-checked comes from an official repository, or from one picked after checking its source, popularity, and install path. That does not vouch for the safety of its contents or the quality of what it produces ([SECURITY.md](SECURITY.md)).
|
|
153
153
|
|
|
154
154
|
| Track | Stack | Pre-checked external skills and tools |
|
|
155
155
|
|---|---|---|
|
|
@@ -201,9 +201,15 @@ In a terminal, `uninstall` offers three choices (one tool, selected assets, or e
|
|
|
201
201
|
|
|
202
202
|
| If you currently… | How this is different |
|
|
203
203
|
|---|---|
|
|
204
|
-
| Write your own `CLAUDE.md` or `AGENTS.md` | Keep it. The harness adds one marked block and leaves the rest alone. It adds what a single file can't: on Claude Code, a hook that
|
|
204
|
+
| Write your own `CLAUDE.md` or `AGENTS.md` | Keep it. The harness adds one marked block and leaves the rest alone. It adds what a single file can't: on Claude Code, a hook that blocks edits to protected files and a reviewer separate from the agent that builds; and an install record so `update` changes only what the harness put there. |
|
|
205
205
|
| Pick skills from a marketplace | If you only need one skill, take just that one: `npx skills add uzysjung/uzys-agent-harness --skill <id> -a claude-code` (see ids with `--list`, or on [skills.sh](https://skills.sh/uzysjung/uzys-agent-harness)). The wizard is for what a skill list doesn't cover: standing rules, hooks, subagents, and the record that keeps them current. |
|
|
206
|
-
| Use another harness with many rules |
|
|
206
|
+
| Use another harness with many rules | Only a few short rules are read every session; longer procedures are read when needed. You see an estimate of their per-session token cost before you install. If you want a fixed, step-by-step process, add the third-party workflow kits `openspec` or `bmad-method`. Both are optional and compared in [WORKFLOWS.md](docs/WORKFLOWS.md). |
|
|
207
|
+
|
|
208
|
+
## When this harness is not a fit
|
|
209
|
+
|
|
210
|
+
- **You need a fixed procedure followed step by step.** This harness gives judgment criteria instead of procedures and leaves the decisions to the model. If an audit or regulation requires fixed steps, add a workflow kit such as `openspec` or `bmad-method`, or write those steps as your own rules.
|
|
211
|
+
- **You use a small model you can't trust with judgment calls.** Instructions that give criteria rather than steps pay off when the model can make the call itself.
|
|
212
|
+
- **You want numbers on the benefit before you adopt it.** This project's tests check that installing and file handling work as intended. There are no measurements yet comparing development results with and without the harness.
|
|
207
213
|
|
|
208
214
|
## Docs
|
|
209
215
|
|
|
@@ -1029,7 +1029,7 @@ import { dirname as dirname3, join as join4 } from "path";
|
|
|
1029
1029
|
// package.json
|
|
1030
1030
|
var package_default = {
|
|
1031
1031
|
name: "@uzysjung/agent-harness",
|
|
1032
|
-
version: "26.
|
|
1032
|
+
version: "26.166.0",
|
|
1033
1033
|
description: "Curate vetted AI-coding skills & plugins by your tech stack \u2014 install only what you need, across Claude Code, Codex, OpenCode & Antigravity",
|
|
1034
1034
|
type: "module",
|
|
1035
1035
|
publishConfig: {
|
|
@@ -1118,6 +1118,12 @@ var CLI_BASE_SORT_ORDER = {
|
|
|
1118
1118
|
opencode: 2,
|
|
1119
1119
|
antigravity: 3
|
|
1120
1120
|
};
|
|
1121
|
+
var CLI_DISPLAY_NAMES = {
|
|
1122
|
+
claude: "Claude",
|
|
1123
|
+
codex: "Codex",
|
|
1124
|
+
opencode: "OpenCode",
|
|
1125
|
+
antigravity: "Antigravity"
|
|
1126
|
+
};
|
|
1121
1127
|
function parseCliTargets(input) {
|
|
1122
1128
|
const items = normalizeInput(input);
|
|
1123
1129
|
if (items.length === 0) {
|
|
@@ -1900,7 +1906,7 @@ var FILL_SPECS = {
|
|
|
1900
1906
|
},
|
|
1901
1907
|
"installed-assets": {
|
|
1902
1908
|
title: "Installed Harness Assets",
|
|
1903
|
-
prompt: "List the harness assets installed in this project (rules / skills / agents / commands) and add one line each on when to reach for it here. Verify against .claude/rules
|
|
1909
|
+
prompt: "List the harness assets installed in this project (rules / skills / agents / commands) and add one line each on when to reach for it here. Verify against the harness folders this CLI reads (.claude/rules/ \xB7 .claude/skills/ \xB7 .claude/agents/ for Claude Code; AGENTS.md \xA7 Harness Rules \xB7 .agents/skills/ for Codex and OpenCode; .agents/rules/ \xB7 .agents/skills/ for Antigravity) and list ONLY assets whose file exists on disk \u2014 do not invent any. Do NOT restate the harness's working principles (they live in this project's harness anchor and rules layer) \u2014 cross-reference them instead. Delete this comment when done.",
|
|
1904
1910
|
placeholder: "the installed rules/skills/agents/commands and when to use each"
|
|
1905
1911
|
},
|
|
1906
1912
|
boundaries: {
|
|
@@ -1918,8 +1924,7 @@ function anchorLine(surface) {
|
|
|
1918
1924
|
if (surface === "claude") {
|
|
1919
1925
|
return `> The working principles live in this project's harness anchor \`${HARNESS_ANCHOR_FILE}\`, imported at the bottom of this file. Everything above that import is **project-specific context only**.`;
|
|
1920
1926
|
}
|
|
1921
|
-
|
|
1922
|
-
return `> **This file (${self}) is the harness anchor** \u2014 it carries the working principles in full, further down. Only the \`## \u2026\` sections immediately below are project-specific context for you to fill in.`;
|
|
1927
|
+
return `> **This file (\`AGENTS.md\`) is the harness anchor** \u2014 it carries the working principles in full, further down. Only the \`## \u2026\` sections immediately below are project-specific context for you to fill in.`;
|
|
1923
1928
|
}
|
|
1924
1929
|
function scaffoldBanner(surface) {
|
|
1925
1930
|
return [
|
|
@@ -1941,6 +1946,61 @@ _(not filled yet \u2014 ${spec.placeholder})_`;
|
|
|
1941
1946
|
|
|
1942
1947
|
${blocks.join("\n\n")}`;
|
|
1943
1948
|
}
|
|
1949
|
+
var SCAFFOLD_MARK = "SCAFFOLD \u2014 not filled in yet";
|
|
1950
|
+
var TRACK_NOTE_MARK = "Active track(s):";
|
|
1951
|
+
function dropHarnessQuoteBlocks(lines) {
|
|
1952
|
+
const out = [];
|
|
1953
|
+
let i = 0;
|
|
1954
|
+
while (i < lines.length) {
|
|
1955
|
+
if (!(lines[i] ?? "").trim().startsWith(">")) {
|
|
1956
|
+
out.push(lines[i] ?? "");
|
|
1957
|
+
i += 1;
|
|
1958
|
+
continue;
|
|
1959
|
+
}
|
|
1960
|
+
let end = i;
|
|
1961
|
+
while (end < lines.length && (lines[end] ?? "").trim().startsWith(">")) end++;
|
|
1962
|
+
const run = lines.slice(i, end);
|
|
1963
|
+
const text = run.join("\n");
|
|
1964
|
+
if (!text.includes(SCAFFOLD_MARK) && !text.includes(TRACK_NOTE_MARK)) out.push(...run);
|
|
1965
|
+
i = end;
|
|
1966
|
+
}
|
|
1967
|
+
return out;
|
|
1968
|
+
}
|
|
1969
|
+
function continuousNoteEnd(lines, headingAt) {
|
|
1970
|
+
let i = headingAt + 1;
|
|
1971
|
+
while (i < lines.length) {
|
|
1972
|
+
const l = (lines[i] ?? "").replace(/\r$/, "").trim();
|
|
1973
|
+
const isNote = l === "" || l.startsWith("- `") || l.startsWith("These installed skills apply");
|
|
1974
|
+
if (!isNote) break;
|
|
1975
|
+
i++;
|
|
1976
|
+
}
|
|
1977
|
+
return i;
|
|
1978
|
+
}
|
|
1979
|
+
function dropContinuousSkillsNote(lines) {
|
|
1980
|
+
const at = lines.findIndex((l) => l.replace(/\r$/, "").trim() === CONTINUOUS_SKILLS_HEADING);
|
|
1981
|
+
if (at === -1) return [...lines];
|
|
1982
|
+
return [...lines.slice(0, at), ...lines.slice(continuousNoteEnd(lines, at))];
|
|
1983
|
+
}
|
|
1984
|
+
function dropFillComments(lines) {
|
|
1985
|
+
const out = [];
|
|
1986
|
+
let inFill = false;
|
|
1987
|
+
for (const line of lines) {
|
|
1988
|
+
if (!inFill && line.trim().startsWith("<!-- FILL:")) inFill = true;
|
|
1989
|
+
if (inFill) {
|
|
1990
|
+
if (line.includes("-->")) inFill = false;
|
|
1991
|
+
continue;
|
|
1992
|
+
}
|
|
1993
|
+
out.push(line);
|
|
1994
|
+
}
|
|
1995
|
+
return out;
|
|
1996
|
+
}
|
|
1997
|
+
function scaffoldComparable(lines) {
|
|
1998
|
+
return dropFillComments(dropContinuousSkillsNote(dropHarnessQuoteBlocks(lines))).map((l) => l.replace(/\r$/, "").trimEnd()).filter((l) => l.trim() !== "");
|
|
1999
|
+
}
|
|
2000
|
+
function isUnfilledScaffold(body) {
|
|
2001
|
+
const pristine = scaffoldComparable(renderFillScaffold("agents-md").split("\n"));
|
|
2002
|
+
return scaffoldComparable(body).join("\n") === pristine.join("\n");
|
|
2003
|
+
}
|
|
1944
2004
|
function mergeProjectClaude(opts) {
|
|
1945
2005
|
const expanded = expandTracks(opts.tracks);
|
|
1946
2006
|
const trackList = expanded.map((t) => TRACK_DISPLAY_NAMES[t]).join(", ");
|
|
@@ -2326,10 +2386,7 @@ function anchorSurface(cli) {
|
|
|
2326
2386
|
if (cli.includes("claude") || cli.length === 0) {
|
|
2327
2387
|
return { label: "CLAUDE.md", files: 2, scaffold: "claude" };
|
|
2328
2388
|
}
|
|
2329
|
-
|
|
2330
|
-
return { label: "AGENTS.md", files: 1, scaffold: "agents-md" };
|
|
2331
|
-
}
|
|
2332
|
-
return { label: ".agents/rules/uzys-harness.md", files: 1, scaffold: "antigravity-rule" };
|
|
2389
|
+
return { label: "AGENTS.md", files: 1, scaffold: "agents-md" };
|
|
2333
2390
|
}
|
|
2334
2391
|
function residentCost(entries, root = resolveBundleRoot(), cli = ["claude"], contextFiles) {
|
|
2335
2392
|
const tpl = (source) => join5(root, "templates", source);
|
|
@@ -2364,7 +2421,7 @@ function residentCost(entries, root = resolveBundleRoot(), cli = ["claude"], con
|
|
|
2364
2421
|
CONTINUOUS_SKILLS.map((s) => s.id)
|
|
2365
2422
|
).trim().length
|
|
2366
2423
|
);
|
|
2367
|
-
const onDisk = contextFiles?.map(fileTokens).filter((t) => t > 0);
|
|
2424
|
+
const onDisk = contextFiles?.map((f) => typeof f === "string" ? fileTokens(f) : estimateTokens(f.text.trim().length)).filter((t) => t > 0);
|
|
2368
2425
|
const projectClaudeMd = onDisk === void 0 ? harnessAnchor + projectScaffold : onDisk.reduce((a, b) => a + b, 0);
|
|
2369
2426
|
const claudeMdItems = onDisk !== void 0 ? onDisk.length : surface.files === 1 ? 1 : (harnessAnchor > 0 ? 1 : 0) + (projectScaffold > 0 ? 1 : 0);
|
|
2370
2427
|
return makeResidentCost({
|
|
@@ -2399,9 +2456,11 @@ function summarizeContextCost(assetIds, root = resolveBundleRoot()) {
|
|
|
2399
2456
|
}
|
|
2400
2457
|
function formatResidentCostLine(r, unmeasuredCount) {
|
|
2401
2458
|
if (r.total === 0) return null;
|
|
2459
|
+
const rules = r.rulesInline ? `rules ${r.items.rules} inside ${r.contextFile}${r.rulesInline === "planned" ? " (planned count)" : ""}` : `rules ${r.items.rules} ~${r.rules}`;
|
|
2460
|
+
const note = r.contextNote ? ` ${r.contextNote}` : "";
|
|
2402
2461
|
const parts = [
|
|
2403
2462
|
`directives ${r.directive.items} ~${r.directive.tokens}`,
|
|
2404
|
-
`[
|
|
2463
|
+
`[${rules} \xB7 ${r.contextFile} ${r.items.claudeMd} ~${r.projectClaudeMd}${note}]`,
|
|
2405
2464
|
`triggers ${r.firing.items} ~${r.firing.tokens}`,
|
|
2406
2465
|
`[skills ${r.items.skills} ~${r.skillDescriptors} \xB7 agents ${r.items.agents} ~${r.agentDescriptors}]`
|
|
2407
2466
|
].join(" \xB7 ");
|
|
@@ -2503,6 +2562,7 @@ export {
|
|
|
2503
2562
|
DEFAULT_OPTIONS,
|
|
2504
2563
|
UPDATE_GROUPS,
|
|
2505
2564
|
CLI_BASE_SORT_ORDER,
|
|
2565
|
+
CLI_DISPLAY_NAMES,
|
|
2506
2566
|
parseCliTargets,
|
|
2507
2567
|
targetsInclude,
|
|
2508
2568
|
anyTrack,
|
|
@@ -2540,9 +2600,12 @@ export {
|
|
|
2540
2600
|
HARNESS_IMPORT_LINE,
|
|
2541
2601
|
CONTINUOUS_SKILLS_HEADING,
|
|
2542
2602
|
renderContinuousSkillsNote,
|
|
2543
|
-
withContinuousSkillsNote,
|
|
2544
2603
|
scaffoldBanner,
|
|
2545
2604
|
renderFillScaffold,
|
|
2605
|
+
dropHarnessQuoteBlocks,
|
|
2606
|
+
continuousNoteEnd,
|
|
2607
|
+
dropContinuousSkillsNote,
|
|
2608
|
+
isUnfilledScaffold,
|
|
2546
2609
|
upsertHarnessImport,
|
|
2547
2610
|
stripHarnessImport,
|
|
2548
2611
|
buildAssetSpec,
|
|
@@ -2582,6 +2645,8 @@ export {
|
|
|
2582
2645
|
resolveBundleRoot,
|
|
2583
2646
|
extractFrontmatter,
|
|
2584
2647
|
assetCostRows,
|
|
2648
|
+
makeResidentCost,
|
|
2649
|
+
anchorSurface,
|
|
2585
2650
|
residentCost,
|
|
2586
2651
|
summarizeContextCost,
|
|
2587
2652
|
formatResidentCostLine,
|
|
@@ -2589,4 +2654,4 @@ export {
|
|
|
2589
2654
|
CATEGORIES,
|
|
2590
2655
|
CATEGORY_TITLES
|
|
2591
2656
|
};
|
|
2592
|
-
//# sourceMappingURL=chunk-
|
|
2657
|
+
//# sourceMappingURL=chunk-AHAAF4HS.js.map
|