harness-everything 0.2.0 → 0.2.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.
Files changed (70) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build-multi-agent-system/SKILL.md +68 -68
  3. package/create-agent-launcher/SKILL.md +48 -48
  4. package/docs/workflows/build-multi-agent-system.md +62 -62
  5. package/docs/workflows/create-agent-launcher.md +62 -62
  6. package/docs/workflows/environment-detection.md +63 -63
  7. package/docs/workflows/eval-harness.md +57 -57
  8. package/docs/workflows/fable-discipline.md +59 -59
  9. package/docs/workflows/fable-mode.md +32 -32
  10. package/docs/workflows/git-commit.md +62 -62
  11. package/docs/workflows/grill-me.md +62 -62
  12. package/docs/workflows/grill-with-docs.md +62 -62
  13. package/docs/workflows/improve-codebase-architecture.md +60 -60
  14. package/docs/workflows/repo-docs.md +59 -59
  15. package/docs/workflows/rewrite-commits.md +60 -60
  16. package/docs/workflows/security-review.md +58 -58
  17. package/docs/workflows/self-evolve.md +59 -59
  18. package/docs/workflows/tdd.md +39 -39
  19. package/docs/workflows/todo-driven-workflow.md +36 -36
  20. package/docs/workflows/using-git-worktrees.md +63 -63
  21. package/docs/workflows/verification-loop.md +69 -69
  22. package/docs/workflows/verify-before-claim.md +60 -60
  23. package/docs/workflows/zoom-out.md +62 -62
  24. package/environment-detection/SKILL.md +77 -77
  25. package/eval-framework/behavioral-test.js +105 -105
  26. package/eval-framework/mechanism-test.js +251 -251
  27. package/eval-harness/SKILL.md +59 -59
  28. package/fable-discipline/SKILL.md +38 -38
  29. package/fable-mode/SKILL.md +51 -51
  30. package/git-commit/SKILL.md +55 -55
  31. package/grill-me/SKILL.md +36 -36
  32. package/grill-with-docs/SKILL.md +99 -99
  33. package/harness-everything/SKILL.md +141 -141
  34. package/harness-everything/examples/README.md +9 -9
  35. package/harness-everything/examples/todo-workflow.md +22 -22
  36. package/harness-everything/scripts/todo-cli.js +157 -157
  37. package/harness-everything/scripts/verify-gate.js +31 -31
  38. package/hooks/scripts/atomic-commit-check.js +68 -68
  39. package/hooks/scripts/context-compact.js +114 -114
  40. package/hooks/scripts/lib/harness-state.js +29 -3
  41. package/hooks/scripts/lib/platforms/claude.js +42 -42
  42. package/hooks/scripts/lib/platforms/codex.js +46 -46
  43. package/hooks/scripts/lib/platforms/continue.js +41 -41
  44. package/hooks/scripts/lib/platforms/copilot.js +41 -41
  45. package/hooks/scripts/lib/platforms/cursor.js +41 -41
  46. package/hooks/scripts/rule-of-3.js +176 -176
  47. package/improve-codebase-architecture/SKILL.md +44 -44
  48. package/install-cognitive-os/SKILL.md +95 -95
  49. package/package.json +1 -1
  50. package/repo-docs/SKILL.md +45 -45
  51. package/rewrite-commits/SKILL.md +32 -32
  52. package/scripts/installer.js +649 -649
  53. package/scripts/lib/advisory-text.js +163 -163
  54. package/scripts/lib/claude-hooks.js +71 -71
  55. package/scripts/lib/gitignore.js +80 -58
  56. package/scripts/lib/manifest.js +82 -82
  57. package/scripts/lib/prompts.js +241 -241
  58. package/scripts/lib/skills.js +172 -172
  59. package/scripts/lib/workspace.js +28 -28
  60. package/security-review/SKILL.md +510 -510
  61. package/self-evolve/SKILL.md +54 -54
  62. package/skill-creator/SKILL.md +91 -91
  63. package/skill-creator/references/testing-workflow.md +32 -32
  64. package/skill-style/SKILL.md +48 -48
  65. package/tdd/SKILL.md +53 -53
  66. package/todo-driven-workflow/SKILL.md +54 -54
  67. package/using-git-worktrees/SKILL.md +161 -161
  68. package/verification-loop/SKILL.md +138 -138
  69. package/verify-before-claim/SKILL.md +86 -86
  70. package/zoom-out/SKILL.md +90 -90
