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.
Files changed (55) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +32 -0
  4. package/README.md +7 -3
  5. package/ci/mechanism-2a-rule-of-3.test.js +71 -0
  6. package/ci/mechanism-2ah-workflow-lifecycle.test.js +314 -8
  7. package/ci/mechanism-2c-state-persist.test.js +45 -2
  8. package/ci/mechanism-2t-issue-20.test.js +0 -8
  9. package/ci/mechanism-30-opencode-plugin-loadability.test.js +39 -7
  10. package/docs/architecture.md +17 -0
  11. package/docs/audit.md +52 -5
  12. package/docs/release-evidence.md +3 -0
  13. package/docs/workflow-runtime.md +13 -0
  14. package/docs/workflows/environment-detection.md +47 -37
  15. package/docs/workflows/eval-harness.md +45 -38
  16. package/docs/workflows/fable-discipline.md +45 -33
  17. package/docs/workflows/git-commit.md +53 -45
  18. package/docs/workflows/grill-me.md +36 -38
  19. package/docs/workflows/grill-with-docs.md +36 -46
  20. package/docs/workflows/harness-everything.md +59 -57
  21. package/docs/workflows/improve-codebase-architecture.md +36 -44
  22. package/docs/workflows/install-cognitive-os.md +36 -29
  23. package/docs/workflows/repo-docs.md +29 -40
  24. package/docs/workflows/rewrite-commits.md +40 -36
  25. package/docs/workflows/security-review.md +34 -53
  26. package/docs/workflows/skill-creator.md +39 -56
  27. package/docs/workflows/skill-style.md +35 -40
  28. package/docs/workflows/using-git-worktrees.md +40 -44
  29. package/docs/workflows/verification-loop.md +43 -48
  30. package/docs/workflows/verify-before-claim.md +37 -40
  31. package/docs/workflows/zoom-out.md +39 -51
  32. package/harness-everything/SKILL.md +1 -1
  33. package/harness-everything/scripts/kernel-router.js +38 -10
  34. package/hooks/hooks.json +25 -1
  35. package/hooks/scripts/lib/workflow-isolation.js +111 -6
  36. package/hooks/scripts/lib/workflow-runtime.js +138 -2
  37. package/hooks/scripts/rule-of-3-tracker.js +17 -9
  38. package/hooks/scripts/state-persist.js +52 -9
  39. package/hooks/scripts/workflow-gate.js +22 -7
  40. package/hooks/scripts/workflow-mutation-denied.js +17 -0
  41. package/opencode-plugin/plugin.json +1 -1
  42. package/package.json +1 -1
  43. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  44. package/plugins/harness-everything/hooks/hooks.json +1 -1
  45. package/plugins/harness-everything/hooks/scripts/lib/workflow-isolation.js +111 -6
  46. package/plugins/harness-everything/hooks/scripts/lib/workflow-runtime.js +138 -2
  47. package/plugins/harness-everything/hooks/scripts/rule-of-3-tracker.js +17 -9
  48. package/plugins/harness-everything/hooks/scripts/state-persist.js +52 -9
  49. package/plugins/harness-everything/hooks/scripts/workflow-gate.js +22 -7
  50. package/plugins/harness-everything/hooks/scripts/workflow-mutation-denied.js +17 -0
  51. package/plugins/harness-everything/plugin.json +1 -1
  52. package/plugins/harness-everything/skills/harness-everything/SKILL.md +1 -1
  53. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +38 -10
  54. package/docs/issue-20-rollup.md +0 -47
  55. 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 evolves SKILL.md files against a single quality bar — the Skill Contract format plus predictability/pruning/progressive-disclosure principles from external skill-writing research — and is the required gate for skills `self-evolve` generates dynamically.
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
- Start([New skill request / existing SKILL.md to audit / self-evolve dynamic-generation call after LLM selection]) --> Intent["Capture intent: what it does, the one canonical description sentence, which Tier, does an existing skill already own this ground"]
14
- Intent --> Draft["Draft: Skill Contract table first, then body sized by information hierarchy (steps vs flat reference vs guides/references)"]
15
- Draft --> Test["Test 2-3 realistic prompts via multi-agent-workspace: with-skill subagent vs baseline subagent"]
16
- Test --> Checklist{"Quality Checklist (§3): SSOT, no duplication >5 lines, every MUST has a real gate, no no-ops, info hierarchy, leading words reused, checkable completion criteria, human-facing description"}
17
- Checklist -->|Fails| Prune["Prune and rewrite the failing item"]
18
- Prune --> Checklist
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
- Router["harness-everything / tier-router.js"] -->|Keyword: skill / skill.md / new skill / write a skill| Creator["skill-creator / SKILL.md"]
35
- Creator -->|Table shape spec| SkillStyle["skill-style / SKILL.md"]
36
- Creator -->|With/without test subagents| Launcher["multi-agent-workspace / SKILL.md"]
37
- Creator -->|Registers new static skills into| Registry["harness-everything / SKILL.md §5"]
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 TD
52
- Start1["Developer: 'I want a skill for deploying to AWS'"] --> Intent1["skill-creator §2 Step 1: capture intent, one canonical description sentence"]
53
- Intent1 --> Draft1["Draft Skill Contract table + steps, push detail to deploy-aws/guides/"]
54
- Draft1 --> Test1["Spawn with/without subagents via multi-agent-workspace on 2-3 realistic prompts"]
55
- Test1 --> Check1{Quality Checklist passes?}
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
- ## 4. Verification Check
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
- To ensure that the `skill-creator` skill is operating in strict compliance with Harness OS design laws, verify the following:
51
+ ## 4. Verification Check
77
52
 
