repo-harness 0.2.1 → 0.2.2
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 +10 -5
- package/README.zh-CN.md +8 -5
- package/package.json +1 -1
- package/scripts/setup-plugins.sh +13 -5
- package/src/cli/commands/global-runtime.ts +5 -1
- package/src/cli/commands/status.ts +1 -1
- package/src/cli/index.ts +5 -1
package/README.md
CHANGED
|
@@ -34,8 +34,12 @@ This repository now dogfoods its own tasks-first contract. It is both:
|
|
|
34
34
|
read a 1KB capability contract or query the index instead of spending thousands of
|
|
35
35
|
tokens rediscovering structure.
|
|
36
36
|
|
|
37
|
-
## What's New in 0.2.
|
|
37
|
+
## What's New in 0.2.2
|
|
38
38
|
|
|
39
|
+
- **Safer global init defaults.** `repo-harness init` now streams setup progress
|
|
40
|
+
directly to the terminal and no longer installs the Superpowers Claude
|
|
41
|
+
marketplace plugin by default. Use `repo-harness init --with-superpowers` only
|
|
42
|
+
when you explicitly want that marketplace plugin.
|
|
39
43
|
- **Global init command (`repo-harness init`).** One command bootstraps the global
|
|
40
44
|
Claude environment: essential plugins, configurable policy hooks (worktree guard,
|
|
41
45
|
atomic commit/pending), optional LSP plugins by project type, and four hook profiles
|
|
@@ -190,13 +194,14 @@ repository to install or refresh workflow files, hook assets, host adapters,
|
|
|
190
194
|
skill aliases, and repo-local verification surfaces from the current npm package.
|
|
191
195
|
|
|
192
196
|
The npm package release line is now `0.2.x`; generated workflow compatibility is
|
|
193
|
-
tracked separately as the `5.x` model line. The `0.2.
|
|
197
|
+
tracked separately as the `5.x` model line. The `0.2.2` package splits first-run
|
|
194
198
|
global bootstrap (`repo-harness init`) from repo-local refresh
|
|
195
199
|
(`repo-harness update`), keeps the global plugin/hook installer
|
|
196
200
|
(`scripts/setup-plugins.sh`), the read-only config security sentinel
|
|
197
201
|
(`repo-harness security scan`), the explicit Claude/Codex draft-plan lifecycle,
|
|
198
|
-
|
|
199
|
-
|
|
202
|
+
adds non-blocking CodeGraph index initialization for structural prompt routing,
|
|
203
|
+
and keeps Superpowers behind the explicit `--with-superpowers` opt-in flag.
|
|
204
|
+
These sit on top of the renamed `repo-harness` CLI, user-level hook
|
|
200
205
|
adapter bootstrap, AI-native scaffold overlays, the typed prompt-guard decision
|
|
201
206
|
engine, plan-stem task artifact naming, `REPO_HARNESS_*` runtime aliases, Waza
|
|
202
207
|
runtime skill sync, and the maintainer release gate.
|
|
@@ -335,7 +340,7 @@ Most common guards:
|
|
|
335
340
|
|
|
336
341
|
## Current Release
|
|
337
342
|
|
|
338
|
-
- npm package: `repo-harness@0.2.
|
|
343
|
+
- npm package: `repo-harness@0.2.2`
|
|
339
344
|
- Generated workflow compatibility: `5.2.3`
|
|
340
345
|
- GitHub repository: `Ancienttwo/repo-harness`
|
|
341
346
|
- Release history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
package/README.zh-CN.md
CHANGED
|
@@ -23,8 +23,11 @@ repo-local workflow 的自托管样例。
|
|
|
23
23
|
做渐进式上下文加载:一份小而稳定的 root context(约 12KB),加上只在改到对应文件时才加载的
|
|
24
24
|
capability 块。agent 读一份 1KB 的 capability 合约或查索引,而不是花上千 token 重新摸清结构。
|
|
25
25
|
|
|
26
|
-
## 0.2.
|
|
26
|
+
## 0.2.2 新特性
|
|
27
27
|
|
|
28
|
+
- **更安全的全局初始化默认值。** `repo-harness init` 现在会把 setup 进度直接输出到终端,
|
|
29
|
+
不再默认安装 Superpowers Claude marketplace plugin。只有你明确需要它时,才使用
|
|
30
|
+
`repo-harness init --with-superpowers`。
|
|
28
31
|
- **全局初始化命令(`repo-harness init`)。** 一条命令引导全局 Claude 环境:essential plugins、
|
|
29
32
|
可配置 policy hooks(worktree guard、atomic commit/pending)、按项目类型可选的 LSP plugins,以及
|
|
30
33
|
四档 hook profile(`standard`、`minimal`、`biome`、`biome-strict`)。运行
|
|
@@ -162,11 +165,11 @@ npx -y repo-harness update
|
|
|
162
165
|
repo-local verification surfaces。
|
|
163
166
|
|
|
164
167
|
npm package release line 现在是 `0.2.x`;生成的 workflow compatibility model line
|
|
165
|
-
单独以 `5.x` 追踪。`repo-harness@0.2.
|
|
168
|
+
单独以 `5.x` 追踪。`repo-harness@0.2.2` 把首次全局引导(`repo-harness init`)
|
|
166
169
|
和 repo-local 刷新(`repo-harness update`)拆开,同时保留全局 plugin/hook 安装脚本
|
|
167
170
|
(`scripts/setup-plugins.sh`)、只读配置安全哨兵(`repo-harness security scan`)、
|
|
168
|
-
显式 Claude/Codex draft-plan
|
|
169
|
-
|
|
171
|
+
显式 Claude/Codex draft-plan 生命周期,新增 prompt hook 的非阻塞 CodeGraph index 初始化,
|
|
172
|
+
并把 Superpowers 放到显式 `--with-superpowers` opt-in 后面。这些能力叠加在改名后的 CLI、user-level hook adapter bootstrap、AI-native scaffold overlays、
|
|
170
173
|
typed prompt-guard decision engine、plan-stem task artifact 命名、`REPO_HARNESS_*`
|
|
171
174
|
runtime aliases、Waza runtime skill sync,以及 maintainer 发布 npm 前使用的 release gate 之上。
|
|
172
175
|
|
|
@@ -298,7 +301,7 @@ hook block 工作时,先看 terminal 里的结构化输出。核心字段是
|
|
|
298
301
|
|
|
299
302
|
## 当前 Release
|
|
300
303
|
|
|
301
|
-
- npm package:`repo-harness@0.2.
|
|
304
|
+
- npm package:`repo-harness@0.2.2`
|
|
302
305
|
- Generated workflow compatibility:`5.2.3`
|
|
303
306
|
- GitHub repository:`Ancienttwo/repo-harness`
|
|
304
307
|
- Release history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
package/package.json
CHANGED
package/scripts/setup-plugins.sh
CHANGED
|
@@ -392,7 +392,7 @@ install_superpowers_plugin() {
|
|
|
392
392
|
local settings_file="$CLAUDE_DIR/settings.json"
|
|
393
393
|
local configured=false
|
|
394
394
|
|
|
395
|
-
echo -e "${BLUE}Configuring Superpowers plugin
|
|
395
|
+
echo -e "${BLUE}Configuring Superpowers plugin...${NC}"
|
|
396
396
|
|
|
397
397
|
if command_exists claude; then
|
|
398
398
|
if claude plugin marketplace add "$SUPERPOWERS_MARKETPLACE" >/dev/null 2>&1; then
|
|
@@ -722,6 +722,7 @@ print_summary() {
|
|
|
722
722
|
main() {
|
|
723
723
|
local install_optional=false
|
|
724
724
|
local install_obsidian=false
|
|
725
|
+
local install_superpowers=false
|
|
725
726
|
local hook_type="standard"
|
|
726
727
|
|
|
727
728
|
# Parse arguments
|
|
@@ -735,6 +736,10 @@ main() {
|
|
|
735
736
|
install_obsidian=true
|
|
736
737
|
shift
|
|
737
738
|
;;
|
|
739
|
+
--with-superpowers)
|
|
740
|
+
install_superpowers=true
|
|
741
|
+
shift
|
|
742
|
+
;;
|
|
738
743
|
--hooks)
|
|
739
744
|
hook_type="$2"
|
|
740
745
|
shift 2
|
|
@@ -754,7 +759,7 @@ main() {
|
|
|
754
759
|
--help)
|
|
755
760
|
echo "Usage: setup-plugins.sh [options]"
|
|
756
761
|
echo ""
|
|
757
|
-
echo "Default behavior: installs essential plugins
|
|
762
|
+
echo "Default behavior: installs essential plugins and hook-profile support"
|
|
758
763
|
echo "Runtime defaults: Plan-only, Codex platform default sandbox with approval on failure,"
|
|
759
764
|
echo " Claude default permissions, worktree-warning mutations (opt-in enforcement),"
|
|
760
765
|
echo " atomic checkpoint commits after green checks."
|
|
@@ -762,6 +767,7 @@ main() {
|
|
|
762
767
|
echo "Options:"
|
|
763
768
|
echo " --with-optional Install optional plugins (commit-commands, pr-review-toolkit, ralph-loop, etc.)"
|
|
764
769
|
echo " --with-obsidian Install Obsidian skills"
|
|
770
|
+
echo " --with-superpowers Install the Superpowers Claude marketplace plugin"
|
|
765
771
|
echo " --hooks TYPE Hook type: standard (default), minimal, biome, biome-strict, none"
|
|
766
772
|
echo " --no-hooks Skip hook configuration"
|
|
767
773
|
echo " --lsp PLUGIN Install specific LSP plugin (e.g., typescript-lsp, pyright-lsp, gopls-lsp)"
|
|
@@ -930,9 +936,11 @@ main() {
|
|
|
930
936
|
echo ""
|
|
931
937
|
add_permissions
|
|
932
938
|
|
|
933
|
-
# Configure Superpowers marketplace plugin
|
|
934
|
-
|
|
935
|
-
|
|
939
|
+
# Configure Superpowers marketplace plugin only when explicitly requested.
|
|
940
|
+
if [ "$install_superpowers" = true ]; then
|
|
941
|
+
echo ""
|
|
942
|
+
install_superpowers_plugin
|
|
943
|
+
fi
|
|
936
944
|
|
|
937
945
|
# Print summary
|
|
938
946
|
print_summary
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { spawnSync } from 'child_process';
|
|
1
|
+
import { spawnSync, type StdioOptions } from 'child_process';
|
|
2
2
|
import { existsSync } from 'fs';
|
|
3
3
|
import { dirname, join } from 'path';
|
|
4
4
|
import { fileURLToPath } from 'url';
|
|
@@ -10,8 +10,10 @@ export interface GlobalRuntimeOptions {
|
|
|
10
10
|
sourceRoot?: string;
|
|
11
11
|
cwd?: string;
|
|
12
12
|
env?: NodeJS.ProcessEnv;
|
|
13
|
+
stdio?: 'pipe' | 'inherit';
|
|
13
14
|
withOptional?: boolean;
|
|
14
15
|
withObsidian?: boolean;
|
|
16
|
+
withSuperpowers?: boolean;
|
|
15
17
|
hooks?: string | false;
|
|
16
18
|
lsp?: string;
|
|
17
19
|
projectType?: string;
|
|
@@ -32,6 +34,7 @@ export function buildGlobalRuntimeArgs(opts: GlobalRuntimeOptions): string[] {
|
|
|
32
34
|
const args: string[] = [];
|
|
33
35
|
if (opts.withOptional === true) args.push('--with-optional');
|
|
34
36
|
if (opts.withObsidian === true) args.push('--with-obsidian');
|
|
37
|
+
if (opts.withSuperpowers === true) args.push('--with-superpowers');
|
|
35
38
|
if (opts.hooks === false) args.push('--no-hooks');
|
|
36
39
|
else if (typeof opts.hooks === 'string') args.push('--hooks', opts.hooks);
|
|
37
40
|
if (opts.lsp) args.push('--lsp', opts.lsp);
|
|
@@ -68,6 +71,7 @@ export function runGlobalRuntimeSetup(opts: GlobalRuntimeOptions): GlobalRuntime
|
|
|
68
71
|
cwd: opts.cwd ?? process.cwd(),
|
|
69
72
|
encoding: 'utf-8',
|
|
70
73
|
env: { ...process.env, ...(opts.env ?? {}) },
|
|
74
|
+
stdio: (opts.stdio ?? 'pipe') as StdioOptions,
|
|
71
75
|
});
|
|
72
76
|
|
|
73
77
|
return {
|
|
@@ -15,7 +15,7 @@ import { isManagedEntry, type HooksByEvent } from '../installer/managed-entries'
|
|
|
15
15
|
import { readJsonOrEmpty } from '../installer/shared';
|
|
16
16
|
import type { Location } from '../installer/types';
|
|
17
17
|
|
|
18
|
-
export const CLI_VERSION = '0.2.
|
|
18
|
+
export const CLI_VERSION = '0.2.2';
|
|
19
19
|
|
|
20
20
|
const OPT_IN_MARKER = '.ai/harness/workflow-contract.json';
|
|
21
21
|
|
package/src/cli/index.ts
CHANGED
|
@@ -46,7 +46,7 @@ export function buildProgram(): Command {
|
|
|
46
46
|
program
|
|
47
47
|
.name('repo-harness')
|
|
48
48
|
.description('Repo-local agentic development harness CLI')
|
|
49
|
-
.version('0.2.
|
|
49
|
+
.version('0.2.2')
|
|
50
50
|
.exitOverride();
|
|
51
51
|
|
|
52
52
|
program
|
|
@@ -54,6 +54,7 @@ export function buildProgram(): Command {
|
|
|
54
54
|
.description('Bootstrap global Claude plugins and hook profiles from the npm package')
|
|
55
55
|
.option('--with-optional', 'Install optional plugins')
|
|
56
56
|
.option('--with-obsidian', 'Install Obsidian skills')
|
|
57
|
+
.option('--with-superpowers', 'Install the Superpowers Claude marketplace plugin')
|
|
57
58
|
.option('--hooks <profile>', `Hook profile: ${HOOK_PROFILES.join('|')}`, 'standard')
|
|
58
59
|
.option('--no-hooks', 'Skip hook configuration')
|
|
59
60
|
.option('--lsp <plugin>', 'Install a specific LSP plugin')
|
|
@@ -61,6 +62,7 @@ export function buildProgram(): Command {
|
|
|
61
62
|
.action((rawOpts: {
|
|
62
63
|
withOptional?: boolean;
|
|
63
64
|
withObsidian?: boolean;
|
|
65
|
+
withSuperpowers?: boolean;
|
|
64
66
|
hooks?: string | false;
|
|
65
67
|
lsp?: string;
|
|
66
68
|
projectType?: string;
|
|
@@ -73,9 +75,11 @@ export function buildProgram(): Command {
|
|
|
73
75
|
const result = runGlobalRuntimeSetup({
|
|
74
76
|
withOptional: rawOpts.withOptional === true,
|
|
75
77
|
withObsidian: rawOpts.withObsidian === true,
|
|
78
|
+
withSuperpowers: rawOpts.withSuperpowers === true,
|
|
76
79
|
hooks: rawOpts.hooks,
|
|
77
80
|
lsp: rawOpts.lsp,
|
|
78
81
|
projectType: rawOpts.projectType,
|
|
82
|
+
stdio: 'inherit',
|
|
79
83
|
});
|
|
80
84
|
if (result.stdout) process.stdout.write(result.stdout);
|
|
81
85
|
if (result.stderr) process.stderr.write(result.stderr);
|