@punks/cli 3.0.0-beta.0 → 3.0.1

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.
@@ -1,141 +1,37 @@
1
1
  ---
2
2
  name: hi-cli
3
- description: Operates the Harness Intelligence CLI (`hi`, alias `hint`) and interactively follows scaffold, update, report, upgrade, operator-skill, and post-command handoff flows through to completion. Use when a repo contains `.devpunks/` output, when the user mentions `hi scaffold`, `hi update`, `hi report`, `hi upgrade`, `hi operator`, `hint`, or asks what to do after running a Harness CLI command.
3
+ description: Operates the Harness Intelligence CLI (`hi`, alias `hint`) through init, scaffold, drift, settings, update, tool, report, upgrade, operator-skill, and post-command flows. Use when a user runs or asks about `hi`, `hint`, or generated `.devpunks/` work.
4
4
  metadata: {"Harness Intelligence":{"entrypoint":true}}
5
5
  ---
6
6
 
7
7
  # hi-cli
8
8
 
9
- The `hi-cli` skill operates the Harness Intelligence CLI. The command is `hi`; `hint` is an alias. The npm package remains `@punks/cli`.
9
+ Use `hi` for the Harness Intelligence CLI; `hint` is an alias. The npm package remains `@punks/cli`.
10
10
 
11
- ## Quick Start
11
+ ## Commands
12
12
 
13
13
  ```bash
14
14
  hi --help
15
- hint --help
16
- hi scaffold setup
17
- hi scaffold setup --yes
18
- hi scaffold init
19
- hi update --check
20
- hi update --write
21
- hi update --yes
15
+ hi init
16
+ hi scaffold
17
+ hi check
18
+ hi ensure
19
+ hi update
20
+ hi tools ensure
22
21
  hi report --help
23
22
  hi upgrade --help
24
23
  hi operator status
25
- hi operator update
26
24
  ```
27
25
 
28
- After any command, classify the command result before reading artifacts or acting.
26
+ Read [references/commands.md](references/commands.md) when choosing or explaining a command.
29
27
 
30
- ## Core Rule
28
+ ## Workflow
31
29
 
32
- For scaffold init/setup, generated `.devpunks/` artifacts are an active work queue. Follow the scaffold branch through repo-specific authoring and validation.
30
+ 1. Run the bounded command requested by the user.
31
+ 2. Classify its result as init, scaffold, check, ensure, update, tools ensure, report, upgrade, or operator.
32
+ 3. Follow only that branch in [references/post-command-flow.md](references/post-command-flow.md).
33
+ 4. Stop when that branch's completion criterion is verified or its exact blocker is reported.
33
34
 
34
- For update, artifact existence is not a trigger. Route only from the current command summary and changed paths. Do not reopen standing specs, regenerate prompts or subagents, scan every skill home, or repeat setup work unless the current update changed the corresponding input.
35
+ Existing `.devpunks/` artifacts do not create work by themselves. The current command result and changed paths control follow-through.
35
36
 
