Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .agents/skills/hyper-run/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Behavior:
- Run `hyper run --auto --until <stage> [focus]` when the user wants to override the plan target.
- Read the generated runtime packet at `.hyper/goals/<GOAL-ID>/goal.md` and `tasks.md` before implementation.
- Implement the work directly in the current Codex session.
- Run the safest available validation or record why validation is blocked.
- Update `evidence.md` with validation output, readiness evidence, active capability evidence, pressure signals, changed files, decisions, reusable patterns, and blockers.
- Run the safest available validation or record why validation is blocked; prefer `hyper verify -- <command>` for repeatable command proof.
- Update `evidence.md` with validation output or Verified Evidence IDs, readiness evidence, active capability evidence, pressure signals, changed files, decisions, reusable patterns, and blockers.
- Write `next.md` with the next recommended runtime episode and Learn Notes.
- Run `hyper complete` internally as the agent finish gate after evidence and next notes are written; if it fails, fix the same packet using `review.md`.
- In auto mode, read `.hyper/next-packet.md`, obey its Guard and Progress Guard, and continue through the planned command until a guard stops progress.
Expand Down
7 changes: 4 additions & 3 deletions .agents/skills/hyper/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: hyper
description: Thin Codex Desktop router for Hyper Run. Use when the user says $hyper, $hyper run, $hyper init, $hyper status, $hyper status --short, $hyper migrate, $hyper advance, $hyper doctor, $hyper resume, hyper run, or asks Hyper Run to continue the current project.
description: Thin Codex Desktop router for Hyper Run. Use when the user says $hyper, $hyper run, $hyper init, $hyper status, $hyper status --short, $hyper verify, $hyper migrate, $hyper advance, $hyper doctor, $hyper resume, hyper run, or asks Hyper Run to continue the current project.
---

# Hyper Router
Expand Down Expand Up @@ -33,6 +33,7 @@ Command mapping:
- `$hyper run [focus]`: run `hyper run [focus]`; if `plan.md` has `Target Stage`, plain `hyper run` uses it as the guarded auto target until that target stage's readiness proof is complete. Read the generated runtime packet, implement it in the current Codex session, update `evidence.md`, and write `next.md`.
- `$hyper run --auto --until <stage> [focus]`: run `hyper run --auto --until <stage> [focus]` as an explicit target override, then continue packet by packet using `.hyper/next-packet.md` until the target stage proof is complete or a guard stops progress.
- `$hyper complete`: advanced/recovery command. Run it only as the agent finish gate after evidence and next notes are written so project readiness is refreshed.
- `$hyper verify -- <command>`: run repeatable validation through the CLI so exit code, log hashes, commit SHA, worktree status hash, goal ID, and run ID are recorded under `.hyper/verified-evidence/`.
- `$hyper status`: run `hyper status` and use the dashboard to decide whether the agent should finish the packet, repair, advance, migrate, or start the next packet.
- `$hyper status --short`: run `hyper status --short` when the user wants only the current stage, gate, proof, and next action.
- `$hyper migrate`: run `hyper migrate` after CLI updates or when growth state/candidates look stale; then check `hyper status --short`.
Expand All @@ -45,8 +46,8 @@ Execution rules:
1. Run a CLI command only when a new or resumed runtime packet is needed; if `plan.md` has `Target Stage`, plain `hyper run` uses it as the guarded auto target until that target stage's readiness proof is complete.
2. Read the generated runtime packet in `goal.md` and the checklist in `tasks.md` before editing project files.
3. Keep implementation scoped to the current runtime episode.
4. Run the safest available validation, or record why validation is blocked.
5. Update the active runtime packet's `evidence.md` with changed files, validation output, readiness evidence, active capability evidence, pressure signals, decisions, reusable patterns, and blockers.
4. Run the safest available validation, or record why validation is blocked. Prefer `hyper verify -- <command>` when a real command can prove the behavior.
5. Update the active runtime packet's `evidence.md` with changed files, validation output or Verified Evidence IDs, readiness evidence, active capability evidence, pressure signals, decisions, reusable patterns, and blockers.
6. Write the active runtime packet's `next.md` with the next recommended runtime episode and Learn Notes.
7. Run the agent finish gate with `hyper complete`; if it fails, fix the same packet using `review.md` before continuing.
8. In auto mode, read `.hyper/next-packet.md`, obey its Guard and Progress Guard, and continue only through the planned next command: `run` continues, `advance` requires Stage Advancement Review authorization or user acceptance, `complete-current` fixes review.md/evidence.md/next.md in the same packet, and `stop` reports the stop reason and waits.
Expand Down
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- hyper-run:start -->
## Hyper Run

