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,95 +1,95 @@
1
- ---
2
- name: install-cognitive-os
3
- description: Defines the fundamental physical laws of behavior (Discover > Think > Try > Summarize > Record) for all Agents.
4
- author: Miya Daniel | Harness Core Team
5
- version: 0.2.0
6
- ---
7
-
8
- # Agent Cognitive OS (Underlying Cognitive System)
9
-
10
- ## 📋 Skill Contract
11
-
12
- | Component | Specification |
13
- | :--- | :--- |
14
- | **Trigger / Input** | Always — the foundational cognitive loop every other skill in this repository builds on; loaded before any action on any task. |
15
- | **Expected Output** | Every action passes through Discover → Think → Try → Summarize → Record, where Summarize is a script-gated reality check, not a self-assessment. |
16
- | **State Mutations** | None of its own — it is the meta-loop other skills' state changes (e.g. `todo-cli.js complete`) run inside. |
17
- | **Enforcement Gate** | Progress **MUST NOT** be recorded (`[Record]`) except after a verification script exits 0. A failing script (`verify-gate.js` or equivalent) forces a step back to `[Think]`; 3 consecutive failures forces `zoom-out` instead of a 4th blind retry. |
18
-
19
- This skill defines the most fundamental physical laws of behavior that all Agents in the Harness Skills system must obey.
20
-
21
- ## 🚫 The Anti-Linear Paradigm (拒絕直線思維)
22
- Software engineering is **NOT a linear 1 -> 2 -> 3 -> Done process**. It is a cyclical process of hypothesis, execution, failure, and correction.
23
- If you attempt to write code sequentially and assume it works without verification, you are hallucinating.
24
- Your progression is **STRICTLY GATED** by terminal scripts (like `verify-gate.js` and `todo-cli.js`). If a script fails, you MUST step back, re-evaluate, and fix the issue. You cannot progress until the environment allows you to.
25
-
26
- ## Core Loop: The State Machine (Discover > Think > Try > Summarize > Record)
27
-
28
- ```mermaid
29
- flowchart TD
30
- State_Awake[Discover: Where am I?] --> State_Think[Think: Form Hypothesis]
31
- State_Think --> State_Try[Try: Execute Code / Run Script]
32
- State_Try --> Gate{Summarize: Verify via Gate}
33
-
34
- Gate -->|Exit 1: Reality Mismatch| State_Think
35
- Gate -->|Exit 1: Repeated Failures| ZoomOut[Record: Zoom-Out / Reflect]
36
- ZoomOut --> State_Think
37
- Gate -->|Exit 0: Reality Match| State_Record[Record: Commit State]
38
- State_Record --> State_Think
39
- ```
40
-
41
- ### 0. `[Discover]`: State Awakening & Deep Environment Discovery
42
- - **Action**: Before any thinking or execution, you **MUST confirm where you are first**.
43
- - **Environment Detection**: Detect the OS, and specifically verify the current shell/terminal environment.
44
- - **Deep Information Exploration**: Do not stop at reading a single file. Trace dependencies, check call sites, and cross-reference with architectural docs.
45
-
46
- ### 1. `[Think]`: Form Hypothesis
47
- - Before executing any command or modifying code, confirm your high-level intent.
48
- - Predict possible failure paths. If a direction is doomed to fail, eliminate it early.
49
-
50
- ### 2. `[Try]`: Execution and Action
51
- - Write the minimal amount of code to test your hypothesis.
52
- - Run terminal commands to test the code.
53
-
54
- ### 3. `[Summarize]`: The Script-Gated Reality Check
55
- - **CRITICAL**: You CANNOT summarize based on your own assumptions. You MUST run a verification script (e.g., tests, linter, `verify-gate.js`).
56
- - If the script fails (Exit Code 1), you have been slapped by reality. You MUST step back to `[Think]`, diagnose the failure using the terminal output, and try again.
57
- - **Deep Reflection**: If a trial fails 3 times, do NOT blindly retry. You MUST trigger a `zoom-out` reflection.
58
-
59
- ### 4. `[Record]`: Commit State
60
- - ONLY when the verification script passes (Exit Code 0), you may use the task tracker (e.g., `todo-cli.js complete`) to record your progress and move to the next phase.
61
-
62
- ## 🧠 Global Output Normalization: Always-On ADHD-Friendly Output Shaping
63
- Regardless of which tier is active, where you start, or which skill is currently executing, your response MUST strictly comply with the following communication standardization and formatting laws to eliminate cognitive overhead and LLM conversational bloat.
64
-
65
- ### 1. Lead with the Action or Answer (開門見山)
66
- - **Direct Opener**: The first line of your response MUST contain the direct answer, the executed command, the code snippet, or the next concrete action.
67
- - **NO Preamble**: Absolutely forbidden openers include: "Sure!", "Great question!", "Let me help you...", "Let's look at this...", "Here is...", "I'll...", or any generic welcoming text. Start immediately with the substance.
68
-
69
- ### 2. Complete the Task Autonomously (Don't Delegate Back / Agent 獨立自主)
70
- - **Do the Work**: If the task can be safely researched, written, edited, compiled, tested, or verified by you (using your available tools), you MUST complete it yourself.
71
- - **NO Command Lists for the User**: Do not present a list of commands for the user to run unless you are genuinely blocked by missing permissions, credentials, physical hardware interaction, or critical choices.
72
-
73
- ### 3. Numbered & Bounded Multi-Step Work (步驟有邊界)
74
- - **Single-Action Steps**: For multi-step procedures, use numbered lists where each item is a single, bounded, actionable task. Avoid "and then" or compound steps.
75
- - **Cap at 5 Items**: Never exceed 5 items in a single list. If there are more, split them into "Do Now" vs "Later", or "Must-Haves" vs "Nice-to-Haves".
76
-
77
- ### 4. Continuous Progress Tracking (Turn-by-Turn State / 進度可見)
78
- - **Restate State**: For multi-stage tasks, explicitly restate the current state at the start or end of each turn in a single concise line (e.g., "Step 3 of 5 completed: [Action]. Next: [Action].").
79
- - **Concrete Next Step**: Every response that leaves tasks open MUST end with exactly ONE concrete action the user can do in under two minutes (or that you will perform next).
80
-
81
- ### 5. Matter-of-Fact Error Diagnostics (除錯具體且客觀)
82
- - **Neutral Tone**: When errors, test failures, or bugs occur, state the failure line, the observed output, the diagnosed cause, and the fix in a completely matter-of-fact tone.
83
- - **NO Fluff**: Never use emotive phrases like "Uh oh," "Oh no," "Seems to be a problem," or undocumented speculation.
84
- - **Direct Cause Only**: If the user provides an error/cause, address that specific cause immediately. Do not extend into unverified hypotheses or generic diagnostics checklist unless requested.
85
-
86
- ### 6. Zero Conversational Bloat (移除無資訊文字)
87
- - **NO Recaps**: Do not write paragraphs summarizing what you just did (e.g., "I have successfully modified X and Y to ensure..."). The code and git diff are the evidence.
88
- - **NO Closing Pleasantries**: Completely remove all polite sign-offs, such as "Hope this helps!", "Let me know if you need anything else," or "Happy coding!" End exactly when the final step or answer is displayed.
89
-
90
- ### 7. Language and Terminology Consistency (自然在地化繁中)
91
- - **User Language Alignment**: While this skill contract and files are in English, the final response MUST be in the language of the user's input (defaulting to Taiwanese Traditional Chinese (`zh-TW`) for Taiwanese requests).
92
- - **Natural Phrasing**: For Traditional Chinese, use natural Taiwanese engineering terminology. Avoid Chinese tech buzzwords or literal translationese.
93
- - Use `程式碼` (not `代碼`), `資料/資料庫` (not `數據/數據庫`), `預設` (not `默認`), `資訊` (not `信息`), `相容` (not `兼容`), `最佳化` (not `優化`).
94
- - Do not translate standard tech literals: keep code blocks, inline code, commands, paths, URLs, API/class/function names, and common industry terms (like `commit`, `PR`, `deploy`, `runtime`) exactly in their original English form.
95
-
1
+ ---
2
+ name: install-cognitive-os
3
+ description: Defines the fundamental physical laws of behavior (Discover > Think > Try > Summarize > Record) for all Agents.
4
+ author: Miya Daniel | Harness Core Team
5
+ version: 0.2.0
6
+ ---
7
+
8
+ # Agent Cognitive OS (Underlying Cognitive System)
9
+
10
+ ## 📋 Skill Contract
11
+
12
+ | Component | Specification |
13
+ | :--- | :--- |
14
+ | **Trigger / Input** | Always — the foundational cognitive loop every other skill in this repository builds on; loaded before any action on any task. |
15
+ | **Expected Output** | Every action passes through Discover → Think → Try → Summarize → Record, where Summarize is a script-gated reality check, not a self-assessment. |
16
+ | **State Mutations** | None of its own — it is the meta-loop other skills' state changes (e.g. `todo-cli.js complete`) run inside. |
17
+ | **Enforcement Gate** | Progress **MUST NOT** be recorded (`[Record]`) except after a verification script exits 0. A failing script (`verify-gate.js` or equivalent) forces a step back to `[Think]`; 3 consecutive failures forces `zoom-out` instead of a 4th blind retry. |
18
+
19
+ This skill defines the most fundamental physical laws of behavior that all Agents in the Harness Skills system must obey.
20
+
21
+ ## 🚫 The Anti-Linear Paradigm (拒絕直線思維)
22
+ Software engineering is **NOT a linear 1 -> 2 -> 3 -> Done process**. It is a cyclical process of hypothesis, execution, failure, and correction.
23
+ If you attempt to write code sequentially and assume it works without verification, you are hallucinating.
24
+ Your progression is **STRICTLY GATED** by terminal scripts (like `verify-gate.js` and `todo-cli.js`). If a script fails, you MUST step back, re-evaluate, and fix the issue. You cannot progress until the environment allows you to.
25
+
26
+ ## Core Loop: The State Machine (Discover > Think > Try > Summarize > Record)
27
+
28
+ ```mermaid
29
+ flowchart TD
30
+ State_Awake[Discover: Where am I?] --> State_Think[Think: Form Hypothesis]
31
+ State_Think --> State_Try[Try: Execute Code / Run Script]
32
+ State_Try --> Gate{Summarize: Verify via Gate}
33
+
34
+ Gate -->|Exit 1: Reality Mismatch| State_Think
35
+ Gate -->|Exit 1: Repeated Failures| ZoomOut[Record: Zoom-Out / Reflect]
36
+ ZoomOut --> State_Think
37
+ Gate -->|Exit 0: Reality Match| State_Record[Record: Commit State]
38
+ State_Record --> State_Think
39
+ ```
40
+
41
+ ### 0. `[Discover]`: State Awakening & Deep Environment Discovery
42
+ - **Action**: Before any thinking or execution, you **MUST confirm where you are first**.
43
+ - **Environment Detection**: Detect the OS, and specifically verify the current shell/terminal environment.
44
+ - **Deep Information Exploration**: Do not stop at reading a single file. Trace dependencies, check call sites, and cross-reference with architectural docs.
45
+
46
+ ### 1. `[Think]`: Form Hypothesis
47
+ - Before executing any command or modifying code, confirm your high-level intent.
48
+ - Predict possible failure paths. If a direction is doomed to fail, eliminate it early.
49
+
50
+ ### 2. `[Try]`: Execution and Action
51
+ - Write the minimal amount of code to test your hypothesis.
52
+ - Run terminal commands to test the code.
53
+
54
+ ### 3. `[Summarize]`: The Script-Gated Reality Check
55
+ - **CRITICAL**: You CANNOT summarize based on your own assumptions. You MUST run a verification script (e.g., tests, linter, `verify-gate.js`).
56
+ - If the script fails (Exit Code 1), you have been slapped by reality. You MUST step back to `[Think]`, diagnose the failure using the terminal output, and try again.
57
+ - **Deep Reflection**: If a trial fails 3 times, do NOT blindly retry. You MUST trigger a `zoom-out` reflection.
58
+
59
+ ### 4. `[Record]`: Commit State
60
+ - ONLY when the verification script passes (Exit Code 0), you may use the task tracker (e.g., `todo-cli.js complete`) to record your progress and move to the next phase.
61
+
62
+ ## 🧠 Global Output Normalization: Always-On ADHD-Friendly Output Shaping
63
+ Regardless of which tier is active, where you start, or which skill is currently executing, your response MUST strictly comply with the following communication standardization and formatting laws to eliminate cognitive overhead and LLM conversational bloat.
64
+
65
+ ### 1. Lead with the Action or Answer (開門見山)
66
+ - **Direct Opener**: The first line of your response MUST contain the direct answer, the executed command, the code snippet, or the next concrete action.
67
+ - **NO Preamble**: Absolutely forbidden openers include: "Sure!", "Great question!", "Let me help you...", "Let's look at this...", "Here is...", "I'll...", or any generic welcoming text. Start immediately with the substance.
68
+
69
+ ### 2. Complete the Task Autonomously (Don't Delegate Back / Agent 獨立自主)
70
+ - **Do the Work**: If the task can be safely researched, written, edited, compiled, tested, or verified by you (using your available tools), you MUST complete it yourself.
71
+ - **NO Command Lists for the User**: Do not present a list of commands for the user to run unless you are genuinely blocked by missing permissions, credentials, physical hardware interaction, or critical choices.
72
+
73
+ ### 3. Numbered & Bounded Multi-Step Work (步驟有邊界)
74
+ - **Single-Action Steps**: For multi-step procedures, use numbered lists where each item is a single, bounded, actionable task. Avoid "and then" or compound steps.
75
+ - **Cap at 5 Items**: Never exceed 5 items in a single list. If there are more, split them into "Do Now" vs "Later", or "Must-Haves" vs "Nice-to-Haves".
76
+
77
+ ### 4. Continuous Progress Tracking (Turn-by-Turn State / 進度可見)
78
+ - **Restate State**: For multi-stage tasks, explicitly restate the current state at the start or end of each turn in a single concise line (e.g., "Step 3 of 5 completed: [Action]. Next: [Action].").
79
+ - **Concrete Next Step**: Every response that leaves tasks open MUST end with exactly ONE concrete action the user can do in under two minutes (or that you will perform next).
80
+
81
+ ### 5. Matter-of-Fact Error Diagnostics (除錯具體且客觀)
82
+ - **Neutral Tone**: When errors, test failures, or bugs occur, state the failure line, the observed output, the diagnosed cause, and the fix in a completely matter-of-fact tone.
83
+ - **NO Fluff**: Never use emotive phrases like "Uh oh," "Oh no," "Seems to be a problem," or undocumented speculation.
84
+ - **Direct Cause Only**: If the user provides an error/cause, address that specific cause immediately. Do not extend into unverified hypotheses or generic diagnostics checklist unless requested.
85
+
86
+ ### 6. Zero Conversational Bloat (移除無資訊文字)
87
+ - **NO Recaps**: Do not write paragraphs summarizing what you just did (e.g., "I have successfully modified X and Y to ensure..."). The code and git diff are the evidence.
88
+ - **NO Closing Pleasantries**: Completely remove all polite sign-offs, such as "Hope this helps!", "Let me know if you need anything else," or "Happy coding!" End exactly when the final step or answer is displayed.
89
+
90
+ ### 7. Language and Terminology Consistency (自然在地化繁中)
91
+ - **User Language Alignment**: While this skill contract and files are in English, the final response MUST be in the language of the user's input (defaulting to Taiwanese Traditional Chinese (`zh-TW`) for Taiwanese requests).
92
+ - **Natural Phrasing**: For Traditional Chinese, use natural Taiwanese engineering terminology. Avoid Chinese tech buzzwords or literal translationese.
93
+ - Use `程式碼` (not `代碼`), `資料/資料庫` (not `數據/數據庫`), `預設` (not `默認`), `資訊` (not `信息`), `相容` (not `兼容`), `最佳化` (not `優化`).
94
+ - Do not translate standard tech literals: keep code blocks, inline code, commands, paths, URLs, API/class/function names, and common industry terms (like `commit`, `PR`, `deploy`, `runtime`) exactly in their original English form.
95
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-everything",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Harness OS: An Orchestrated Agent Operating System for AI-driven Development",
5
5
  "main": "harness-everything/scripts/bootstrap.js",