36
- For `hi operator`, inspect only the command result. Never read `.devpunks/` or run scaffold follow-through. See [references/post-command-flow.md](references/post-command-flow.md) for the full operator-skill completion rules.
37
-
38
- An assigned execution worker runs its bounded command and reports the result. It does not delegate or launch another execution agent.
39
-
40
- ## Interactive Rule
41
-
42
- Prompt the user frequently when post-scaffold choices affect project policy or shape.
43
-
44
- Ask before:
45
-
46
- - choosing which generated prompt scopes to collapse, split, or prioritize
47
- - replacing existing lint or format tooling with Oxlint/Oxfmt
48
- - deciding which core libraries to clone and inspect with `opensrc`
49
- - changing package scripts, task pipelines, CI, hooks, or docs
50
- - resolving conflicts between existing repo guidance and scaffold specs
51
-
52
- Do not ask for trivial file reads, validation commands, or direct execution of already-approved scaffold instructions.
53
-
54
- ## Command Workflows
55
-
56
- See [references/commands.md](references/commands.md) for command intent and when to use each command.
57
-
58
- See [references/post-command-flow.md](references/post-command-flow.md) for the command-specific read order, update routing table, and completion gates.
59
-
60
- The former backlog scaffold subcommand is not part of current guidance. `hi scaffold init` provides the requirements/backlog skills and initial wiki structure; `hi scaffold setup` provides repo-aware managed scaffold output.
61
-
62
- ## Scaffold Init
63
-
64
- After `hi scaffold init`, expect `.agents/skills/requirements-grill`, `.agents/skills/write-backlog`, and an initial wiki root.
65
-
66
- Run the requirements grill before backlog authoring. If the generated wiki root does not match the real repository layout, move or refactor it before creating durable specs, plans, or routed docs. Monorepos usually use `apps/wiki`; single-repo layouts usually use `wiki`.
67
-
68
- Pre-existing skills are reconciled by the follow-up agent, not by the command. Inspect `.agents/skills`, `.claude/skills`, `.codex/skills`, `.cursor/skills`, and `.opencode/skills`. If `.devpunks/pre-existing-skills` exists, inspect it as blind pre-command evidence. Exact canonical directory id/name overlap keeps the HI baseline skill active: archive local evidence under `.devpunks/replaced-skills/<skill-id>/...`, then remove active local copies or mirrors. Preserve non-overlapping local skills and expose them through harness mirrors or symlinks. Use `hi report` when archived local knowledge should be proposed for HI baseline integration; semantic overlap belongs there, not command runtime.
69
-
70
- ## Scaffold Setup
71
-
72
- After `hi scaffold setup`, expect artifacts such as:
73
-
74
- - `.devpunks/AGENT-SYSTEM-PROMPT.md`
75
- - `.devpunks/AGENT-HANDOFF.md`
76
- - `.devpunks/scaffold-manifest.json`
77
- - `.devpunks/required-tools.json`
78
- - `.devpunks/specs/prompts/**/*.md`
79
- - `.devpunks/specs/lint/*`
80
- - `.devpunks/specs/subagents/manifest-spec.json`
81
-
82
- Read `.devpunks/AGENT-SYSTEM-PROMPT.md` first when present.
83
-
84
- Then author or reconcile the final repo files requested by the specs, including prompt files, harness mirrors, lint configuration, and subagent manifests.
85
-
86
- Reconcile generated wiki guidance with the real repository layout. Do not assume a newly seeded wiki root is canonical until it matches the project boundary.
87
-
88
- Reconcile pre-existing repo skills from the same homes as `hi scaffold init`: `.agents/skills`, `.claude/skills`, `.codex/skills`, `.cursor/skills`, and `.opencode/skills`. Commands do not detect overlap. If `.devpunks/pre-existing-skills` exists, inspect it as blind pre-command evidence. Exact name/id overlap keeps the HI baseline skill active; archive local evidence under `.devpunks/replaced-skills/<skill-id>/...` and remove active local copies or mirrors. Non-overlapping local skills remain repo-owned guidance and should stay exposed through harness mirrors or symlinks. Suggest `hi report` for archived local knowledge that should influence the shared baseline.
89
-
90
- Use `hi scaffold setup --yes` only when the harness cannot answer interactive prompts. It accepts the resolved default pack selection; it does not add optional packs or resolve repo-policy decisions.
91
-
92
- Before authoring prompts or plans, identify the detected core libraries whose source behavior matters. Ask the user which ones to prioritize if the choice is not obvious, then run `opensrc path <package>` or `opensrc path owner/repo` only for that focused set.
93
-
94
- When lint specs suggest Oxlint or hooks suggest Oxfmt, treat migration as a repo-policy change. Ask before replacing existing ESLint/Prettier/Biome scripts or CI, then update package scripts, task pipelines, editor/docs references, and hooks together.
95
-
96
- ## Update
97
-
98
- After `hi update` or `hi update --check`, classify the update summary and changed paths before opening generated artifacts.
99
-
100
- - `--check` reports managed-file drift without writing.
101
- - `--write` refreshes scaffold-managed assets.
102
- - `--yes` refreshes scaffold-managed assets without prompting and is the non-interactive apply flag.
103
- - drift output can include changelog summaries; use them to explain why update/upgrade matters.
104
- - auto-accepted default or detected pack additions follow their affected changed categories only; optional, removal, policy, or surface-shape drift can require a setup decision.
105
-
106
- Use the update decision table and completion gate in [references/post-command-flow.md](references/post-command-flow.md).
107
-
108
- ## Report
109
-
110
- Use `hi report` when reusable Harness friction should enter maintainer triage: stale generated guidance, confusing CLI output, missing docs, broken setup, or shared tooling issues.
111
-
112
- Do not use reports as the default destination for project product backlog. `hi report` submits to the Harness API, which must create or dedupe a GitHub issue in `wearedevpunks/harness-intelligence`; pass `--type`, `--severity`, `--area`, `--skill-pack`, `--command`, `--expected`, `--actual`, `--steps`, and `--labels` so maintainers can triage the issue from GitHub/backoffice without replaying the whole session.
113
-
114
- Reports are GitHub-backed. Backoffice fetches `harness-report` issues from GitHub and treats GitHub state/labels as the triage source of truth. API persistence is audit/local-smoke context, not a substitute for a returned GitHub URL.
115
-
116
- `hi report` emits product telemetry only after the API returns a GitHub issue URL. If issue creation fails or the API stores the report internally without a URL, do not claim the report was submitted; capture the blocker and suggest the exact GitHub/API config missing.
117
-
118
- ## Upgrade
119
-
120
- Use `hi upgrade` to update the CLI executable itself. It checks the selected npm dist-tag, detects whether the current global install came from Bun, pnpm, npm, or Yarn, and runs the matching global reinstall command.
121
-
122
- Use `--tag next` for prerelease channels and `--force` to reinstall the selected tag even when no newer version is detected.
123
-
124
- Upgrade deliberately bypasses package-manager release-age gates for the CLI package so just-published releases can install immediately:
125
-
126
- - Bun: `bun add -g @punks/cli@<tag> --minimum-release-age=0`
127
- - npm: `npm install -g @punks/cli@<tag> --min-release-age=0`
128
- - pnpm: `npm_config_minimum_release_age=0 pnpm add -g @punks/cli@<tag>`
129
- - Yarn: `YARN_NPM_MINIMAL_AGE_GATE=0 yarn global add @punks/cli@<tag>`
130
-
131
- Startup update checks are advisory and detached. They should not mutate installs during normal command startup; `hi upgrade` is the explicit update path.
132
-
133
- ## Operator Skill
134
-
135
- Use `hi operator status|install|update|migrate` to manage the separately installed `hi-cli` operator skill. `hi skills rename` remains a deprecated compatibility alias for `hi operator migrate`.
136
-
137
- This flow is separate from CLI executable upgrade and project scaffold update. Follow the operator-skill branch in [references/post-command-flow.md](references/post-command-flow.md).
138
-
139
- ## Completion
140
-
141
- Use the branch-specific completion criteria in [references/post-command-flow.md](references/post-command-flow.md). Do not substitute an existence-based checklist.
37
+ An assigned execution worker runs its bounded command and reports the result. It does not delegate again.
@@ -2,91 +2,76 @@
2
2
 