78
- - [ ] **Physical Boundary Verification**: The skill boundaries are respected and do not leak context.
79
- - [ ] **State Checkpoint Verification**: The active state is established, validated, and recorded at the beginning and end of each execution branch.
80
- - [ ] **Cognitive Alignment**: The skill conforms to the **Think > Try > Summarize > Record** cognitive loop.
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
- > Guidelines and style rules for authoring, refactoring, and maintaining SKILL.md files to enforce clean frontmatter and logical boundaries.
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
- Start([Authoring / Editing a SKILL.md]) --> ParseFrontmatter["Parse and validate YAML Frontmatter: name, description"]
14
- ParseFrontmatter --> ValidateBoundary["Check for explicit physical boundaries & state checkpoints"]
15
- ValidateBoundary --> VerifyCognitiveLoop["Verify integration with Cognitive Loop laws"]
16
- VerifyCognitiveLoop --> CheckFormatting["Ensure clean markdown layout and bullet-style rules"]
17
- CheckFormatting --> FormatApproved{Complies with STYLE.md?}
18
- FormatApproved -->|No| FixSkillFile["Refactor and clean file formatting"]
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
- Router["harness-everything / tier-router.js"] -->|Keyword: skill / skill.md / new skill| Creator["skill-creator / SKILL.md"]
33
- Creator -->|Builds on the table shape defined in| SkillStyle["skill-style / SKILL.md"]
34
- SkillStyle -->|Audits format correctness of| OtherSkills["Any SKILL.md in the workspace"]
35
- SkillStyle -->|Pre-PR validation gate integration| VerLoop["verification-loop / SKILL.md"]
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 TD
46
- Start["Developer: 'help me write a new skill for deploying to AWS'"] --> Router["tier-router.js recommends skill-creator + skill-style"]
47
- Router --> Creator["skill-creator: capture intent, draft, test against real prompts (§2)"]
48
- Creator --> StyleCheck["skill-style: does the draft's Skill Contract table match the required shape?"]
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
- ## 4. Verification Check
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
- To ensure that the `skill-style` skill is operating in strict compliance with Harness OS design laws, verify the following:
49
+ ## 4. Verification Check
61
50
 
62
- - [ ] **Physical Boundary Verification**: The skill boundaries are respected and do not leak context.
63
- - [ ] **State Checkpoint Verification**: The active state is established, validated, and recorded at the beginning and end of each execution branch.
64
- - [ ] **Cognitive Alignment**: The skill conforms to the **Think > Try > Summarize > Record** cognitive loop.
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
- > Manages isolated workspace environments in parallel using native Git Worktrees, enabling developers to switch contexts safely without stashing or losing unsaved progress.
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
- ## 1. Skill Behavior Workflow
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
- This section visualizes how the `using-git-worktrees` skill executes internally, detailing the sequence of operations, state transitions, and evaluation steps.
9
+ ## 1. Skill Behavior Workflow
10
10
 
