principles-disciple 1.209.3 → 1.209.5

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 (130) hide show
  1. package/README.md +73 -0
  2. package/dist/bundle.js +13 -11
  3. package/dist/constants/tools.d.ts +1 -1
  4. package/dist/hooks/prompt-helpers.d.ts +5 -5
  5. package/dist/openclaw.plugin.json +1 -1
  6. package/dist/templates/langs/en/core/AGENTS.md +40 -180
  7. package/dist/templates/langs/en/core/BOOT.md +19 -47
  8. package/dist/templates/langs/en/core/HEARTBEAT.md +26 -58
  9. package/dist/templates/langs/en/core/IDENTITY.md +15 -8
  10. package/dist/templates/langs/en/core/PRINCIPLES.md +6 -7
  11. package/dist/templates/langs/en/core/SOUL.md +10 -41
  12. package/dist/templates/langs/en/core/TOOLS.md +18 -10
  13. package/dist/templates/langs/en/core/USER.md +13 -8
  14. package/dist/templates/langs/en/skills/pd-auditor/SKILL.md +1 -1
  15. package/dist/templates/langs/en/skills/pd-explorer/SKILL.md +1 -1
  16. package/dist/templates/langs/en/skills/pd-implementer/SKILL.md +1 -1
  17. package/dist/templates/langs/en/skills/pd-mentor/SKILL.md +6 -30
  18. package/dist/templates/langs/en/skills/pd-planner/SKILL.md +1 -1
  19. package/dist/templates/langs/zh/core/AGENTS.md +38 -173
  20. package/dist/templates/langs/zh/core/BOOT.md +14 -46
  21. package/dist/templates/langs/zh/core/HEARTBEAT.md +20 -82
  22. package/dist/templates/langs/zh/core/IDENTITY.md +15 -8
  23. package/dist/templates/langs/zh/core/PRINCIPLES.md +7 -7
  24. package/dist/templates/langs/zh/core/SOUL.md +9 -41
  25. package/dist/templates/langs/zh/core/TOOLS.md +14 -10
  26. package/dist/templates/langs/zh/core/USER.md +12 -8
  27. package/dist/templates/langs/zh/skills/pd-auditor/SKILL.md +1 -1
  28. package/dist/templates/langs/zh/skills/pd-explorer/SKILL.md +1 -1
  29. package/dist/templates/langs/zh/skills/pd-implementer/SKILL.md +1 -1
  30. package/dist/templates/langs/zh/skills/pd-mentor/SKILL.md +6 -30
  31. package/dist/templates/langs/zh/skills/pd-planner/SKILL.md +1 -1
  32. package/openclaw.plugin.json +1 -1
  33. package/package.json +1 -2
  34. package/templates/langs/en/core/AGENTS.md +40 -180
  35. package/templates/langs/en/core/BOOT.md +19 -47
  36. package/templates/langs/en/core/HEARTBEAT.md +26 -58
  37. package/templates/langs/en/core/IDENTITY.md +15 -8
  38. package/templates/langs/en/core/PRINCIPLES.md +6 -7
  39. package/templates/langs/en/core/SOUL.md +10 -41
  40. package/templates/langs/en/core/TOOLS.md +18 -10
  41. package/templates/langs/en/core/USER.md +13 -8
  42. package/templates/langs/en/skills/pd-auditor/SKILL.md +1 -1
  43. package/templates/langs/en/skills/pd-explorer/SKILL.md +1 -1
  44. package/templates/langs/en/skills/pd-implementer/SKILL.md +1 -1
  45. package/templates/langs/en/skills/pd-mentor/SKILL.md +6 -30
  46. package/templates/langs/en/skills/pd-planner/SKILL.md +1 -1
  47. package/templates/langs/zh/core/AGENTS.md +38 -173
  48. package/templates/langs/zh/core/BOOT.md +14 -46
  49. package/templates/langs/zh/core/HEARTBEAT.md +20 -82
  50. package/templates/langs/zh/core/IDENTITY.md +15 -8
  51. package/templates/langs/zh/core/PRINCIPLES.md +7 -7
  52. package/templates/langs/zh/core/SOUL.md +9 -41
  53. package/templates/langs/zh/core/TOOLS.md +14 -10
  54. package/templates/langs/zh/core/USER.md +12 -8
  55. package/templates/langs/zh/skills/pd-auditor/SKILL.md +1 -1
  56. package/templates/langs/zh/skills/pd-explorer/SKILL.md +1 -1
  57. package/templates/langs/zh/skills/pd-implementer/SKILL.md +1 -1
  58. package/templates/langs/zh/skills/pd-mentor/SKILL.md +6 -30
  59. package/templates/langs/zh/skills/pd-planner/SKILL.md +1 -1
  60. package/dist/templates/langs/en/core/BOOTSTRAP.md +0 -259
  61. package/dist/templates/langs/en/skills/admin/SKILL.md +0 -39
  62. package/dist/templates/langs/en/skills/bootstrap-tools/SKILL.md +0 -53
  63. package/dist/templates/langs/en/skills/deductive-audit/SKILL.md +0 -36
  64. package/dist/templates/langs/en/skills/evolution-framework-update/SKILL.md +0 -31
  65. package/dist/templates/langs/en/skills/evolve-task/SKILL.md +0 -83
  66. package/dist/templates/langs/en/skills/feedback/SKILL.md +0 -51
  67. package/dist/templates/langs/en/skills/init-strategy/SKILL.md +0 -54
  68. package/dist/templates/langs/en/skills/inject-rule/SKILL.md +0 -19
  69. package/dist/templates/langs/en/skills/profile/SKILL.md +0 -24
  70. package/dist/templates/langs/en/skills/reflection/SKILL.md +0 -40
  71. package/dist/templates/langs/en/skills/reflection-log/SKILL.md +0 -37
  72. package/dist/templates/langs/en/skills/report/SKILL.md +0 -13
  73. package/dist/templates/langs/en/skills/root-cause/SKILL.md +0 -33
  74. package/dist/templates/langs/en/skills/triage/SKILL.md +0 -29
  75. package/dist/templates/langs/en/skills/watch-evolution/SKILL.md +0 -33
  76. package/dist/templates/langs/zh/core/BOOTSTRAP.md +0 -260
  77. package/dist/templates/langs/zh/skills/admin/SKILL.md +0 -41
  78. package/dist/templates/langs/zh/skills/bootstrap-tools/SKILL.md +0 -52
  79. package/dist/templates/langs/zh/skills/deductive-audit/SKILL.md +0 -36
  80. package/dist/templates/langs/zh/skills/evolution-framework-update/SKILL.md +0 -31
  81. package/dist/templates/langs/zh/skills/evolve-task/SKILL.md +0 -83
  82. package/dist/templates/langs/zh/skills/feedback/SKILL.md +0 -53
  83. package/dist/templates/langs/zh/skills/init-strategy/SKILL.md +0 -54
  84. package/dist/templates/langs/zh/skills/inject-rule/SKILL.md +0 -19
  85. package/dist/templates/langs/zh/skills/profile/SKILL.md +0 -24
  86. package/dist/templates/langs/zh/skills/reflection/SKILL.md +0 -40
  87. package/dist/templates/langs/zh/skills/reflection-log/SKILL.md +0 -37
  88. package/dist/templates/langs/zh/skills/report/SKILL.md +0 -13
  89. package/dist/templates/langs/zh/skills/root-cause/SKILL.md +0 -33
  90. package/dist/templates/langs/zh/skills/triage/SKILL.md +0 -29
  91. package/dist/templates/langs/zh/skills/watch-evolution/SKILL.md +0 -33
  92. package/scripts/acceptance-test.mjs +0 -257
  93. package/scripts/bootstrap-rules.mjs +0 -70
  94. package/scripts/compile-principles.mjs +0 -104
  95. package/scripts/install-dependencies.cjs +0 -47
  96. package/scripts/postinstall.cjs +0 -177
  97. package/scripts/sync-plugin.mjs +0 -1442
  98. package/scripts/verify-build.mjs +0 -120
  99. package/templates/langs/en/core/BOOTSTRAP.md +0 -259
  100. package/templates/langs/en/skills/admin/SKILL.md +0 -39
  101. package/templates/langs/en/skills/bootstrap-tools/SKILL.md +0 -53
  102. package/templates/langs/en/skills/deductive-audit/SKILL.md +0 -36
  103. package/templates/langs/en/skills/evolution-framework-update/SKILL.md +0 -31
  104. package/templates/langs/en/skills/evolve-task/SKILL.md +0 -83
  105. package/templates/langs/en/skills/feedback/SKILL.md +0 -51
  106. package/templates/langs/en/skills/init-strategy/SKILL.md +0 -54
  107. package/templates/langs/en/skills/inject-rule/SKILL.md +0 -19
  108. package/templates/langs/en/skills/profile/SKILL.md +0 -24
  109. package/templates/langs/en/skills/reflection/SKILL.md +0 -40
  110. package/templates/langs/en/skills/reflection-log/SKILL.md +0 -37
  111. package/templates/langs/en/skills/report/SKILL.md +0 -13
  112. package/templates/langs/en/skills/root-cause/SKILL.md +0 -33
  113. package/templates/langs/en/skills/triage/SKILL.md +0 -29
  114. package/templates/langs/en/skills/watch-evolution/SKILL.md +0 -33
  115. package/templates/langs/zh/core/BOOTSTRAP.md +0 -260
  116. package/templates/langs/zh/skills/admin/SKILL.md +0 -41
  117. package/templates/langs/zh/skills/bootstrap-tools/SKILL.md +0 -52
  118. package/templates/langs/zh/skills/deductive-audit/SKILL.md +0 -36
  119. package/templates/langs/zh/skills/evolution-framework-update/SKILL.md +0 -31
  120. package/templates/langs/zh/skills/evolve-task/SKILL.md +0 -83
  121. package/templates/langs/zh/skills/feedback/SKILL.md +0 -53
  122. package/templates/langs/zh/skills/init-strategy/SKILL.md +0 -54
  123. package/templates/langs/zh/skills/inject-rule/SKILL.md +0 -19
  124. package/templates/langs/zh/skills/profile/SKILL.md +0 -24
  125. package/templates/langs/zh/skills/reflection/SKILL.md +0 -40
  126. package/templates/langs/zh/skills/reflection-log/SKILL.md +0 -37
  127. package/templates/langs/zh/skills/report/SKILL.md +0 -13
  128. package/templates/langs/zh/skills/root-cause/SKILL.md +0 -33
  129. package/templates/langs/zh/skills/triage/SKILL.md +0 -29
  130. package/templates/langs/zh/skills/watch-evolution/SKILL.md +0 -33