3
3
  The command is `hi`; `hint` is an alias. The npm package remains `@punks/cli`.
4
4
 
5
- ## `hi scaffold setup`
5
+ ## `hi init`
6
6
 
7
- Use for repo-aware full scaffold setup.
7
+ Use before repo-aware setup. It seeds docs onboarding, requirements/backlog/spec skills, and the initial wiki structure.
8
8
 
9
- It detects package manifests, resolves packs, writes `.agents/`, harness files, selected skills, prompt specs, lint specs, subagent specs, required tools metadata, and `.devpunks/scaffold-manifest.json`.
9
+ Activate `$docs-onboarding` after the command. Reconcile a generated wiki root with the real repository layout before writing durable specs or routed docs.
10
10
 
11
- It does not finish all repo-specific authoring. The next agent must use `.devpunks/AGENT-SYSTEM-PROMPT.md` and `.devpunks/specs/**` to generate final scoped guidance and reconcile assets.
11
+ ## `hi scaffold`
12
12
 
13
- Use `hi scaffold setup --yes` in non-interactive harnesses. It accepts the resolved default pack selection and skips pack-selection prompts. It does not select optional packs.
13
+ Use for repo-aware AI setup. It detects the repository, resolves packs, and writes managed `.agents/`, `.devpunks/`, skill, prompt, lint, subagent, tool, and scaffold-manifest assets.
14
14
 
15
- ## `hi scaffold init`
15
+ The command does not finish repo-specific authoring. Reconcile its generated instructions with the real repository. Use `hi scaffold --yes` only when a non-interactive harness must accept the resolved default pack selection; it does not select optional packs or resolve policy choices.
16
16
 
17
- Use before boilerplate exists.
17
+ ## `hi check`
18
18
 
19
- It scaffolds `requirements-grill`, `write-backlog`, and the initial wiki tree, then prints an operator prompt. Follow that prompt before moving to repo-aware setup.
19
+ Use as the preferred read-only drift command. It checks managed scaffold, baseline, and CLI drift without writing files.
20
20
 
21
- If the generated wiki root does not match the repository layout, move or refactor it before writing specs, plans, or routed docs. Monorepos usually use `apps/wiki`; single-repo layouts usually use `wiki`.
21
+ Report the current findings. A clean result needs no update follow-through.
22
22
 
23
- After init, the agent must reconcile pre-existing skills. The command does not detect overlap. Inspect `.agents/skills`, `.claude/skills`, `.codex/skills`, `.cursor/skills`, `.opencode/skills`, and `.devpunks/pre-existing-skills` when present; exact name/id overlap keeps HI baseline active, non-overlaps stay exposed through mirrors or symlinks, and `hi report` carries semantic overlap or baseline integration proposals.
23
+ ## `hi ensure`
24
24
 