11
11
  ```mermaid
12
12
  graph TD
13
- Start([Trigger: Need Workspace Isolation]) --> CheckIso{1. Already in Worktree? GIT_DIR != GIT_COMMON}
14
- CheckIso -->|Yes| Setup["3. Project Setup & Dependency Install"]
15
- CheckIso -->|No| CheckNative{2. Native Worktree Tool Available?}
16
-
17
- CheckNative -->|Yes| RunNative["Use Native Worktree Tool"] --> Setup
18
- CheckNative -->|No| RunGit["Try git worktree add .worktrees/branch"]
19
-
20
- RunGit -->|Success| Setup
21
- RunGit -->|Fails / Sandbox Denied| WorkInPlace["Fallback: Work in Place in Current Directory"] --> Setup
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 LR
35
- Router["harness-everything / tier-router.js"] -->|Keyword: worktree / isolate / checkout| WT["using-git-worktrees / SKILL.md"]
36
- WT -->|Maintains isolation before running tests in| TDDSkill["tdd / SKILL.md"]
37
- WT -->|Protects terminal environment testing in| EnvSkill["environment-detection / SKILL.md"]
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
- Start["Working on deep feature 'feat-billing' (unstaged edits)"] --> Interrupt["Urgent production hotfix required!"]
49
- Interrupt --> Trigger["using-git-worktrees skill invoked"]
50
- Trigger --> CreateWT["Add worktree: 'git worktree add ../hotfix-auth hotfix-branch'"]
51
- CreateWT --> OpenWT["Open separate workspace editor in ../hotfix-auth"]
52
- OpenWT --> FixBug["Fix auth bug & run verification test"]
53
- FixBug --> CommitWT["Commit fix and push branch"]
54
- CommitWT --> CloseWT["Close editor, run 'git worktree prune'"]
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
- ## 4. Verification Check
54
+ Deep dive: `using-git-worktrees/references/workflow-details.md`.
62
55
 
63
- To ensure that the `using-git-worktrees` skill is operating in strict compliance with Harness OS design laws, verify the following:
56
+ ## 4. Verification Check
64
57
 
65
- - [ ] **Physical Boundary Verification**: The skill boundaries are respected and do not leak context.
66
- - [ ] **State Checkpoint Verification**: The active state is established, validated, and recorded at the beginning and end of each execution branch.
67
- - [ ] **Cognitive Alignment**: The skill conforms to the **Think > Try > Summarize > Record** cognitive loop.
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
- > Comprehensive pre-PR quality gate executing builds, linting, type-checking, test suites, and security scans before claiming a task complete.
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
- ## 1. Skill Behavior Workflow
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
- This section visualizes how the `verification-loop` skill executes internally, detailing the sequence of operations, state transitions, and evaluation steps.
9
+ ## 1. Skill Behavior Workflow
10
10
 
11
11
  ```mermaid
12
12
  graph TD
