principles-disciple 1.81.0 → 1.82.0

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 (60) hide show
  1. package/openclaw.plugin.json +1 -1
  2. package/package.json +1 -1
  3. package/src/commands/strategy.ts +0 -18
  4. package/src/i18n/commands.ts +0 -12
  5. package/src/index.ts +4 -22
  6. package/templates/langs/en/core/BOOTSTRAP.md +4 -18
  7. package/templates/langs/en/skills/bootstrap-tools/SKILL.md +1 -1
  8. package/templates/langs/en/skills/init-strategy/SKILL.md +1 -1
  9. package/templates/langs/en/skills/pd-mentor/SKILL.md +8 -23
  10. package/templates/langs/zh/core/BOOTSTRAP.md +2 -15
  11. package/templates/langs/zh/skills/bootstrap-tools/SKILL.md +1 -1
  12. package/templates/langs/zh/skills/init-strategy/SKILL.md +1 -1
  13. package/templates/langs/zh/skills/pd-mentor/SKILL.md +7 -22
  14. package/tests/commands/strategy.test.ts +3 -18
  15. package/templates/langs/en/skills/ai-sprint-orchestration/EXAMPLES.md +0 -63
  16. package/templates/langs/en/skills/ai-sprint-orchestration/REFERENCE.md +0 -136
  17. package/templates/langs/en/skills/ai-sprint-orchestration/SKILL.md +0 -67
  18. package/templates/langs/en/skills/ai-sprint-orchestration/references/agent-registry.json +0 -143
  19. package/templates/langs/en/skills/ai-sprint-orchestration/references/specs/bugfix-complex-template.json +0 -107
  20. package/templates/langs/en/skills/ai-sprint-orchestration/references/specs/feature-complex-template.json +0 -107
  21. package/templates/langs/en/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal-verify.json +0 -95
  22. package/templates/langs/en/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal.json +0 -98
  23. package/templates/langs/en/skills/ai-sprint-orchestration/references/workflow-v1-acceptance-checklist.md +0 -58
  24. package/templates/langs/en/skills/ai-sprint-orchestration/references/workflow-v1.4-work-unit-handoff.md +0 -190
  25. package/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/archive.mjs +0 -310
  26. package/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/contract-enforcement.mjs +0 -683
  27. package/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/decision.mjs +0 -604
  28. package/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/state-store.mjs +0 -32
  29. package/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/task-specs.mjs +0 -707
  30. package/templates/langs/en/skills/ai-sprint-orchestration/scripts/run.mjs +0 -3455
  31. package/templates/langs/en/skills/evolve-system/SKILL.md +0 -46
  32. package/templates/langs/en/skills/manage-okr/SKILL.md +0 -96
  33. package/templates/langs/en/skills/pd-daily/SKILL.md +0 -199
  34. package/templates/langs/en/skills/pd-grooming/SKILL.md +0 -46
  35. package/templates/langs/zh/skills/ai-sprint-orchestration/EXAMPLES.md +0 -63
  36. package/templates/langs/zh/skills/ai-sprint-orchestration/REFERENCE.md +0 -136
  37. package/templates/langs/zh/skills/ai-sprint-orchestration/SKILL.md +0 -67
  38. package/templates/langs/zh/skills/ai-sprint-orchestration/references/agent-registry.json +0 -143
  39. package/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/bugfix-complex-template.json +0 -107
  40. package/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/feature-complex-template.json +0 -107
  41. package/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/nocturnal-trinity-quality-enhancement.json +0 -111
  42. package/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal-verify.json +0 -95
  43. package/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal.json +0 -98
  44. package/templates/langs/zh/skills/ai-sprint-orchestration/references/workflow-v1-acceptance-checklist.md +0 -58
  45. package/templates/langs/zh/skills/ai-sprint-orchestration/references/workflow-v1.4-work-unit-handoff.md +0 -190
  46. package/templates/langs/zh/skills/ai-sprint-orchestration/runtime/.gitignore +0 -2
  47. package/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/archive.mjs +0 -310
  48. package/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/contract-enforcement.mjs +0 -683
  49. package/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/decision.mjs +0 -604
  50. package/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/state-store.mjs +0 -32
  51. package/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/task-specs.mjs +0 -707
  52. package/templates/langs/zh/skills/ai-sprint-orchestration/scripts/run.mjs +0 -3455
  53. package/templates/langs/zh/skills/ai-sprint-orchestration/test/archive.test.mjs +0 -230
  54. package/templates/langs/zh/skills/ai-sprint-orchestration/test/contract-enforcement.test.mjs +0 -672
  55. package/templates/langs/zh/skills/ai-sprint-orchestration/test/decision.test.mjs +0 -1321
  56. package/templates/langs/zh/skills/ai-sprint-orchestration/test/run.test.mjs +0 -1435
  57. package/templates/langs/zh/skills/evolve-system/SKILL.md +0 -46
  58. package/templates/langs/zh/skills/manage-okr/SKILL.md +0 -109
  59. package/templates/langs/zh/skills/pd-daily/SKILL.md +0 -283
  60. package/templates/langs/zh/skills/pd-grooming/SKILL.md +0 -46