25
- ## `hi update --check`
25
+ Use to reconfigure repository manager, backlog provider, asset provider, and backlog project URL settings in an existing Harness setup.
26
26
 
27
- Use at session start when `.devpunks/` exists or to preview managed scaffold drift from `.devpunks/scaffold-manifest.json`.
27
+ It does not install, repair, validate, or refresh external tools. Use `hi tools ensure` for tools.
28
28
 
29
- Report CLI, baseline, missing, changed, or pack-drift findings. Do not write files. If remediation is accepted, the parent may assign one bounded execution worker for `hi upgrade`, `hi update --write`, or `hi update --yes` under the core execution rule.
30
-
31
- ## `hi update --write`
29
+ ## `hi update`
32
30
 
33
31
  Use to refresh scaffold-managed files recorded in `.devpunks/scaffold-manifest.json`.
34
32
 
35
- After writing, follow only the matching update branches in [post-command-flow.md](post-command-flow.md).
36
-
37
- ## `hi update --yes`
33
+ - `--write` applies accepted managed-file updates.
34
+ - `--yes` applies them non-interactively.
35
+ - `--check` remains a supported compatibility preview, but prefer `hi check` for read-only drift inspection.
38
36
 
39
- Use in non-interactive harnesses to apply managed scaffold updates without answering the terminal confirmation prompt.
37
+ After a write, follow only the changed categories in [post-command-flow.md](post-command-flow.md).
40
38
 
41
- It has the same managed-file apply behavior and branch-sensitive follow-through as `--write`.
39
+ ## `hi tools ensure`
42
40
 
43
- ## `hi report`
41
+ Use to refresh external Harness tool requirements.
44
42
 
45
- Use to open reusable Harness friction in the Harness Intelligence GitHub repository. Include `--area`, `--skill-pack`, `--command`, `--expected`, `--actual`, and `--steps` whenever they apply so labels and issue body are useful for backoffice triage.
43
+ This command may mutate global or external tool installations. It refreshes every auto-managed required tool through the verified baseline's trusted latest target, even when the installed version already satisfies setup minimums. Manual platform CLIs such as `gh`, `az`, and `glab` are validation-only; the command does not upgrade them.
46
44
 
47
- Reports are for shared Harness/docs/tooling/workflow issues, not the default path for project product backlog.
45
+ Report each failed tool with the exact failed command or recovery guidance from the result. Do not convert a tool failure into scaffold or settings work.
48
46
 
49
- Useful classification flags:
47
+ ## `hi report`
50
48
 
51
- - `--type bug|docs|workflow|tooling|other`
52
- - `--severity low|medium|high`
53
- - `--area cli|wiki|skill|docs|workflow|backoffice|other`
54
- - `--skill-pack <name>`
55
- - `--command <command>`
56
- - `--expected <text>`
57
- - `--actual <text>`
58
- - `--steps <text>`
59
- - `--labels <comma-separated-labels>`
49
+ Use to submit reusable Harness friction for GitHub-backed maintainer triage. Reports are for shared Harness, docs, tooling, skill, or workflow issues, not ordinary project backlog.
60
50
 
61
- The report path is GitHub-backed. The CLI submits typed context to the Harness API; the API creates or dedupes an issue with `harness-report` metadata and labels, then the CLI emits report-submitted telemetry only after the API returns a GitHub issue URL. Backoffice reads GitHub issues for report triage.
51
+ Include `--type`, `--severity`, `--area`, `--skill-pack`, `--command`, `--expected`, `--actual`, `--steps`, and `--labels` when applicable. Success requires a returned GitHub issue URL.
62
52
 
63
53
  ## `hi upgrade`
64
54
 
65
- Use to update the installed CLI executable through its original global package-manager path.
55
+ Use to update the installed CLI executable through its detected global package manager. Use `--tag next` for prerelease channels, `--force` to reinstall the selected tag, and `--json` for structured output.
66
56
 
67
- The command checks the selected npm dist-tag, detects Bun, pnpm, npm, or Yarn from the current install path, and runs the corresponding global reinstall command. Use `--tag next` for prerelease channels, `--force` to reinstall the selected tag, and `--json` when automation needs structured output.
68
-
69
- `hi upgrade` bypasses minimum-release-age gates for the CLI package:
70
-
71
- - Bun uses `--minimum-release-age=0`.
72
- - npm uses `--min-release-age=0`.
73
- - pnpm uses `npm_config_minimum_release_age=0`.
74
- - Yarn uses `YARN_NPM_MINIMAL_AGE_GATE=0`.
57
+ The command bypasses package-manager minimum-release-age gates for the selected CLI release. Startup update checks remain advisory and do not replace `hi upgrade`.
75
58
 
