@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.
- package/README.md +8 -3
- package/dist/BASELINE_CHANGELOG.md +22 -0
- package/dist/CHANGELOG.md +21 -2
- package/dist/data/hooks/scaffold-update-check.mjs +43 -2
- package/dist/index.js +14 -14
- package/dist/skills/agnostic/cli/hi-cli/SKILL.md +17 -121
- package/dist/skills/agnostic/cli/hi-cli/references/commands.md +32 -47
- package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +73 -62
- package/package.json +47 -9
- package/dist/skills/frameworks/nestjs/nestjs-best-practices/.gitignore +0 -29
|
@@ -1,141 +1,37 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hi-cli
|
|
3
|
-
description: Operates the Harness Intelligence CLI (`hi`, alias `hint`)
|
|
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
|
-
|
|
9
|
+
Use `hi` for the Harness Intelligence CLI; `hint` is an alias. The npm package remains `@punks/cli`.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Commands
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
hi --help
|
|
15
|
-
|
|
16
|
-
hi scaffold
|
|
17
|
-
hi
|
|
18
|
-
hi
|
|
19
|
-
hi update
|
|
20
|
-
hi
|
|
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
|
-
|
|
26
|
+
Read [references/commands.md](references/commands.md) when choosing or explaining a command.
|
|
29
27
|
|
|
30
|
-
##
|
|
28
|
+
## Workflow
|
|
31
29
|
|
|
32
|
-
|
|
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
|
-
|
|
35
|
+
Existing `.devpunks/` artifacts do not create work by themselves. The current command result and changed paths control follow-through.
|
|
35
36
|
|
|
36
|
-
|
|
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
|
|
5
|
+
## `hi init`
|
|
6
6
|
|
|
7
|
-
Use
|
|
7
|
+
Use before repo-aware setup. It seeds docs onboarding, requirements/backlog/spec skills, and the initial wiki structure.
|
|
8
8
|
|
|
9
|
-
|
|
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
|
-
|
|
11
|
+
## `hi scaffold`
|
|
12
12
|
|
|
13
|
-
Use
|
|
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
|
-
|
|
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
|
-
|
|
17
|
+
## `hi check`
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Use as the preferred read-only drift command. It checks managed scaffold, baseline, and CLI drift without writing files.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Report the current findings. A clean result needs no update follow-through.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
## `hi ensure`
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Use to reconfigure repository manager, backlog provider, asset provider, and backlog project URL settings in an existing Harness setup.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
It does not install, repair, validate, or refresh external tools. Use `hi tools ensure` for tools.
|
|
28
28
|
|
|
29
|
-
|
|
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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
37
|
+
After a write, follow only the changed categories in [post-command-flow.md](post-command-flow.md).
|
|
40
38
|
|
|
41
|
-
|
|
39
|
+
## `hi tools ensure`
|
|
42
40
|
|
|
43
|
-
|
|
41
|
+
Use to refresh external Harness tool requirements.
|
|
44
42
|
|
|
45
|
-
|
|
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
|
-
|
|
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
|
-
|
|
47
|
+
## `hi report`
|
|
50
48
|
|
|
51
|
-
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
69
|
+
Update and verify every detected global or project `hi-cli` copy.
|
|
87
70
|
|
|
88
71
|
## `hi operator migrate`
|
|
89
72
|
|
|
90
|
-
|
|
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:
|
|
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.
|
|
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.
|
|
9
|
+
## 2. Follow the Active Branch
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Init
|
|
12
12
|
|
|
13
|
-
|
|
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
|
-
|
|
33
|
+
Then:
|
|
25
34
|
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
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
|
-
|
|
40
|
+
Do not stop merely because generated files exist.
|
|
41
|
+
|
|
42
|
+
### Check
|
|
36
43
|
|
|
37
|
-
|
|
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
|
-
|
|
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
|
-
|
|
48
|
+
`hi update --check` follows this branch as a supported compatibility preview.
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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,
|
|
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.
|
|
67
|
-
| Skill content; IDs unchanged | Inspect affected skills and active mirrors only.
|
|
68
|
-
| Skill added, removed, or renamed | Reconcile affected IDs and their mirrors.
|
|
69
|
-
| `local-edited` conflict |
|
|
70
|
-
| Missing or stale path | Confirm the named recreation or deletion and
|
|
71
|
-
| Prompt
|
|
72
|
-
| Subagent
|
|
73
|
-
| Lint, hook, or script input | Validate the affected config or command
|
|
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.
|
|
76
|
-
| Wiki input | Reconcile affected routes or documents
|
|
77
|
-
|
|
|
78
|
-
| Optional
|
|
79
|
-
| First adoption or missing
|
|
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
|
-
|
|
83
|
+
Treat the command as a global or external mutation.
|
|
82
84
|
|
|
83
|
-
|
|
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
|
|
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.
|
|
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
|
|
100
|
+
### Operator
|
|
94
101
|
|
|
95
|
-
Classify `hi operator status`, `install`, `update`, or `migrate` from the command result only. `hi skills rename`
|
|
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
|
|
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
|
|
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`
|
|
103
|
-
- `update`: verify every detected `hi-cli` copy
|
|
104
|
-
- `migrate`: verify
|
|
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
|
|
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
|
-
-
|
|
111
|
-
-
|
|
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
|
|
125
|
+
- operator: both scopes are reported; mutation outcomes are verified; reload/reactivation is requested after success
|
|
115
126
|
|
|
116
|
-
Report only
|
|
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.
|
|
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
|
-
"
|
|
17
|
-
"
|
|
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
|