When the user writes `$hyper`, `$hyper run`, `$hyper-run`, `$hyper status`, `$hyper status --short`, `$hyper migrate`, `$hyper advance`, `$hyper doctor`, `hyper run`, or asks Hyper Run to continue the project, treat it as a project workflow command inside the current Codex session.
When the user writes `$hyper`, `$hyper run`, `$hyper-run`, `$hyper status`, `$hyper status --short`, `$hyper verify`, `$hyper migrate`, `$hyper advance`, `$hyper doctor`, `hyper run`, or asks Hyper Run to continue the project, treat it as a project workflow command inside the current Codex session.

Use `.agents/skills/hyper/SKILL.md` as the thin Codex Desktop router. Keep product judgment, execution state, learning, and generated project knowledge in `plan.md`, `.hyper/`, and the `hyper` CLI rather than in static skill text.

Expand All @@ -21,8 +21,8 @@ Required workflow:
2. Read the generated runtime packet path from the CLI output, or read `.hyper/state.json` and use `current_goal_path`.
3. Read `.hyper/goals/<GOAL-ID>/goal.md` and `.hyper/goals/<GOAL-ID>/tasks.md`.
4. Implement the smallest coherent step that satisfies the current episode.
5. Run the safest available validation or record why validation is blocked.
6. Update `.hyper/goals/<GOAL-ID>/evidence.md` with validation output, readiness evidence, active capability evidence, pressure signals, changed files, decisions, reusable patterns, and blockers.
5. Run the safest available validation or record why validation is blocked; prefer `hyper verify -- <command>` for repeatable command proof.
6. Update `.hyper/goals/<GOAL-ID>/evidence.md` with validation output or Verified Evidence IDs, readiness evidence, active capability evidence, pressure signals, changed files, decisions, reusable patterns, and blockers.
7. Write `.hyper/goals/<GOAL-ID>/next.md` with the next recommended runtime episode and Learn Notes.
8. Run the agent finish gate with `hyper complete`; if it fails, fix the same packet using `review.md` before continuing.
9. In auto mode, read `.hyper/next-packet.md`, obey its Guard and Progress Guard, and continue only through the planned next command: `run` continues, `advance` requires Stage Advancement Review authorization or user acceptance, `complete-current` fixes review.md/evidence.md/next.md in the same packet, and `stop` reports the stop reason and waits.
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If `plan.md` has a `Target Stage`, plain `hyper run` keeps moving packet by pack

The goal is simple: start from a tiny MVP and keep upgrading it until it can behave like a real service, without every AI session losing the project thread.

Current release: `v0.6.10`. It can continue packet by packet toward a target stage, stop and write review notes when evidence is weak, record command execution through Verified Evidence, require approval before changing stages, compare Service Quality work against category references, verify release downloads, and recover stale stage state with `hyper migrate`.
Current release: `v0.6.11`. It can continue packet by packet toward a target stage, stop and write review notes when evidence is weak, record command execution through Verified Evidence, require approval before changing stages, compare Service Quality work against category references, verify release downloads, and recover stale stage state with `hyper migrate`.

## First Run

Expand Down Expand Up @@ -111,8 +111,10 @@ You do not need these terms to start, but they explain what Hyper Run is doing:
| Term | Plain meaning |
| --- | --- |
| Runtime packet | The next AI work bundle. |
| AI Control Charter | The packet rule that gives the AI ordinary execution control while reserving only policy-boundary decisions for humans. |
| External Reference Evolution | The rule for treating outside prompts, docs, and benchmarks as raw material that must be transformed into stronger Hyper-native mechanisms before use. |
| Evidence | Proof that the work was done and checked. |
| Verified Evidence | Machine-recorded command proof from `hyper verify`, including exit code, log hashes, commit SHA, and goal/run metadata. |
| Verified Evidence | Machine-recorded command proof from `hyper verify`, including exit code, log hashes, commit SHA, and goal/run metadata. Record writes are serialized so parallel validators do not overwrite the same evidence file. |
| Proof Contract | The packet's proof checklist. |
| Learn | Extracting reusable lessons from `evidence.md` and `next.md`. Not a summary. |
| Pressure Ledger | A list of repeated needs, gaps, or failures the project keeps showing. |
Expand Down Expand Up @@ -334,6 +336,8 @@ GOCACHE=/private/tmp/hyper-go-cache go build -o /private/tmp/hyper-local ./cmd/h
/private/tmp/hyper-local version
```

When you run Hyper Run directly from source or from a temporary release-candidate binary, `hyper doctor` may show that a local validation executable is running while `PATH` still resolves an installed `hyper`. That is expected during local validation; install the local build only when you intentionally want it to replace the active `hyper`.

After the local binary is verified, install it to the standard user bin only when you intentionally want this checkout to replace the active `hyper`:

```bash
Expand Down
17 changes: 15 additions & 2 deletions README_ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ hyper run

