harness-everything 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.github/workflows/ci.yml +12 -2
- package/AGENTS.md +36 -35
- package/CHANGELOG.md +51 -0
- package/README.md +2 -2
- package/benchmarks/results/reviews/pr142-verification.json +95 -0
- package/ci/action-gate.test.js +83 -3
- package/ci/doc-capability-consistency.test.js +3 -0
- package/ci/invariant-routing.test.js +87 -74
- package/ci/mechanism-2af-worktree-isolation.test.js +152 -0
- package/ci/mechanism-2ag-router-worktree-contract.test.js +44 -0
- package/ci/mechanism-2ah-workflow-lifecycle.test.js +140 -0
- package/ci/openai-plugin-package.test.js +9 -6
- package/ci/phase4-ensemble-memory.test.js +128 -10
- package/ci/router-workflow-plan.test.js +23 -0
- package/ci/workflow-execution-contract.test.js +133 -0
- package/ci/workflow-plan-consumers.test.js +18 -0
- package/docs/architecture.md +111 -114
- package/docs/mechanism-first-skill-mesh.md +92 -103
- package/docs/openai-plugin.md +1 -1
- package/docs/philosophy.md +40 -33
- package/docs/platform-capabilities.md +2 -2
- package/docs/reviews/pr-142-issue-131.md +89 -0
- package/docs/routing.md +61 -124
- package/docs/workflow-runtime.md +109 -0
- package/fable-mode/CONTRACT-FORMAT.md +3 -1
- package/fable-mode/SKILL.md +1 -1
- package/fable-mode/agents/fable-orchestrator.md +9 -7
- package/fable-mode/execution-guardrails/SKILL.md +1 -1
- package/fable-mode/fable-haiku/SKILL.md +1 -1
- package/fable-mode/fable-opus/SKILL.md +1 -1
- package/fable-mode/fable-sonnet/SKILL.md +1 -1
- package/fable-mode/scripts/workflow-plan-consumer.js +13 -8
- package/harness-everything/SKILL.md +11 -10
- package/harness-everything/references/triage-and-tiers.md +76 -107
- package/harness-everything/schemas/router-task-shape.schema.json +4 -2
- package/harness-everything/schemas/router-workflow-plan.schema.json +3 -2
- package/harness-everything/scripts/kernel-router-core.js +265 -0
- package/harness-everything/scripts/kernel-router.js +118 -223
- package/harness-everything/scripts/router-contract-core.js +633 -0
- package/harness-everything/scripts/router-contract.js +21 -581
- package/harness-everything/scripts/tier-router.js +19 -1
- package/hooks/hooks.json +25 -4
- package/hooks/scripts/action-gate.js +111 -2
- package/hooks/scripts/contract-test.js +27 -2
- package/hooks/scripts/lib/workflow-isolation.js +102 -0
- package/hooks/scripts/lib/workflow-runtime.js +254 -0
- package/hooks/scripts/state-persist.js +1 -0
- package/hooks/scripts/subagent-scope-guard.js +20 -3
- package/hooks/scripts/workflow-disposition.js +104 -0
- package/hooks/scripts/workflow-gate.js +56 -0
- package/hooks/scripts/workflow-stop-gate.js +44 -0
- package/multi-agent-workspace/SKILL.md +2 -2
- package/multi-agent-workspace/scripts/index_memory.js +107 -1
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +2 -2
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/hooks/hooks.json +44 -1
- package/plugins/harness-everything/hooks/scripts/action-gate.js +111 -2
- package/plugins/harness-everything/hooks/scripts/contract-test.js +27 -2
- package/plugins/harness-everything/hooks/scripts/lib/workflow-isolation.js +102 -0
- package/plugins/harness-everything/hooks/scripts/lib/workflow-runtime.js +254 -0
- package/plugins/harness-everything/hooks/scripts/state-persist.js +1 -0
- package/plugins/harness-everything/hooks/scripts/subagent-scope-guard.js +20 -3
- package/plugins/harness-everything/hooks/scripts/workflow-disposition.js +104 -0
- package/plugins/harness-everything/hooks/scripts/workflow-gate.js +56 -0
- package/plugins/harness-everything/hooks/scripts/workflow-stop-gate.js +44 -0
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/scripts/lib/advisory-text.js +51 -54
- package/plugins/harness-everything/skills/fable-mode/CONTRACT-FORMAT.md +3 -1
- package/plugins/harness-everything/skills/fable-mode/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/agents/fable-orchestrator.md +9 -7
- package/plugins/harness-everything/skills/fable-mode/execution-guardrails/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/fable-haiku/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/fable-opus/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/fable-sonnet/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/scripts/workflow-plan-consumer.js +13 -8
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +11 -10
- package/plugins/harness-everything/skills/harness-everything/references/triage-and-tiers.md +76 -107
- package/plugins/harness-everything/skills/harness-everything/schemas/router-task-shape.schema.json +4 -2
- package/plugins/harness-everything/skills/harness-everything/schemas/router-workflow-plan.schema.json +3 -2
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router-core.js +265 -0
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +118 -223
- package/plugins/harness-everything/skills/harness-everything/scripts/router-contract-core.js +633 -0
- package/plugins/harness-everything/skills/harness-everything/scripts/router-contract.js +21 -581
- package/plugins/harness-everything/skills/harness-everything/scripts/tier-router.js +19 -1
- package/plugins/harness-everything/skills/multi-agent-workspace/SKILL.md +2 -2
- package/plugins/harness-everything/skills/multi-agent-workspace/scripts/index_memory.js +107 -1
- package/plugins/harness-everything/skills/self-evolve/SKILL.md +6 -6
- package/plugins/harness-everything/skills/self-evolve/references/memory-resolution.md +22 -33
- package/plugins/harness-everything/skills/self-evolve/scripts/persist-memory.js +336 -57
- package/plugins/harness-everything/skills/self-evolve/scripts/self-regression.js +1 -0
- package/plugins/harness-everything/skills/using-git-worktrees/SKILL.md +14 -16
- package/plugins/harness-everything/skills/using-git-worktrees/references/workflow-details.md +44 -85
- package/scripts/lib/advisory-text.js +51 -54
- package/self-evolve/SKILL.md +6 -6
- package/self-evolve/references/memory-resolution.md +22 -33
- package/self-evolve/scripts/persist-memory.js +336 -57
- package/self-evolve/scripts/self-regression.js +1 -0
- package/using-git-worktrees/SKILL.md +14 -16
- package/using-git-worktrees/references/workflow-details.md +44 -85
|
@@ -1,108 +1,67 @@
|
|
|
1
1
|
# Using Git Worktrees — Full Workflow Reference
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Decide whether isolation is mandatory
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Tier 3 / Fable-class engineering requires Git isolation before the first source
|
|
6
|
+
or artifact mutation. Read-only discovery may remain in the bound repository.
|
|
7
|
+
Durable multi-agent workspace state is separate: a staged run may need no
|
|
8
|
+
multi-agent workspace and still require Git isolation.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
Ordinary feature work may honor an explicit preference to stay in place.
|
|
11
|
+
Mandatory mode has no in-place fallback for a declined helper, unavailable
|
|
12
|
+
native tool, sandbox denial, or creation failure; report `blocked`.
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
CheckNative -- No --> RunGit[Try git worktree add .worktrees/branch]
|
|
14
|
+
## Detect existing isolation
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
RunGit -- Fails / Denied --> WorkInPlace[Fallback: Work in Place in Current Directory] --> Setup
|
|
17
|
-
|
|
18
|
-
Setup --> RunBaseline[4. Verify Clean Test Baseline]
|
|
19
|
-
RunBaseline --> Done[Isolated Workspace Ready]
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Step 0 detail
|
|
23
|
-
|
|
24
|
-
**Submodule guard:** `git-dir` differs from `git-common-dir` inside git submodules as well. Before concluding "already in a worktree," verify you are not in a submodule:
|
|
16
|
+
Inspect absolute Git paths and the registered worktree list:
|
|
25
17
|
|
|
26
18
|
```bash
|
|
27
|
-
|
|
19
|
+
git rev-parse --absolute-git-dir
|
|
20
|
+
git rev-parse --path-format=absolute --git-common-dir
|
|
28
21
|
git rev-parse --show-superproject-working-tree
|
|
22
|
+
git worktree list --porcelain
|
|
29
23
|
```
|
|
30
24
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Has the user already indicated their worktree preference in your instructions? If not, ask for consent before creating a worktree:
|
|
36
|
-
|
|
37
|
-
> "Would you like me to set up an isolated worktree? It protects your current branch from changes."
|
|
38
|
-
|
|
39
|
-
Honor any existing declared preference without asking. If the user declines consent, work in place and skip to project setup.
|
|
40
|
-
|
|
41
|
-
## Step 1a detail — native tools
|
|
42
|
-
|
|
43
|
-
The user has asked for an isolated workspace. Do you already have a way to create a worktree? It might be a tool with a name like `EnterWorktree`, `WorktreeCreate`, a `/worktree` command, or a `--worktree` flag. If you do, use it and skip to setup.
|
|
44
|
-
|
|
45
|
-
Native tools handle directory placement, branch creation, and cleanup automatically. Using `git worktree add` when you have a native tool creates phantom state your harness can't see or manage.
|
|
46
|
-
|
|
47
|
-
Only use the git fallback if you have no native worktree tool available.
|
|
48
|
-
|
|
49
|
-
## Step 1b detail — directory selection priority
|
|
50
|
-
|
|
51
|
-
Follow this priority order. Explicit user preference always beats observed filesystem state.
|
|
52
|
-
|
|
53
|
-
1. **Check your instructions for a declared worktree directory preference.** If the user has already specified one, use it without asking.
|
|
54
|
-
2. **Check for an existing project-local worktree directory:** Check if `.worktrees/` or `worktrees/` exists using cross-platform file system tools (`read_file` / `list_dir` or native shell test commands). If found, use it. If both exist, `.worktrees` wins.
|
|
55
|
-
3. **If there is no other guidance available**, default to `.worktrees/` at the project root.
|
|
56
|
-
|
|
57
|
-
### Safety verification (project-local directories only)
|
|
58
|
-
|
|
59
|
-
**MUST verify directory is ignored before creating worktree:**
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
git check-ignore -q .worktrees || git check-ignore -q worktrees
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
**If NOT ignored:** Add to .gitignore, commit the change, then proceed.
|
|
25
|
+
Reuse a registered linked checkout of the bound repository; never nest another
|
|
26
|
+
worktree inside it. A submodule or unrelated repository is not sufficient proof.
|
|
27
|
+
Record the resolved directory and branch (or detached HEAD) in the handoff.
|
|
66
28
|
|
|
67
|
-
|
|
29
|
+
## Create and enter
|
|
68
30
|
|
|
69
|
-
|
|
31
|
+
Honor an existing directory preference. Prefer a host-native worktree facility
|
|
32
|
+
when available, then verify that it is backed by a registered Git worktree.
|
|
33
|
+
Otherwise use Git:
|
|
70
34
|
|
|
71
35
|
```bash
|
|
72
|
-
|
|
73
|
-
path="$LOCATION/$BRANCH_NAME"
|
|
74
|
-
|
|
75
|
-
git worktree add "$path" -b "$BRANCH_NAME"
|
|
76
|
-
cd "$path"
|
|
36
|
+
git worktree add "<isolated-path>" -b "<task-branch>"
|
|
77
37
|
```
|
|
78
38
|
|
|
79
|
-
|
|
39
|
+
For mandatory mode, choose an already-ignored project-local path or an external
|
|
40
|
+
sibling path. Verify the exact project-local candidate with `git check-ignore`.
|
|
41
|
+
Do not edit/commit the primary tree's ignore file just to permit worktree setup.
|
|
42
|
+
If the native facility fails, a permitted Git fallback is valid; if neither can
|
|
43
|
+
establish isolation, stop mutable work as blocked.
|
|
80
44
|
|
|
81
|
-
|
|
45
|
+
Set each subsequent tool's working-directory field to the isolated path and
|
|
46
|
+
keep artifact targets inside it. Entering a worktree does not authorize an
|
|
47
|
+
absolute edit, patch move, or shell target back into the primary checkout.
|
|
48
|
+
Resolve symlinks/junctions when verifying target scope.
|
|
82
49
|
|
|
83
|
-
|
|
50
|
+
## Setup and baseline
|
|
84
51
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
# Rust
|
|
90
|
-
if [ -f Cargo.toml ]; then cargo build; fi
|
|
52
|
+
Install the detected dependencies inside the isolated checkout, then run the
|
|
53
|
+
relevant baseline tests/build before implementation. Surface existing failures
|
|
54
|
+
with exact output and distinguish them from regressions introduced by the task.
|
|
55
|
+
Continue fixing task-relevant failures within the user's authorized scope.
|
|
91
56
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
# Go
|
|
97
|
-
if [ -f go.mod ]; then go mod download; fi
|
|
98
|
-
```
|
|
57
|
+
For active Fable workflows, enter the correlated run through the router's
|
|
58
|
+
displayed controller before dependency installation or artifact mutation. The
|
|
59
|
+
session's `workflow-stages.json` bootstrap file is runtime state; it is not an
|
|
60
|
+
exception for source changes.
|
|
99
61
|
|
|
100
|
-
##
|
|
62
|
+
## Evidence boundary
|
|
101
63
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
Tests passing (<N> tests, 0 failures)
|
|
107
|
-
Ready to implement <feature-name>
|
|
108
|
-
```
|
|
64
|
+
The workflow gate checks registered Git identity, direct/patch target paths,
|
|
65
|
+
known shell side effects, and explicit outside paths. It is not a filesystem
|
|
66
|
+
sandbox for arbitrary script bodies or indirect side effects. Preserve the
|
|
67
|
+
platform capability boundary and report unsupported hook/metadata paths.
|