harness-everything 0.11.5 → 0.11.7
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/CHANGELOG.md +32 -0
- package/README.md +7 -3
- package/ci/mechanism-2a-rule-of-3.test.js +71 -0
- package/ci/mechanism-2ah-workflow-lifecycle.test.js +314 -8
- package/ci/mechanism-2c-state-persist.test.js +45 -2
- package/ci/mechanism-2t-issue-20.test.js +0 -8
- package/ci/mechanism-30-opencode-plugin-loadability.test.js +39 -7
- package/docs/architecture.md +17 -0
- package/docs/audit.md +52 -5
- package/docs/release-evidence.md +3 -0
- package/docs/workflow-runtime.md +13 -0
- package/docs/workflows/environment-detection.md +47 -37
- package/docs/workflows/eval-harness.md +45 -38
- package/docs/workflows/fable-discipline.md +45 -33
- package/docs/workflows/git-commit.md +53 -45
- package/docs/workflows/grill-me.md +36 -38
- package/docs/workflows/grill-with-docs.md +36 -46
- package/docs/workflows/harness-everything.md +59 -57
- package/docs/workflows/improve-codebase-architecture.md +36 -44
- package/docs/workflows/install-cognitive-os.md +36 -29
- package/docs/workflows/repo-docs.md +29 -40
- package/docs/workflows/rewrite-commits.md +40 -36
- package/docs/workflows/security-review.md +34 -53
- package/docs/workflows/skill-creator.md +39 -56
- package/docs/workflows/skill-style.md +35 -40
- package/docs/workflows/using-git-worktrees.md +40 -44
- package/docs/workflows/verification-loop.md +43 -48
- package/docs/workflows/verify-before-claim.md +37 -40
- package/docs/workflows/zoom-out.md +39 -51
- package/harness-everything/SKILL.md +1 -1
- package/harness-everything/scripts/kernel-router.js +38 -10
- package/hooks/hooks.json +25 -1
- package/hooks/scripts/lib/workflow-isolation.js +111 -6
- package/hooks/scripts/lib/workflow-runtime.js +138 -2
- package/hooks/scripts/rule-of-3-tracker.js +17 -9
- package/hooks/scripts/state-persist.js +52 -9
- package/hooks/scripts/workflow-gate.js +22 -7
- package/hooks/scripts/workflow-mutation-denied.js +17 -0
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/hooks/hooks.json +1 -1
- package/plugins/harness-everything/hooks/scripts/lib/workflow-isolation.js +111 -6
- package/plugins/harness-everything/hooks/scripts/lib/workflow-runtime.js +138 -2
- package/plugins/harness-everything/hooks/scripts/rule-of-3-tracker.js +17 -9
- package/plugins/harness-everything/hooks/scripts/state-persist.js +52 -9
- package/plugins/harness-everything/hooks/scripts/workflow-gate.js +22 -7
- package/plugins/harness-everything/hooks/scripts/workflow-mutation-denied.js +17 -0
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +1 -1
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +38 -10
- package/docs/issue-20-rollup.md +0 -47
- package/docs/reviews/pr-142-issue-131.md +0 -89
|
@@ -1,80 +1,63 @@
|
|
|
1
1
|
# Workflow: Skill Creator
|
|
2
2
|
|
|
3
|
-
> Authors, audits, and
|
|
3
|
+
> Authors, audits, and refactors SKILL.md files against the Skill Contract quality bar — for new skills, SKILL.md refactors, overlap checks, and packaging insights as dynamic skills.
|
|
4
|
+
|
|
5
|
+
Source of truth: `skill-creator/SKILL.md`.
|
|
4
6
|
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
## 1. Skill Behavior Workflow
|
|
8
10
|
|
|
9
|
-
This section visualizes how the `skill-creator` skill executes internally, detailing the sequence of operations, state transitions, and evaluation steps.
|
|
10
|
-
|
|
11
11
|
```mermaid
|
|
12
12
|
graph TD
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Checklist -->|Passes| Route{Static or dynamic?}
|
|
20
|
-
Route -->|Static| Register["Register: harness-everything §5 row + tier-router.js keyword line"]
|
|
21
|
-
Route -->|Dynamic, from self-evolve| DynamicContract["§4 Dynamic Skill Generation Contract: write to .claude/harness-everything/skills/generated/<name>/ & register-dynamic-skill.js to manifest.json, metadata.type=dynamic, status=draft"]
|
|
22
|
-
Register --> End([Skill live in the repo, single source of truth for its own description])
|
|
23
|
-
DynamicContract --> End
|
|
13
|
+
NewReq["Trigger: new skill, SKILL.md audit, or self-evolve packaging"] --> DupGrep["Grep registry for near-duplicates; when-to-fire sentence becomes description"]
|
|
14
|
+
DupGrep --> DraftContract["Draft Contract table first, then USE FOR and DO NOT USE FOR, then steps or flat reference"]
|
|
15
|
+
DraftContract --> PushRef["Push branch-only detail to references/"]
|
|
16
|
+
PushRef --> ABTest["A/B-test via multi-agent-workspace subagents; read both transcripts"]
|
|
17
|
+
ABTest --> QualityGate["Quality Checklist gate before registering"]
|
|
18
|
+
QualityGate --> RegisterOut["Output: SKILL.md passing Quality Checklist; writes SKILL.md and updates registry or generated folder"]
|
|
24
19
|
```
|
|
25
20
|
|
|
26
|
-
|
|
21
|
+
```mermaid
|
|
22
|
+
graph TD
|
|
23
|
+
DynamicReq["Dynamic path: only generalizable procedures qualify"] --> SimpleRule["Simple constraints go to memories/repo/RULES.md"]
|
|
24
|
+
SimpleRule --> DynLoc["Location: workspace/.claude/harness-everything/skills/generated/kebab-case-name/SKILL.md"]
|
|
25
|
+
DynLoc --> DynFront["Frontmatter: triggers, type generated, source, status draft"]
|
|
26
|
+
DynFront --> DynLife["Lifecycle: draft to active after firing elsewhere; deprecate, do not delete; promote once proven general"]
|
|
27
|
+
```
|
|
27
28
|
|
|
28
29
|
## 2. Triggering and Routing Path
|
|
29
30
|
|
|
30
|
-
This diagram illustrates how `skill-creator` is triggered through user requests or developer actions, and how it integrates or chains together with other companion skills in the Harness OS ecosystem to form unified workflows.
|
|
31
|
-
|
|
32
31
|
```mermaid
|
|
33
32
|
graph LR
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Evolve["self-evolve / SKILL.md §4"] -->|LLM decides to promote insight| Creator
|
|
39
|
-
Creator -->|Writes dynamic skills to| Generated[".claude/harness-everything/skills/generated/"]
|
|
40
|
-
Generated -->|Registered in| Manifest["manifest.json 'generated' registry"]
|
|
41
|
-
Manifest -->|Matched & auto-loaded by| Router
|
|
33
|
+
CreateReq["Create a skill from scratch"] --> CreatorSkill["skill-creator / SKILL.md"]
|
|
34
|
+
AuditReq["Audit or refactor a SKILL.md; check overlap"] --> CreatorSkill
|
|
35
|
+
PackageReq["Packaging a session insight as a dynamic skill"] --> CreatorSkill
|
|
36
|
+
CreatorSkill --> ChecklistOut["Gate: Quality Checklist, incl. USE FOR and DO NOT USE FOR"]
|
|
42
37
|
```
|
|
43
38
|
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## 3. Real-World Use Case Flowchart
|
|
47
|
-
|
|
48
|
-
Here we model concrete real-world scenarios and use cases of the `skill-creator` skill, illustrating standard success paths, error handling, or recovery loops — one for a human-directed static skill, one for `self-evolve`'s dynamic path.
|
|
49
|
-
|
|
50
39
|
```mermaid
|
|
51
|
-
graph
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
Check1 -->|No| Fix1["Fix flagged item, re-test"]
|
|
57
|
-
Fix1 --> Check1
|
|
58
|
-
Check1 -->|Yes| Reg1["Add row to harness-everything §5 + one line to tier-router.js"]
|
|
59
|
-
Reg1 --> Done1([deploy-aws/SKILL.md live as a static, reviewed skill])
|
|
60
|
-
|
|
61
|
-
Start2["zoom-out recovery ends: root cause found for a recurring connection-pool exhaustion bug"] --> Decide2{"LLM: Does it warrant a standalone complex skill?"}
|
|
62
|
-
Decide2 -->|No: Simple Tip| Save2["persist-memory.js writes simple rule to RULES.md"]
|
|
63
|
-
Decide2 -->|Yes: Complex Skill| Trigger2["self-evolve §3 Step 3: Promote to Dynamic Skill"]
|
|
64
|
-
Trigger2 --> Load2["self-evolve MUST load skill-creator §4 before writing anything"]
|
|
65
|
-
Load2 --> Gate2{Quality Checklist §3 passes?}
|
|
66
|
-
Gate2 -->|No| Reject2["Do not persist — this checklist is the only review a dynamic skill gets"]
|
|
67
|
-
Gate2 -->|Yes| Write2["Write .claude/harness-everything/skills/generated/orm-transaction-batching/SKILL.md & run register-dynamic-skill.js"]
|
|
68
|
-
Write2 --> Done2([Dynamic skill available next session via manifest registration and tier-router.js scan])
|
|
69
|
-
Save2 --> Done3([Simple memory rule available in RULES.md])
|
|
40
|
+
graph LR
|
|
41
|
+
CreatorSkill2["skill-creator / SKILL.md"] -->|A-B tests with| MultiAgent["multi-agent-workspace subagents"]
|
|
42
|
+
NonSkillDocs["Non-skill project docs"] -->|Use instead| RepoDocs["repo-docs or to-spec"]
|
|
43
|
+
ThirdParty["Third-party skill discovery"] -->|Use instead| FindSkills["find-skills"]
|
|
44
|
+
StyleOnly["Code style outside SKILL.md files"] -->|Out of scope| NotCreator["Not skill-creator"]
|
|
70
45
|
```
|
|
71
46
|
|
|
72
|
-
|
|
47
|
+
## 3. Real-World Use Case
|
|
73
48
|
|
|
74
|
-
|
|
49
|
+
A team wants a new `deploy-preview` skill. The author greps the registry for near-duplicates, writes the when-to-fire sentence as the description, drafts the Contract table first with its enforcement gate, then `USE FOR` and `DO NOT USE FOR`, then the steps, pushing long detail to `references/`. They A/B-test via `multi-agent-workspace` subagents, read both transcripts, run the Quality Checklist (`skill-creator/references/quality-checklist.md`), and only then register. A separate small tip discovered mid-session does not qualify as a dynamic skill and goes to `<workspace>/memories/repo/RULES.md`.
|
|
75
50
|
|
|
76
|
-
|
|
51
|
+
## 4. Verification Check
|
|
77
52
|
|
|
78
|
-
- [ ]
|
|
79
|
-
- [ ]
|
|
80
|
-
- [ ]
|
|
53
|
+
- [ ] Registry grep for near-duplicates completed; description written as the when-to-fire sentence
|
|
54
|
+
- [ ] Contract table drafted first to force the enforcement gate
|
|
55
|
+
- [ ] `USE FOR` and `DO NOT USE FOR` present before steps or flat reference
|
|
56
|
+
- [ ] Branch-only detail pushed to `references/` (e.g. `skill-creator/references/quality-checklist.md`)
|
|
57
|
+
- [ ] A/B-tested via `multi-agent-workspace` subagents and both transcripts read
|
|
58
|
+
- [ ] Quality Checklist passed before registering, including `USE FOR` / `DO NOT USE FOR` consistency
|
|
59
|
+
- [ ] Output is a SKILL.md passing the Quality Checklist; `<skill>/SKILL.md` written and registry or generated folder updated
|
|
60
|
+
- [ ] Dynamic path gated by Quality Checklist first; location, frontmatter triggers, generated type, and draft status correct
|
|
61
|
+
- [ ] Dynamic lifecycle respected: draft to active after firing elsewhere; deprecate, do not delete; promote once proven general
|
|
62
|
+
- [ ] Only generalizable procedures kept as skills; simple constraints sent to `<workspace>/memories/repo/RULES.md`
|
|
63
|
+
- [ ] Not misused for non-skill docs, third-party discovery, or code style outside SKILL.md files
|
|
@@ -1,64 +1,59 @@
|
|
|
1
1
|
# Workflow: Skill Style
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Applies the Harness writing standard to SKILL.md files — covering new skills, structure reviews, naming and frontmatter conventions, tone, formatting, and progressive disclosure across the catalog.
|
|
4
|
+
|
|
5
|
+
Source of truth: `skill-style/SKILL.md`.
|
|
4
6
|
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
## 1. Skill Behavior Workflow
|
|
8
10
|
|
|
9
|
-
This section visualizes how the `skill-style` skill executes internally, detailing the sequence of operations, state transitions, and evaluation steps.
|
|
10
|
-
|
|
11
11
|
```mermaid
|
|
12
12
|
graph TD
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
FormatApproved -->|Yes| SaveSkillFile["Commit clean, validated SKILL.md"]
|
|
20
|
-
FixSkillFile --> SaveSkillFile
|
|
21
|
-
SaveSkillFile --> End([Skill document aligned with professional guidelines])
|
|
13
|
+
TriggerEdit["Trigger: creating, reviewing, or refactoring a Harness SKILL.md"] --> FrontAccurate["Keep frontmatter accurate and description routeable"]
|
|
14
|
+
FrontAccurate --> OrderCheck["Include in order: title, introduction, Skill Contract, usage, actionable rules"]
|
|
15
|
+
OrderCheck --> ImperativeGate["Use imperative language and name the enforcing command or gate"]
|
|
16
|
+
ImperativeGate --> OverlapCheck["Avoid overlap with OS-layer routing or domain expertise"]
|
|
17
|
+
OverlapCheck --> ConsistencyGate["Gate: npm run test:consistency plus style-guide review"]
|
|
18
|
+
ConsistencyGate --> ConciseOut["Output: concise, complete, non-overlapping SKILL.md"]
|
|
22
19
|
```
|
|
23
20
|
|
|
24
|
-
|
|
21
|
+
```mermaid
|
|
22
|
+
graph TD
|
|
23
|
+
StyleGuide["Deep dive: skill-style/references/style-guide.md"] --> ToneFormat["Standardize tone, formatting, and progressive disclosure"]
|
|
24
|
+
ToneFormat --> NoMutate["State mutations: none; writing and review standard only"]
|
|
25
|
+
NoMutate --> OverlapAvoid["No overlap with existing catalog entries"]
|
|
26
|
+
```
|
|
25
27
|
|
|
26
28
|
## 2. Triggering and Routing Path
|
|
27
29
|
|
|
28
|
-
This diagram illustrates how `skill-style` is reached — as of the `skill-creator` split, it is no longer the first stop. `tier-router.js`'s `/\bskill\b|skill\.md|new skill|write a skill/` match now recommends `skill-creator` first (the full authoring/audit/testing workflow) and `skill-style` second (the terse Skill Contract table shape it builds on) — see `harness-everything/scripts/tier-router.js`.
|
|
29
|
-
|
|
30
30
|
```mermaid
|
|
31
31
|
graph LR
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
NewSkillReq["Creating a new SKILL.md file"] --> StyleSkill["skill-style / SKILL.md"]
|
|
33
|
+
RefactorReq["Refactoring or reviewing an existing SKILL.md"] --> StyleSkill
|
|
34
|
+
ToneReq["Deciding tone, structure, or enforcement style"] --> StyleSkill
|
|
35
|
+
OverlapReq["Checking overlap with an existing skill"] --> StyleSkill
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## 3. Real-World Use Case Flowchart
|
|
41
|
-
|
|
42
|
-
§1 already walks the linear audit steps for a single file. This section instead shows the case that motivated splitting `skill-creator` out of this skill in the first place: a developer who needs the *fuller* workflow, not just the table shape.
|
|
43
|
-
|
|
44
38
|
```mermaid
|
|
45
|
-
graph
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
StyleCheck -->|Missing/malformed table| Fix["Fix table shape per skill-style, re-run skill-creator's Quality Checklist"]
|
|
50
|
-
StyleCheck -->|Table shape OK| Checklist["skill-creator §3 Quality Checklist: no-op / duplication / negation / progressive-disclosure checks"]
|
|
51
|
-
Fix --> Checklist
|
|
52
|
-
Checklist --> Register["Register in harness-everything §5 + tier-router.js (skill-creator §2 Step 4)"]
|
|
53
|
-
Register --> Done([deploy-aws/SKILL.md committed, consistent with the rest of the repo])
|
|
39
|
+
graph LR
|
|
40
|
+
StyleSkill2["skill-style / SKILL.md"] -->|For intent interviews, drafting, prompt tests| CreatorSkill["skill-creator / SKILL.md"]
|
|
41
|
+
DynRoute["Routing rules for dynamically generated mid-session skills"] -->|Owned by| SelfEvolve["self-evolve"]
|
|
42
|
+
NonHarness["Non-Harness skill formats outside harness-everything"] -->|Out of scope| NotStyle["Not skill-style"]
|
|
54
43
|
```
|
|
55
44
|
|
|
56
|
-
|
|
45
|
+
## 3. Real-World Use Case
|
|
57
46
|
|
|
58
|
-
|
|
47
|
+
An author drafts a new `backup-restore` SKILL.md and runs a style pass. They tighten the frontmatter description for routing, reorder the file to title, introduction, Skill Contract, usage, and actionable rules, rewrite vague advice in imperative language naming `npm run test:consistency` as the gate, remove duplicated routing already owned elsewhere, and check `skill-style/references/style-guide.md`. Intent interviewing and prompt testing are handed to `skill-creator/SKILL.md` per the Core Rules.
|
|
59
48
|
|
|
60
|
-
|
|
49
|
+
## 4. Verification Check
|
|
61
50
|
|
|
62
|
-
- [ ]
|
|
63
|
-
- [ ]
|
|
64
|
-
- [ ]
|
|
51
|
+
- [ ] Frontmatter accurate and description routeable
|
|
52
|
+
- [ ] File includes in order: title, introduction, Skill Contract, usage, and actionable rules
|
|
53
|
+
- [ ] Imperative language used with the enforcing command or gate named (`npm run test:consistency` plus style-guide review)
|
|
54
|
+
- [ ] No overlap with OS-layer routing or domain expertise; catalog overlap checked
|
|
55
|
+
- [ ] Tone, formatting, and progressive disclosure standardized per `skill-style/references/style-guide.md`
|
|
56
|
+
- [ ] State mutations are none — treated as a writing and review standard only
|
|
57
|
+
- [ ] Intent interviews, drafting, and prompt tests routed to `skill-creator/SKILL.md`, not handled here
|
|
58
|
+
- [ ] Routing rules for dynamically generated mid-session skills left to `self-evolve`
|
|
59
|
+
- [ ] Not applied to non-Harness skill formats outside `harness-everything`
|
|
@@ -1,67 +1,63 @@
|
|
|
1
1
|
# Workflow: Using Git Worktrees
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Start isolated when feature work needs it: prefer native worktree entry before implementation plans, with raw git worktree as fallback.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Source of truth: `using-git-worktrees/SKILL.md`.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Contract summary from SKILL.md — USE FOR: Tier 3 / Fable-class mutable engineering, feature work needing isolation, pre-implementation-plan setup. DO NOT USE FOR: nesting inside an existing worktree, read-only analysis with no mutation, branch/merge workflows unrelated to workspace isolation.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## 1. Skill Behavior Workflow
|
|
10
10
|
|
|
11
11
|
```mermaid
|
|
12
12
|
graph TD
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Setup --> RunBaseline["4. Verify Clean Test Baseline"]
|
|
24
|
-
RunBaseline --> End([Isolated Workspace Ready])
|
|
13
|
+
Detect[Step0 Detect Isolation] --> Isolated{Already Isolated?}
|
|
14
|
+
Isolated -->|git-dir differs from git-common-dir, no superproject| Setup[Step2 Setup Dependencies]
|
|
15
|
+
Isolated -->|same dirs or needs isolation| NestGuard{Nesting Check}
|
|
16
|
+
NestGuard -->|inside existing worktree| BlockedA[BLOCKED Never Nest]
|
|
17
|
+
NestGuard -->|top-level repo| Create[Step1 Create Enter Worktree]
|
|
18
|
+
Create -->|native EnterWorktree or worktree flag| Setup
|
|
19
|
+
Create -->|fallback git worktree add| Setup
|
|
20
|
+
Create -->|creation-entry failure| BlockedB[BLOCKED Major Mode]
|
|
21
|
+
Setup --> Baseline[Step3 Baseline Tests and Build]
|
|
22
|
+
Baseline --> Ready([Isolated Workspace Ready])
|
|
25
23
|
```
|
|
26
24
|
|
|
27
|
-
---
|
|
28
|
-
|
|
29
25
|
## 2. Triggering and Routing Path
|
|
30
26
|
|
|
31
|
-
This diagram illustrates how the `using-git-worktrees` skill is triggered through user requests or developer actions, and how it integrates or chains together with other companion skills in the Harness OS ecosystem to form unified workflows.
|
|
32
|
-
|
|
33
27
|
```mermaid
|
|
34
|
-
graph
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
graph TD
|
|
29
|
+
Tier3[Tier3 Fable Mutable Engineering] --> Skill[using-git-worktrees SKILL]
|
|
30
|
+
Feature[Feature Work Needing Isolation] --> Skill
|
|
31
|
+
PrePlan[Pre-Implementation Plan Setup] --> Skill
|
|
32
|
+
Skill --> SkillDetect[Detect Adapted Per environment-detection]
|
|
33
|
+
ReadOnly[Read-Only Analysis No Mutation] --> Decline[Do Not Route]
|
|
34
|
+
Nested[Nesting Inside Existing Worktree] --> Decline
|
|
35
|
+
BranchOnly[Branch Merge Unrelated To Isolation] --> Decline
|
|
36
|
+
SkillDetect --> IsolatedPath[Reuse Or Create Linked Worktree]
|
|
38
37
|
```
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## 3. Real-World Use Case Flowchart
|
|
43
|
-
|
|
44
|
-
Here we model concrete real-world scenarios and use cases of the `using-git-worktrees` skill, illustrating standard success paths, error handling, or recovery loops.
|
|
39
|
+
## 3. Real-World Use Case
|
|
45
40
|
|
|
46
41
|
```mermaid
|
|
47
42
|
graph TD
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
CloseWT --> Resume["Return to original billing workspace with all unsaved files exactly where they were"]
|
|
56
|
-
Resume --> Done([Context switched safely with zero stashing friction])
|
|
43
|
+
Request[Feature Branch Requested With Clean Isolation] --> Detect2[Run git rev-parse git-dir common-dir branch superproject]
|
|
44
|
+
Detect2 -->|not isolated| Enter[Enter Native Worktree Else git worktree add]
|
|
45
|
+
Enter --> Setup2[Install Dependencies As Needed]
|
|
46
|
+
Setup2 --> Base2[Run Relevant Tests and Build Before Mutation]
|
|
47
|
+
Base2 -->|pre-existing failures| Surface[Surface Failures Before Implementation]
|
|
48
|
+
Base2 -->|clean| Implement[Proceed With Implementation]
|
|
49
|
+
Surface --> Implement
|
|
57
50
|
```
|
|
58
51
|
|
|
59
|
-
|
|
52
|
+
Ordinary-mode note: only ordinary isolation-needing work may honor an explicit user preference to stay in place after a decline or unsupported environment. Major mode never falls back to the primary tree.
|
|
60
53
|
|
|
61
|
-
|
|
54
|
+
Deep dive: `using-git-worktrees/references/workflow-details.md`.
|
|
62
55
|
|
|
63
|
-
|
|
56
|
+
## 4. Verification Check
|
|
64
57
|
|
|
65
|
-
- [ ]
|
|
66
|
-
- [ ]
|
|
67
|
-
- [ ]
|
|
58
|
+
- [ ] Tier 3 / Fable-class source or artifact mutation occurs only in a verified isolated worktree; otherwise state is `BLOCKED`
|
|
59
|
+
- [ ] No worktree is nested inside an already isolated worktree
|
|
60
|
+
- [ ] Isolation detection used `git rev-parse --git-dir`, `git rev-parse --git-common-dir`, `git branch --show-current`, and `git rev-parse --show-superproject-working-tree`; a submodule counted as a normal repo
|
|
61
|
+
- [ ] Entry preferred native `EnterWorktree`, `/worktree`, or `--worktree` before `git worktree add "$path" -b "$BRANCH_NAME"`; major mode chose an already-ignored or external/sibling path
|
|
62
|
+
- [ ] Creation or entry failure yields `BLOCKED` in major mode; in-place continuation happened only in ordinary mode after explicit decline or unsupported environment
|
|
63
|
+
- [ ] Dependencies were installed as needed, then relevant tests/build ran in the isolated tree with pre-existing failures surfaced before mutation
|
|
@@ -1,71 +1,66 @@
|
|
|
1
1
|
# Workflow: Verification Loop
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Run the objective gates — build, types, lint, tests, security, diff — and only claim done when the evidence-backed report passes.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Source of truth: `verification-loop/SKILL.md`.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Contract summary from SKILL.md — Trigger: completed implementation or change awaiting delivery. Output: evidence-backed verification report and delivery decision. USE FOR: verify a feature or change before delivery, run quality gates before a PR. DO NOT USE FOR: fixing failures without re-running the loop, writing new features or tests (use `tdd`).
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## 1. Skill Behavior Workflow
|
|
10
10
|
|
|
11
11
|
```mermaid
|
|
12
12
|
graph TD
|
|
13
|
-
Start
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
ScriptReport --> CheckGate{All Verification Gates Passed?}
|
|
25
|
-
DirectReport --> CheckGate
|
|
26
|
-
|
|
27
|
-
CheckGate -->|No| FixIssues["Fix Issues in Code & Re-verify"] --> RunBuild
|
|
28
|
-
CheckGate -->|Yes| End([Pre-PR Verification Gate Cleared])
|
|
13
|
+
Start[Completed Change Awaiting Delivery] --> Build[Gate1 Build npm run build]
|
|
14
|
+
Build --> Types[Gate2 Types tsc noEmit or pyright]
|
|
15
|
+
Types --> Lint[Gate3 Lint npm run lint or ruff]
|
|
16
|
+
Lint --> Tests[Gate4 Tests npm run test coverage]
|
|
17
|
+
Tests --> Security[Gate5 Security Secrets StrayLogs]
|
|
18
|
+
Security --> Diff[Gate6 Diff git diff stat]
|
|
19
|
+
Diff --> Report[Fill verification-report template]
|
|
20
|
+
Report --> Decision{All Gates Pass?}
|
|
21
|
+
Decision -->|yes| Deliver([Delivery Decision Ready])
|
|
22
|
+
Decision -->|no| Fix[Fix Cause Rerun From First Affected Gate]
|
|
23
|
+
Fix --> Build
|
|
29
24
|
```
|
|
30
25
|
|
|
31
|
-
---
|
|
32
|
-
|
|
33
26
|
## 2. Triggering and Routing Path
|
|
34
27
|
|
|
35
|
-
This diagram illustrates how the `verification-loop` skill is triggered through user requests or developer actions, and how it integrates or chains together with other companion skills in the Harness OS ecosystem to form unified workflows.
|
|
36
|
-
|
|
37
28
|
```mermaid
|
|
38
|
-
graph
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
graph TD
|
|
30
|
+
VerifyReq[Run Full Verification Loop Request] --> Skill[verification-loop SKILL]
|
|
31
|
+
DeliveryReq[Verify Before Delivery Request] --> Skill
|
|
32
|
+
PRReq[Quality Gates Before PR] --> Skill
|
|
33
|
+
DesignOnly[Design Discussion No Completed Work] --> Decline[Do Not Route]
|
|
34
|
+
PlanOnly[Planning Without Code Changes] --> Decline
|
|
35
|
+
NewWork[Write New Features Tests] --> TDD[tdd SKILL]
|
|
36
|
+
Skill --> Gates[Build Type Lint Test Security Diff]
|
|
43
37
|
```
|
|
44
38
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
## 3. Real-World Use Case Flowchart
|
|
48
|
-
|
|
49
|
-
Here we model concrete real-world scenarios and use cases of the `verification-loop` skill, illustrating standard success paths, error handling, or recovery loops.
|
|
39
|
+
## 3. Real-World Use Case
|
|
50
40
|
|
|
51
41
|
```mermaid
|
|
52
42
|
graph TD
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
43
|
+
Done[Feature Implemented Awaiting PR] --> B[Run npm run build]
|
|
44
|
+
B -->|pass| T[Run npx tsc noEmit]
|
|
45
|
+
T -->|fail| FixT[Fix Type Errors]
|
|
46
|
+
FixT --> B
|
|
47
|
+
T -->|pass| L[Run npm run lint]
|
|
48
|
+
L -->|pass| TS[Run npm run test coverage]
|
|
49
|
+
TS -->|pass| Sec[Check Secrets And Stray Logs]
|
|
50
|
+
Sec --> D[Check git diff stat For Unintended Changes]
|
|
51
|
+
D --> R[Fill templates verification-report template md]
|
|
52
|
+
R --> PR[Report Evidence And Delivery Decision]
|
|
61
53
|
```
|
|
62
54
|
|
|
63
|
-
|
|
55
|
+
Template: `verification-loop/templates/verification-report.template.md`. Deep dive: `verification-loop/references/verification-phases.md`.
|
|
64
56
|
|
|
65
57
|
## 4. Verification Check
|
|
66
58
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
- [ ]
|
|
70
|
-
- [ ]
|
|
71
|
-
- [ ]
|
|
59
|
+
- [ ] No completion was claimed until every applicable gate passed
|
|
60
|
+
- [ ] Build gate ran (`npm run build`) with evidence recorded
|
|
61
|
+
- [ ] Type gate ran (`npx tsc --noEmit` or `pyright .`) with evidence recorded
|
|
62
|
+
- [ ] Lint gate ran (`npm run lint` or `ruff check .`) with evidence recorded
|
|
63
|
+
- [ ] Test and coverage gate ran (`npm run test -- --coverage`) with evidence recorded
|
|
64
|
+
- [ ] Security gate checked secrets and stray logs with evidence recorded
|
|
65
|
+
- [ ] Diff gate checked `git diff --stat` and unintended changes with evidence recorded
|
|
66
|
+
- [ ] `templates/verification-report.template.md` was filled with evidence, and any failure was fixed then rerun from the first affected gate rather than patched without a rerun
|
|
@@ -1,64 +1,61 @@
|
|
|
1
1
|
# Workflow: Verify Before Claim
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Check external framework, SDK, CLI, and API claims plus any unmeasured performance or cost numbers against an authoritative source, then deliver a cited claim, a real measurement, or a labeled estimate.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Source of truth: `verify-before-claim/SKILL.md`.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Contract summary from SKILL.md — Trigger: external behavior, version/config/exit-code claim, or unmeasured number. Output: official citation, real measurement, or explicitly labeled estimate. State mutation: none; evidence travels with the claim. Gate: official source or real measurement; unresolved claims stay inconclusive. USE FOR: stating how an external framework, SDK, CLI tool, or API behaves; quoting performance, cost, latency, or timing numbers; answering "does X support Y" or version-specific questions; citing defaults, exit codes, config flags, pricing, or rate limits. DO NOT USE FOR: claims about this repository's own code, facts the user supplied directly, generic CS knowledge such as Big-O.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## 1. Skill Behavior Workflow
|
|
10
10
|
|
|
11
11
|
```mermaid
|
|
12
12
|
graph TD
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
EstimateFallback --> End
|
|
13
|
+
Claim[External Claim Or Unmeasured Number] --> Scope{Claim Scope?}
|
|
14
|
+
Scope -->|this repo own code| Local[Read Local Source Report Observed Facts]
|
|
15
|
+
Scope -->|external behavior or number| Official[Consult Official Docs First]
|
|
16
|
+
Official --> Numbers{Needs Number?}
|
|
17
|
+
Numbers -->|yes| Measure[Real Measurement Or Labeled Estimate]
|
|
18
|
+
Numbers -->|no| Cite[Return Cited Claim]
|
|
19
|
+
Measure --> Output[Claim With Evidence]
|
|
20
|
+
Cite --> Output
|
|
21
|
+
Local --> Output2[Fact From Source]
|
|
22
|
+
Official -->|contradiction or missing evidence| Inconclusive[Report Inconclusive]
|
|
24
23
|
```
|
|
25
24
|
|
|
26
|
-
---
|
|
27
|
-
|
|
28
25
|
## 2. Triggering and Routing Path
|
|
29
26
|
|
|
30
|
-
This diagram illustrates how the `verify-before-claim` skill is triggered through user requests or developer actions, and how it integrates or chains together with other companion skills in the Harness OS ecosystem to form unified workflows.
|
|
31
|
-
|
|
32
27
|
```mermaid
|
|
33
|
-
graph
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
graph TD
|
|
29
|
+
ExtBehave[State External Framework SDK CLI API Behavior] --> Skill[verify-before-claim SKILL]
|
|
30
|
+
PerfNum[Quote Perf Cost Latency Timing] --> Skill
|
|
31
|
+
SupportQ[Does X Support Y Version Question] --> Skill
|
|
32
|
+
ConfigQ[Cite Default ExitCode Flag Pricing Limit] --> Skill
|
|
33
|
+
OwnCode[Claim About This Repo Own Code] --> LocalSrc[Read Actual Source]
|
|
34
|
+
UserFact[Fact User Supplied Directly] --> Decline[Do Not Route]
|
|
35
|
+
GenericCS[Generic CS Knowledge BigO] --> Decline
|
|
36
|
+
Skill --> Cited[Cited Claim Or Measurement Or Estimate]
|
|
38
37
|
```
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## 3. Real-World Use Case Flowchart
|
|
39
|
+
## 3. Real-World Use Case
|
|
43
40
|
|
|
44
|
-
|
|
41
|
+
A developer is about to assert a version-specific SDK default and a latency number in a design note. The skill routes the default to official documentation for a citation, routes the latency claim to a real measurement, and labels the value an estimate when no run exists. If sources contradict each other or no authoritative source exists, the result is reported as inconclusive rather than asserted as certain, even under time pressure.
|
|
45
42
|
|
|
46
43
|
```mermaid
|
|
47
44
|
graph TD
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
UpdateCode --> Done([Potential production runtime crash prevented])
|
|
45
|
+
Draft[Draft Asserts SDK Default And Latency] --> CheckDocs[Check Official Docs For Default]
|
|
46
|
+
CheckDocs --> CheckNum[Require Real Measurement For Number]
|
|
47
|
+
CheckNum -->|measured| Cited2[Cited Default Plus Measured Number]
|
|
48
|
+
CheckNum -->|no run| Labeled[Labeled Estimate]
|
|
49
|
+
CheckDocs -->|conflict or gap| Inconc[Inconclusive Report]
|
|
54
50
|
```
|
|
55
51
|
|
|
56
|
-
|
|
52
|
+
Deep dive: `verify-before-claim/references/verification-guide.md`.
|
|
57
53
|
|
|
58
54
|
## 4. Verification Check
|
|
59
55
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
- [ ]
|
|
63
|
-
- [ ]
|
|
64
|
-
- [ ]
|
|
56
|
+
- [ ] Local-repository claims were settled by reading the actual source, not by external citation
|
|
57
|
+
- [ ] External framework, SDK, CLI, or API behavior used official documentation first with a citation
|
|
58
|
+
- [ ] Performance, cost, latency, or timing numbers came from a real measurement or were explicitly labeled as estimates
|
|
59
|
+
- [ ] Defaults, exit codes, config flags, pricing, and rate limits were cited rather than asserted from memory
|
|
60
|
+
- [ ] Contradictions or missing evidence were reported as inconclusive
|
|
61
|
+
- [ ] No unverified external fact was claimed as certain, even under time pressure
|