목표는 단순합니다. 작은 MVP에서 시작해, AI 세션이 바뀌어도 문맥을 잃지 않고 실제 서비스처럼 다룰 수 있는 수준까지 계속 개선하는 것입니다.

현재 릴리즈는 `v0.6.10`입니다. 목표 stage까지 packet 단위로 이어가고, evidence가 약하면 멈춰서 review를 남기며, 명령 실행은 Verified Evidence로 기록할 수 있고, stage 변경은 사용자가 승인할 때만 적용합니다. Service Quality에서는 비슷한 reference와 비교할 수 있고, 설치/업데이트를 검증하며, 오래된 stage 상태는 `hyper migrate`로 복구합니다.
현재 릴리즈는 `v0.6.11`입니다. 목표 stage까지 packet 단위로 이어가고, evidence가 약하면 멈춰서 review를 남기며, 명령 실행은 Verified Evidence로 기록할 수 있고, stage 변경은 사용자가 승인할 때만 적용합니다. Service Quality에서는 비슷한 reference와 비교할 수 있고, 설치/업데이트를 검증하며, 오래된 stage 상태는 `hyper migrate`로 복구합니다.

## 첫 실행

Expand Down Expand Up @@ -111,8 +111,10 @@ Hyper Run은 첫날부터 하네스를 만들라고 하지 않습니다.
| 용어 | 쉽게 말하면 |
| --- | --- |
| Runtime packet | 다음 AI 작업 묶음입니다. |
| AI Control Charter | 일반 실행 제어권은 AI가 갖고, 인간은 정책 경계 결정만 맡도록 packet에 명시하는 규칙입니다. |
| External Reference Evolution | 외부 프롬프트, 문서, 벤치마크를 그대로 받아들이지 않고 더 강한 Hyper-native 메커니즘으로 변환할 때만 쓰는 규칙입니다. |
| Evidence | 작업이 됐고 확인했다는 증거입니다. |
| Verified Evidence | `hyper verify`가 남기는 기계 기록입니다. exit code, log hash, commit SHA, goal/run metadata를 포함합니다. |
| Verified Evidence | `hyper verify`가 남기는 기계 기록입니다. exit code, log hash, commit SHA, goal/run metadata를 포함합니다. 병렬 validator가 같은 evidence file을 덮어쓰지 않도록 record write는 직렬화됩니다. |
| Proof Contract | 이번 packet의 증명 체크리스트입니다. |
| Learn | `evidence.md`와 `next.md`에서 다음 작업에 다시 쓸 신호만 뽑는 단계입니다. 단순 요약이 아닙니다. |
| Pressure Ledger | 프로젝트가 반복해서 보여준 필요, gap, 실패를 모아둔 목록입니다. |
Expand Down Expand Up @@ -321,10 +323,21 @@ hyper version

## Source에서 설치

일반 사용자는 release installer 또는 `hyper update`를 우선 권장합니다. Source 설치는 신뢰하는 local checkout을 직접 검증하고, 그 checkout을 현재 `PATH`의 active `hyper`로 바꾸려는 경우에 사용합니다.

```bash
go install github.com/KoreanCode/orange-hyper-run/cmd/hyper@latest
```

Local checkout에서 source build를 검증할 때는 먼저 별도 binary로 확인합니다.

```bash
GOCACHE=/private/tmp/hyper-go-cache go build -o /private/tmp/hyper-local ./cmd/hyper
/private/tmp/hyper-local version
```

Source 또는 임시 release-candidate binary에서 직접 실행하는 동안 `hyper doctor`가 local validation executable은 실행 중이지만 `PATH`는 설치된 `hyper`를 가리킨다고 표시할 수 있습니다. 이는 local 검증 중에는 정상입니다. 해당 checkout을 active `hyper`로 바꾸고 싶을 때만 의도적으로 설치합니다.

## 업데이트