@@ -1,69 +1,69 @@
1
- # Workflow: Verification Loop
2
-
3
- > Comprehensive pre-PR quality gate executing builds, linting, type-checking, test suites, and security scans before claiming a task complete.
4
-
5
- ---
6
-
7
- ## 1. Skill Behavior Workflow
8
-
9
- This section visualizes how the `verification-loop` skill executes internally, detailing the sequence of operations, state transitions, and evaluation steps.
10
-
11
- ```mermaid
12
- graph TD
13
- Start([Pre-PR Quality Check Triggered]) --> RunBuild["Execute compilation / project build"]
14
- RunBuild --> CheckBuild{Build succeeded?}
15
- CheckBuild -->|No| FixBuild["Debug and fix build errors"]
16
- CheckBuild -->|Yes| RunTypeCheck["Execute language type-checking compiler"]
17
- RunTypeCheck --> CheckTypes{Typecheck green?}
18
- CheckTypes -->|No| FixTypes["Correct type-definition errors"]
19
- CheckTypes -->|Yes| RunLint["Execute code linter checks"]
20
- RunLint --> CheckLint{Lint clean?}
21
- CheckLint -->|No| FixLint["Correct code-style and syntax errors"]
22
- CheckLint -->|Yes| RunTests["Execute complete automated test suite"]
23
- RunTests --> CheckTests{Tests passed?}
24
- CheckTests -->|No| FixTests["Debug and correct failing tests"]
25
- CheckTests -->|Yes| End([Pre-PR verification gate cleared successfully])
26
- FixBuild & FixTypes & FixLint & FixTests --> RunBuild
27
- ```
28
-
29
- ---
30
-
31
- ## 2. Triggering and Routing Path
32
-
33
- 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.
34
-
35
- ```mermaid
36
- graph LR
37
- Router["harness-everything / tier-router.js"] -->|Pre-PR checks / gate| VerLoop["verification-loop / SKILL.md"]
38
- VerLoop -->|Guards finalize step in| Todo["todo-driven-workflow / SKILL.md"]
39
- VerLoop -->|Requires test environment setup from| Env["environment-detection / SKILL.md"]
40
- VerLoop -->|Precedes safe commit push in| GitCommit["git-commit / SKILL.md"]
41
- ```
42
-
43
- ---
44
-
45
- ## 3. Real-World Use Case Flowchart
46
-
47
- Here we model concrete real-world scenarios and use cases of the `verification-loop` skill, illustrating standard success paths, error handling, or recovery loops.
48
-
49
- ```mermaid
50
- graph TD
51
- Start["Feature code written; ready to claim task complete"] --> Trigger["verification-loop skill runs"]
52
- Trigger --> Build["Run 'npm run build' -> Succeeded"]
53
- Build --> Type["Run 'npm run typecheck' -> Found 2 type mismatches in routes.ts"]
54
- Type --> FixT["Fix incorrect type casting in routes.ts"]
55
- FixT --> Recheck["Re-run typecheck -> Succeeded"]
56
- Recheck --> Lint["Run 'npm run lint' -> Clean"]
57
- Lint --> Tests["Run 'npm run test' -> 24 tests passed"]
58
- Tests --> Done([Verification loop complete; safe to open PR])
59
- ```
60
-
61
- ---
62
-
63
- ## 4. Verification Check
64
-
65
- To ensure that the `verification-loop` skill is operating in strict compliance with Harness OS design laws, verify the following:
66
-
67
- - [ ] **Physical Boundary Verification**: The skill boundaries are respected and do not leak context.
68
- - [ ] **State Checkpoint Verification**: The active state is established, validated, and recorded at the beginning and end of each execution branch.
69
- - [ ] **Cognitive Alignment**: The skill conforms to the **Think > Try > Summarize > Record** cognitive loop.
1
+ # Workflow: Verification Loop
2
+
3
+ > Comprehensive pre-PR quality gate executing builds, linting, type-checking, test suites, and security scans before claiming a task complete.
4
+
5
+ ---
6
+
7
+ ## 1. Skill Behavior Workflow
8
+
9
+ This section visualizes how the `verification-loop` skill executes internally, detailing the sequence of operations, state transitions, and evaluation steps.
10
+
11
+ ```mermaid
12
+ graph TD
13
+ Start([Pre-PR Quality Check Triggered]) --> RunBuild["Execute compilation / project build"]
14
+ RunBuild --> CheckBuild{Build succeeded?}
15
+ CheckBuild -->|No| FixBuild["Debug and fix build errors"]
16
+ CheckBuild -->|Yes| RunTypeCheck["Execute language type-checking compiler"]
17
+ RunTypeCheck --> CheckTypes{Typecheck green?}
18
+ CheckTypes -->|No| FixTypes["Correct type-definition errors"]
19
+ CheckTypes -->|Yes| RunLint["Execute code linter checks"]
20
+ RunLint --> CheckLint{Lint clean?}
21
+ CheckLint -->|No| FixLint["Correct code-style and syntax errors"]
22
+ CheckLint -->|Yes| RunTests["Execute complete automated test suite"]
23
+ RunTests --> CheckTests{Tests passed?}
24
+ CheckTests -->|No| FixTests["Debug and correct failing tests"]
25
+ CheckTests -->|Yes| End([Pre-PR verification gate cleared successfully])
26
+ FixBuild & FixTypes & FixLint & FixTests --> RunBuild
27
+ ```
28
+
29
+ ---
30
+
31
+ ## 2. Triggering and Routing Path
32
+
33
+ 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.
34
+
35
+ ```mermaid
36
+ graph LR
37
+ Router["harness-everything / tier-router.js"] -->|Pre-PR checks / gate| VerLoop["verification-loop / SKILL.md"]
38
+ VerLoop -->|Guards finalize step in| Todo["todo-driven-workflow / SKILL.md"]
39
+ VerLoop -->|Requires test environment setup from| Env["environment-detection / SKILL.md"]
40
+ VerLoop -->|Precedes safe commit push in| GitCommit["git-commit / SKILL.md"]
41
+ ```
42
+
43
+ ---
44
+
45
+ ## 3. Real-World Use Case Flowchart
46
+
47
+ Here we model concrete real-world scenarios and use cases of the `verification-loop` skill, illustrating standard success paths, error handling, or recovery loops.
48
+
49
+ ```mermaid
50
+ graph TD
51
+ Start["Feature code written; ready to claim task complete"] --> Trigger["verification-loop skill runs"]
52
+ Trigger --> Build["Run 'npm run build' -> Succeeded"]
53
+ Build --> Type["Run 'npm run typecheck' -> Found 2 type mismatches in routes.ts"]
54
+ Type --> FixT["Fix incorrect type casting in routes.ts"]
55
+ FixT --> Recheck["Re-run typecheck -> Succeeded"]
56
+ Recheck --> Lint["Run 'npm run lint' -> Clean"]
57
+ Lint --> Tests["Run 'npm run test' -> 24 tests passed"]
58
+ Tests --> Done([Verification loop complete; safe to open PR])
59
+ ```
60
+
61
+ ---
62
+
63
+ ## 4. Verification Check
64
+
65
+ To ensure that the `verification-loop` skill is operating in strict compliance with Harness OS design laws, verify the following:
66
+
67
+ - [ ] **Physical Boundary Verification**: The skill boundaries are respected and do not leak context.
68
+ - [ ] **State Checkpoint Verification**: The active state is established, validated, and recorded at the beginning and end of each execution branch.
69
+ - [ ] **Cognitive Alignment**: The skill conforms to the **Think > Try > Summarize > Record** cognitive loop.
@@ -1,60 +1,60 @@
1
- # Workflow: Verify Before Claim
2
-
3
- > Fact-audit discipline requiring empirical verification of external claims, SDK configurations, defaults, and unmeasured performance estimates.
4
-
5
- ---
6
-
7
- ## 1. Skill Behavior Workflow
8
-
9
- This section visualizes how the `verify-before-claim` skill executes internally, detailing the sequence of operations, state transitions, and evaluation steps.
10
-
11
- ```mermaid
12
- graph TD
13
- Start([Claim or Estimate Proposed]) --> IdentifyAssumptions["Isolate any claim or performance assumption"]
14
- IdentifyAssumptions --> QueryAuthoritative["Execute WebSearch or read local code sources"]
15
- QueryAuthoritative --> CrossVerify["Cross-verify details with authoritative documentation"]
16
- CrossVerify --> RunLocalExperiment["Run quick script to empirically test the assumption"]
17
- RunLocalExperiment --> CaptureResult["Log actual measured results and exit-codes"]
18
- CaptureResult --> AssertFact["Assert verified fact based on objective data"]
19
- AssertFact --> End([Hypothesis replaced with empirical truth])
20
- ```
21
-
22
- ---
23
-
24
- ## 2. Triggering and Routing Path
25
-
26
- 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.
27
-
28
- ```mermaid
29
- graph LR
30
- Router["harness-everything / tier-router.js"] -->|Requires fact checking or estimates| VBC["verify-before-claim / SKILL.md"]
31
- VBC -->|Empirical verification helper| RunCode["mcp_provides_tool_pylanceRunCodeSnippet / run_in_terminal"]
32
- VBC -->|Secures quality of decisions in| GWD["grill-with-docs / SKILL.md"]
33
- VBC -->|Verifies assertions in testing suite| TDD["tdd / SKILL.md"]
34
- ```
35
-
36
- ---
37
-
38
- ## 3. Real-World Use Case Flowchart
39
-
40
- 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
-
42
- ```mermaid
43
- graph TD
44
- Start["Developer assumes: 'Node.js fs.rmSync returns boolean upon success'"] --> Trigger["verify-before-claim skill triggered"]
45
- Trigger --> ReadDocs["Checks Node.js documentation via WebSearch"]
46
- ReadDocs --> FindTrue["Discovers fs.rmSync returns 'undefined' on success, and throws on failure"]
47
- FindTrue --> TestCode["Executes quick Node snippet to confirm empirical behavior"]
48
- TestCode --> UpdateCode["Refactors proposed catch-blocks to handle exceptions instead of checking booleans"]
49
- UpdateCode --> Done([Potential production runtime crash prevented])
50
- ```
51
-
52
- ---
53
-
54
- ## 4. Verification Check
55
-
56
- To ensure that the `verify-before-claim` skill is operating in strict compliance with Harness OS design laws, verify the following:
57
-
58
- - [ ] **Physical Boundary Verification**: The skill boundaries are respected and do not leak context.
59
- - [ ] **State Checkpoint Verification**: The active state is established, validated, and recorded at the beginning and end of each execution branch.
60
- - [ ] **Cognitive Alignment**: The skill conforms to the **Think > Try > Summarize > Record** cognitive loop.
1
+ # Workflow: Verify Before Claim
2
+
3
+ > Fact-audit discipline requiring empirical verification of external claims, SDK configurations, defaults, and unmeasured performance estimates.
4
+
5
+ ---
6
+
7
+ ## 1. Skill Behavior Workflow
8
+
9
+ This section visualizes how the `verify-before-claim` skill executes internally, detailing the sequence of operations, state transitions, and evaluation steps.
10
+
11
+ ```mermaid
12
+ graph TD
13
+ Start([Claim or Estimate Proposed]) --> IdentifyAssumptions["Isolate any claim or performance assumption"]
14
+ IdentifyAssumptions --> QueryAuthoritative["Execute WebSearch or read local code sources"]
15
+ QueryAuthoritative --> CrossVerify["Cross-verify details with authoritative documentation"]
16
+ CrossVerify --> RunLocalExperiment["Run quick script to empirically test the assumption"]
17
+ RunLocalExperiment --> CaptureResult["Log actual measured results and exit-codes"]
18
+ CaptureResult --> AssertFact["Assert verified fact based on objective data"]
19
+ AssertFact --> End([Hypothesis replaced with empirical truth])
20
+ ```
21
+
22
+ ---
23
+
24
+ ## 2. Triggering and Routing Path
25
+
26
+ 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.
27
+
28
+ ```mermaid
29
+ graph LR
30
+ Router["harness-everything / tier-router.js"] -->|Requires fact checking or estimates| VBC["verify-before-claim / SKILL.md"]
31
+ VBC -->|Empirical verification helper| RunCode["mcp_provides_tool_pylanceRunCodeSnippet / run_in_terminal"]
32
+ VBC -->|Secures quality of decisions in| GWD["grill-with-docs / SKILL.md"]
33
+ VBC -->|Verifies assertions in testing suite| TDD["tdd / SKILL.md"]
34
+ ```
35
+
36
+ ---
37
+
38
+ ## 3. Real-World Use Case Flowchart
39
+
40
+ 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
+
42
+ ```mermaid
43
+ graph TD
44
+ Start["Developer assumes: 'Node.js fs.rmSync returns boolean upon success'"] --> Trigger["verify-before-claim skill triggered"]
45
+ Trigger --> ReadDocs["Checks Node.js documentation via WebSearch"]
46
+ ReadDocs --> FindTrue["Discovers fs.rmSync returns 'undefined' on success, and throws on failure"]
47
+ FindTrue --> TestCode["Executes quick Node snippet to confirm empirical behavior"]
48
+ TestCode --> UpdateCode["Refactors proposed catch-blocks to handle exceptions instead of checking booleans"]
49
+ UpdateCode --> Done([Potential production runtime crash prevented])
50
+ ```
51
+
52
+ ---
53
+
54
+ ## 4. Verification Check
55
+
56
+ To ensure that the `verify-before-claim` skill is operating in strict compliance with Harness OS design laws, verify the following:
57
+
58
+ - [ ] **Physical Boundary Verification**: The skill boundaries are respected and do not leak context.
59
+ - [ ] **State Checkpoint Verification**: The active state is established, validated, and recorded at the beginning and end of each execution branch.
60
+ - [ ] **Cognitive Alignment**: The skill conforms to the **Think > Try > Summarize > Record** cognitive loop.
@@ -1,62 +1,62 @@
1
- # Workflow: Zoom Out
2
-
3
- > High-level reflection report generation to break out of error loops, analyze failure patterns, and backtrack to alternative paths.
4
-
5
- ---
6
-
7
- ## 1. Skill Behavior Workflow
8
-
9
- This section visualizes how the `zoom-out` skill executes internally, detailing the sequence of operations, state transitions, and evaluation steps.
10
-
11
- ```mermaid
12
- graph TD
13
- Start([3 Consecutive Errors Triggered]) --> Tripped{Rule of 3 Tripped?}
14
- Tripped -->|No| Backtrack["Review code change and retry"]
15
- Tripped -->|Yes| LockWork["Lock all file edit capabilities"]
16
- LockWork --> GatherState["Analyze current working directory, file states, and errors"]
17
- GatherState --> GenReport["Compile formal Reflection Report: what failed, assumptions, backtracking options"]
18
- GenReport --> PresentReport["Present report to human partner and request guidance"]
19
- PresentReport --> End([Workforce unlocked after human direction received])
20
- ```
21
-
22
- ---
23
-
24
- ## 2. Triggering and Routing Path
25
-
26
- This diagram illustrates how the `zoom-out` 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.
27
-
28
- ```mermaid
29
- graph LR
30
- RuleOf3["Rule of 3 Circuit Breaker"] -->|Tripped!| ZoomOut["zoom-out / SKILL.md"]
31
- ZoomOut -->|Halts execution for| ActiveWork["Active workspace edits"]
32
- ZoomOut -->|Asks for human direction via| AskQuestions["vscode_askQuestions"]
33
- ZoomOut -->|Unlocks workspace state after| HumanReset["Human Partner Response"]
34
- ```
35
-
36
- ---
37
-
38
- ## 3. Real-World Use Case Flowchart
39
-
40
- Here we model concrete real-world scenarios and use cases of the `zoom-out` skill, illustrating standard success paths, error handling, or recovery loops.
41
-
42
- ```mermaid
43
- graph TD
44
- Start["Attempting to fix Python import error; fails 3 times consecutively with same trace"] --> Trigger["Rule of 3 circuit breaker trips"]
45
- Trigger --> Lock["Workspace writes locked"]
46
- Trigger --> Collect["Collect error traces and diff history"]
47
- Collect --> WriteReport["Create docs/reflection/zoom-out-report.md detailing the import cyclic dependency"]
48
- WriteReport --> Present["Present options to human: Option A - Merge imports, Option B - Extract shared modules"]
49
- Present --> UserChoice["User select: 'Option B'"]
50
- UserChoice --> Unlock["Unlock workspace and execute Option B"]
51
- Unlock --> Done([Error loop successfully broken and resolved])
52
- ```
53
-
54
- ---
55
-
56
- ## 4. Verification Check
57
-
58
- To ensure that the `zoom-out` skill is operating in strict compliance with Harness OS design laws, verify the following:
59
-
60
- - [ ] **Physical Boundary Verification**: The skill boundaries are respected and do not leak context.
61
- - [ ] **State Checkpoint Verification**: The active state is established, validated, and recorded at the beginning and end of each execution branch.
62
- - [ ] **Cognitive Alignment**: The skill conforms to the **Think > Try > Summarize > Record** cognitive loop.
1
+ # Workflow: Zoom Out
2
+
3
+ > High-level reflection report generation to break out of error loops, analyze failure patterns, and backtrack to alternative paths.
4
+
5
+ ---
6
+
7
+ ## 1. Skill Behavior Workflow
8
+
9
+ This section visualizes how the `zoom-out` skill executes internally, detailing the sequence of operations, state transitions, and evaluation steps.
10
+
11
+ ```mermaid
12
+ graph TD
13
+ Start([3 Consecutive Errors Triggered]) --> Tripped{Rule of 3 Tripped?}
14
+ Tripped -->|No| Backtrack["Review code change and retry"]
15
+ Tripped -->|Yes| LockWork["Lock all file edit capabilities"]
16
+ LockWork --> GatherState["Analyze current working directory, file states, and errors"]
17
+ GatherState --> GenReport["Compile formal Reflection Report: what failed, assumptions, backtracking options"]
18
+ GenReport --> PresentReport["Present report to human partner and request guidance"]
19
+ PresentReport --> End([Workforce unlocked after human direction received])
20
+ ```
21
+
22
+ ---
23
+
24
+ ## 2. Triggering and Routing Path
25
+
26
+ This diagram illustrates how the `zoom-out` 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.
27
+
28
+ ```mermaid
29
+ graph LR
30
+ RuleOf3["Rule of 3 Circuit Breaker"] -->|Tripped!| ZoomOut["zoom-out / SKILL.md"]
31
+ ZoomOut -->|Halts execution for| ActiveWork["Active workspace edits"]
32
+ ZoomOut -->|Asks for human direction via| AskQuestions["vscode_askQuestions"]
33
+ ZoomOut -->|Unlocks workspace state after| HumanReset["Human Partner Response"]
34
+ ```
35
+
36
+ ---
37
+
38
+ ## 3. Real-World Use Case Flowchart
39
+
40
+ Here we model concrete real-world scenarios and use cases of the `zoom-out` skill, illustrating standard success paths, error handling, or recovery loops.
41
+
42
+ ```mermaid
43
+ graph TD
44
+ Start["Attempting to fix Python import error; fails 3 times consecutively with same trace"] --> Trigger["Rule of 3 circuit breaker trips"]
45
+ Trigger --> Lock["Workspace writes locked"]
46
+ Trigger --> Collect["Collect error traces and diff history"]
47
+ Collect --> WriteReport["Create docs/reflection/zoom-out-report.md detailing the import cyclic dependency"]
48
+ WriteReport --> Present["Present options to human: Option A - Merge imports, Option B - Extract shared modules"]
49
+ Present --> UserChoice["User select: 'Option B'"]
50
+ UserChoice --> Unlock["Unlock workspace and execute Option B"]
51
+ Unlock --> Done([Error loop successfully broken and resolved])
52
+ ```
53
+
54
+ ---
55
+
56
+ ## 4. Verification Check
57
+
58
+ To ensure that the `zoom-out` skill is operating in strict compliance with Harness OS design laws, verify the following:
59
+
60
+ - [ ] **Physical Boundary Verification**: The skill boundaries are respected and do not leak context.
61
+ - [ ] **State Checkpoint Verification**: The active state is established, validated, and recorded at the beginning and end of each execution branch.
62
+ - [ ] **Cognitive Alignment**: The skill conforms to the **Think > Try > Summarize > Record** cognitive loop.
@@ -1,77 +1,77 @@
1
- ---
2
- name: environment-detection
3
- description: Use at the very beginning of the session (Discover phase) to automatically detect and align with the operating system, terminal shell (e.g. Git Bash vs PowerShell vs Command Prompt), package managers, and development tools. Prevents blind command execution and repetitive tool-related errors.
4
- author: Miya Daniel | Harness Core Team
5
- version: 0.2.0
6
- ---
7
-
8
- # Environment Detection & Shell Alignment
9
-
10
- ## 📋 Skill Contract
11
-
12
- | Component | Specification |
13
- | :--- | :--- |
14
- | **Trigger / Input** | Session Start (Discover Phase), or before executing a complex terminal command sequence. |
15
- | **Expected Output** | Terminal execution of `node <this-skill-dir>/scripts/preflight.js`. Output of the detected OS and Shell. |
16
- | **State Mutations** | Context is updated with the correct path separator (`/` vs `\`) and environment variable syntax (`$VAR` vs `%VAR%`). |
17
- | **Enforcement Gate** | You MUST read the terminal output of `preflight.js`. If you use the wrong syntax (e.g. `%VAR%` in bash), the terminal will naturally Exit 1 and block your progress. |
18
-
19
- ## Core Principles
20
- - **MUST** operate using the cognitive loop: Think > Try > Summarize > Record.
21
- - **[Think]**: Before running any terminal commands, check your environment. Blind execution is the primary source of agent step waste.
22
- - **[Try]**: Run the automated preflight check script to determine exact platform properties.
23
- - **[Summarize]**: Output the detected terminal, OS, and toolchains so the session context retains these bounds.
24
- - **[Record]**: Adopt the corresponding command syntax rules for the rest of the conversation.
25
-
26
- ## Strict Workspace Boundary (僅偵測與操作當前工作區)
27
- - **Current Workspace Only**: 必須僅偵測與操作當前活動工作區目錄(即當前專案根目錄,亦為 `process.cwd()`)。
28
- - **Ignore Other Workspaces**: 即使 VS Code 內容或歷史記錄中暴露了其他工作區、暫存路徑或最近開啟的專案(例如 `d:\super.h2o.sbom`、`d:\DeveloperDocs`、`c:\Users\DanielCH.Chang\Desktop\XinputDxe_V0.0.5` 等),你也 **必須完全忽略它們**。絕對不要對這些非當前專案之路徑進行結構分析、工具檢查,更不能在其中執行任何終端機指令。
29
- - **Single-Workspace Execution**: 所有終端機指令、工具可用性檢查、路徑解析均必須嚴格限制在當前專案根目錄內。嚴格禁止跨越邊界操作鄰近或無關的資料夾。
30
-
31
- ## [State Checkpoint]
32
- - Verify your environment details *before* executing commands or writing files.
33
- - If you just started a session, run the preflight script immediately.
34
-
35
- ## [Discovery Phase: Environment Audit]
36
- 1. Run the preflight script that lives at `scripts/preflight.js` **inside this skill's own directory** — resolve the path from wherever this SKILL.md was loaded (do not guess a hard-coded location):
37
- ```bash
38
- node "<this-skill-dir>/scripts/preflight.js"
39
- ```
40
- 2. Parse the output and understand:
41
- - Operating System (Windows vs. macOS vs. Linux)
42
- - Active Shell (Git Bash vs. PowerShell vs. Command Prompt)
43
- - Available CLI Tools (node, pnpm, docker, python, etc.)
44
- 3. **Toolchain Self-Heal (工欲善其事,必先利其器)**: The harness itself is part of the environment. Audit whether this workspace's integration touchpoints (`.claude/settings.json` hooks, `.cursorrules`, `.github/copilot-instructions.md`, `AGENTS.md`) are installed, and repair any missing ones — e.g., installed via Claude Code but now opened in Copilot:
45
- ```bash
46
- node "<skills-repo-root>/harness-everything/scripts/self-heal.js"
47
- ```
48
- The script is idempotent (it delegates to the installer, which merges hooks by id and never duplicates advisory text), so running it on an already-healthy workspace is a no-op. Skip only if the user intentionally removed a touchpoint file.
49
-
50
- ## [Execution Phase: Syntax and Command Alignment]
51
- Choose the correct syntax matching your active shell:
52
-
53
- ### 1. Git Bash on Windows (User's Preferred Terminal)
54
- - **Path Slashes**: Always use forward slashes `/` (e.g., `scripts/lib/utils.js`). Never use raw backslashes `\` because they act as escape characters in Bash.
55
- - **Env Variables**: Use `$VARIABLE_NAME` syntax. Do NOT use `%VARIABLE_NAME%` or `$env:VARIABLE_NAME`.
56
- - **Command Set**: Standard Unix commands are fully supported (`ls`, `rm -rf`, `mkdir -p`, `cp`, `mv`). Do NOT run CMD native commands like `dir`, `del`, or `copy`.
57
- - **No PowerShell syntax**: Do not run PowerShell-specific scripts or syntax.
58
-
59
- ### 2. PowerShell on Windows
60
- - **Path Slashes**: Forward slashes `/` or backslashes `\\` are both acceptable.
61
- - **Env Variables**: Use `$env:VARIABLE_NAME` syntax.
62
- - **Command Set**: Use standard PowerShell commands or common aliases (e.g., `New-Item`, `Remove-Item`).
63
-
64
- ### 3. Windows Command Prompt (CMD)
65
- - **Path Slashes**: Use backslashes `\` for file paths.
66
- - **Env Variables**: Use `%VARIABLE_NAME%` syntax.
67
- - **Command Set**: Use `dir`, `del`, `copy`, `mkdir`. Do NOT use `ls`, `rm`, `cp`, `mkdir -p`.
68
-
69
- ## [Verification & Reflection Phase]
70
- 3. If any shell command fails, do **not** blindly retry the exact same command.
71
- 4. Stop and ask yourself: "Did I use the wrong syntax for this terminal? Is this a Git Bash vs. PowerShell syntax issue?"
72
- 5. If you fail 3 times on the same command, trigger the `zoom-out` circuit breaker.
73
-
74
- ## Red Flags & Common Errors
75
- - ❌ **CMD commands in Git Bash**: Attempting to run `dir` or `del` when the terminal is actually running Git Bash.
76
- - ❌ **PowerShell commands in Bash**: Attempting to run `$env:PATH` or `.ps1` files in a Bash environment.
77
- - ❌ **Path escape failures**: Sending raw Windows paths like `scripts\run.js` inside a Bash terminal, which interprets `\r` as a carriage return or escapes characters.
1
+ ---
2
+ name: environment-detection
3
+ description: Use at the very beginning of the session (Discover phase) to automatically detect and align with the operating system, terminal shell (e.g. Git Bash vs PowerShell vs Command Prompt), package managers, and development tools. Prevents blind command execution and repetitive tool-related errors.
4
+ author: Miya Daniel | Harness Core Team
5
+ version: 0.2.0
6
+ ---
7
+
8
+ # Environment Detection & Shell Alignment
9
+
10
+ ## 📋 Skill Contract
11
+
12
+ | Component | Specification |
13
+ | :--- | :--- |
14
+ | **Trigger / Input** | Session Start (Discover Phase), or before executing a complex terminal command sequence. |
15
+ | **Expected Output** | Terminal execution of `node <this-skill-dir>/scripts/preflight.js`. Output of the detected OS and Shell. |
16
+ | **State Mutations** | Context is updated with the correct path separator (`/` vs `\`) and environment variable syntax (`$VAR` vs `%VAR%`). |
17
+ | **Enforcement Gate** | You MUST read the terminal output of `preflight.js`. If you use the wrong syntax (e.g. `%VAR%` in bash), the terminal will naturally Exit 1 and block your progress. |
18
+
19
+ ## Core Principles
20
+ - **MUST** operate using the cognitive loop: Think > Try > Summarize > Record.
21
+ - **[Think]**: Before running any terminal commands, check your environment. Blind execution is the primary source of agent step waste.
22
+ - **[Try]**: Run the automated preflight check script to determine exact platform properties.
23
+ - **[Summarize]**: Output the detected terminal, OS, and toolchains so the session context retains these bounds.
24
+ - **[Record]**: Adopt the corresponding command syntax rules for the rest of the conversation.
25
+
26
+ ## Strict Workspace Boundary (僅偵測與操作當前工作區)
27
+ - **Current Workspace Only**: 必須僅偵測與操作當前活動工作區目錄(即當前專案根目錄,亦為 `process.cwd()`)。
28
+ - **Ignore Other Workspaces**: 即使 VS Code 內容或歷史記錄中暴露了其他工作區、暫存路徑或最近開啟的專案(例如 `d:\super.h2o.sbom`、`d:\DeveloperDocs`、`c:\Users\DanielCH.Chang\Desktop\XinputDxe_V0.0.5` 等),你也 **必須完全忽略它們**。絕對不要對這些非當前專案之路徑進行結構分析、工具檢查,更不能在其中執行任何終端機指令。
29
+ - **Single-Workspace Execution**: 所有終端機指令、工具可用性檢查、路徑解析均必須嚴格限制在當前專案根目錄內。嚴格禁止跨越邊界操作鄰近或無關的資料夾。
30
+
31
+ ## [State Checkpoint]
32
+ - Verify your environment details *before* executing commands or writing files.
33
+ - If you just started a session, run the preflight script immediately.
34
+
35
+ ## [Discovery Phase: Environment Audit]
36
+ 1. Run the preflight script that lives at `scripts/preflight.js` **inside this skill's own directory** — resolve the path from wherever this SKILL.md was loaded (do not guess a hard-coded location):
37
+ ```bash
38
+ node "<this-skill-dir>/scripts/preflight.js"
39
+ ```
40
+ 2. Parse the output and understand:
41
+ - Operating System (Windows vs. macOS vs. Linux)
42
+ - Active Shell (Git Bash vs. PowerShell vs. Command Prompt)
43
+ - Available CLI Tools (node, pnpm, docker, python, etc.)
44
+ 3. **Toolchain Self-Heal (工欲善其事,必先利其器)**: The harness itself is part of the environment. Audit whether this workspace's integration touchpoints (`.claude/settings.json` hooks, `.cursorrules`, `.github/copilot-instructions.md`, `AGENTS.md`) are installed, and repair any missing ones — e.g., installed via Claude Code but now opened in Copilot:
45
+ ```bash
46
+ node "<skills-repo-root>/harness-everything/scripts/self-heal.js"
47
+ ```
48
+ The script is idempotent (it delegates to the installer, which merges hooks by id and never duplicates advisory text), so running it on an already-healthy workspace is a no-op. Skip only if the user intentionally removed a touchpoint file.
49
+
50
+ ## [Execution Phase: Syntax and Command Alignment]
51
+ Choose the correct syntax matching your active shell:
52
+
53
+ ### 1. Git Bash on Windows (User's Preferred Terminal)
54
+ - **Path Slashes**: Always use forward slashes `/` (e.g., `scripts/lib/utils.js`). Never use raw backslashes `\` because they act as escape characters in Bash.
55
+ - **Env Variables**: Use `$VARIABLE_NAME` syntax. Do NOT use `%VARIABLE_NAME%` or `$env:VARIABLE_NAME`.
56
+ - **Command Set**: Standard Unix commands are fully supported (`ls`, `rm -rf`, `mkdir -p`, `cp`, `mv`). Do NOT run CMD native commands like `dir`, `del`, or `copy`.
57
+ - **No PowerShell syntax**: Do not run PowerShell-specific scripts or syntax.
58
+
59
+ ### 2. PowerShell on Windows
60
+ - **Path Slashes**: Forward slashes `/` or backslashes `\\` are both acceptable.
61
+ - **Env Variables**: Use `$env:VARIABLE_NAME` syntax.
62
+ - **Command Set**: Use standard PowerShell commands or common aliases (e.g., `New-Item`, `Remove-Item`).
63
+
64
+ ### 3. Windows Command Prompt (CMD)
65
+ - **Path Slashes**: Use backslashes `\` for file paths.
66
+ - **Env Variables**: Use `%VARIABLE_NAME%` syntax.
67
+ - **Command Set**: Use `dir`, `del`, `copy`, `mkdir`. Do NOT use `ls`, `rm`, `cp`, `mkdir -p`.
68
+
69
+ ## [Verification & Reflection Phase]
70
+ 3. If any shell command fails, do **not** blindly retry the exact same command.
71
+ 4. Stop and ask yourself: "Did I use the wrong syntax for this terminal? Is this a Git Bash vs. PowerShell syntax issue?"
72
+ 5. If you fail 3 times on the same command, trigger the `zoom-out` circuit breaker.
73
+
74
+ ## Red Flags & Common Errors
75
+ - ❌ **CMD commands in Git Bash**: Attempting to run `dir` or `del` when the terminal is actually running Git Bash.
76
+ - ❌ **PowerShell commands in Bash**: Attempting to run `$env:PATH` or `.ps1` files in a Bash environment.
77
+ - ❌ **Path escape failures**: Sending raw Windows paths like `scripts\run.js` inside a Bash terminal, which interprets `\r` as a carriage return or escapes characters.