76
59
  ## `hi operator status`
77
60
 
78
- Use to report global and project `hi-cli` installations plus legacy `dp-cli` installations without changing them.
61
+ Report global and project `hi-cli` installations plus legacy `dp-cli` installations without changing them.
79
62
 
80
63
  ## `hi operator install`
81
64
 
82
- Use to install `hi-cli` when absent. Report both scopes and reload or reactivate `$hi-cli` after success.
65
+ Install the frozen `hi-cli` target when absent and verify the resulting global copy.
83
66
 
84
67
  ## `hi operator update`
85
68
 
86
- Use to update every detected global or project `hi-cli` installation. Verify each detected copy and reload or reactivate `$hi-cli` after success.
69
+ Update and verify every detected global or project `hi-cli` copy.
87
70
 
88
71
  ## `hi operator migrate`
89
72
 
90
- Use to install or update `hi-cli`, then remove detected legacy `dp-cli` installations. Verify every affected scope and reload or reactivate `$hi-cli` after success.
73
+ Verify replacement `hi-cli` copies before removing detected legacy `dp-cli` copies.
74
+
75
+ Operator writes require Skills CLI 1.5.20 or newer. After successful install, update, or migration, reload or reactivate `$hi-cli` before relying on its instructions.
91
76
 
92
77
  `hi skills rename` is a deprecated compatibility alias for `hi operator migrate`.
@@ -2,15 +2,24 @@
2
2
 
3
3
  ## 1. Classify the Result
4
4
 
5
- Capture the command, mode, summary, and paths changed by this run. Choose one branch: scaffold setup, scaffold init, update, report, upgrade, or operator skill.
5
+ Capture the command, mode, summary, and paths changed by this run. Choose one branch: init, scaffold, check, ensure, update, tools ensure, report, upgrade, or operator.
6
6
 
7
- Existing `.devpunks/` artifacts describe project state. Their existence does not make them current work. Read an artifact only when the active branch or a changed category below points to it.
7
+ Existing `.devpunks/` artifacts describe project state. Read an artifact only when the active branch or changed category points to it.
8
8
 
9
- ## 2. Read the Active Branch
9
+ ## 2. Follow the Active Branch
10
10
 
11
- ### Scaffold Setup
11
+ ### Init
12
12
 
13
- Read available artifacts in this order:
13
+ - inspect the generated docs-onboarding, requirements/backlog/spec skills, and wiki root
14
+ - activate `$docs-onboarding`
15
+ - reconcile the wiki root with the real repository before durable docs are written
16
+ - reconcile pre-existing skills only when the command reports relevant evidence
17
+ - do not start requirements discovery unless the user asks for it
18
+ - run `hi scaffold` only when the repository is ready for repo-aware setup
19
+
20
+ ### Scaffold
21
+
22
+ Read available generated artifacts in this order:
14
23
 
15
24
  1. `.devpunks/AGENT-SYSTEM-PROMPT.md`
16
25
  2. `.devpunks/AGENT-HANDOFF.md`
@@ -21,96 +30,98 @@ Read available artifacts in this order:
21
30
 
22
31
  If an expected artifact is missing, continue and report it.
23
32
 
24
- Artifact meanings:
33
+ Then:
25
34
 
26
- - `AGENT-SYSTEM-PROMPT.md`: next-agent instructions
27
- - `AGENT-HANDOFF.md`: scaffold summary and follow-up
28
- - `scaffold-manifest.json`: managed-file and update authority
29
- - `required-tools.json`: tools implied by selected skills
30
- - `settings.json`: accepted CLI and baseline pins
31
- - `specs/prompts/**`: instructions for final prompts, not prompt bodies
32
- - `specs/lint/**`: lint selection and starter guidance
33
- - `specs/subagents/**`: desired subagent manifest shape
35
+ - author the requested root, docs, and workspace guidance
36
+ - reconcile only the generated skills, prompts, lint, hooks, scripts, subagents, tools, and wiki assets in scope
37
+ - preserve repo-owned edits and ask before changing project policy
38
+ - run targeted validation for the outputs reconciled
34
39
 
35
- Then:
40
+ Do not stop merely because generated files exist.
41
+
42
+ ### Check
36
43
 