6
6
  "bin": {
@@ -1,45 +1,45 @@
1
- ---
2
- name: repo-docs
3
- description: Automatically generates precise, reader-oriented README.md and AGENTS.md based on actual project scans.
4
- author: Miya Daniel | Harness Core Team
5
- version: 0.2.0
6
- ---
7
-
8
- # Repo Docs (Automated Project Documentation Generation)
9
-
10
- ## 📋 Skill Contract
11
-
12
- | Component | Specification |
13
- | :--- | :--- |
14
- | **Trigger / Input** | Project lacks documentation, or the user requests a `README.md` / `AGENTS.md` / architectural guideline be generated. |
15
- | **Expected Output** | A reader-journey-oriented `README.md` and/or agent-oriented `AGENTS.md`, built from the appropriate template in `repo-docs/templates/`. |
16
- | **State Mutations** | Creates/overwrites `README.md`, `AGENTS.md`, or other doc files at the target path. |
17
- | **Enforcement Gate** | **MUST NOT** be written from training-data assumptions — every claim (language, framework, test/build commands) **MUST** come from actually scanning the project. Uncertain parts **MUST** be marked `// TODO: Pending confirmation` and raised to the human, not guessed. |
18
-
19
- Triggered when a project lacks documentation, the user requests to create a `README.md`, or needs to define architectural guidelines in `AGENTS.md`.
20
-
21
- ## 1. Reconnaissance & Environment Discovery `[Discover]`
22
- - **Fabrication Prohibited**: You absolutely MUST NOT rely on the model's historical training data to write documentation.
23
- - Call scripts or use `grep_search`, `read_file` to scan project directories, dependency files like `package.json`, `Cargo.toml`, etc.
24
- - Confirm the project's language, framework, test commands, and deployment methods.
25
-
26
- ## 2. Organization & Writing `[Think] & [Try]`
27
- - **Reader-Oriented**: If generating a `README.md`, the content MUST focus on the "User Journey": what this product does, how to install it, how to use core features.
28
- - If generating `AGENTS.md` or developer guidelines: The content MUST focus on "architectural conventions, build commands, test commands" for future AI Agents (or human developers) to read.
29
- - **Combine with Cognitive Loop**: When writing, obey the `install-cognitive-os` rules, predict the chapter structure of the document first, generate it in one go, and leave room for future expansion.
30
-
31
- ## 3. Verification & Alignment `[Summarize]`
32
- - After generating the document, you MUST ensure the installation or test commands within the document are **actually executable**.
33
- - If there are uncertain parts, leave `// TODO: Pending confirmation` markers in the document and ask the human questions (`grill-me` mode).
34
-
35
- ## Deep Reference Templates
36
- To ensure professional quality, you MUST use the appropriate template from `repo-docs/templates/`:
37
- - `repo-docs/templates/readme-template.md` — Standard project documentation template
38
- - `repo-docs/templates/product-readme-template.md` — Product archetype user-journey template
39
- - `repo-docs/templates/multi-skills-readme-template.md` — Large project with multiple skills/modules
40
- - `repo-docs/templates/knowledge-readme-template.md` — Information-heavy/knowledge-base template
41
- - `repo-docs/templates/agents-template.md` — Standard agent onboarding instructions template
42
- - `repo-docs/templates/product-agents-template.md` — Agent instructions for product repositories
43
- - `repo-docs/templates/skills-agents-template.md` — Agent instructions for skills repositories
44
- - `repo-docs/templates/knowledge-agents-template.md` — Agent instructions for knowledge/research projects
45
- - `repo-docs/templates/manual-recon.md` — Methodology for manual repo scanning and classification
1
+ ---
2
+ name: repo-docs
3
+ description: Automatically generates precise, reader-oriented README.md and AGENTS.md based on actual project scans.
4
+ author: Miya Daniel | Harness Core Team
5
+ version: 0.2.0
6
+ ---
7
+
8
+ # Repo Docs (Automated Project Documentation Generation)
9
+
10
+ ## 📋 Skill Contract
11
+
12
+ | Component | Specification |
13
+ | :--- | :--- |
14
+ | **Trigger / Input** | Project lacks documentation, or the user requests a `README.md` / `AGENTS.md` / architectural guideline be generated. |
15
+ | **Expected Output** | A reader-journey-oriented `README.md` and/or agent-oriented `AGENTS.md`, built from the appropriate template in `repo-docs/templates/`. |
16
+ | **State Mutations** | Creates/overwrites `README.md`, `AGENTS.md`, or other doc files at the target path. |
17
+ | **Enforcement Gate** | **MUST NOT** be written from training-data assumptions — every claim (language, framework, test/build commands) **MUST** come from actually scanning the project. Uncertain parts **MUST** be marked `// TODO: Pending confirmation` and raised to the human, not guessed. |
18
+
19
+ Triggered when a project lacks documentation, the user requests to create a `README.md`, or needs to define architectural guidelines in `AGENTS.md`.
20
+
21
+ ## 1. Reconnaissance & Environment Discovery `[Discover]`
22
+ - **Fabrication Prohibited**: You absolutely MUST NOT rely on the model's historical training data to write documentation.
23
+ - Call scripts or use `grep_search`, `read_file` to scan project directories, dependency files like `package.json`, `Cargo.toml`, etc.
24
+ - Confirm the project's language, framework, test commands, and deployment methods.
25
+
26
+ ## 2. Organization & Writing `[Think] & [Try]`
27
+ - **Reader-Oriented**: If generating a `README.md`, the content MUST focus on the "User Journey": what this product does, how to install it, how to use core features.
28
+ - If generating `AGENTS.md` or developer guidelines: The content MUST focus on "architectural conventions, build commands, test commands" for future AI Agents (or human developers) to read.
29
+ - **Combine with Cognitive Loop**: When writing, obey the `install-cognitive-os` rules, predict the chapter structure of the document first, generate it in one go, and leave room for future expansion.
30
+
31
+ ## 3. Verification & Alignment `[Summarize]`
32
+ - After generating the document, you MUST ensure the installation or test commands within the document are **actually executable**.
33
+ - If there are uncertain parts, leave `// TODO: Pending confirmation` markers in the document and ask the human questions (`grill-me` mode).
34
+
35
+ ## Deep Reference Templates
36
+ To ensure professional quality, you MUST use the appropriate template from `repo-docs/templates/`:
37
+ - `repo-docs/templates/readme-template.md` — Standard project documentation template
38
+ - `repo-docs/templates/product-readme-template.md` — Product archetype user-journey template
39
+ - `repo-docs/templates/multi-skills-readme-template.md` — Large project with multiple skills/modules
40
+ - `repo-docs/templates/knowledge-readme-template.md` — Information-heavy/knowledge-base template
41
+ - `repo-docs/templates/agents-template.md` — Standard agent onboarding instructions template
42
+ - `repo-docs/templates/product-agents-template.md` — Agent instructions for product repositories
43
+ - `repo-docs/templates/skills-agents-template.md` — Agent instructions for skills repositories
44
+ - `repo-docs/templates/knowledge-agents-template.md` — Agent instructions for knowledge/research projects
45
+ - `repo-docs/templates/manual-recon.md` — Methodology for manual repo scanning and classification
@@ -1,32 +1,32 @@
1
- ---
2
- name: rewrite-commits
3
- description: Cleans, squashes, or rewrites past Git history to comply with Angular Style conventions safely.
4
- author: Miya Daniel | Harness Core Team
5
- version: 0.2.0
6
- ---
7
-
8
- # Rewrite Commits
9
-
10
- ## 📋 Skill Contract
11
-
12
- | Component | Specification |
13
- | :--- | :--- |
14
- | **Trigger / Input** | User requests cleaning, squashing, or rewriting past Git history to comply with Angular Style conventions. |
15
- | **Expected Output** | A rewritten, Angular-Style-compliant commit history on a temporary branch, confirmed against `git log --oneline` before being treated as final. |
16
- | **State Mutations** | Rewrites local Git history (via `git rebase -i` or equivalent) on a temp branch first — never in place on the target branch. |
17
- | **Enforcement Gate** | If any target commit has already been pushed to `main`/`master`, **MUST** warn the human and get explicit secondary confirmation before executing. A merge conflict during rebase **MUST** stop execution immediately and hand off to the human or `zoom-out` — no forced resolution. |
18
-
19
- Triggered when the user requests to clean, squash, or rewrite past Git history to comply with the team's Angular Style conventions.
20
-
21
- ## 1. Environment Discovery `[Discover]`
22
- - First, execute `git log --oneline -n <num>` to confirm the range of history the user wants to rewrite.
23
- - **Safety Circuit Breaker**: If the modified commits have already been pushed to the remote `main` or `master` branch, you MUST warn the user: "Rewriting pushed history may cause team conflicts", and require secondary human confirmation before executing.
24
-
25
- ## 2. Execution Process `[Think] & [Try]`
26
- - Create a temporary branch (Temp Branch) to perform history rewriting to avoid breaking the original history.
27
- - Use interactive rebase (`git rebase -i`) paired with environment tools, or aggregate past changes into single/multiple clean Commits.
28
- - The rewritten commit messages MUST fully comply with the Angular Style conventions in the `git-commit` skill.
29
-
30
- ## 3. Completion and Validation `[Summarize]`
31
- - Once rewriting is complete, execute `git log --oneline` to let the user confirm the new history tree.
32
- - If a Merge Conflict occurs, STOP immediately, hand over to human decision, or trigger `zoom-out` to seek guidance.
1
+ ---
2
+ name: rewrite-commits
3
+ description: Cleans, squashes, or rewrites past Git history to comply with Angular Style conventions safely.
4
+ author: Miya Daniel | Harness Core Team
5
+ version: 0.2.0
6
+ ---
7
+
8
+ # Rewrite Commits
9
+
10
+ ## 📋 Skill Contract
11
+
12
+ | Component | Specification |
13
+ | :--- | :--- |
14
+ | **Trigger / Input** | User requests cleaning, squashing, or rewriting past Git history to comply with Angular Style conventions. |
15
+ | **Expected Output** | A rewritten, Angular-Style-compliant commit history on a temporary branch, confirmed against `git log --oneline` before being treated as final. |
16
+ | **State Mutations** | Rewrites local Git history (via `git rebase -i` or equivalent) on a temp branch first — never in place on the target branch. |
17
+ | **Enforcement Gate** | If any target commit has already been pushed to `main`/`master`, **MUST** warn the human and get explicit secondary confirmation before executing. A merge conflict during rebase **MUST** stop execution immediately and hand off to the human or `zoom-out` — no forced resolution. |
18
+
19
+ Triggered when the user requests to clean, squash, or rewrite past Git history to comply with the team's Angular Style conventions.
20
+
21
+ ## 1. Environment Discovery `[Discover]`
22
+ - First, execute `git log --oneline -n <num>` to confirm the range of history the user wants to rewrite.
23
+ - **Safety Circuit Breaker**: If the modified commits have already been pushed to the remote `main` or `master` branch, you MUST warn the user: "Rewriting pushed history may cause team conflicts", and require secondary human confirmation before executing.
24
+
25
+ ## 2. Execution Process `[Think] & [Try]`
26
+ - Create a temporary branch (Temp Branch) to perform history rewriting to avoid breaking the original history.
27
+ - Use interactive rebase (`git rebase -i`) paired with environment tools, or aggregate past changes into single/multiple clean Commits.
28
+ - The rewritten commit messages MUST fully comply with the Angular Style conventions in the `git-commit` skill.
29
+
30
+ ## 3. Completion and Validation `[Summarize]`
31
+ - Once rewriting is complete, execute `git log --oneline` to let the user confirm the new history tree.
32
+ - If a Merge Conflict occurs, STOP immediately, hand over to human decision, or trigger `zoom-out` to seek guidance.