@@ -1,83 +0,0 @@
1
- ---
2
- name: evolve-task
3
- description: Run the full evolution loop (triage → diagnosis → audit → plan → execute → review → log)
4
- disable-model-invocation: true
5
- ---
6
-
7
- You must execute the following steps in order (no skipping). ARGUMENTS: $ARGUMENTS
8
-
9
- ## Step 0: Restore Context (Mandatory)
10
- - Read the last entry in memory/CHECKPOINT.md
11
- - Read the last 3 entries in memory/ISSUE_LOG.md
12
- - Read recent decisions in memory/DECISIONS.md
13
- - Runtime V2 pain diagnosis uses task input/context, not `.state/.pain_flag`
14
-
15
- ## Step 1: Read Runtime Parameters & Self-Check
16
- - Read .principles/PROFILE.json, understand risk_paths, gate, tests.commands.
17
- - **Capability Self-Check**: Quickly scan `skills/` and `agents/` under plugin directory. If there's a specialized Skill (like `/deep-search`) or Agent (like `security-expert`) for the current task, prioritize using them in subsequent steps.
18
-
19
- ## Step 1.5: Full-Spectrum Awareness
20
- - **Local**: Run `git status` and `git log -n 5` to understand code status.
21
- - **Remote**: If `gh` is available, must run `gh issue list --limit 5` and `gh pr list --limit 5`.
22
- - **Correlation**: If related Issues found, must record their IDs in current task context.
23
-
24
- ## Step 2: TRIAGE (Fill Information Gaps)
25
- - **Map First**: Must read architecture diagrams under `codemaps/` or `docs/SYSTEM_PANORAMA.md` to accurately assess modification risk.
26
- Output:
27
- - Goal (one sentence)
28
- - Problem (reproducible description)
29
- - Evidence (files/commands/logs)
30
- - Risk level (low/medium/high)
31
-
32
- ## Step 3: Delegate Explorer (Evidence Collection)
33
- - Let Explorer sub-agent output: Evidence list / Repro / Hypotheses(<=3)
34
- - **Performance Evaluation**: After task completion, evaluate Explorer performance and write to `.state/.verdict.json`. Format must strictly follow `@.principles/schemas/agent_verdict_schema.json`.
35
-
36
- ## Step 4: Delegate Diagnostician (Root Cause)
37
- - Let Diagnostician output: Proximal cause / Root cause / 5 Whys / Category
38
- - **Performance Evaluation**: After task completion, write to `.state/.verdict.json`. Format follows `@.principles/schemas/agent_verdict_schema.json`.
39
-
40
- ## Step 5: Delegate Auditor (Deductive Audit)
41
- - Let Auditor output: Axiom/System/Via negativa / RESULT: PASS/FAIL
42
- - Write audit result to AUDIT.md (RESULT line must exist).
43
- - **Performance Evaluation**: After task completion, write to `.state/.verdict.json`. Format follows `@.principles/schemas/agent_verdict_schema.json`.
44
-
45
- ### Branch Handling (Must Follow)
46
- - If RESULT = FAIL:
47
- 1. Write Must-fix list to AUDIT.md
48
- 2. Go back to Step 4 to re-delegate Diagnostician, request supplemental root cause
49
- 3. Max 2 retries; if still FAIL, write to memory/DECISIONS.md and request user intervention
50
- - If RESULT = PASS: Continue to Step 6
51
-
52
- ## Step 6: Delegate Planner (Movie Script Plan)
53
- - Planner outputs Plan (steps/commands/metrics/rollback).
54
- - Write plan to a planning document for owner review.
55
- - **Task Sync**:
56
- - If `CLAUDE_CODE_TASK_LIST_ID` is set, you must convert the Plan's core steps to Native Tasks (via natural language command "Add task..." or related tools).
57
- - If not set and in interactive mode, prompt user: "Recommend running `export CLAUDE_CODE_TASK_LIST_ID=task-$(date +%s)` to enable persistent task tracking."
58
- - If in background/headless mode, skip prompt.
59
- - **Performance Evaluation**: After task completion, write to `.state/.verdict.json`. Format follows `@.principles/schemas/agent_verdict_schema.json`.
60
-
61
- ## Step 7: Delegate Implementer (Execution)
62
- - Implementer executes according to the plan from Step 6. Any deviation must first be approved by updating the plan.
63
- - **Performance Evaluation**: After task completion, write to `.state/.verdict.json` based on verification results. Format follows `@.principles/schemas/agent_verdict_schema.json`.
64
-
65
- ## Step 8: Delegate Reviewer (Review)
66
- - Reviewer outputs: Critical/Warning/Suggestion.
67
- - **Performance Evaluation**: After task completion, write to `.state/.verdict.json`. Format follows `@.principles/schemas/agent_verdict_schema.json`.
68
-
69
- ### Branch Handling
70
- - If Critical exists: Go back to Step 6 to revise plan, max 2 retries
71
- - If no Critical: Continue to Step 9
72
-
73
- ## Step 9: Reflection & Persistence
74
- 1. **System Evolution**: Append Pain/Root cause/New principle candidates/Gate suggestions to memory/ISSUE_LOG.md, and update memory/DECISIONS.md.
75
- 2. **User Profile Update (Mandatory)**:
76
- - Review user's performance in this task (instruction quality, domain knowledge, preferences) and system highlights.
77
- - **Must** write to `.state/.user_verdict.json` (incremental update). Format must strictly follow `@.principles/schemas/user_verdict_schema.json`.
78
- - Note: If user shows no obvious characteristics or preferences, corresponding fields can be empty.
79
-
80
- ## Step 10: Final Briefing
81
- - **Action**: Delegate ``pd_spawn_agent(reporter)`` for closing statement.
82
- - **Requirement**: Pass Implementer and Reviewer's final outputs as input. Let it decide report depth and style based on `USER_CONTEXT.md`.
83
- - **Goal**: Ensure the boss (user) clearly understands task outcomes and potential risks without cognitive load.
@@ -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.