13
- Start([Pre-PR Quality Check Triggered]) --> RunBuild["1. Phase 1: Build Verification"]
14
- RunBuild --> RunTypeCheck["2. Phase 2: Type Check (tsc / pyright)"]
15
- RunTypeCheck --> RunLint["3. Phase 3: Lint Check"]
16
- RunLint --> RunTests["4. Phase 4: Test Suite Execution"]
17
- RunTests --> RunSecurity["5. Phase 5: Security & Secret Scan"]
18
- RunSecurity --> DiffReview["6. Phase 6: Diff Review"]
19
-
20
- DiffReview --> CheckScript{7. Is verify-gate.js / Template Available?}
21
- CheckScript -->|Yes| ScriptReport["Run harness-everything/scripts/verify-gate.js & Fill Template"]
22
- CheckScript -->|No| DirectReport["Output Verification Report Inline"]
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 LR
39
- Router["harness-everything / tier-router.js"] -->|Pre-PR checks / gate| VerLoop["verification-loop / SKILL.md"]
40
- VerLoop -->|Guards finalize step in| Todo["todo-driven-workflow / SKILL.md"]
41
- VerLoop -->|Requires test environment setup from| Env["environment-detection / SKILL.md"]
42
- VerLoop -->|Precedes safe commit push in| GitCommit["git-commit / SKILL.md"]
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
- Start["Feature code written; ready to claim task complete"] --> Trigger["verification-loop skill runs"]
54
- Trigger --> Build["Run 'npm run build' -> Succeeded"]
55
- Build --> Type["Run 'npm run typecheck' -> Found 2 type mismatches in routes.ts"]
56
- Type --> FixT["Fix incorrect type casting in routes.ts"]
57
- FixT --> Recheck["Re-run typecheck -> Succeeded"]
58
- Recheck --> Lint["Run 'npm run lint' -> Clean"]
59
- Lint --> Tests["Run 'npm run test' -> 24 tests passed"]
60
- Tests --> Done([Verification loop complete; safe to open PR])
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
- To ensure that the `verification-loop` skill is operating in strict compliance with Harness OS design laws, verify the following:
68
-
69
- - [ ] **Physical Boundary Verification**: The skill boundaries are respected and do not leak context.
70
- - [ ] **State Checkpoint Verification**: The active state is established, validated, and recorded at the beginning and end of each execution branch.
71
- - [ ] **Cognitive Alignment**: The skill conforms to the **Think > Try > Summarize > Record** cognitive loop.
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
- > Fact-audit discipline requiring empirical verification of external claims, SDK configurations, defaults, and unmeasured performance estimates.
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
- ## 1. Skill Behavior Workflow
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
- This section visualizes how the `verify-before-claim` skill executes internally, detailing the sequence of operations, state transitions, and evaluation steps.
9
+ ## 1. Skill Behavior Workflow
10
10
 
11
11
  ```mermaid
12
12
  graph TD
13
- Start([About to Assert External Framework / API Behavior or Perf Number]) --> CheckScope{Claim Scope Check}
14
- CheckScope -->|Internal Repo Code| ReadSource["Read Local Source Code -> State Facts"]
15
- CheckScope -->|External Framework / API / Number| CheckNet{Web Fetch / Search / Measurement Available?}
16
-
17
- CheckNet -->|Yes| FetchDocs["WebFetch Official Docs / Measure Real Execution"]
18
- CheckNet -->|No / Offline| EstimateFallback["Explicitly Label Response as Unverified Estimate"]
19
-
20
- FetchDocs --> CiteDocs["Quote Authoritative Source / State Measured Data"]
21
- ReadSource --> End([Verified Output Delivered])
22
- CiteDocs --> End
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 LR
34
- Router["harness-everything / tier-router.js"] -->|Requires fact checking or estimates| VBC["verify-before-claim / SKILL.md"]
35
- VBC -->|Empirical verification helper| RunCode["Run a real Node/terminal measurement"]
36
- VBC -->|Secures quality of decisions in| GWD["grill-with-docs / SKILL.md"]
37
- VBC -->|Verifies assertions in testing suite| TDD["tdd / SKILL.md"]
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
- Here we model concrete real-world scenarios and use cases of the `verify-before-claim` skill, illustrating standard success paths, error handling, or recovery loops.
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
- Start["Developer assumes: 'Node.js fs.rmSync returns boolean upon success'"] --> Trigger["verify-before-claim skill triggered"]
49
- Trigger --> ReadDocs["Checks Node.js documentation via WebSearch"]
50
- ReadDocs --> FindTrue["Discovers fs.rmSync returns 'undefined' on success, and throws on failure"]
51
- FindTrue --> TestCode["Executes quick Node snippet to confirm empirical behavior"]
52
- TestCode --> UpdateCode["Refactors proposed catch-blocks to handle exceptions instead of checking booleans"]
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
- To ensure that the `verify-before-claim` skill is operating in strict compliance with Harness OS design laws, verify the following:
61
-
62
- - [ ] **Physical Boundary Verification**: The skill boundaries are respected and do not leak context.
63
- - [ ] **State Checkpoint Verification**: The active state is established, validated, and recorded at the beginning and end of each execution branch.
64
- - [ ] **Cognitive Alignment**: The skill conforms to the **Think > Try > Summarize > Record** cognitive loop.
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