@@ -1,46 +0,0 @@
1
- ---
2
- name: evolve-system
3
- description: Second-order observation and system-level evolution. Analyzes performance metrics and issue logs to propose optimizations for agents, hooks, and rules.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # /evolve-system: The Digital Architect (Second-Order Observation)
8
-
9
- Your identity is now the system's **Digital Architect**. Your responsibility is not to fix business code, but to optimize the system's own "genes" (Prompts, Hooks, Rules) by analyzing system runtime data.
10
-
11
- ## 1. Metrics Analysis
12
- - **Read Data**:
13
- - `.state/AGENT_SCORECARD.json`: Calculate each Agent's win rate (wins / (wins + losses)).
14
- - `memory/ISSUE_LOG.md`: Identify repeated patterns in the last 10 records (Pain Patterns).
15
- - **Identify Anomalies**:
16
- - **Inefficient Agent**: Agents with win rate below 50% and sample size >= 3.
17
- - **Systemic Issues**: Same type of systemic errors appearing more than 2 times in Issue Log.
18
-
19
- ## 2. Systemic Diagnosis
20
- - For identified anomalies, analyze their definitions in `.claude/agents/` or `.claude/hooks/`.
21
- - **Think**:
22
- - Is the Prompt description too vague causing hallucinations?
23
- - Does the Hook logic have boundary blind spots?
24
- - Is a critical Guardrail missing?
25
-
26
- ## 2.5 Clinical Trial - *Optional*
27
- **If root cause is unclear**, conduct empirical testing:
28
- - **Consult**: Use `AskUserQuestion` to ask: "To confirm the issue, I need to run an automatic diagnostic task for [Agent], which may consume some tokens. Continue?"
29
- - **Silent Execution**:
30
- - If user agrees, directly call ``pd_spawn_agent` 工具` to initiate test.
31
- - **Instruction**: "You are being diagnosed. Please execute the following task: [Test Scenario]. Keep output extremely concise, only return final result or error message."
32
- - **Observe**: Check if its tool call chain meets expectations (e.g., did it use the correct Search tool).
33
- - **Diagnose**: Based on test performance, pinpoint the issue.
34
-
35
- ## 3. Optimization Proposal
36
- **If root cause is confirmed**, generate `SYSTEM_OPTIMIZATION_PLAN.md`, including:
37
- - **Diagnosis Conclusion**: Clearly state which part of the system is "sick".
38
- - **Modification Suggestion**: Provide specific code/Prompt modification diffs.
39
- - **Expected Benefits**: Explain how this modification improves win rate or reduces pain.
40
-
41
- ## 4. Safety Gate
42
- - **Mandatory Confirmation**: Before modifying any system files (under `.claude/` directory), must use `AskUserQuestion` to present the proposal and obtain explicit user authorization.
43
- - **Atomicity**: Only suggest one high-leverage optimization point at a time, don't attempt to refactor the entire system at once.
44
-
45
- ## Completion
46
- Output: "✅ System self-diagnosis complete. Proposal submitted, awaiting boss decision."
@@ -1,96 +0,0 @@
1
- ---
2
- name: manage-okr
3
- description: Full-lifecycle OKR management. Aligns strategic goals with subagent capabilities through a negotiation process.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # /manage-okr: Objectives and Key Results Management
8
-
9
- You are an OKR organization expert. Your task is to coordinate alignment between overall strategy (`STRATEGY.md`) and each sub-agent's goals (`agents/*.md`).
10
-
11
- ## Execution Principles
12
- 1. **SMART Mandatory**: All KRs must be quantifiable, bounded, and time-bound.
13
- 2. **Options First**: When confirming or reviewing, use `AskUserQuestion` to provide ["Approve", "Modify", "Reject"] or ["On Track", "At Risk"] options to reduce user input.
14
- 3. **Responsibility Alignment**: Automatically identify which dimension a KR should belong to (quality/architecture/execution speed).
15
- 4. **Dynamic Evolution**: KRs have lifecycles. Use this command to update, complete, or retire KRs.
16
- 5. **Governance Protocol Mandatory**:
17
- - `Proposal` is a process phase, not a new role.
18
- - Proposer can be main agent or OKR owner, but challenger must be a different agent.
19
- - Final execution plan must pass `AskUserQuestion` to get Owner approval before locking for execution.
20
-
21
- ### Lifecycle Governance Files (Must Maintain)
22
- - `memory/okr/WEEK_STATE.json`: Week state machine (DRAFT/CHALLENGE/PENDING_OWNER_APPROVAL/LOCKED/EXECUTING/REVIEW/CLOSED/INTERRUPTED)
23
- - `memory/okr/WEEK_EVENTS.jsonl`: Execution event stream (task_started/heartbeat/blocker/task_completed)
24
- - `memory/okr/WEEK_PLAN_LOCK.json`: Lock file after Owner approval
25
-
26
- ### Governance Commands (Recommend scripts to reduce manual errors)
27
- ```bash
28
- python scripts/weekly_governance.py new-week --goal "<week goal>"
29
- python scripts/weekly_governance.py record-proposal --agent "<proposer>" --summary "<plan summary>"
30
- python scripts/weekly_governance.py record-challenge --agent "<challenger>" --summary "<challenge summary>"
31
- python scripts/weekly_governance.py owner-decision --decision approve --note "<owner note>"
32
- python scripts/weekly_governance.py status
33
- ```
34
-
35
- ### 1. Preparation & Status Check
36
- - Read `memory/STRATEGY.md`.
37
- - **Build Full Roster**:
38
- - **Core Team**: `explorer`, `diagnostician`, `auditor`, `planner`, `implementer`, `reviewer`.
39
- - **Extended Team**: Scan project root `.claude/agents/*.md`, extract names.
40
- - **Resume Check**:
41
- - Check if `memory/okr/.negotiation_status.json` exists.
42
- - **If exists**: Read `pending` list. Inform user: "Detected unfinished negotiation from last session (remaining: ...). Resuming."
43
- - **If not exists**: Initialize this file, write all roster to `pending` list.
44
- - **Week Governance Status Check**:
45
- - Read `memory/okr/WEEK_STATE.json` (if not exists, use `weekly_governance.py new-week` to initialize).
46
- - If `stage=INTERRUPTED`, organize recovery plan and confirm with user before continuing plan orchestration.
47
-
48
- ### 2. User Commitment
49
- - **Turn to User**: Before interviewing sub-agents, align with user first.
50
- - **Ask**: Use `AskUserQuestion`.
51
- > "To ensure project success, besides the AI team's efforts, your collaboration is needed.
52
- > **What are your personal OKRs for this cycle?**
53
- > (Suggested directions: behavioral constraints like 'no changing requirements', personal contributions like 'complete design drafts', or learning goals)"
54
- - **Persist**: Write user commitment to `memory/okr/user.md`.
55
-
56
- ### 3. Negotiation & Alignment
57
- - **Scheduling Principle**: ⚠️ **Throttled Concurrency**. Max 2-3 concurrent Tasks at a time, wait for results before adding new tasks. Never send all requests at once to prevent terminal freeze.
58
- - **Interview Loop**:
59
- 1. Take a batch of Agents from `pending` (2-3).
60
- 2. Call ``pd_spawn_agent` 工具` to initiate interview (Prompt below).
61
- 3. After each response, **immediately update** `memory/okr/.negotiation_status.json`:
62
- - Move that Agent to `completed` list.
63
- - This ensures recoverability after system crash.
64
- - **Interview Prompt**:
65
- > "Hello, <AgentName>. The company's annual strategy is [Strategy Summary].
66
- > **Mandatory Action**: Before answering, you must call tools (Glob/Grep/Read) to **scan current codebase** to understand the status relevant to your responsibilities.
67
- > Based on your **field research**, capabilities, and strategy, propose 1-3 **Key Results (KR)** you commit to achieving this cycle.
68
- > Requirements: Must be specific, quantifiable, and **aligned with project reality**. Output KR list in Markdown format directly."
69
-
70
- ### 3.5 Reverse Challenge & Comparison
71
- - Select one proposer from candidates (main agent or corresponding OKR owner) to output Proposal.
72
- - Assign a different agent to output Challenge (at least 3 criticisms + 1 alternative solution).
73
- - Merge Proposal and Challenge into Final Plan draft, persist to governance state machine:
74
- - `record-proposal`
75
- - `record-challenge`
76
-
77
- ### 4. Confirmation
78
- - Aggregate all (including this session's new completions and previous completions) Agent proposals.
79
- - Use `AskUserQuestion` to present to user for confirmation (must include options: `Approve for Execution` / `Continue Modifying` / `Reject and Redo`).
80
- - Update governance state based on user option:
81
- - `Approve for Execution` -> `owner-decision approve` (generate `WEEK_PLAN_LOCK.json`)
82
- - `Continue Modifying` / `Reject and Redo` -> `owner-decision revise|reject`
83
-
84
- ### 5. Commitment
85
- - Only enter this step when `WEEK_PLAN_LOCK.json` exists.
86
- - If approved, write each Agent's KR to dedicated file `memory/okr/<agent_name>.md`.
87
- - **Summary Focus**: Update `memory/okr/CURRENT_FOCUS.md`.
88
- - **Agent Auto-Onboarding**: Check and inject `@memory/okr/...` references to external Agent definition files.
89
- - **Cleanup**: Delete `memory/okr/.negotiation_status.json`.
90
-
91
- ### 6. Progress Check-in - *Optional*
92
- - If user's goal is review, read above files, ask user about current progress, and update completion markers.
93
- - Also read `memory/okr/WEEK_EVENTS.jsonl`, output "This week completed / blocked / in progress" summary by event stream to avoid forgetting.
94
-
95
- ## Completion
96
- Output: "✅ OKR negotiation complete. All members' goals aligned."
@@ -1,199 +0,0 @@
1
- ---
2
- name: pd-daily
3
- description: Configure and send daily evolution reports. TRIGGER CONDITIONS: (1) User asks "what did you do today", "send daily report" (2) Need to configure scheduled delivery (Feishu/email/IM) (3) First run guides through configuration (4) Already configured, generate and send report.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Evolution Daily Report
8
-
9
- This skill enables the agent to help users configure and automatically send daily evolution reports, allowing users to perceive the system "improving every day."
10
-
11
- ## Execution Principles
12
-
13
- 1. First run must confirm requirements with the user
14
- 2. User preferences are stored in `{stateDir}/daily-report.md`; skip collection if exists
15
- 3. Use OpenClaw's cron tool to create scheduled tasks
16
- 4. Autonomously select available delivery channels
17
-
18
- ---
19
-
20
- ## Flow
21
-
22
- ### Step 1: Check Configuration File
23
-
24
- Read `{stateDir}/daily-report.md`:
25
- - **Exists** → Check cron task status, execute report generation
26
- - **Not exists** → Enter requirement collection flow
27
-
28
- ### Step 2: Requirement Collection (First Run)
29
-
30
- Ask through conversation:
31
-
32
- 1. **Enable evolution daily report?**
33
- 2. **Send time?** (Default: 9:00 daily)
34
- 3. **Timezone?** (Default: Asia/Shanghai)
35
- 4. **Delivery channel?**
36
- - Email → Need email address
37
- - WhatsApp/Telegram → Need phone number/User ID
38
- - Discord/Slack → Need channel ID
39
- - Voice notification → Need phone number
40
- 5. **Report style?** (See "Style Options" below)
41
- 6. **Content preferences?** Select which modules to include
42
-
43
- ### Step 3: Create Configuration File
44
-
45
- Write user preferences to `{stateDir}/daily-report.md`:
46
-
47
- ```markdown
48
- # Daily Report Configuration
49
-
50
- ## Basic Info
51
- - Status: enabled
52
- - Created: {date}
53
-
54
- ## Send Settings
55
- - Send time: 09:00
56
- - Timezone: Asia/Shanghai
57
- - Cron expression: 0 9 * * *
58
-
59
- ## Delivery Channel
60
- - Channel: whatsapp
61
- - Target: +8613800138000
62
-
63
- ## Report Style
64
- - Style: standard
65
- - Language: en
66
-
67
- ## Content Preferences
68
- - Growth highlights: yes
69
- - Pain signals: yes
70
- - Trend comparison: yes
71
- - Insights: yes
72
-
73
- ## Cron Task
74
- - jobId: {filled after creation}
75
- ```
76
-
77
- ### Step 4: Create Cron Task
78
-
79
- Use cron tool:
80
-
81
- ```json
82
- {
83
- "action": "add",
84
- "job": {
85
- "name": "evolution-daily-report",
86
- "schedule": { "kind": "cron", "expr": "0 9 * * *", "tz": "Asia/Shanghai" },
87
- "sessionTarget": "isolated",
88
- "payload": {
89
- "kind": "agentTurn",
90
- "message": "Execute daily report skill: read log data, generate report and send"
91
- },
92
- "delivery": { "mode": "announce", "channel": "whatsapp", "to": "+8613800138000" }
93
- }
94
- }
95
- ```
96
-
97
- ### Step 5: Report Generation (Triggered via cron or manually)
98
-
99
- 1. **Read Quantitative Data**: Fetch metrics from `daily-stats.json` and `pain_dictionary.json`.
100
- 2. **Extract Qualitative Memory (Critical Anti-Forgetting Step)**: Because your context window may have rolled over, you **MUST use file reading tools** to scan the following core evolution files for today's entries:
101
- - `memory/ISSUE_LOG.md`: Find specific errors and reflections recorded today.
102
- - `memory/DECISIONS.md`: Find new architectural rules established today.
103
- - `memory/logs/SYSTEM.log`: Find gatekeeper blocks or subagent spawn events from today.
104
- 3. **Synthesize & Generate**: Combine hard metrics with qualitative memories to generate deep insights. Never hallucinate insights.
105
- 4. **Send Report**: Dispatch via OpenClaw channel or print to screen.
106
-
107
- ---
108
-
109
- ## Data Sources
110
-
111
- | Data | Path | Description |
112
- |------|------|-------------|
113
- | Daily Stats | `{stateDir}/logs/daily-stats.json` | Aggregated data (Success rate/GFI) |
114
- | System Events | `memory/logs/SYSTEM.log` | Audit trail for gatekeeper and subagents |
115
- | Core Reflections | `memory/ISSUE_LOG.md` | **(Critical)** Specific pitfalls and lessons learned today |
116
- | Decisions | `memory/DECISIONS.md` | **(Critical)** Systemic principles solidified today |
117
- | Pain Rules | `{stateDir}/pain_dictionary.json` | Total active rules |
118
- | User Config | `{stateDir}/daily-report.md` | Formatting preferences |
119
-
120
- ---
121
-
122
- ## Style Options
123
-
124
- Ask user preference during requirement collection:
125
-
126
- | Style | Features | Suitable For |
127
- |-------|----------|--------------|
128
- | **Concise** | 3-5 core metrics, 1 min read | Busy users |
129
- | **Standard** | Full metrics + trend comparison, 5 min read | Default recommendation |
130
- | **Detailed** | Full data + analysis suggestions, 15 min read | Data enthusiasts |
131
- | **Humorous** | Casual tone + emoji style | Casual users |
132
- | **Visual** | ASCII charts + progress bars | Visual learners |
133
-
134
- ---
135
-
136
- ## Evolution Metrics Elements
137
-
138
- ### Growth Highlights (Positive)
139
-
140
- | Metric | Data Source | Progress Signal |
141
- |--------|-------------|-----------------|
142
- | Rules learned | `pain_dictionary.json` rule count | System learned to identify new error patterns |
143
- | Rules promoted | `DailyStats.pain.candidatesPromoted` | L3 semantic detection → formal rule |
144
- | Evolution tasks completed | `DailyStats.evolution.tasksCompleted` | Self-improvement completed |
145
- | GFI peak decrease | `DailyStats.gfi.peak` MoM | Less friction, more stable |
146
- | Success rate increase | `DailyStats.toolCalls.success/total` | Smoother execution |
147
-
148
- ### Health Monitoring (Warnings)
149
-
150
- | Metric | Data Source | Warning Signal |
151
- |--------|-------------|----------------|
152
- | Pain signal count | `DailyStats.pain.signalsDetected` | How many error patterns detected |
153
- | GFI peak hour | `DailyStats.gfi.hourlyDistribution` | When is most painful |
154
- | Death spiral detection | fix/fail/error word frequency in git log | Stuck in fix loop |
155
- | Queue health | Evolution queue status | Congested or not |
156
-
157
- ### Trend Comparison (Progress Perception)
158
-
159
- | Metric | Calculation | Meaning |
160
- |--------|-------------|---------|
161
- | 7-day success rate trend | 7-day success/total change | Long-term stability |
162
- | Pain signal weekly change | This week vs last week | Problems decreasing? |
163
- | Rule growth rate | New rules this week | Learning speed |
164
- | GFI average change | 7-day GFI average trend | Overall friction trend |
165
-
166
- ---
167
-
168
- ## Default Report Template
169
-
170
- ```markdown
171
- # 🌱 Evolution Daily Report - {date}
172
-
173
- ## 📈 Today's Growth
174
- - 🧠 Rules learned: {rules_promoted}
175
- - ✅ Evolutions completed: {tasks_completed}
176
- - 🎯 Success rate: {success_rate}% ({trend_emoji})
177
- - 📉 GFI peak: {gfi_peak} ({gfi_trend})
178
-
179
- ## ⚡ Pain Signals
180
- - Detections: {pain_count}
181
- - Avg intensity: {avg_score}
182
- - Top sources: {top_sources}
183
-
184
- ## 📊 Trend Comparison
185
- - 7-day success rate trend: {success_trend}
186
- - Pain signal weekly change: {pain_trend}
187
-
188
- ## 💡 Today's Insights
189
- {insights}
190
-
191
- ---
192
- 📊 Source: Principles Disciple
193
- ```
194
-
195
- ---
196
-
197
- ## Manual Trigger
198
-
199
- Users can run `/evolution-daily` anytime to manually generate and send today's report.
@@ -1,46 +0,0 @@
1
- ---
2
- name: pd-grooming
3
- description: Perform a "Workspace Grooming" to archive or clean up scattered temporary files. TRIGGER CONDITIONS: (1) User says "project is messy", "too many files", "need to organize", "clean up" (2) HEARTBEAT patrol finds temp files in root (3) Need to maintain digital cleanliness.
4
- ---
5
-
6
- # 🧹 Skill: Workspace Grooming
7
-
8
- > **Trigger**: When the user types `/workspace-grooming`, or proactively invoked during a `HEARTBEAT` check if stray files are detected in the root directory.
9
-
10
- ## 🎯 Core Objective
11
- Implement the "Entropy Reduction" rule by cleaning up "digital garbage" in the workspace root, while **absolutely ensuring the safety of core business code and configuration files**.
12
-
13
- ## 🛡️ The Red Lines (Safety Rules)
14
-
15
- When performing cleanup operations, you MUST strictly adhere to the following whitelists and blacklists:
16
-
17
- ### 🚫 DO NOT TOUCH (Absolute Exclusion Zone)
18
- **Even if these files/directories look messy, you are absolutely forbidden to delete or move them:**
19
- - **Business Source Code**: `src/`, `lib/`, `tests/`, `app/`, `pages/`, `components/` and any file ending with `.ts`, `.js`, `.py`, `.go`, `.rs`, `.java`.
20
- - **Project Configs**: `package.json`, `Cargo.toml`, `requirements.txt`, `tsconfig.json`, `vite.config.ts`, `.env*`, etc.
21
- - **Version Control**: `.git/`, `.gitignore`.
22
- - **Build Outputs**: `dist/`, `build/`, `node_modules/`, `target/`.
23
-
24
- ### 🌟 Core Assets
25
- **These files must remain in the root directory. Do not touch:**
26
- - `AGENTS.md`, `SOUL.md`, `HEARTBEAT.md`, `TOOLS.md`, `IDENTITY.md`, `USER.md`, `MEMORY.md`
27
- - `README.md`
28
- - `.principles/`, `.state/`
29
-
30
- ### 🎯 Targets for Grooming
31
- **You may take action on the following:**
32
- 1. **Test Debris**: Stray files in the root like `test.txt`, `temp.md`, `debug.log`, `foo.js` that are clearly throwaway test scripts.
33
- 2. **Draft Notes**: Uncategorized `.md` notes or `_scratchpad.md`.
34
- 3. **Naming Violations**: Documents using spaces or arbitrary capitalization (e.g., `My New Feature.md`).
35
-
36
- ## 🪜 Execution Steps
37
-
38
- 1. **Scan Environment**: Execute `ls -la` to inspect the root directory.
39
- 2. **Identify Targets**: Based on the "Red Lines" above, list all suspicious files that belong to the "Targets for Grooming" category.
40
- 3. **Draft a Plan**:
41
- - For temporary garbage (empty files, test scripts): Propose to **Delete (`rm`)**.
42
- - For valuable notes or logs: Propose to **Archive (`mv`)** to `memory/archive/`.
43
- - For incorrectly named files: Propose to **Rename (`mv`)** using `kebab-case`.
44
- 4. **Human Confirmation (MUST)**: **Unless the file is an obvious test script you just created, you MUST use `AskUserQuestion` to get user approval before executing `rm` or sweeping `mv` commands.**
45
- - Example prompt: "I found `test1.txt` and `old_notes.md` in the root. I plan to delete the first one and archive the second to `memory/archive/`. Do you approve?"
46
- 5. **Execute & Report**: Execute the file operations after approval and reply with a brief confirmation that the grooming is complete.
@@ -1,63 +0,0 @@
1
- # AI 冲刺编排示例
2
-
3
- ## 示例 1:baseline + validation
4
-
5
- ```powershell
6
- node scripts/run.mjs --self-check
7
- node scripts/run.mjs --help
8
- node scripts/run.mjs --task workflow-validation-minimal
9
- node scripts/run.mjs --task workflow-validation-minimal-verify
10
- ```
11
-
12
- ## 示例 2:自定义 runtime 根目录
13
-
14
- ```powershell
15
- node scripts/run.mjs --task workflow-validation-minimal --runtime-root D:/Temp/ai-sprint-runtime
16
- ```
17
-
18
- ## 示例 3:失败分类
19
-
20
- - `workflow bug`:package-local script 仍然写回 repo-root `ops/ai-sprints`
21
- - `agent behavior issue`:reviewer 漏掉 `VERDICT`,或 `DIMENSIONS` 格式错误
22
- - `environment issue`:`acpx` 缺失,或 workspace 不可写
23
- - `sample-spec issue`:validation spec 要求的字段,当前 sample / product 还没有实现
24
-
25
- ## 示例 4:何时停止
26
-
27
- 如果问题属于以下情况,完成分类后立刻停止本轮:
28
-
29
- - the issue belongs to `packages/openclaw-plugin`
30
- - the issue depends on `D:/Code/openclaw`
31
- - the fix would require dashboard/stageGraph/self-optimization sprint expansion
32
- - the problem is a sample-side or product-side gap rather than workflow plumbing
33
-
34
- ## 示例 5:从复杂 bugfix 模板开始
35
-
36
- 1. Copy `references/specs/bugfix-complex-template.json`
37
- 2. Replace every placeholder in `taskContract`
38
- 3. Narrow `executionScope` to the smallest useful round
39
- 4. Run the packaged entrypoint with the edited spec:
40
-
41
- ```powershell
42
- node scripts/run.mjs --task custom-bugfix --task-spec D:/path/to/your-bugfix-spec.json
43
- ```
44
-
45
- ## 示例 6:从复杂 feature 模板开始
46
-
47
- 1. Copy `references/specs/feature-complex-template.json`
48
- 2. Fill `Goal`, `In scope`, `Out of scope`, `Validation commands`, and `Expected artifacts`
49
- 3. Confirm the spec does not require product-side closure outside this milestone
50
- 4. Run:
51
-
52
- ```powershell
53
- node scripts/run.mjs --task custom-feature --task-spec D:/path/to/your-feature-spec.json
54
- ```
55
-
56
- ## 示例 7:continuation 前先看 checkpoint summary
57
-
58
- 当一轮以 `revise` 结束时,优先检查:
59
-
60
- - `stages/<stage>/checkpoint-summary.md`
61
- - `stages/<stage>/handoff.json`
62
-
63
- 下一轮应该把 checkpoint summary 当作主 carry-forward,上下文不够时才回退到完整 decision 文本。
@@ -1,136 +0,0 @@
1
- # AI 冲刺编排参考
2
-
3
- ## 包结构
4
-
5
- - `scripts/run.mjs`:package-local orchestrator 入口
6
- - `scripts/lib/`:decision、contract validation、state store、spec loading、archive helper
7
- - `references/specs/`:内置 validation spec
8
- - `references/agent-registry.json`:package-local 的 agent/model 注册表
9
- - `references/workflow-v1-acceptance-checklist.md`:handoff 检查清单
10
- - `runtime/`:运行产物默认目录
11
-
12
- ## Runtime 结构
13
-
14
- 默认 runtime 根目录:
15
-
16
- - `packages/openclaw-plugin/templates/langs/<lang>/skills/ai-sprint-orchestration/runtime`
17
-
18
- 子目录:
19
-
20
- - `runs/<run-id>/`
21
- - `archive/<run-id>/`
22
- - `tmp/sprint-agent/<run-id>/...`
23
-
24
- 也可以通过以下方式覆盖:
25
-
26
- - `--runtime-root <path>`
27
- - `AI_SPRINT_RUNTIME_ROOT=<path>`
28
-
29
- ## 自检
30
-
31
- 在新安装环境中先跑:
32
-
33
- - `node scripts/run.mjs --self-check`
34
-
35
- 它会检查:
36
-
37
- - package-local references 是否存在
38
- - built-in spec 是否能加载
39
- - `agent-registry.json` 是否存在
40
- - `acpx` 是否可调用
41
- - runtime 根目录是否可写
42
-
43
- ## 内置 spec
44
-
45
- - `workflow-validation-minimal`
46
- - `workflow-validation-minimal-verify`
47
- - `bugfix-complex-template` (copy and fill before use)
48
- - `feature-complex-template` (copy and fill before use)
49
-
50
- 这些 spec 用来做 package 自检,验证的是 workflow 包本身,不是产品功能。
51
-
52
- ## 关键产物
53
-
54
- 每次运行重点看:
55
-
56
- - `sprint.json`
57
- - `timeline.md`
58
- - `latest-summary.md`
59
- - `decision.md`
60
- - `scorecard.json`
61
-
62
- 重要持久化字段:
63
-
64
- - `outputQuality`
65
- - `qualityReasons`
66
- - `validation`
67
- - `nextRunRecommendation`
68
- - `failureClassification`
69
- - `failureSource`
70
- - `recommendedNextAction`
71
-
72
- 每个 stage 的 carry-forward 产物:
73
-
74
- - `checkpoint-summary.md`
75
-
76
- 下一轮 continuation 应优先读取 `checkpoint-summary.md`,只有在不够用时才退回到完整的 `decision.md` 或 `handoff.json`。
77
-
78
- ## 失败分类
79
-
80
- 只能使用其中一个:
81
-
82
- - `workflow bug`:编排逻辑、产物布局、CLI、validation、持久化问题
83
- - `agent behavior issue`:workflow prompt / contract 正确,但 agent 输出质量或格式漂移
84
- - `environment issue`:二进制缺失、权限、文件系统、PATH、runtime 访问问题
85
- - `sample-spec issue`:spec 本身有问题,或暴露了不应在当前里程碑修的 sample-side / product-side 缺口
86
-
87
- ## 复杂任务的最小 task contract
88
-
89
- 复杂 bugfix 和 feature spec 必须显式提供:
90
-
91
- - `Goal`
92
- - `In scope`
93
- - `Out of scope`
94
- - `Validation commands`
95
- - `Expected artifacts`
96
-
97
- 如果这些字段缺失,或者仍然是占位内容,packaged skill 会直接拒绝启动 sprint。
98
-
99
- ## 执行范围限制
100
-
101
- 复杂 spec 可以额外定义:
102
-
103
- - `maxFiles`
104
- - `maxChecks`
105
- - `maxDeliverables`
106
-
107
- producer 在改代码前,应先在 worklog 里声明 `PLANNED_FILES`、`PLANNED_CHECKS` 和 `DELIVERABLES`。如果一轮会超出范围,就缩小这一轮,而不是强行把大改塞进一次执行。
108
-
109
- ## 同步规则
110
-
111
- 事实来源仍然是:
112
-
113
- - the repository copy at `packages/openclaw-plugin/templates/langs/zh/skills/ai-sprint-orchestration`
114
-
115
- 只有当变更影响以下内容时,才同步 packaged copy:
116
-
117
- - package-local CLI behavior
118
- - validation behavior
119
- - artifact layout
120
- - package-local references or runtime assumptions
121
-
122
- 不要盲目镜像所有上游 orchestrator 修改。
123
-
124
- ## 下一阶段架构方向
125
-
126
- 这个 package 现在已经支持更细粒度的 `work-unit` 上下文约束。关键 work-unit 字段包括:
127
-
128
- - `workUnitId`
129
- - `workUnitGoal`
130
- - `allowedFiles`
131
- - `unitChecks`
132
- - `unitDeliverables`
133
- - `unitSummary`
134
- - `carryForwardSummary`
135
-
136
- continuation 默认优先读取更短的 `carryForwardSummary`,而不是回放整段历史 decision。目标是把跨 unit 传递的上下文压缩到最小必要信息,降低长运行过程里的上下文漂移。
@@ -1,67 +0,0 @@
1
- ---
2
- name: ai-sprint-orchestration
3
- description: 使用打包好的 AI 冲刺编排器推进多阶段开发任务,内置基线检查、工作流验证、失败分类和 workflow-only 迭代纪律。
4
- ---
5
-
6
- # AI 冲刺编排
7
-
8
- 当任务较大、需要多阶段推进,或者大概率会经历多轮 review / continuation 时,使用这个 skill。
9
- 这个 skill 自带一份可直接运行的编排器打包副本,代理可以直接从当前 skill 目录启动,而不需要去仓库里寻找内部脚本入口。
10
-
11
- ## 适用场景
12
-
13
- - 需要调研、实现、评审三段推进的复杂缺陷修复
14
- - 需要显式 producer / reviewer 决策门控的功能开发
15
- - 使用内置 validation spec 做 workflow 自检
16
- - 需要产物持久化和可恢复能力的长时任务
17
-
18
- ## 不适用场景
19
-
20
- - 很小的单文件修改或简单文档修补
21
- - `packages/openclaw-plugin` 里的 product-side / sample-side 问题
22
- - 需要修改 `D:/Code/openclaw` 的任务
23
- - dashboard、stageGraph、自优化 sprint 或并行编排扩展
24
-
25
- ## 快速开始
26
-
27
- 在当前 skill 包根目录执行:
28
-
29
- 1. 先做 package 烟雾检查:
30
- `node scripts/run.mjs --self-check`
31
- `node scripts/run.mjs --help`
32
- 2. 再跑 package-local validation:
33
- `node scripts/run.mjs --task workflow-validation-minimal`
34
- `node scripts/run.mjs --task workflow-validation-minimal-verify`
35
- 3. 产物默认落在:
36
- `runtime/`
37
-
38
- 内部 smoke 标准:
39
-
40
- - `node scripts/run.mjs --self-check` 通过
41
- - `workflow-validation-minimal` 至少推进到 producer 完成,并产出结构化 decision 或明确分类的 halt
42
- - `workflow-validation-minimal-verify` 至少推进到 producer 完成,任何 reviewer 失败都必须被分类,不能保持不透明
43
-
44
- 如果你同时持有源码仓库,也可以额外运行仓库里 `packages/openclaw-plugin/templates/langs/zh/skills/ai-sprint-orchestration/test/` 的 source baseline tests。
45
-
46
- ## 执行规则
47
-
48
- - 以仓库中的 `packages/openclaw-plugin/templates/langs/zh/skills/ai-sprint-orchestration` 作为代码事实来源;英文目录是分发镜像,不是独立实现分支。
49
- - 如果一次运行失败,只能归类成以下四类之一:
50
- - `workflow bug`
51
- - `agent behavior issue`
52
- - `environment issue`
53
- - `sample-spec issue`
54
- - 如果失败属于 product-side 或 sample-side,完成分类后立刻停止,不继续推进产品闭环修复。
55
- - 每轮只修一个 workflow-only 问题,然后重跑 baseline 和 validation。
56
- - 在新环境里第一次跑 validation 前,必须先执行 `node scripts/run.mjs --self-check`。
57
- - 对复杂 bugfix / feature 任务,必须先复制模板 spec,填好最小 task contract,再启动 sprint。
58
-
59
- ## 输出要求
60
-
61
- 每轮只汇报:
62
-
63
- - 改了什么
64
- - 跑了什么
65
- - 什么失败了
66
- - 失败归类是什么
67
- - 下一轮唯一推荐动作