37
- - author the requested root, docs, and workspace guidance plus sibling `CLAUDE.md` symlink mirrors
38
- - keep `.agents/AGENTS.md` as shared global prompt source and `.agents/skills/` as the main skill directory; only `.claude/skills` mirrors it
39
- - reconcile the seeded wiki with the real repo boundary before durable docs are written
40
- - inspect pre-existing skill homes and `.devpunks/pre-existing-skills` when present; keep the HI baseline active for exact IDs, archive replaced evidence, preserve non-overlaps through mirrors, and use `hi report` for semantic overlap
41
- - reconcile `.agents/subagents/manifest.mjs` with its prompt and generated spec
42
- - implement applicable lint specs; ask before replacing lint or format policy, scripts, CI, hooks, or docs
43
- - ask which detected core libraries matter when source context is broad, then inspect only that set
44
+ Read the current summary only. Report CLI, baseline, managed-file, settings, pack, or tool drift without writing.
44
45
 
45
- Do not stop because generated files exist. Finish applicable repo-authored outputs and validation.
46
+ A clean result is complete. If drift exists, name the matching `hi update`, `hi ensure`, `hi tools ensure`, or `hi upgrade` action without running a mutation unless authorized.
46
47
 
47
- ### Scaffold Init
48
+ `hi update --check` follows this branch as a supported compatibility preview.
48
49
 
49
- - inspect the generated requirements skills and seeded wiki root
50
- - reconcile pre-existing skills with the same exact-ID policy as setup
51
- - treat the wiki root as provisional and move or refactor it to match the repo
52
- - do not start requirements discovery by default
53
- - run `requirements-grill` before `write-backlog` only when the user asks for requirements or backlog generation
54
- - use `hi scaffold setup` only when the repo is ready for repo-aware setup
50
+ ### Ensure
51
+
52
+ Verify only the repository manager, backlog provider, asset provider, backlog project URL, and resulting settings summary.
53
+
54
+ Do not inspect or mutate external tools. A settings failure is complete when its exact validation or write blocker is reported.
55
55
 
56
56
  ### Update
57
57
 
58
58
  Read the command summary before any generated artifact. If it reports no diff, report success and stop.
59
59
 
60
- For a diff, classify only paths changed or flagged by this run. If the summary is insufficient, read the matching manifest entries. Read settings only for pin changes. Read a prompt, handoff, tool list, or spec only when its own category changed.
61
-
62
- Apply every matching row:
60
+ For a diff, inspect only paths changed or flagged by this run. Apply every matching row:
63
61
 
64
62
  | Changed category | Required follow-through |
65
63
  | --- | --- |
66
- | Settings or manifest pins only | Confirm accepted pins. The standard fresh drift gate below is the only follow-through. |
67
- | Skill content; IDs unchanged | Inspect affected skills and active mirrors only. Preserve repo-owned edits. Do not scan every skill home or touch prompts, subagents, packs, or wiki. |
68
- | Skill added, removed, or renamed | Reconcile affected IDs and their mirrors. Inspect overlap evidence only for those IDs. |
69
- | `local-edited` conflict | Inspect the flagged path and its relevant snapshot/evidence. Preserve local intent; ask only when project and baseline intent conflict. |
70
- | Missing or stale path | Confirm the named recreation or deletion and its direct references. Do not audit unrelated managed files. |
71
- | Prompt spec or prompt input | Reconcile only affected prompt scopes and their mirrors. |
72
- | Subagent contract input | Reconcile only the generated and final subagent manifests. Do not spawn agents merely to perform reconciliation. |
73
- | Lint, hook, or script input | Validate the affected config or command. Ask before changing project policy. |
64
+ | Settings or manifest pins only | Confirm accepted pins. |
65
+ | Skill content; IDs unchanged | Inspect affected skills and active mirrors only. |
66
+ | Skill added, removed, or renamed | Reconcile affected IDs and their mirrors. |
67
+ | `local-edited` conflict | Preserve local intent; ask when project and baseline intent conflict. |
68
+ | Missing or stale path | Confirm the named recreation or deletion and direct references. |
69
+ | Prompt input | Reconcile only affected prompt scopes and mirrors. |
70
+ | Subagent input | Reconcile only generated and final subagent manifests. |
71
+ | Lint, hook, or script input | Validate the affected config or command; ask before changing policy. |
74
72
  | Required tools | Check only added, changed, or failed tools. |
