harness-everything 0.18.1 → 0.19.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/AGENTS.md +3 -2
- package/CHANGELOG.md +8 -0
- package/README.md +21 -14
- package/bin/cli.js +16 -0
- package/ci/invariant-routing.test.js +42 -19
- package/ci/mechanism-2af-worktree-isolation.test.js +3 -3
- package/ci/mechanism-2ag-router-worktree-contract.test.js +1 -0
- package/ci/mechanism-2an-workflow-obligations.test.js +1 -0
- package/ci/mechanism-2ao-plugin-sync.test.js +163 -0
- package/ci/mechanism-33-issues-205-207.test.js +2 -2
- package/ci/openai-plugin-package.test.js +6 -6
- package/ci/router-workflow-plan.test.js +12 -9
- package/ci/workflow-execution-contract.test.js +2 -2
- package/docs/architecture.md +15 -15
- package/docs/enforcement-locks.md +17 -15
- package/docs/philosophy.md +43 -8
- package/docs/platform-capabilities.md +22 -2
- package/docs/platform-compatibility.json +4 -4
- package/docs/routing.md +23 -16
- package/docs/troubleshooting.md +8 -0
- package/docs/workflow-runtime.md +20 -19
- package/environment-detection/SKILL.md +3 -1
- package/evals/harness-everything/tasks/positive-tier1.yaml +1 -1
- package/evals/harness-everything/tasks/positive-tier2.yaml +1 -1
- package/evals/harness-everything/tasks/positive-tier3.yaml +1 -1
- package/evals/using-git-worktrees/tasks/positive-trigger.yaml +1 -1
- package/find-skills/SKILL.md +20 -29
- package/git-commit/SKILL.md +4 -4
- package/harness-everything/SKILL.md +16 -17
- package/harness-everything/references/triage-and-tiers.md +17 -16
- package/harness-everything/scripts/kernel-router-core.js +26 -24
- package/harness-everything/scripts/kernel-router.js +8 -8
- package/harness-everything/scripts/router-contract-core.js +7 -7
- package/harness-everything/scripts/router-contract.js +1 -1
- package/hooks/scripts/atomic-commit-check.js +1 -1
- package/hooks/scripts/boundary-guard.js +2 -2
- package/hooks/scripts/depth-guard.js +5 -6
- package/hooks/scripts/subagent-scope-guard.js +2 -2
- package/hooks/scripts/workflow-gate.js +1 -1
- package/install-cognitive-os/SKILL.md +3 -3
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +4 -2
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/hooks/scripts/atomic-commit-check.js +1 -1
- package/plugins/harness-everything/hooks/scripts/boundary-guard.js +2 -2
- package/plugins/harness-everything/hooks/scripts/depth-guard.js +5 -6
- package/plugins/harness-everything/hooks/scripts/subagent-scope-guard.js +2 -2
- package/plugins/harness-everything/hooks/scripts/workflow-gate.js +1 -1
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/scripts/lib/advisory-text.js +19 -17
- package/plugins/harness-everything/skills/environment-detection/SKILL.md +3 -1
- package/plugins/harness-everything/skills/find-skills/SKILL.md +20 -29
- package/plugins/harness-everything/skills/git-commit/SKILL.md +4 -4
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +16 -17
- package/plugins/harness-everything/skills/harness-everything/references/triage-and-tiers.md +17 -16
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router-core.js +26 -24
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +8 -8
- package/plugins/harness-everything/skills/harness-everything/scripts/router-contract-core.js +7 -7
- package/plugins/harness-everything/skills/harness-everything/scripts/router-contract.js +1 -1
- package/plugins/harness-everything/skills/install-cognitive-os/SKILL.md +3 -3
- package/plugins/harness-everything/skills/rewrite-commits/SKILL.md +2 -2
- package/plugins/harness-everything/skills/to-tickets/SKILL.md +2 -2
- package/plugins/harness-everything/skills/using-git-worktrees/SKILL.md +6 -6
- package/rewrite-commits/SKILL.md +2 -2
- package/scripts/lib/advisory-text.js +19 -17
- package/scripts/plugin-sync.js +465 -0
- package/scripts/plugin-sync.ps1 +5 -0
- package/scripts/plugin-sync.sh +5 -0
- package/to-tickets/SKILL.md +2 -2
- package/using-git-worktrees/SKILL.md +6 -6
|
@@ -320,7 +320,7 @@ function selectWorkflowStrategy(input = {}) {
|
|
|
320
320
|
function planMetadataForStrategy(strategy) {
|
|
321
321
|
const base = {
|
|
322
322
|
patterns: ['router'],
|
|
323
|
-
requiredInvariants: ['scope-lock', 'verify-before-claim', 'replan-after-repeated-failure', 'visible-status-updates'],
|
|
323
|
+
requiredInvariants: ['scope-lock', 'environment-alignment', 'verify-before-claim', 'replan-after-repeated-failure', 'visible-status-updates'],
|
|
324
324
|
suggestedSkills: [],
|
|
325
325
|
maxIterations: null,
|
|
326
326
|
parallelAllowed: null,
|
|
@@ -365,8 +365,8 @@ function planMetadataForStrategy(strategy) {
|
|
|
365
365
|
return {
|
|
366
366
|
...base,
|
|
367
367
|
patterns: ['router', 'planner-executor', 'evaluator-optimizer'],
|
|
368
|
-
requiredInvariants: [...base.requiredInvariants, 'stage-contracts', 'cold-verification'],
|
|
369
|
-
suggestedSkills: ['fable-mode', 'fable-discipline', 'verification-loop'],
|
|
368
|
+
requiredInvariants: [...base.requiredInvariants, 'stage-contracts', 'cold-verification', 'isolated-worktree-before-mutation'],
|
|
369
|
+
suggestedSkills: ['using-git-worktrees', 'fable-mode', 'fable-discipline', 'verification-loop'],
|
|
370
370
|
parallelAllowed: false,
|
|
371
371
|
parallelReasonCodes: ['dependent-or-unproven-independent-stages'],
|
|
372
372
|
workspaceRequired: false,
|
|
@@ -380,8 +380,8 @@ function planMetadataForStrategy(strategy) {
|
|
|
380
380
|
return {
|
|
381
381
|
...base,
|
|
382
382
|
patterns: ['router', 'planner-executor', 'evaluator-optimizer'],
|
|
383
|
-
requiredInvariants: [...base.requiredInvariants, 'stage-contracts', 'cold-verification', 'parallel-scope-contract', 'synthesis-barrier'],
|
|
384
|
-
suggestedSkills: ['fable-mode', 'fable-discipline', 'verification-loop'],
|
|
383
|
+
requiredInvariants: [...base.requiredInvariants, 'stage-contracts', 'cold-verification', 'isolated-worktree-before-mutation', 'parallel-scope-contract', 'synthesis-barrier'],
|
|
384
|
+
suggestedSkills: ['using-git-worktrees', 'fable-mode', 'fable-discipline', 'verification-loop'],
|
|
385
385
|
parallelAllowed: true,
|
|
386
386
|
parallelReasonCodes: ['independent-read-only-or-disjoint-scopes'],
|
|
387
387
|
workspaceRequired: false,
|
|
@@ -395,8 +395,8 @@ function planMetadataForStrategy(strategy) {
|
|
|
395
395
|
return {
|
|
396
396
|
...base,
|
|
397
397
|
patterns: ['router', 'planner-executor', 'evaluator-optimizer', 'multi-agent-memory'],
|
|
398
|
-
requiredInvariants: [...base.requiredInvariants, 'stage-contracts', 'cold-verification', 'handoff-contracts', 'workspace-state'],
|
|
399
|
-
suggestedSkills: ['multi-agent-workspace', 'fable-mode', 'fable-discipline', 'verification-loop'],
|
|
398
|
+
requiredInvariants: [...base.requiredInvariants, 'stage-contracts', 'cold-verification', 'isolated-worktree-before-mutation', 'handoff-contracts', 'workspace-state'],
|
|
399
|
+
suggestedSkills: ['using-git-worktrees', 'multi-agent-workspace', 'fable-mode', 'fable-discipline', 'verification-loop'],
|
|
400
400
|
parallelAllowed: false,
|
|
401
401
|
parallelReasonCodes: ['workspace-orchestrator-controls-concurrency'],
|
|
402
402
|
workspaceRequired: true,
|
|
@@ -16,7 +16,7 @@ function augmentWorkflowPlan(plan) {
|
|
|
16
16
|
if (!requiredInvariants.includes('isolated-worktree-before-mutation')) requiredInvariants.push('isolated-worktree-before-mutation');
|
|
17
17
|
if (!suggestedSkills.includes('using-git-worktrees')) suggestedSkills.push('using-git-worktrees');
|
|
18
18
|
return { ...plan, requiredInvariants, suggestedSkills, mutationIsolation: {
|
|
19
|
-
required: true, mechanism: 'git-worktree', transition: 'before-first-mutation', onUnavailable: '
|
|
19
|
+
required: true, mechanism: 'git-worktree', transition: 'before-first-mutation', onUnavailable: 'degraded',
|
|
20
20
|
} };
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -142,7 +142,7 @@ function main(payload) {
|
|
|
142
142
|
|
|
143
143
|
const changedFiles = statusRaw.split('\n').length;
|
|
144
144
|
console.error(`[Atomic Commit Check] ${state.editCount} edits since the last commit (${changedFiles} files currently changed).`);
|
|
145
|
-
console.error('
|
|
145
|
+
console.error('Before committing, MUST inspect the staged diff/scope; unrelated concerns SHOULD be split unless coupling or explicit user intent justifies one commit. Large uncommitted diffs remain a review/recovery risk.');
|
|
146
146
|
process.exit(0);
|
|
147
147
|
}
|
|
148
148
|
|
|
@@ -27,7 +27,7 @@ process.stdin.on('end', () => {
|
|
|
27
27
|
if (stat.isFile() && stat.size > MAX_BYTES_WITHOUT_LIMIT) {
|
|
28
28
|
console.error(`[Boundary Reminder]: "${filePath}" is ${(stat.size / 1024).toFixed(0)}KB.`);
|
|
29
29
|
console.error(`Reading a file this large in one call risks context bloat and "lost in the middle" degradation.`);
|
|
30
|
-
console.error(`
|
|
30
|
+
console.error(`SHOULD narrow the read with explicit "offset"/"limit" or use Grep first, unless full-file context is materially required.`);
|
|
31
31
|
process.exit(0);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -43,7 +43,7 @@ process.stdin.on('end', () => {
|
|
|
43
43
|
if (hitsNoiseDir) {
|
|
44
44
|
console.error(`[Boundary Reminder]: search targets a noise directory (${NOISE_DIRS.join(', ')}).`);
|
|
45
45
|
console.error(`These produce huge, low-signal result sets and rarely contain what you're actually looking for.`);
|
|
46
|
-
console.error(`
|
|
46
|
+
console.error(`SHOULD scope the search to source directories; if the noisy directory is materially required, state the evidence-based exception.`);
|
|
47
47
|
process.exit(0);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
* Claude Code already refuses to Edit a file that wasn't Read first in the
|
|
5
5
|
* same session - that's native behavior, not something this hook needs to
|
|
6
6
|
* re-check. The gap is Write: it happily overwrites an existing file with
|
|
7
|
-
* no prior Read at all. This hook
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* Fails open on any parse/lookup error - never blocks due to a bug here.
|
|
7
|
+
* no prior Read at all. This hook observes that gap and emits the semantic
|
|
8
|
+
* MUST to establish current target state before destructive overwrite.
|
|
9
|
+
* Fails open on parse/lookup errors and does not create a cognitive lock.
|
|
11
10
|
*/
|
|
12
11
|
const fs = require('fs');
|
|
13
12
|
const path = require('path');
|
|
@@ -53,8 +52,8 @@ process.stdin.on('end', () => {
|
|
|
53
52
|
|
|
54
53
|
if (!wasRead) {
|
|
55
54
|
console.error(`[Depth Reminder]: "${filePath}" already exists but hasn't been Read in this session.`);
|
|
56
|
-
console.error(`
|
|
57
|
-
console.error(`Read the file first (even a quick pass),
|
|
55
|
+
console.error(`Semantic MUST: establish the current target state before a destructive whole-file overwrite.`);
|
|
56
|
+
console.error(`Read the file first (even a quick pass), or use Edit for a targeted change. This reminder is fail-open rather than a persistent lock.`);
|
|
58
57
|
process.exit(0);
|
|
59
58
|
}
|
|
60
59
|
|
|
@@ -165,7 +165,7 @@ process.stdin.on('end', () => {
|
|
|
165
165
|
} else if (declaredContracts.length === 0) {
|
|
166
166
|
console.error(`[Subagent Scope Reminder] ${newlyChanged.length} file(s) changed with no machine-readable writeSet contract:`);
|
|
167
167
|
newlyChanged.forEach(line => console.error(` ${line}`));
|
|
168
|
-
console.error('
|
|
168
|
+
console.error('Semantic MUST: reconcile every changed path against the declared scope before trusting or committing this output.');
|
|
169
169
|
} else {
|
|
170
170
|
for (const entry of classified.expected) {
|
|
171
171
|
console.log(`[Subagent Scope Reminder] in-scope ${entry.statusLine} -> ${entry.planId}/${entry.runId}/${entry.stageId}${entry.workerId ? ` worker=${entry.workerId}` : ''}`);
|
|
@@ -174,7 +174,7 @@ process.stdin.on('end', () => {
|
|
|
174
174
|
console.error(`[Subagent Scope Reminder] ambiguous scope ${entry.statusLine}; matches ${entry.stages.map(stage => `${stage.runId}/${stage.stageId}`).join(', ')}`);
|
|
175
175
|
}
|
|
176
176
|
for (const entry of classified.outOfScope) {
|
|
177
|
-
console.error(`[Subagent Scope Reminder] OUT-OF-SCOPE ${entry.statusLine}${entry.workerId ? ` worker=${entry.workerId}` : ''}
|
|
177
|
+
console.error(`[Subagent Scope Reminder] OUT-OF-SCOPE ${entry.statusLine}${entry.workerId ? ` worker=${entry.workerId}` : ''}; MUST reconcile/revert or explicitly re-authorize scope before accepting the result.`);
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
|
|
@@ -35,7 +35,7 @@ function decide(payload) {
|
|
|
35
35
|
if (String(workflow.strategy || '').startsWith('fable-') && !matchingRun(context)) warn('Selected Fable workflow has no correlated run; consider creating/updating the stage map before broad changes.');
|
|
36
36
|
if (isMajorWorkflow(workflow)) {
|
|
37
37
|
const isolatedRoot = linkedWorktree(cwd, root);
|
|
38
|
-
if (!isolatedRoot) warn('
|
|
38
|
+
if (!isolatedRoot) warn('Tier-3/Fable isolation disposition is a semantic MUST before broad mutation: enter a linked Git worktree or record an explicit degraded fallback. This reminder does not hard-block.');
|
|
39
39
|
else {
|
|
40
40
|
try { if (DIRECT.has(tool)) assertTargets(payload, cwd, isolatedRoot); else assertShellScope(command, cwd, isolatedRoot); }
|
|
41
41
|
catch (error) { warn(error.message); }
|
|
@@ -4,12 +4,12 @@ description: "Explain or explicitly apply the Harness cognitive policy: Discover
|
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
6
|
author: Miya Daniel
|
|
7
|
-
version: 0.
|
|
7
|
+
version: 0.19.1
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Agent Cognitive OS
|
|
11
11
|
|
|
12
|
-
The Cognitive OS is policy, not a required peer-skill selection. Supported runtimes
|
|
12
|
+
The Cognitive OS is policy, not a required peer-skill selection. Supported runtimes **MUST** establish the smaller Harness invariant contract before domain-skill execution; this skill remains its human-readable/manual entry point.
|
|
13
13
|
|
|
14
14
|
## USE FOR:
|
|
15
15
|
- Apply or explain Discover → Think → Try → Summarize → Record.
|
|
@@ -39,6 +39,6 @@ The Cognitive OS is policy, not a required peer-skill selection. Supported runti
|
|
|
39
39
|
|
|
40
40
|
Domain skills may define their own tactics and phases. They do not need to invoke this skill first as long as the Harness invariants remain satisfied.
|
|
41
41
|
|
|
42
|
-
On
|
|
42
|
+
On instruction-only platforms, the same semantic MUST/SHOULD/MAY contract applies through instructions rather than hard tool-call gates.
|
|
43
43
|
|
|
44
44
|
Deep dive: <this-skill-dir>/references/cognitive-loop.md
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "harness-everything",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"description": "Harness OS: An Orchestrated Agent Operating System for AI-driven Development",
|
|
5
5
|
"main": "harness-everything/scripts/bootstrap.js",
|
|
6
6
|
"bin": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"repo:contract": "node scripts/repository-contract.js",
|
|
18
18
|
"docs:sync": "node scripts/sync-current-docs.js",
|
|
19
19
|
"test:repo-contract": "node ci/repository-contract.test.js",
|
|
20
|
-
"test:consistency": "node ci/consistency-check.js && node ci/doc-capability-consistency.test.js && node ci/repository-contract.test.js",
|
|
20
|
+
"test:consistency": "node ci/consistency-check.js && node ci/doc-capability-consistency.test.js && node ci/repository-contract.test.js && node ci/mechanism-2ao-plugin-sync.test.js",
|
|
21
21
|
"test:docs:capabilities": "node ci/doc-capability-consistency.test.js",
|
|
22
22
|
"test:references": "node ci/reference-check.js",
|
|
23
23
|
"test:release": "node ci/release-consistency-check.js && node ci/mechanism-2x-release-automation.test.js && node ci/mechanism-2x-release-commit-message.test.js",
|
|
@@ -28,10 +28,12 @@
|
|
|
28
28
|
"test:routing": "node ci/routing-check.js",
|
|
29
29
|
"test:routing:invariants": "node ci/invariant-routing.test.js && node ci/router-workflow-plan.test.js && node ci/workflow-execution-contract.test.js",
|
|
30
30
|
"plugin:sync": "node scripts/sync-openai-plugin.js",
|
|
31
|
+
"plugin:hosts": "node scripts/plugin-sync.js",
|
|
31
32
|
"test:plugin:claude": "node ci/mechanism-2z-claude-plugin-manifest.test.js",
|
|
32
33
|
"plugin:claude:stage": "node scripts/stage-claude-plugin.js",
|
|
33
34
|
"plugin:claude:validate": "node scripts/validate-claude-plugin.js",
|
|
34
35
|
"test:plugin:openai": "node ci/openai-plugin-package.test.js && node ci/openai-plugin-runtime.test.js",
|
|
36
|
+
"test:plugin:hosts": "node ci/mechanism-2ao-plugin-sync.test.js",
|
|
35
37
|
"plugin:submission:build": "node scripts/build-openai-submission.js",
|
|
36
38
|
"test:plugin:submission": "node ci/openai-plugin-submission.test.js",
|
|
37
39
|
"test:platform:compatibility": "node ci/mechanism-2w-platform-compatibility.test.js",
|
|
@@ -142,7 +142,7 @@ function main(payload) {
|
|
|
142
142
|
|
|
143
143
|
const changedFiles = statusRaw.split('\n').length;
|
|
144
144
|
console.error(`[Atomic Commit Check] ${state.editCount} edits since the last commit (${changedFiles} files currently changed).`);
|
|
145
|
-
console.error('
|
|
145
|
+
console.error('Before committing, MUST inspect the staged diff/scope; unrelated concerns SHOULD be split unless coupling or explicit user intent justifies one commit. Large uncommitted diffs remain a review/recovery risk.');
|
|
146
146
|
process.exit(0);
|
|
147
147
|
}
|
|
148
148
|
|
|
@@ -27,7 +27,7 @@ process.stdin.on('end', () => {
|
|
|
27
27
|
if (stat.isFile() && stat.size > MAX_BYTES_WITHOUT_LIMIT) {
|
|
28
28
|
console.error(`[Boundary Reminder]: "${filePath}" is ${(stat.size / 1024).toFixed(0)}KB.`);
|
|
29
29
|
console.error(`Reading a file this large in one call risks context bloat and "lost in the middle" degradation.`);
|
|
30
|
-
console.error(`
|
|
30
|
+
console.error(`SHOULD narrow the read with explicit "offset"/"limit" or use Grep first, unless full-file context is materially required.`);
|
|
31
31
|
process.exit(0);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -43,7 +43,7 @@ process.stdin.on('end', () => {
|
|
|
43
43
|
if (hitsNoiseDir) {
|
|
44
44
|
console.error(`[Boundary Reminder]: search targets a noise directory (${NOISE_DIRS.join(', ')}).`);
|
|
45
45
|
console.error(`These produce huge, low-signal result sets and rarely contain what you're actually looking for.`);
|
|
46
|
-
console.error(`
|
|
46
|
+
console.error(`SHOULD scope the search to source directories; if the noisy directory is materially required, state the evidence-based exception.`);
|
|
47
47
|
process.exit(0);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
* Claude Code already refuses to Edit a file that wasn't Read first in the
|
|
5
5
|
* same session - that's native behavior, not something this hook needs to
|
|
6
6
|
* re-check. The gap is Write: it happily overwrites an existing file with
|
|
7
|
-
* no prior Read at all. This hook
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* Fails open on any parse/lookup error - never blocks due to a bug here.
|
|
7
|
+
* no prior Read at all. This hook observes that gap and emits the semantic
|
|
8
|
+
* MUST to establish current target state before destructive overwrite.
|
|
9
|
+
* Fails open on parse/lookup errors and does not create a cognitive lock.
|
|
11
10
|
*/
|
|
12
11
|
const fs = require('fs');
|
|
13
12
|
const path = require('path');
|
|
@@ -53,8 +52,8 @@ process.stdin.on('end', () => {
|
|
|
53
52
|
|
|
54
53
|
if (!wasRead) {
|
|
55
54
|
console.error(`[Depth Reminder]: "${filePath}" already exists but hasn't been Read in this session.`);
|
|
56
|
-
console.error(`
|
|
57
|
-
console.error(`Read the file first (even a quick pass),
|
|
55
|
+
console.error(`Semantic MUST: establish the current target state before a destructive whole-file overwrite.`);
|
|
56
|
+
console.error(`Read the file first (even a quick pass), or use Edit for a targeted change. This reminder is fail-open rather than a persistent lock.`);
|
|
58
57
|
process.exit(0);
|
|
59
58
|
}
|
|
60
59
|
|
|
@@ -165,7 +165,7 @@ process.stdin.on('end', () => {
|
|
|
165
165
|
} else if (declaredContracts.length === 0) {
|
|
166
166
|
console.error(`[Subagent Scope Reminder] ${newlyChanged.length} file(s) changed with no machine-readable writeSet contract:`);
|
|
167
167
|
newlyChanged.forEach(line => console.error(` ${line}`));
|
|
168
|
-
console.error('
|
|
168
|
+
console.error('Semantic MUST: reconcile every changed path against the declared scope before trusting or committing this output.');
|
|
169
169
|
} else {
|
|
170
170
|
for (const entry of classified.expected) {
|
|
171
171
|
console.log(`[Subagent Scope Reminder] in-scope ${entry.statusLine} -> ${entry.planId}/${entry.runId}/${entry.stageId}${entry.workerId ? ` worker=${entry.workerId}` : ''}`);
|
|
@@ -174,7 +174,7 @@ process.stdin.on('end', () => {
|
|
|
174
174
|
console.error(`[Subagent Scope Reminder] ambiguous scope ${entry.statusLine}; matches ${entry.stages.map(stage => `${stage.runId}/${stage.stageId}`).join(', ')}`);
|
|
175
175
|
}
|
|
176
176
|
for (const entry of classified.outOfScope) {
|
|
177
|
-
console.error(`[Subagent Scope Reminder] OUT-OF-SCOPE ${entry.statusLine}${entry.workerId ? ` worker=${entry.workerId}` : ''}
|
|
177
|
+
console.error(`[Subagent Scope Reminder] OUT-OF-SCOPE ${entry.statusLine}${entry.workerId ? ` worker=${entry.workerId}` : ''}; MUST reconcile/revert or explicitly re-authorize scope before accepting the result.`);
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
|
|
@@ -35,7 +35,7 @@ function decide(payload) {
|
|
|
35
35
|
if (String(workflow.strategy || '').startsWith('fable-') && !matchingRun(context)) warn('Selected Fable workflow has no correlated run; consider creating/updating the stage map before broad changes.');
|
|
36
36
|
if (isMajorWorkflow(workflow)) {
|
|
37
37
|
const isolatedRoot = linkedWorktree(cwd, root);
|
|
38
|
-
if (!isolatedRoot) warn('
|
|
38
|
+
if (!isolatedRoot) warn('Tier-3/Fable isolation disposition is a semantic MUST before broad mutation: enter a linked Git worktree or record an explicit degraded fallback. This reminder does not hard-block.');
|
|
39
39
|
else {
|
|
40
40
|
try { if (DIRECT.has(tool)) assertTargets(payload, cwd, isolatedRoot); else assertShellScope(command, cwd, isolatedRoot); }
|
|
41
41
|
catch (error) { warn(error.message); }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "harness-everything",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.19.1",
|
|
5
5
|
"description": "Invariant-first engineering harness for routing, verification, and failure recovery while preserving agent autonomy.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Miya Daniel",
|
|
@@ -7,14 +7,14 @@ const MARKER = "Harness OS Guidance (Advisory)";
|
|
|
7
7
|
|
|
8
8
|
const advisoryInstructions = [
|
|
9
9
|
`\n# ${MARKER}`,
|
|
10
|
-
`Harness is an observer/router/reminder layer on this surface; do not treat
|
|
10
|
+
`Harness is an observer/router/reminder layer on this surface. Instruction/advisory delivery describes the mechanism, not semantic optionality; do not treat Harness as a hard scheduler.`,
|
|
11
11
|
``,
|
|
12
|
-
`## 🚦 ENTRY TRIAGE &
|
|
12
|
+
`## 🚦 ENTRY TRIAGE & SEMANTIC CONTRACT`,
|
|
13
13
|
`For software/project work, load the \`harness-everything\` skill and establish routing context before broad mutation:`,
|
|
14
|
-
`1.
|
|
15
|
-
`2.
|
|
16
|
-
`3.
|
|
17
|
-
`4.
|
|
14
|
+
`1. MUST route before broad mutation; run \`npx github:dyphn1/Harness-everything next "<Brief summary of user's prompt>"\` when terminal execution is available and no equivalent routing state was injected.`,
|
|
15
|
+
`2. MUST read/evaluate EVERY suggested skill. If applicable, MUST follow its core contract; if not-applicable, keep a flow-grounded reason.`,
|
|
16
|
+
`3. Selected-topology required obligations are MUSTs. Implementation tactics MAY adapt; numeric iteration/revision/replan/worker values MAY guide planning but never hard-block.`,
|
|
17
|
+
`4. MUST verify before claiming completion. Tier-3/Fable broad mutation MUST resolve isolation: linked worktree or explicit degraded fallback.`,
|
|
18
18
|
`5. Use the routing checkpoint only as internal source state for the first Harness Status; do not render a competing progress block.`,
|
|
19
19
|
``,
|
|
20
20
|
`## 📣 USER-VISIBLE STATUS (MUST)`,
|
|
@@ -31,10 +31,11 @@ const advisoryInstructions = [
|
|
|
31
31
|
`- **No universal skill pipeline**: do not force every task through TODO/TDD/Fable.`,
|
|
32
32
|
`- **Rule of 3**: after 3 same-signature failures, stop micro-retrying and use a fresh diagnosis / zoom-out. This reflection boundary may block mutation until completed.`,
|
|
33
33
|
`- **Permission boundaries are separate**: explicit host/user approval for destructive or external actions remains authoritative.`,
|
|
34
|
-
`- **
|
|
35
|
-
`- **
|
|
36
|
-
`- **
|
|
37
|
-
`- **
|
|
34
|
+
`- **Contract strength**: MUST = required semantic obligation; SHOULD = default with evidence-based exception; MAY = optional optimization. Reminder-only mechanics never downgrade MUST.`,
|
|
35
|
+
`- **Verification is evidence, not a cage**: MUST verify before completion claims; host hooks may remind rather than persistently block.`,
|
|
36
|
+
`- **Environment discovery**: MUST establish relevant OS/shell/toolchain/host facts before relying on environment-sensitive behavior.`,
|
|
37
|
+
`- **Memory / self-evolve**: durable writes MUST be authorized by the active workflow/session contract and backed by verified reusable evidence.`,
|
|
38
|
+
`- **Editing / commits**: targeted edits SHOULD be preferred; before committing, MUST inspect the staged diff and SHOULD split unrelated concerns.`,
|
|
38
39
|
``
|
|
39
40
|
].join('\n');
|
|
40
41
|
|
|
@@ -144,15 +145,16 @@ function buildCodexGlobalContent() {
|
|
|
144
145
|
`# ${MARKER}`,
|
|
145
146
|
`This instruction surface cannot be assumed to provide hard lifecycle blocking.`,
|
|
146
147
|
``,
|
|
147
|
-
`-
|
|
148
|
-
`- For software/project work,
|
|
148
|
+
`- MUST establish relevant environment/host facts before relying on environment-sensitive behavior.`,
|
|
149
|
+
`- For software/project work, MUST establish routing before broad mutation; use \`npx github:dyphn1/Harness-everything next "<summary>"\` when terminal execution is available and routing state was not already injected.`,
|
|
149
150
|
`- For non-trivial work, MUST render one Markdown \`### 🚦 Harness Status\` with bullet-aligned bold \`Current\`, \`Read / Evidence\`, \`Next\`, and optional \`Risk / Blocked\`; repeat it at major phase/direction boundaries and before final completion.`,
|
|
150
|
-
`-
|
|
151
|
-
`-
|
|
151
|
+
`- MUST read/evaluate every suggested skill; applicable skill core contracts MUST be followed, while not-applicable needs a flow-grounded reason.`,
|
|
152
|
+
`- Selected-topology required obligations are MUSTs; implementation tactics MAY adapt and numeric planning values MAY guide but never hard-block.`,
|
|
152
153
|
`- Do not impose a universal TODO/TDD/Fable sequence; use the smallest useful topology plus applicable skills.`,
|
|
153
|
-
`-
|
|
154
|
-
`-
|
|
155
|
-
`-
|
|
154
|
+
`- MUST verify before declaring done; a reminder-only host mechanism does not make verification optional.`,
|
|
155
|
+
`- Tier-3/Fable broad mutation MUST resolve isolation: verified linked worktree or explicit degraded fallback.`,
|
|
156
|
+
`- After 3 same-signature failures, MUST stop retrying and use a fresh diagnosis / zoom-out.`,
|
|
157
|
+
`- Targeted edits SHOULD be preferred; before committing, MUST inspect the staged diff and SHOULD split unrelated concerns.`,
|
|
156
158
|
``
|
|
157
159
|
].join('\n');
|
|
158
160
|
}
|
|
@@ -4,7 +4,7 @@ description: Use at session start (Discover phase) to detect and align with the
|
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
6
|
author: Miya Daniel
|
|
7
|
-
version: 0.
|
|
7
|
+
version: 0.19.1
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Environment Detection & Shell Alignment
|
|
@@ -20,6 +20,8 @@ metadata:
|
|
|
20
20
|
|
|
21
21
|
Boundary: stay inside `process.cwd()`. Detection never writes integrations or searches parent/cache paths for another runtime.
|
|
22
22
|
|
|
23
|
+
**Strength:** before relying on environment-sensitive commands, paths, package managers, or host capabilities, relevant discovery is a semantic **MUST**. Hosts may satisfy it from trusted injected environment context instead of rerunning probes.
|
|
24
|
+
|
|
23
25
|
## Workflow
|
|
24
26
|
|
|
25
27
|
1. Run `node "<this-skill-dir>/scripts/preflight.js"`; detect OS, shell, CLIs.
|
|
@@ -4,45 +4,36 @@ description: Search the agent-skills ecosystem (skills.sh / npx skills) when no
|
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
6
|
author: Miya Daniel
|
|
7
|
-
version: 0.
|
|
7
|
+
version: 0.19.1
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Find Skills
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Skill Contract
|
|
13
13
|
|
|
14
|
-
| Component |
|
|
14
|
+
| Component | Contract |
|
|
15
15
|
| :--- | :--- |
|
|
16
|
-
| **
|
|
17
|
-
| **
|
|
18
|
-
| **State
|
|
19
|
-
| **
|
|
16
|
+
| **Input** | No installed skill fits, or user asks to find one. |
|
|
17
|
+
| **Output** | Vetted skill pointer, approved application, or fallback. |
|
|
18
|
+
| **State** | Temp cache by default; permanent install is opt-in. |
|
|
19
|
+
| **Gate** | Third-party fetch/apply/install requires explicit approval. |
|
|
20
20
|
|
|
21
21
|
## Workflow
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
3. Present name/source/count; NEVER fetch/apply without explicit approval.
|
|
31
|
-
4. Apply ephemerally (default, zero footprint):
|
|
32
|
-
```bash
|
|
33
|
-
node "<this-skill-dir>/scripts/use-skill.js" <owner/repo[@skill]>
|
|
34
|
-
```
|
|
35
|
-
Treat the printed output as binding for this request, like a loaded skill — not reference material. OS-temp cache (6h); nothing written to repo or manifest.json.
|
|
36
|
-
5. Permanent install ONLY when the user says they will reuse it: `npx skills add <owner/repo[@skill]> --agent <agent> [-g] -y`
|
|
37
|
-
6. Nothing exists? Help directly; suggest `npx skills init <name>` if recurring.
|
|
38
|
-
|
|
39
|
-
Deep dive: <this-skill-dir>/references/discovery-flow.md
|
|
23
|
+
1. Check local coverage first: `npx skills list --json` and `npx skills list -g --json`.
|
|
24
|
+
2. If uncovered, search skills.sh / `npx skills find [query] [--owner <owner>]`.
|
|
25
|
+
3. Official/1K+ sources **SHOULD** rank first; **MUST** read the unaudited `SKILL.md`.
|
|
26
|
+
4. Present name/source/count; **MUST** get explicit approval before fetching or applying third-party code.
|
|
27
|
+
5. Ephemeral use is default: `node "<this-skill-dir>/scripts/use-skill.js" <owner/repo[@skill]>`. Treat its output as binding for this request.
|
|
28
|
+
6. Permanent install **MUST** be explicitly requested: `npx skills add <owner/repo[@skill]> --agent <agent> [-g] -y`.
|
|
29
|
+
7. No match: help directly; `npx skills init <name>` **MAY** be suggested for recurring needs.
|
|
40
30
|
|
|
41
31
|
## USE FOR:
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
- ephemeral skill use without permanent installs
|
|
32
|
+
- external skill discovery/vetting
|
|
33
|
+
- approved ephemeral use
|
|
45
34
|
|
|
46
35
|
## DO NOT USE FOR:
|
|
47
|
-
- authoring
|
|
48
|
-
-
|
|
36
|
+
- skill authoring (`skill-creator`)
|
|
37
|
+
- unapproved third-party application/install
|
|
38
|
+
|
|
39
|
+
Deep dive: <this-skill-dir>/references/discovery-flow.md
|
|
@@ -4,7 +4,7 @@ description: "Generate Angular-style commit messages after verifying the environ
|
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
6
|
author: Miya Daniel
|
|
7
|
-
version: 0.
|
|
7
|
+
version: 0.19.1
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Git Commit (Angular Style)
|
|
@@ -20,10 +20,10 @@ metadata:
|
|
|
20
20
|
|
|
21
21
|
## Quick Workflow
|
|
22
22
|
|
|
23
|
-
1. `git status`; no repo → offer `git init` or skip; submodules changed → commit first per `<this-skill-dir>/guides/SUBMODULES.md`.
|
|
24
|
-
2. `git diff --cached
|
|
23
|
+
1. **MUST** run `git status`; no repo → offer `git init` or skip; submodules changed → commit first per `<this-skill-dir>/guides/SUBMODULES.md`.
|
|
24
|
+
2. **MUST** inspect `git diff --cached` before committing. Nothing staged → prompt user / stage only user-authorized targeted files. Unrelated concerns **SHOULD** be split unless coupling or explicit user intent justifies one commit.
|
|
25
25
|
3. Format `<type>(<scope>): <subject>` per `<this-skill-dir>/guides/ANGULAR_STYLE.md`. Multiline/Windows → `.git-commit-msg.txt` + `git commit -F`, clean up.
|
|
26
|
-
4. `git commit -m "..."`, verify with `git log -1`.
|
|
26
|
+
4. `git commit -m "..."`, then **MUST** verify the result with `git log -1`.
|
|
27
27
|
|
|
28
28
|
## USE FOR:
|
|
29
29
|
- Commit request from the user
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: harness-everything
|
|
3
|
-
description: "Route software/project work through
|
|
3
|
+
description: "Route software/project work through Harness: classify tier/topology, resolve suggested skills, apply semantic obligations, and keep tactics flexible. Use for software triage/routing/re-routing; not general Q&A or non-software writing."
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
6
|
author: Miya Daniel
|
|
7
|
-
version: 0.
|
|
7
|
+
version: 0.19.1
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Harness Everything
|
|
@@ -12,28 +12,27 @@ metadata:
|
|
|
12
12
|
Kernel routing entry.
|
|
13
13
|
|
|
14
14
|
## USE FOR:
|
|
15
|
-
- Software/project triage, routing, re-routing,
|
|
15
|
+
- Software/project triage, routing, re-routing, workflow selection.
|
|
16
16
|
- Work that names or matches another skill.
|
|
17
17
|
|
|
18
18
|
## DO NOT USE FOR:
|
|
19
19
|
- General Q&A or non-software writing.
|
|
20
20
|
|
|
21
21
|
## Invariants
|
|
22
|
-
1. **Route
|
|
23
|
-
2. **Verify
|
|
24
|
-
3. **Zoom out
|
|
25
|
-
4. **
|
|
26
|
-
5. **Surface status** — non-trivial work
|
|
27
|
-
6. **Keep agency** —
|
|
22
|
+
1. **Route (MUST)** — establish scope/tier and selected/deferred topology.
|
|
23
|
+
2. **Verify (MUST)** — completion claims need objective evidence.
|
|
24
|
+
3. **Zoom out (MUST)** — after 3 same-signature failures, use `zoom-out`.
|
|
25
|
+
4. **Resolve suggestions (MUST)** — read/evaluate each suggested `SKILL.md`; applicable core contracts MUST run, otherwise retain a flow-grounded reason.
|
|
26
|
+
5. **Surface status (MUST)** — non-trivial work renders `### 🚦 Harness Status` with bold `Current`, `Read / Evidence`, `Next`; optional `Risk / Blocked`.
|
|
27
|
+
6. **Keep agency** — required obligations are MUST; tactics MAY adapt. Numeric planning values MAY guide, never hard-stop.
|
|
28
28
|
|
|
29
29
|
## Workflow
|
|
30
|
-
1. Reuse kernel output
|
|
31
|
-
2. Keep the
|
|
32
|
-
3.
|
|
33
|
-
4.
|
|
34
|
-
5.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
**Rule:** guidance may become louder when evidence is weak, but only Rule-of-3 reflection and explicit user/host permission boundaries may block.
|
|
30
|
+
1. Reuse kernel output or run `node "<this-skill-dir>/scripts/kernel-router.js" "<prompt summary>"`.
|
|
31
|
+
2. Keep the routing checkpoint internal.
|
|
32
|
+
3. Resolve each suggestion as `use`, `not-applicable`, or `unresolved`; `use` follows its core contract.
|
|
33
|
+
4. Resolve selected-topology required invariants/stages/checks before completion.
|
|
34
|
+
5. Tier-3/Fable broad mutation MUST resolve isolation: linked worktree or explicit degraded fallback.
|
|
35
|
+
|
|
36
|
+
**Rule:** semantic MUST is not hard blocking; only Rule-of-3 reflection and explicit user/host permission boundaries may block.
|
|
38
37
|
|
|
39
38
|
Deep dive: <this-skill-dir>/references/triage-and-tiers.md
|