```bash
Expand Down
7 changes: 7 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## Unreleased

## v0.6.11 - 2026-06-19

- Add generated runtime-packet guidance for an AI Control Charter and External Reference Evolution, keeping ordinary execution under AI control while treating outside prompts, docs, and benchmarks as raw material that must be transformed into stronger Hyper-native mechanisms before use.
- Serialize Verified Evidence record writes behind a single-writer lock and add regression coverage so parallel `hyper verify` calls cannot reuse and overwrite the same `VE-*.json` record.
- Make `hyper doctor` report source-built or temporary release-candidate validation as an expected local-build state when PATH still resolves an installed `hyper`, while preserving warnings for real installed-binary mismatches.
- Update the release checklist so runtime-template releases explicitly confirm the new AI Control Charter and External Reference Evolution packet surfaces before publishing.

## v0.6.10 - 2026-06-19

- Add `hyper verify [--axis axis] [--name name] -- <command>` to run validation commands directly and record exit code, stdout/stderr hashes, commit SHA, worktree status hash, run ID, and goal ID under `.hyper/verified-evidence/`.
Expand Down
7 changes: 7 additions & 0 deletions docs/CHANGELOG_ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## Unreleased

## v0.6.11 - 2026-06-19

- Runtime packet에 AI Control Charter와 External Reference Evolution 안내를 생성하게 했습니다. 일반 실행 제어권은 AI가 갖고, 외부 prompt, 문서, benchmark는 그대로 수용하지 않고 더 강한 Hyper-native 메커니즘으로 변환할 때만 쓰도록 합니다.
- Verified Evidence record write를 single-writer lock으로 직렬화하고, 병렬 `hyper verify` 호출이 같은 `VE-*.json` record를 재사용하거나 덮어쓰지 못하도록 회귀 테스트를 추가했습니다.
- `hyper doctor`가 source-built 또는 임시 release-candidate 검증 상태를 정상적인 local-build 상태로 설명하게 했습니다. 실제 설치 binary mismatch 경고는 유지합니다.
- Runtime-template release를 publish하기 전에 새 AI Control Charter와 External Reference Evolution packet surface를 명시적으로 확인하도록 release checklist를 갱신했습니다.

## v0.6.10 - 2026-06-19

- `hyper verify [--axis axis] [--name name] -- <command>`를 추가했습니다. 검증 명령을 직접 실행하고 exit code, stdout/stderr hash, commit SHA, worktree status hash, run ID, goal ID를 `.hyper/verified-evidence/` 아래에 기록합니다.
Expand Down
2 changes: 2 additions & 0 deletions docs/RELEASE_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ The disposable project check must confirm that generated packets include any new

For autonomous runtime-template releases, confirm these generated sections before publishing:

- `AI Control Charter`
- `External Reference Evolution`
- `Decision Hierarchy`
- `Autonomous Work Plan`
- `Autonomous Safety Policy`
Expand Down
52 changes: 44 additions & 8 deletions internal/app/doctor.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,9 @@ func doctorHyper(fsys fsRoot) (commandOutput, *hyperError) {
} else {
checks = append(checks, doctorCheck{"Executable", "OK", executable})
if path, err := exec.LookPath("hyper"); err == nil {
status := "OK"
detail := path
if filepath.Clean(path) != filepath.Clean(executable) {
status = "WARN"
detail = fmt.Sprintf("PATH resolves %s, current executable is %s", path, executable)
}
checks = append(checks, doctorCheck{"PATH", status, detail})
checks = append(checks, doctorPathCheck(executable, path, nil))
} else {
checks = append(checks, doctorCheck{"PATH", "WARN", "`hyper` is not found on PATH"})
checks = append(checks, doctorPathCheck(executable, "", err))
}
}
checks = append(checks, doctorCheck{"Version", "OK", buildinfo.Version + " (" + runtime.GOOS + "/" + runtime.GOARCH + ")"})
Expand Down Expand Up @@ -94,6 +88,48 @@ func doctorHyper(fsys fsRoot) (commandOutput, *hyperError) {
return stdout(strings.Join(lines, "\n")), nil
}

func doctorPathCheck(executable string, path string, lookupErr error) doctorCheck {
if lookupErr != nil {
return doctorCheck{"PATH", "WARN", "`hyper` is not found on PATH"}
}
if filepath.Clean(path) == filepath.Clean(executable) {
return doctorCheck{"PATH", "OK", path}
}
if isLocalValidationExecutable(executable) {
return doctorCheck{
Name: "PATH",
Status: "OK",
Detail: fmt.Sprintf("local validation executable %s is running; PATH resolves installed hyper at %s", executable, path),
}
}
return doctorCheck{"PATH", "WARN", fmt.Sprintf("PATH resolves %s, current executable is %s", path, executable)}
}

func isLocalValidationExecutable(executable string) bool {
executable = filepath.Clean(strings.TrimSpace(executable))
if executable == "" {
return false
}
gocache := strings.TrimSpace(os.Getenv("GOCACHE"))
if gocache != "" && pathWithinDir(filepath.Clean(gocache), executable) {
return true
}
for _, dir := range []string{os.TempDir(), "/private/tmp", "/tmp"} {
if strings.TrimSpace(dir) != "" && pathWithinDir(filepath.Clean(dir), executable) {
return true
}
}
return false
}

func pathWithinDir(dir string, path string) bool {
rel, err := filepath.Rel(dir, path)
if err != nil {
return false
}
return rel != "." && rel != ".." && !strings.HasPrefix(rel, ".."+string(os.PathSeparator))
}

func doctorPlanTargetCheck(plan map[string]string) doctorCheck {
value := firstRuntimeValue(plan["Target Stage"])
if value == "" {
Expand Down
Loading
Loading