75
- | Source-guide content | Inspect only affected guide files. Do not run `opensrc` unless the user's current task requires that library's source. |
76
- | Wiki input | Reconcile affected routes or documents against the real repo boundary, then run route- or runtime-targeted validation. |
77
- | Auto-accepted default or detected pack addition | Follow only the other changed categories caused by that addition. Do not ask or rerun setup. |
78
- | Optional pack addition, pack removal, policy change, surface reshape, or explicit unresolved setup decision | Ask for the required decision. Run full setup follow-through only when the accepted decision requires repo-authored final outputs. |
79
- | First adoption or missing/corrupt final output | Run the applicable scaffold setup follow-through. |
73
+ | Source-guide content | Inspect only affected guide files. |
74
+ | Wiki input | Reconcile affected routes or documents, then validate them. |
75
+ | Default or detected pack addition | Follow only categories changed by that addition. |
76
+ | Optional/removal/policy/surface decision | Ask for the unresolved decision. |
77
+ | First adoption or missing final output | Run applicable scaffold follow-through. |
78
+
79
+ After write modes, run targeted validation and one fresh `hi check --json`. Rerun `hi update` once only when that check detects new CLI or baseline drift, then finish with one final `hi check --json`.
80
+
81
+ ### Tools Ensure
80
82
 
81
- After write modes, run targeted validation for the affected category and one fresh `hi check --json` drift gate. Do not rerun `hi update` merely because an earlier command mentioned a possible version race. Rerun once only when `hi check --json` detects new CLI or baseline drift; then run the final `hi check --json` gate.
83
+ Treat the command as a global or external mutation.
82
84
 
83
- For `hi update --check`, report the classified preview without writing. A clean preview is complete.
85
+ - report every auto-managed tool refreshed through its trusted latest target
86
+ - report every manual platform CLI as validation-only; do not upgrade it
87
+ - preserve successful tool work when another tool fails
88
+ - return the exact failed install, refresh, validation, or recovery command from the result
89
+ - do not read `.devpunks/` beyond paths explicitly named by the command result
90
+ - do not run scaffold, settings, or update follow-through
84
91
 
85
92
  ### Report
86
93
 
87
- Confirm that the command returned a GitHub issue URL before saying the report was submitted. Return the URL, labels, command, skill pack, and any blocker. Do not duplicate project backlog into Harness reports unless maintainers explicitly promote it.
94
+ Confirm the command returned a GitHub issue URL before saying the report was submitted. Return the URL, labels, command, skill pack, and any blocker.
88
95
 
89
96
  ### Upgrade
90
97
 
91
- Report whether the CLI upgraded, was current, could not detect its install manager, or failed. Include the package manager and command when available. For registry or install-manager failure, give the matching manual reinstall command instead of treating the repo as broken.
98
+ Report whether the CLI upgraded, was current, could not detect its install manager, or failed. Include the package manager and command when available.
92
99
 
93
- ### Operator Skill
100
+ ### Operator
94
101
 
95
- Classify `hi operator status`, `install`, `update`, or `migrate` from the command result only. `hi skills rename` is a deprecated compatibility alias for `hi operator migrate` and follows this same branch.
102
+ Classify `hi operator status`, `install`, `update`, or `migrate` from the command result only. `hi skills rename` follows the same branch as a deprecated alias for `hi operator migrate`.
96
103
 
97
- Never read `.devpunks/` artifacts or inspect project files for this branch. Do not scan skill homes, run scaffold or update checks, generate prompts, or delegate again.
104
+ Never read `.devpunks/`, run scaffold follow-through, or scan unrelated skill homes.
98
105
 
99
- Report `hi-cli` and legacy `dp-cli` state for both global and project scopes:
106
+ Report `hi-cli` and legacy `dp-cli` state for global and project scopes:
100
107
 
101
108
  - `status`: report detected installations without changing them
102
- - `install`: verify the resulting `hi-cli` installation
103
- - `update`: verify every detected `hi-cli` copy updated successfully
104
- - `migrate`: verify `hi-cli` was installed or updated in every affected scope and every detected legacy `dp-cli` copy was removed
109
+ - `install`: verify the resulting global `hi-cli` copy
110
+ - `update`: verify every detected `hi-cli` copy
111
+ - `migrate`: verify replacements before every detected legacy `dp-cli` copy is removed
105
112
 
106
- If any action partially fails, return the exact failed Skills CLI command from the command result. After successful `install`, `update`, or `migrate`, tell the agent to reload or reactivate `$hi-cli` before relying on its instructions.
113
+ Operator writes require Skills CLI 1.5.20 or newer. If an action partially fails, return the exact failed Skills CLI command from the result. After successful install, update, or migrate, reload or reactivate `$hi-cli`.
107
114
 
108
115
  ## 3. Complete the Branch
109
116
 
