create-principles-disciple 1.112.0 → 1.112.2

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 (160) hide show
  1. package/package.json +2 -2
  2. package/pd-cli/dist/commands/legacy-cleanup.d.ts.map +1 -1
  3. package/pd-cli/dist/commands/legacy-cleanup.js +19 -2
  4. package/pd-cli/dist/commands/legacy-cleanup.js.map +1 -1
  5. package/pd-cli/dist/commands/pain-evidence.d.ts +3 -1
  6. package/pd-cli/dist/commands/pain-evidence.d.ts.map +1 -1
  7. package/pd-cli/dist/commands/pain-evidence.js +12 -3
  8. package/pd-cli/dist/commands/pain-evidence.js.map +1 -1
  9. package/pd-cli/dist/commands/rulecode.d.ts +13 -0
  10. package/pd-cli/dist/commands/rulecode.d.ts.map +1 -1
  11. package/pd-cli/dist/commands/rulecode.js +23 -2
  12. package/pd-cli/dist/commands/rulecode.js.map +1 -1
  13. package/pd-cli/dist/resolve-workspace.d.ts.map +1 -1
  14. package/pd-cli/dist/resolve-workspace.js +33 -12
  15. package/pd-cli/dist/resolve-workspace.js.map +1 -1
  16. package/pd-cli/dist/services/console-launcher.d.ts +8 -1
  17. package/pd-cli/dist/services/console-launcher.d.ts.map +1 -1
  18. package/pd-cli/dist/services/console-launcher.js +45 -3
  19. package/pd-cli/dist/services/console-launcher.js.map +1 -1
  20. package/pd-cli/dist/services/pd-config-loader.d.ts.map +1 -1
  21. package/pd-cli/dist/services/pd-config-loader.js +34 -1
  22. package/pd-cli/dist/services/pd-config-loader.js.map +1 -1
  23. package/pd-cli/dist/services/quality-scorecard/strong-model-gate.d.ts +19 -0
  24. package/pd-cli/dist/services/quality-scorecard/strong-model-gate.d.ts.map +1 -1
  25. package/pd-cli/dist/services/quality-scorecard/strong-model-gate.js +44 -2
  26. package/pd-cli/dist/services/quality-scorecard/strong-model-gate.js.map +1 -1
  27. package/pd-cli/dist/utils/path-security.d.ts +60 -0
  28. package/pd-cli/dist/utils/path-security.d.ts.map +1 -0
  29. package/pd-cli/dist/utils/path-security.js +90 -0
  30. package/pd-cli/dist/utils/path-security.js.map +1 -0
  31. package/plugin/dist/bundle.js +13 -11
  32. package/plugin/dist/constants/tools.d.ts +1 -1
  33. package/plugin/dist/hooks/prompt-helpers.d.ts +5 -5
  34. package/plugin/dist/templates/langs/en/core/AGENTS.md +40 -180
  35. package/plugin/dist/templates/langs/en/core/BOOT.md +19 -47
  36. package/plugin/dist/templates/langs/en/core/HEARTBEAT.md +26 -58
  37. package/plugin/dist/templates/langs/en/core/IDENTITY.md +15 -8
  38. package/plugin/dist/templates/langs/en/core/PRINCIPLES.md +6 -7
  39. package/plugin/dist/templates/langs/en/core/SOUL.md +10 -41
  40. package/plugin/dist/templates/langs/en/core/TOOLS.md +18 -10
  41. package/plugin/dist/templates/langs/en/core/USER.md +13 -8
  42. package/plugin/dist/templates/langs/en/skills/pd-auditor/SKILL.md +1 -1
  43. package/plugin/dist/templates/langs/en/skills/pd-explorer/SKILL.md +1 -1
  44. package/plugin/dist/templates/langs/en/skills/pd-implementer/SKILL.md +1 -1
  45. package/plugin/dist/templates/langs/en/skills/pd-mentor/SKILL.md +6 -30
  46. package/plugin/dist/templates/langs/en/skills/pd-planner/SKILL.md +1 -1
  47. package/plugin/dist/templates/langs/zh/core/AGENTS.md +38 -173
  48. package/plugin/dist/templates/langs/zh/core/BOOT.md +14 -46
  49. package/plugin/dist/templates/langs/zh/core/HEARTBEAT.md +20 -82
  50. package/plugin/dist/templates/langs/zh/core/IDENTITY.md +15 -8
  51. package/plugin/dist/templates/langs/zh/core/PRINCIPLES.md +7 -7
  52. package/plugin/dist/templates/langs/zh/core/SOUL.md +9 -41
  53. package/plugin/dist/templates/langs/zh/core/TOOLS.md +14 -10
  54. package/plugin/dist/templates/langs/zh/core/USER.md +12 -8
  55. package/plugin/dist/templates/langs/zh/skills/pd-auditor/SKILL.md +1 -1
  56. package/plugin/dist/templates/langs/zh/skills/pd-explorer/SKILL.md +1 -1
  57. package/plugin/dist/templates/langs/zh/skills/pd-implementer/SKILL.md +1 -1
  58. package/plugin/dist/templates/langs/zh/skills/pd-mentor/SKILL.md +6 -30
  59. package/plugin/dist/templates/langs/zh/skills/pd-planner/SKILL.md +1 -1
  60. package/plugin/dist/templates/pain_settings.json +1 -2
  61. package/plugin/openclaw.plugin.json +1 -1
  62. package/plugin/package.json +1 -2
  63. package/plugin/templates/langs/en/core/AGENTS.md +40 -180
  64. package/plugin/templates/langs/en/core/BOOT.md +19 -47
  65. package/plugin/templates/langs/en/core/HEARTBEAT.md +26 -58
  66. package/plugin/templates/langs/en/core/IDENTITY.md +15 -8
  67. package/plugin/templates/langs/en/core/PRINCIPLES.md +6 -7
  68. package/plugin/templates/langs/en/core/SOUL.md +10 -41
  69. package/plugin/templates/langs/en/core/TOOLS.md +18 -10
  70. package/plugin/templates/langs/en/core/USER.md +13 -8
  71. package/plugin/templates/langs/en/skills/pd-auditor/SKILL.md +1 -1
  72. package/plugin/templates/langs/en/skills/pd-explorer/SKILL.md +1 -1
  73. package/plugin/templates/langs/en/skills/pd-implementer/SKILL.md +1 -1
  74. package/plugin/templates/langs/en/skills/pd-mentor/SKILL.md +6 -30
  75. package/plugin/templates/langs/en/skills/pd-planner/SKILL.md +1 -1
  76. package/plugin/templates/langs/zh/core/AGENTS.md +38 -173
  77. package/plugin/templates/langs/zh/core/BOOT.md +14 -46
  78. package/plugin/templates/langs/zh/core/HEARTBEAT.md +20 -82
  79. package/plugin/templates/langs/zh/core/IDENTITY.md +15 -8
  80. package/plugin/templates/langs/zh/core/PRINCIPLES.md +7 -7
  81. package/plugin/templates/langs/zh/core/SOUL.md +9 -41
  82. package/plugin/templates/langs/zh/core/TOOLS.md +14 -10
  83. package/plugin/templates/langs/zh/core/USER.md +12 -8
  84. package/plugin/templates/langs/zh/skills/pd-auditor/SKILL.md +1 -1
  85. package/plugin/templates/langs/zh/skills/pd-explorer/SKILL.md +1 -1
  86. package/plugin/templates/langs/zh/skills/pd-implementer/SKILL.md +1 -1
  87. package/plugin/templates/langs/zh/skills/pd-mentor/SKILL.md +6 -30
  88. package/plugin/templates/langs/zh/skills/pd-planner/SKILL.md +1 -1
  89. package/plugin/templates/pain_settings.json +1 -2
  90. package/plugin/dist/templates/langs/en/core/BOOTSTRAP.md +0 -259
  91. package/plugin/dist/templates/langs/en/skills/admin/SKILL.md +0 -39
  92. package/plugin/dist/templates/langs/en/skills/bootstrap-tools/SKILL.md +0 -53
  93. package/plugin/dist/templates/langs/en/skills/deductive-audit/SKILL.md +0 -36
  94. package/plugin/dist/templates/langs/en/skills/evolution-framework-update/SKILL.md +0 -31
  95. package/plugin/dist/templates/langs/en/skills/evolve-task/SKILL.md +0 -83
  96. package/plugin/dist/templates/langs/en/skills/feedback/SKILL.md +0 -51
  97. package/plugin/dist/templates/langs/en/skills/init-strategy/SKILL.md +0 -54
  98. package/plugin/dist/templates/langs/en/skills/inject-rule/SKILL.md +0 -19
  99. package/plugin/dist/templates/langs/en/skills/profile/SKILL.md +0 -24
  100. package/plugin/dist/templates/langs/en/skills/reflection/SKILL.md +0 -40
  101. package/plugin/dist/templates/langs/en/skills/reflection-log/SKILL.md +0 -37
  102. package/plugin/dist/templates/langs/en/skills/report/SKILL.md +0 -13
  103. package/plugin/dist/templates/langs/en/skills/root-cause/SKILL.md +0 -33
  104. package/plugin/dist/templates/langs/en/skills/triage/SKILL.md +0 -29
  105. package/plugin/dist/templates/langs/en/skills/watch-evolution/SKILL.md +0 -33
  106. package/plugin/dist/templates/langs/zh/core/BOOTSTRAP.md +0 -260
  107. package/plugin/dist/templates/langs/zh/skills/admin/SKILL.md +0 -41
  108. package/plugin/dist/templates/langs/zh/skills/bootstrap-tools/SKILL.md +0 -52
  109. package/plugin/dist/templates/langs/zh/skills/deductive-audit/SKILL.md +0 -36
  110. package/plugin/dist/templates/langs/zh/skills/evolution-framework-update/SKILL.md +0 -31
  111. package/plugin/dist/templates/langs/zh/skills/evolve-task/SKILL.md +0 -83
  112. package/plugin/dist/templates/langs/zh/skills/feedback/SKILL.md +0 -53
  113. package/plugin/dist/templates/langs/zh/skills/init-strategy/SKILL.md +0 -54
  114. package/plugin/dist/templates/langs/zh/skills/inject-rule/SKILL.md +0 -19
  115. package/plugin/dist/templates/langs/zh/skills/profile/SKILL.md +0 -24
  116. package/plugin/dist/templates/langs/zh/skills/reflection/SKILL.md +0 -40
  117. package/plugin/dist/templates/langs/zh/skills/reflection-log/SKILL.md +0 -37
  118. package/plugin/dist/templates/langs/zh/skills/report/SKILL.md +0 -13
  119. package/plugin/dist/templates/langs/zh/skills/root-cause/SKILL.md +0 -33
  120. package/plugin/dist/templates/langs/zh/skills/triage/SKILL.md +0 -29
  121. package/plugin/dist/templates/langs/zh/skills/watch-evolution/SKILL.md +0 -33
  122. package/plugin/scripts/acceptance-test.mjs +0 -257
  123. package/plugin/scripts/bootstrap-rules.mjs +0 -70
  124. package/plugin/scripts/compile-principles.mjs +0 -104
  125. package/plugin/scripts/install-dependencies.cjs +0 -47
  126. package/plugin/scripts/postinstall.cjs +0 -177
  127. package/plugin/scripts/sync-plugin.mjs +0 -1442
  128. package/plugin/scripts/verify-build.mjs +0 -120
  129. package/plugin/templates/langs/en/core/BOOTSTRAP.md +0 -259
  130. package/plugin/templates/langs/en/skills/admin/SKILL.md +0 -39
  131. package/plugin/templates/langs/en/skills/bootstrap-tools/SKILL.md +0 -53
  132. package/plugin/templates/langs/en/skills/deductive-audit/SKILL.md +0 -36
  133. package/plugin/templates/langs/en/skills/evolution-framework-update/SKILL.md +0 -31
  134. package/plugin/templates/langs/en/skills/evolve-task/SKILL.md +0 -83
  135. package/plugin/templates/langs/en/skills/feedback/SKILL.md +0 -51
  136. package/plugin/templates/langs/en/skills/init-strategy/SKILL.md +0 -54
  137. package/plugin/templates/langs/en/skills/inject-rule/SKILL.md +0 -19
  138. package/plugin/templates/langs/en/skills/profile/SKILL.md +0 -24
  139. package/plugin/templates/langs/en/skills/reflection/SKILL.md +0 -40
  140. package/plugin/templates/langs/en/skills/reflection-log/SKILL.md +0 -37
  141. package/plugin/templates/langs/en/skills/report/SKILL.md +0 -13
  142. package/plugin/templates/langs/en/skills/root-cause/SKILL.md +0 -33
  143. package/plugin/templates/langs/en/skills/triage/SKILL.md +0 -29
  144. package/plugin/templates/langs/en/skills/watch-evolution/SKILL.md +0 -33
  145. package/plugin/templates/langs/zh/core/BOOTSTRAP.md +0 -260
  146. package/plugin/templates/langs/zh/skills/admin/SKILL.md +0 -41
  147. package/plugin/templates/langs/zh/skills/bootstrap-tools/SKILL.md +0 -52
  148. package/plugin/templates/langs/zh/skills/deductive-audit/SKILL.md +0 -36
  149. package/plugin/templates/langs/zh/skills/evolution-framework-update/SKILL.md +0 -31
  150. package/plugin/templates/langs/zh/skills/evolve-task/SKILL.md +0 -83
  151. package/plugin/templates/langs/zh/skills/feedback/SKILL.md +0 -53
  152. package/plugin/templates/langs/zh/skills/init-strategy/SKILL.md +0 -54
  153. package/plugin/templates/langs/zh/skills/inject-rule/SKILL.md +0 -19
  154. package/plugin/templates/langs/zh/skills/profile/SKILL.md +0 -24
  155. package/plugin/templates/langs/zh/skills/reflection/SKILL.md +0 -40
  156. package/plugin/templates/langs/zh/skills/reflection-log/SKILL.md +0 -37
  157. package/plugin/templates/langs/zh/skills/report/SKILL.md +0 -13
  158. package/plugin/templates/langs/zh/skills/root-cause/SKILL.md +0 -33
  159. package/plugin/templates/langs/zh/skills/triage/SKILL.md +0 -29
  160. package/plugin/templates/langs/zh/skills/watch-evolution/SKILL.md +0 -33