110
- - scaffold setup/init: applicable generated instructions are reconciled into final repo outputs; targeted validation ran; unresolved policy choices are named
111
- - update: only changed categories were handled; the required drift gate is clean, or its remaining findings are reported
117
+ - init: generated onboarding/skills/wiki state is reported and the next bounded action is clear
118
+ - scaffold: applicable generated instructions are reconciled, targeted validation ran, and unresolved policy choices are named
119
+ - check: current drift is reported without writes
120
+ - ensure: settings were reconfigured or the exact blocker is reported
121
+ - update: changed categories were handled and the final `hi check --json` result is reported
122
+ - tools ensure: tool refresh/validation outcomes and exact failures are reported
112
123
  - report: a GitHub issue URL or exact submission blocker is returned
113
124
  - upgrade: install manager, command, and outcome are returned
114
- - operator skill: global and project states are returned; requested actions are verified or the exact failed Skills CLI command is returned; reload/reactivation is requested after successful mutation
125
+ - operator: both scopes are reported; mutation outcomes are verified; reload/reactivation is requested after success
115
126
 
116
- Report only artifacts consumed for the active branch, final files changed, validation run, and unresolved items.
127
+ Report only active-branch evidence, files changed by the command, validation run, and unresolved items.
package/package.json CHANGED
@@ -1,19 +1,57 @@
1
1
  {
2
2
  "name": "@punks/cli",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.1",
4
4
  "description": "Harness Intelligence scaffolding CLI",
5
- "bin": {
6
- "hi": "dist/index.js",
7
- "hint": "dist/index.js"
8
- },
9
- "type": "module",
10
5
  "homepage": "https://github.com/wearedevpunks/harness-intelligence/tree/main/apps/cli#readme",
6
+ "bugs": {
7
+ "url": "https://github.com/wearedevpunks/harness-intelligence/issues"
8
+ },
11
9
  "repository": {
12
10
  "type": "git",
13
11
  "url": "git+https://github.com/wearedevpunks/harness-intelligence.git",
14
12
  "directory": "apps/cli"
15
13
  },
16
- "bugs": {
17
- "url": "https://github.com/wearedevpunks/harness-intelligence/issues"
18
- }
14
+ "bin": {
15
+ "hi": "dist/index.js",
16
+ "hint": "dist/index.js"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "README.md",
21
+ "AGENTS.md"
22
+ ],
23
+ "type": "module",
24
+ "scripts": {
25
+ "build": "node ./scripts/build-dist.mjs",
26
+ "baseline:build": "bun ./scripts/build-baseline.mjs",
27
+ "baseline:publish": "node ./scripts/publish-baseline.mjs",
28
+ "check-types": "tsc --noEmit",
29
+ "dev": "bun run ./src/index.ts scaffold",
30
+ "entrypoints": "bun ./scripts/print-entrypoints.mjs",
31
+ "local": "bun run build && bun run ./dist/index.js",
32
+ "release:publish": "node ./scripts/publish-release.mjs",
33
+ "release:publish:beta": "NPM_TAG=beta node ./scripts/publish-release.mjs",
34
+ "sync:skills": "node ./scripts/sync-skills-repo.mjs",
35
+ "test": "vitest run --config vitest.config.ts",
36
+ "ui:catalog": "bun ./scripts/run-renderer-catalog.mjs",
37
+ "check": "oxlint src scripts && oxfmt --check src scripts package.json tsconfig.json vitest.config.ts"
38
+ },
39
+ "dependencies": {
40
+ "react-devtools-core": "^6.1.5"
41
+ },
42
+ "devDependencies": {
43
+ "@effect/eslint-plugin": "0.3.2",
44
+ "@effect/platform-bun": "catalog:",
45
+ "@effect/vitest": "catalog:",
46
+ "@punks/contract": "workspace:*",
47
+ "@punks/env": "workspace:*",
48
+ "@punks/scaffold": "workspace:*",
49
+ "@types/node": "catalog:",
50
+ "effect": "catalog:",
51
+ "oxlint": "1.72.0",
52
+ "typescript": "catalog:",
53
+ "ultracite": "7.8.3",
54
+ "vitest": "catalog:"
55
+ },
56
+ "packageManager": "bun@1.3.5"
19
57
  }
@@ -1,29 +0,0 @@
1
- # Dependencies
2
- node_modules/
3
-
4
- # Website (lives on docs branch)
5
- website/
6
-
7
- # Build outputs
8
- dist/
9
- *.js
10
- *.d.ts
11
- *.js.map
12
-
13
- # IDE
14
- .idea/
15
- .vscode/
16
- *.swp
17
- *.swo
18
-
19
- # OS
20
- .DS_Store
21
- Thumbs.db
22
-
23
- # Logs
24
- *.log
25
- npm-debug.log*
26
-
27
- # Environment
28
- .env
29
- .env.local