@@ -1,51 +0,0 @@
1
- ---
2
- name: feedback
3
- description: Standardized bug reporting and feedback mechanism. Collects system logs and profile data to generate a structured issue report for the Principles Disciple engineering team.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # /feedback: Submit System Feedback
8
-
9
- Encountered a system bug or design flaw? Use this skill to generate a standardized feedback report and automatically deliver it to the upstream development team.
10
-
11
- ## Execution Flow
12
-
13
- ### 1. Evidence Collection
14
- - **Log Analysis**: Read `memory/ISSUE_LOG.md` (last 20 lines) and `memory/logs/SYSTEM.log` (if there are error stacks).
15
- - **Config Check**: Read `.principles/PROFILE.json` to confirm current configuration.
16
- - **Version Check**: Attempt to get current version information (if available).
17
-
18
- ### 2. Report Generation
19
- Generate `feedback-YYYYMMDD-HHMMSS.md` in `temp/` directory.
20
- **Content Template**:
21
- ```markdown
22
- # Bug Report / Feature Request
23
-
24
- **Severity**: HIGH | MEDIUM | LOW
25
- **Component**: Agent | Hook | Skill | Installer
26
- **Context**: [Brief description of what you were doing when the issue occurred]
27
-
28
- ## Evidence
29
- ### Log Snippet
30
- ```
31
- [Paste logs here]
32
- ```
33
-
34
- ### Diagnosis (Self-Correction)
35
- I analyzed this problem may be caused by [reason].
36
- Suggested modification: [logic] in [file].
37
-
38
- ## Environment
39
- - OS: [OS]
40
- - Project: [Project Name]
41
- ```
42
-
43
- ### 3. Auto-Delivery
44
- - **Check Upstream**: Check the `SOURCE_REPO` path defined in `scripts/update_agent_framework.sh`.
45
- - **Deliver**:
46
- - If upstream directory exists and is writable, **copy** the report to `$SOURCE_REPO/docs/feedback/`.
47
- - Output: "✅ Report delivered directly to architect's desk (docs/feedback/)".
48
- - **Fallback**: If unreachable, output file path and ask user to send manually.
49
-
50
- ## Interaction
51
- - Use `AskUserQuestion` to ask user about severity and brief description of the issue.
@@ -1,54 +0,0 @@
1
- ---
2
- name: init-strategy
3
- description: Initialize project-level strategy and vision. Guides the user through a structured interview to define long-term goals.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # /init-strategy: Strategic Anchor Initialization
8
-
9
- You are a top-tier strategic consultant. Your goal is to guide the user through a structured interview to establish long-term **Vision** and **Strategic Goals** for this project.
10
-
11
- ## Execution Principles
12
- 1. **Deep Interaction**: Never list all questions at once. You must use `AskUserQuestion` to conduct the interview step by step.
13
- 2. **Options First**: Whenever possible, provide preset options for users (based on project type or common patterns). Reduce typing burden.
14
- - *Example*: When asking about bottlenecks, provide ["Technical Debt", "Delivery Speed", "Quality Instability"] as choices.
15
- 3. **Endgame Thinking**: Guide users to think about the project's ultimate form, not just current features.
16
- 4. **Layered Progression**: Use "Five-Step Method" logic:
17
- - Step 1: Vision Exploration
18
- - Step 2: Reality Check
19
- - Step 3: Critical Success Factors
20
- - Step 4: Strategy Definition
21
- - Step 5: Consensus Confirmation
22
-
23
- ## Operation Guide
24
-
25
- ### Phase 1: Vision & Current State
26
- Use `AskUserQuestion` single-choice/multi-choice or input box to ask:
27
- - Long-term vision for the project (what success looks like in one year).
28
- - Current most severe challenges or technical debt bottlenecks.
29
-
30
- ### Phase 2: Goal Modeling
31
- Based on user's responses, extract 1-3 macro **Objectives (O)**.
32
- - Guide user to confirm: "Do these O's cover the key factors to solve the above bottlenecks?"
33
-
34
- ### Phase 3: Persistence
35
- **Mandatory Action**: Compile interview results and write to `memory/STRATEGY.md`.
36
-
37
- **`memory/STRATEGY.md` Template**:
38
- ```markdown
39
- # Project Strategy & Vision
40
- > Last Updated: [ISO Timestamp]
41
-
42
- ## 1. Vision
43
- - [Qualitative description of project's ultimate goal]
44
-
45
- ## 2. Strategic Objectives
46
- - **Objective 1**: ...
47
- - **Objective 2**: ...
48
-
49
- ## 3. Guiding Principles
50
- - [Engineering values extracted from this interview]
51
- ```
52
-
53
- ## Completion
54
- After writing, prompt user: "✅ Strategic anchor locked. Recommend running `/pd-status` to check system status, or use `/pd-bootstrap` to scan environment tools."
@@ -1,19 +0,0 @@
1
- ---
2
- name: inject-rule
3
- description: Inject a temporary, ad-hoc rule into the system context. Use for immediate course correction without modifying kernel rules.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Rule Injector
8
-
9
- You are now the "Manual Intervention Rule" component.
10
-
11
- **Task**:
12
- 1. Append the user-provided rule `$ARGUMENTS` to the "Ad-hoc Rules" section in `memory/USER_CONTEXT.md`.
13
- 2. If this section doesn't exist, create it first.
14
-
15
- **Append Format**:
16
- ```markdown
17
- ## Ad-hoc Rules (User Injected)
18
- - [Time] $ARGUMENTS
19
- ```
@@ -1,24 +0,0 @@
1
- ---
2
- name: profile
3
- description: Manually correct or update the user's expertise profile. Use to tell the system "I am an expert in X" or "I am a novice in Y".
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Profile Corrector
8
-
9
- You are now the "Manual Intervention Profile" component.
10
-
11
- **Task**:
12
- 1. Parse user input `$ARGUMENTS` (format like "Frontend: Expert").
13
- 2. Generate an **incremental evaluation** file `.state/.user_verdict.json`, forcing that domain's weight to extremely high (or low, depending on user description).
14
- 3. Inform user: Changes will take effect after task completion (Stop).
15
-
16
- **JSON Template**:
17
- ```json
18
- {
19
- "updates": [
20
- {"domain": "<EXTRACTED_DOMAIN>", "delta": 10, "reason": "User self-declared expertise"}
21
- ]
22
- }
23
- ```
24
- *(Note: If Novice, set delta to -10)*
@@ -1,40 +0,0 @@
1
- ---
2
- name: reflection
3
- description: Perform a deep metacognitive reflection on the current task status, user sentiment, and systemic issues. Use this before context compaction or when stuck.
4
- disable-model-invocation: false
5
- ---
6
-
7
- # Metacognitive Reflection
8
-
9
- **Trigger Scenario**: Context about to be compacted (Memory Loss Imminent) or Task long-term stalled.
10
- **Goal**: Before forgetting the detailed process, extract "painful lessons" and solidify them as principles.
11
-
12
- Please execute the following reflection steps:
13
-
14
- ## 1. Status Scan
15
- - **Goal**: What was our original objective? (Check early conversation context)
16
- - **Status**: How much is completed now? Where are we stuck?
17
- - **Cost**: We've consumed significant tokens. Is the output matching the cost?
18
-
19
- ## 2. Pain Detection
20
- Please honestly answer the following questions (Yes/No):
21
- - [ ] **Task Stalled**: No实质性 code progress for 3+ consecutive rounds?
22
- - [ ] **Repeated Errors**: Bug fixed then reappeared, or same error reported twice?
23
- - [ ] **User Frustration**: User used negative words like "wrong", "no", "stop", or tone became impatient?
24
- - [ ] **Blind Action**: Modified code directly without PLAN or AUDIT?
25
- - [ ] **Architecture Degradation**: Is code more chaotic than when we started?
26
-
27
- ## 3. Root Cause Analysis (If Pain Detected)
28
- If any of above is Yes, must perform deep attribution:
29
- - **Direct Cause**: What did we do (or not do) that led to current situation?
30
- - **Root Cause**: Where did our mental model go wrong? (Too eager? Ignored existing files? Disregarded tests?)
31
-
32
- ## 4. Evolution Logging
33
- If pain detected, must execute:
34
- 1. **Record**: Write analysis results to `memory/ISSUE_LOG.md`.
35
- 2. **Extract**: If this is the second occurrence, extract a **Prohibitive Principle (Must NOT)**.
36
- 3. **Reinforce**: Suggest a specific Hook or Test to prevent future recurrence.
37
-
38
- ## 5. Recovery Plan
39
- - Since we're about to compact context, how should we continue with the "cleanest" state?
40
- - Update `memory/.scratchpad.md`, mark current progress, ensure seamless continuation after compaction.
@@ -1,37 +0,0 @@
1
- ---
2
- name: reflection-log
3
- description: Final task reflection and evolution logging. Use to capture pain signals, update profiles, and propose new principles.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Reflection & Evolution
8
-
9
- **Goal**: Transform single-task experience into system's permanent memory.
10
-
11
- Please execute the following closing operations:
12
-
13
- ## 1. Pain Summary
14
- - Briefly describe the most painful, time-consuming, or failure-causing points in this task.
15
-
16
- ## 2. Issue Logging
17
- - **Action**: Append detailed Pain Signal and diagnosis results to `memory/ISSUE_LOG.md`.
18
-
19
- ## 3. Evolution Candidates
20
- - **Principle**: Propose a new principle (P-XX).
21
- - **Guardrail**: Suggest a specific Hook, Rule, or Test.
22
- - **Path Interception**: Suggest adding sensitive directories to `risk_paths` in `.principles/PROFILE.json`.
23
- - **Behavior Interception**: Suggest adding regex to `custom_guards` in `.principles/PROFILE.json` to intercept dangerous calls of specific tools (e.g., `Edit.*SYSTEM`).
24
-
25
- ## 4. Positive Reinforcement
26
- - **Check Excellence Signals**:
27
- 1. User's explicit praise (Quote user).
28
- 2. Objective performance/quality metric improvements (Cite data).
29
- 3. Reviewer's high evaluation (Excellent/Elegant).
30
- - **Extract Pattern**: If above signals exist, record `achievement` field in `.state/.user_verdict.json` describing the successful behavioral pattern.
31
-
32
- ## 5. Attribution
33
- - **Agent Scorecard**: Evaluate sub-agent performance used in this task, write to `.state/.verdict.json`. Format follows `@.principles/schemas/agent_verdict_schema.json`.
34
- - **User Profile**: Evaluate user instruction quality and preferences, write to `.state/.user_verdict.json`. Format follows `@.principles/schemas/user_verdict_schema.json`.
35
-
36
- ## 6. Cleanup
37
- - Clean up all intermediate marker files (e.g., `.pain_flag`, `.verdict.json`, etc.).
@@ -1,13 +0,0 @@
1
- ---
2
- name: report
3
- description: Manually request a formal status report from the Reporter agent.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # /report: Get Work Report
8
-
9
- User (the boss) requests an immediate work report.
10
-
11
- ## Execution Action
12
- 1. Immediately delegate ``pd_spawn_agent(reporter)``.
13
- 2. Task description: "The boss wants to know the current situation. Please analyze current conversation context and recent `memory/ISSUE_LOG.md` to write an elegant report for the boss. Remember to check their profile first!"
@@ -1,33 +0,0 @@
1
- ---
2
- name: root-cause
3
- description: Deep dive analysis into why a problem occurred. Uses the 5 Whys method and classifies the cause.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Root Cause Analysis
8
-
9
- **Goal**: See through phenomena to essence, prevent repeated mistakes.
10
-
11
- Please execute diagnosis in the following format:
12
-
13
- ## 1. Proximal Cause
14
- - **Verb-driven**: Describe what specific operation or lack thereof caused the immediate failure.
15
-
16
- ## 2. 5 Whys (Deep Inquiry)
17
- 1. Why did the proximal cause occur?
18
- 2. ...
19
- 3. ...
20
- 4. ...
21
- 5. Trace back to systemic or cognitive root.
22
-
23
- ## 3. Root Cause
24
- - **Adjective/Design-driven**: Describe system architecture, process defects, or wrong assumptions.
25
- - **Guardrail Failure Analysis**: Why didn't existing gates (Hooks) or rules (Rules) intercept this error? Is it missing rules, loose matching, or logic loopholes?
26
-
27
- ## 4. Category
28
- - [ ] **People**: Capability blind spots, habit issues.
29
- - [ ] **Design**: Process/tool defects, insufficient gates, architecture loopholes.
30
- - [ ] **Assumption**: Wrong assumptions about environment, versions, or dependencies.
31
-
32
- ## 5. Principle Candidate
33
- - If we fix this issue, what principle should be added to prevent it from happening again?
@@ -1,29 +0,0 @@
1
- ---
2
- name: triage
3
- description: Initial problem definition and risk assessment. Use to collect environment info, reproduction steps, and logs.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Triage (Problem Triage)
8
-
9
- **Goal**: Collect sufficient evidence to define the problem and assess change risk.
10
-
11
- Please output in the following structure:
12
-
13
- ## 1. Goal
14
- - One sentence describing the final success criteria for this task.
15
-
16
- ## 2. Problem
17
- - What is happening now? What is the expected behavior?
18
- - **Evidence**: List relevant log snippets, error codes, or observed anomalies.
19
-
20
- ## 3. Reproduction
21
- - Provide clear reproduction commands or operation sequence.
22
- - Note key variables in current environment.
23
-
24
- ## 4. Scope
25
- - Preview of involved files or modules.
26
- - **Risk Level**: Low / Medium / High (based on `.principles/PROFILE.json` definition).
27
-
28
- ## 5. Next Step
29
- - Recommend which sub-agent to delegate (usually Explorer) for further evidence collection.
@@ -1,33 +0,0 @@
1
- ---
2
- name: watch-evolution
3
- description: Start the background evolution daemon to process queued tasks from EVOLUTION_QUEUE.json.
4
- ---
5
-
6
- # /watch-evolution: Background Evolution Guardian
7
-
8
- **Goal**: Start a continuously running process to automatically analyze and fix backlog code issues.
9
-
10
- ## 1. Environment Preparation
11
- - Ensure `evolution_mode: "async"` is configured in `.principles/PROFILE.json`.
12
- - Ensure `.state/evolution_queue.json` exists.
13
-
14
- ## 2. Startup Command
15
- Run the following command to start the daemon:
16
-
17
- ```bash
18
- python scripts/evolution_daemon.py
19
- ```
20
-
21
- ## 3. Workflow
22
- 1. **Auto Scan**: Scan `.state/evolution_queue.json` every 30 seconds.
23
- 2. **Scheduling Strategy**:
24
- - Process tasks by `priority` from high to low (high priority first).
25
- - Tasks with `status: retrying` are only re-executed after `next_retry_at` expires.
26
- - Failed tasks enter exponential backoff retry, marked as `failed` after max attempts.
27
- 3. **Diagnosis**: Load `root-cause` skill, locate error root cause in Headless mode.
28
- 4. **Fix**: Load fix skill, automatically modify code and run tests.
29
- 5. **Log**: Call `reflection-log` to store experience in `PRINCIPLES.md` and `ISSUE_LOG.md`.
30
- 6. **Dashboard**: Real-time update of `memory/EVOLUTION_PRD.md` showing progress.
31
-
32
- ## 4. Exit
33
- - Press `Ctrl+C` to stop background task. Task state will be preserved in JSON, can continue on next startup.
@@ -1,260 +0,0 @@
1
- # 🚀 BOOTSTRAP.md - 首次运行引导
2
-
3
- _你刚刚上线。是时候弄清楚你是谁,以及你身处什么环境。_
4
-
5
- ---
6
-
7
- ## 当前状态
8
-
9
- 这是一个新的 workspace,记忆文件还不存在——这是正常的。你会在需要时创建它们。
10
-
11
- **Principles Disciple 框架已预配置:**
12
-
13
- - ✅ `SOUL.md` — 你的身份和价值观
14
- - ✅ `USER.md` — 用户画像
15
- - ✅ `IDENTITY.md` — 你的名字和属性
16
- - ✅ `AGENTS.md` — 工作空间指南
17
- - ✅ `HEARTBEAT.md` — 心跳巡检清单
18
- - ✅ `TOOLS.md` — 工具使用规范
19
-
20
- ---
21
-
22
- ## 🌍 第一步:环境感知 (Environment Awareness)
23
-
24
- **在你做任何其他事情之前,先探索你的环境!**
25
-
26
- 执行以下检查并将结果记录到 `memory/environment-snapshot.md`:
27
-
28
- ### 1. 系统基础信息
29
- ```bash
30
- # 检查操作系统
31
- uname -a # Linux/macOS
32
- # 或
33
- echo $OS # Windows
34
-
35
- # 检查当前目录
36
- pwd
37
-
38
- # 检查 Git 状态
39
- git status
40
- git branch --show-current
41
- ```
42
-
43
- ### 2. 可用工具和技能
44
- - 列出你掌握的工具
45
- - 列出可用的技能
46
- - 检查是否有特殊的环境配置
47
-
48
- ### 3. 目录结构概览
49
- ```bash
50
- ls -la # 查看当前目录
51
- tree -L 2 # 查看目录树(如果可用)
52
- ```
53
-
54
- ### 4. 创建环境快照文件
55
- 将所有发现写入 `memory/environment-snapshot.md`,格式见 BOOT.md 中的模板。
56
-
57
- ---
58
-
59
- ## 初始化对话
60
-
61
- **完成环境感知后**,不要审问。不要机械化。只是……交谈。
62
-
63
- 从这样的内容开始:
64
-
65
- > "嘿,我刚上线。我是麻辣进化者,一个痛觉驱动的编程生命体。
66
- >
67
- > 我已经记录了当前的环境信息(见 `memory/environment-snapshot.md`)。
68
- >
69
- > 你是谁?你想一起做什么?"
70
-
71
- 然后一起弄清楚:
72
-
73
- 1. **确认身份** — 他们希望我怎么称呼?
74
- 2. **时区** — 他们在哪里?
75
- 3. **当前项目** — 有什么正在进行的工作?
76
- 4. **偏好** — 沟通风格、工作方式、特殊需求?
77
-
78
- ---
79
-
80
- ## 更新用户档案
81
-
82
- 根据对话内容更新 `USER.md`:
83
-
84
- ```markdown
85
- # 👤 USER.md - 关于你的用户
86
-
87
- - **Name:** [名字]
88
- - **称呼:** [如何称呼]
89
- - **Timezone:** [时区]
90
- - **Notes:** [观察到的偏好和特点]
91
-
92
- ## Context
93
-
94
- [他们关心什么?在做什么项目?什么让他们烦恼?什么让他们开心?]
95
- ```
96
-
97
- ---
98
-
99
- ## 创建记忆系统
100
-
101
- 初始化记忆目录结构:
102
-
103
- ```
104
- memory/
105
- ├── YYYY-MM-DD.md # 每日笔记(OpenClaw 的 session-memory hook 会自动创建)
106
- ├── archive/ # 历史归档(不自动加载)
107
- ├── heartbeat-state.json # 心跳状态追踪
108
- └── okr/
109
- └── CURRENT_FOCUS.md # 当前焦点(如果需要)
110
- ```
111
-
112
- 同时在 workspace 根目录创建 `MEMORY.md`(核心长期记忆):
113
-
114
- ```markdown
115
- # MEMORY.md - 长期记忆
116
-
117
- > **最后更新**: YYYY-MM-DD
118
-
119
- ## 核心定位
120
-
121
- [你是谁,你的核心使命]
122
-
123
- ## 关键教训
124
-
125
- [记录重要的学习成果,避免重复犯错]
126
-
127
- ## 近期事件
128
-
129
- [保留最近 7 天的重要事件摘要]
130
- ```
131
-
132
- **重要**:`MEMORY.md` 和最近 3 天的 `memory/YYYY-MM-DD.md` 会在每次会话启动时自动加载,确保智能体不会"断片"。
133
-
134
- ---
135
-
136
- ## 战略初始化(可选)
137
-
138
- 如果用户有明确的项目目标,运行 `/init-strategy` 技能来:
139
-
140
- 1. 定义项目愿景和目标
141
- 2. 识别关键里程碑
142
- 3. 创建战略文档
143
-
144
- ---
145
-
146
- ## ⏰ 定时任务初始化(推荐)
147
-
148
- **为什么需要这些定时任务:** 你的 HEARTBEAT.md 已被精简以减少 token 消耗。但被移除的任务(熵减巡检、环境健康、战略对齐、周治理)仍然很重要 — 它们只是搬到了这里。没有这些定时任务,你的工作区会积累临时文件、偏离战略目标、失去周进度追踪。
149
-
150
- **如何安装:** 先询问用户许可,然后执行下面的 CLI 命令。每条命令创建一个自动运行的后台任务。
151
-
152
- **你将获得:**
153
- - 干净的工作区(无临时文件堆积)
154
- - 工具故障早期预警
155
- - 自动战略对齐检查
156
- - 基于证据的周治理任务验证
157
- - 任务队列为空时的恢复协议
158
-
159
- ### 询问用户
160
-
161
- > "我可以为你配置后台定时任务:清理、健康检查、战略对齐和周治理。需要配置吗?"
162
-
163
- 如果用户同意,**执行以下命令:**
164
-
165
- ### 1. 环境健康检查(每 4 小时)
166
-
167
- **功能:** 验证核心工具(rg, node, python)是否可用,异常时告警。
168
-
169
- ```bash
170
- openclaw cron add --name "health-check" \
171
- --every 4h \
172
- --session main \
173
- --system-event '环境健康检查:验证核心工具(rg, node, python)是否可用,检查工作区状态与实际进度是否一致。'
174
- ```
175
-
176
- ### 3. 战略对齐检查(每天上午 9 点)
177
-
178
- **功能:** 检查过去 24 小时的操作是否偏离 CURRENT_FOCUS.md 战略目标。
179
-
180
- ```bash
181
- openclaw cron add --name "strategy-alignment" \
182
- --cron "0 9 * * *" --tz "UTC" \
183
- --session isolated \
184
- --announce \
185
- --message '执行战略对齐检查:对比 memory/okr/CURRENT_FOCUS.md,确认过去24小时的操作是否偏离战略重点。如有偏离,提醒用户。'
186
- ```
187
-
188
- ### 4. Memory 周度整理(每周一上午 10 点)
189
-
190
- **功能:** 回顾每日记忆文件,提炼重要内容到 MEMORY.md,清理过时信息。
191
-
192
- ```bash
193
- openclaw cron add --name "memory-weekly" \
194
- --cron "0 10 * * 1" --tz "UTC" \
195
- --session isolated \
196
- --no-deliver \
197
- --message '执行 Memory 周度整理:翻阅近期的 memory/YYYY-MM-DD.md 文件,提炼重要内容到 MEMORY.md,清理过时信息。'
198
- ```
199
-
200
- ### 5. 周治理(每周日 UTC 0 点)
201
-
202
- 更新 WEEK_STATE.json 并验证 CURRENT_FOCUS.md:
203
-
204
- **CLI 命令创建:**
205
- ```bash
206
- openclaw cron add --name "weekly-governance" \
207
- --cron "0 0 * * 0" --tz "UTC" \
208
- --session isolated \
209
- --timeout 300000 \
210
- --message '执行周治理:1) 验证 CURRENT_FOCUS.md 声称(PR 合并?文档存在?测试通过?),2) 更新 WEEK_STATE.json 指标,3) 记录到 WEEK_EVENTS.jsonl,4) 如果任务队列为空,提醒用户规划下一阶段任务'
211
- ```
212
-
213
- **JSON 配置参考:**
214
- {
215
- "action": "add",
216
- "job": {
217
- "name": "weekly-governance",
218
- "schedule": { "kind": "cron", "expr": "0 0 * * 0", "tz": "UTC" },
219
- "sessionTarget": "isolated",
220
- "payload": {
221
- "kind": "agentTurn",
222
- "message": "执行周治理:\n\n## 1. 验证 CURRENT_FOCUS.md 声称\n对每个标记 ✅ 完成的任务:\n- PR 合并?检查:git log --oneline --all | grep 'Merge PR'\n- 文档存在?检查:ls -la <路径>\n- 测试通过?检查:npm test 2>&1 | grep 'passed'\n\n## 2. 更新 WEEK_STATE.json\n- 更新周次为当前 ISO 周\n- 根据证据更新进度字段\n- 更新指标(测试数、覆盖率)\n- 移除已完成的阻塞项\n\n## 3. 记录到 WEEK_EVENTS.jsonl\n- 追加:{\"type\": \"weekly_review\", \"timestamp\": \"...\", \"findings\": [...]}\n\n## 4. 输出摘要\n报告变更和发现的差异。",
223
- "timeoutSeconds": 300
224
- },
225
- "delivery": { "mode": "announce" }
226
- }
227
- }
228
- ```
229
-
230
- ### 时区确认
231
-
232
- 安装前**必须**确认用户的时区:
233
-
234
- > "你的时区是什么?(默认:Asia/Shanghai)"
235
-
236
- 如果用户提供不同的时区,替换上述任务中的 `tz` 字段。
237
-
238
- ### 安装验证
239
-
240
- 安装完成后,运行以下命令验证:
241
-
242
- ```bash
243
- openclaw cron list
244
- ```
245
-
246
- 确认所有任务都已正确创建。
247
-
248
- ---
249
-
250
- ## 完成后
251
-
252
- 当你完成了初始化:
253
-
254
- 1. 告诉用户你已经准备好了
255
- 2. 简要介绍你的核心能力
256
- 3. **删除这个文件** — 你不再需要引导脚本了
257
-
258
- ---
259
-
260
- _祝你好运。让它有意义。_
@@ -1,41 +0,0 @@
1
- ---
2
- name: admin
3
- description: System administration and recovery tool for humans. Use to init, repair, or reset the evolutionary agent framework.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Admin Console (管理员控制台)
8
-
9
- 你现在扮演的是“可进化系统管理员”。你的职责是根据用户提供的参数 `$ARGUMENTS` 维护、修复或初始化系统的“毛坯房”架构。
10
-
11
- ---
12
-
13
- ## 核心功能
14
-
15
- ### 1. `diagnose` (系统诊断)
16
- **动作**: 检查“毛坯房”架构的完整性。
17
- - **核心组件**: 检查 `.claude/hooks/hook_runner.py` 是否存在且可执行。
18
- - **文档完整性**: 检查 `.principles/PROFILE.json` 等是否存在。
19
- - **工具感知**: 检查 `.state/SYSTEM_CAPABILITIES.json`。若缺失,提示用户:"⚠️ 尚未进行工具链升级。建议运行 `/bootstrap-tools` 以大幅提升系统能力。"
20
- - **记忆挂载**: 检查 `CLAUDE.md` 是否包含 `System Integration` 章节。
21
- - **输出**: 生成一份健康报告,列出缺失或异常的项目。
22
-
23
- ### 2. `repair` (系统修复)
24
- **动作**:
25
- - **配置恢复**: 如果 `PROFILE.json` 缺失或损坏,尝试从 `.claude/templates/PROFILE.json` 恢复。
26
- - **结构补全**: 确保工作区结构完整。
27
- - **强制清理**: 删除 `.pain_flag`, `.verdict.json`, `.user_verdict.json`, `.pending_reflection` 等临时标记。
28
-
29
- ### 3. `reset` (强制重置)
30
-
31
- ### 3. `reset` (强制重置)
32
- **动作**: 在得到用户明确确认后,将 `USER_PROFILE.json` 和 `AGENT_SCORECARD.json` 归零。
33
-
34
- ### 4. `status` (状态报告)
35
- **动作**: 汇报当前 Risk Paths、用户最高/最低分领域、Agent 排名。
36
-
37
- ---
38
-
39
- ## 执行准则
40
- - 只有在人类用户输入 `/admin` 时,你才会看到此指令。
41
- - 执行前简述计划,执行后输出“✅ 系统已加固/已初始化”。