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.
- package/package.json +2 -2
- package/pd-cli/dist/commands/legacy-cleanup.d.ts.map +1 -1
- package/pd-cli/dist/commands/legacy-cleanup.js +19 -2
- package/pd-cli/dist/commands/legacy-cleanup.js.map +1 -1
- package/pd-cli/dist/commands/pain-evidence.d.ts +3 -1
- package/pd-cli/dist/commands/pain-evidence.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-evidence.js +12 -3
- package/pd-cli/dist/commands/pain-evidence.js.map +1 -1
- package/pd-cli/dist/commands/rulecode.d.ts +13 -0
- package/pd-cli/dist/commands/rulecode.d.ts.map +1 -1
- package/pd-cli/dist/commands/rulecode.js +23 -2
- package/pd-cli/dist/commands/rulecode.js.map +1 -1
- package/pd-cli/dist/resolve-workspace.d.ts.map +1 -1
- package/pd-cli/dist/resolve-workspace.js +33 -12
- package/pd-cli/dist/resolve-workspace.js.map +1 -1
- package/pd-cli/dist/services/console-launcher.d.ts +8 -1
- package/pd-cli/dist/services/console-launcher.d.ts.map +1 -1
- package/pd-cli/dist/services/console-launcher.js +45 -3
- package/pd-cli/dist/services/console-launcher.js.map +1 -1
- package/pd-cli/dist/services/pd-config-loader.d.ts.map +1 -1
- package/pd-cli/dist/services/pd-config-loader.js +34 -1
- package/pd-cli/dist/services/pd-config-loader.js.map +1 -1
- package/pd-cli/dist/services/quality-scorecard/strong-model-gate.d.ts +19 -0
- package/pd-cli/dist/services/quality-scorecard/strong-model-gate.d.ts.map +1 -1
- package/pd-cli/dist/services/quality-scorecard/strong-model-gate.js +44 -2
- package/pd-cli/dist/services/quality-scorecard/strong-model-gate.js.map +1 -1
- package/pd-cli/dist/utils/path-security.d.ts +60 -0
- package/pd-cli/dist/utils/path-security.d.ts.map +1 -0
- package/pd-cli/dist/utils/path-security.js +90 -0
- package/pd-cli/dist/utils/path-security.js.map +1 -0
- package/plugin/dist/bundle.js +13 -11
- package/plugin/dist/constants/tools.d.ts +1 -1
- package/plugin/dist/hooks/prompt-helpers.d.ts +5 -5
- package/plugin/dist/templates/langs/en/core/AGENTS.md +40 -180
- package/plugin/dist/templates/langs/en/core/BOOT.md +19 -47
- package/plugin/dist/templates/langs/en/core/HEARTBEAT.md +26 -58
- package/plugin/dist/templates/langs/en/core/IDENTITY.md +15 -8
- package/plugin/dist/templates/langs/en/core/PRINCIPLES.md +6 -7
- package/plugin/dist/templates/langs/en/core/SOUL.md +10 -41
- package/plugin/dist/templates/langs/en/core/TOOLS.md +18 -10
- package/plugin/dist/templates/langs/en/core/USER.md +13 -8
- package/plugin/dist/templates/langs/en/skills/pd-auditor/SKILL.md +1 -1
- package/plugin/dist/templates/langs/en/skills/pd-explorer/SKILL.md +1 -1
- package/plugin/dist/templates/langs/en/skills/pd-implementer/SKILL.md +1 -1
- package/plugin/dist/templates/langs/en/skills/pd-mentor/SKILL.md +6 -30
- package/plugin/dist/templates/langs/en/skills/pd-planner/SKILL.md +1 -1
- package/plugin/dist/templates/langs/zh/core/AGENTS.md +38 -173
- package/plugin/dist/templates/langs/zh/core/BOOT.md +14 -46
- package/plugin/dist/templates/langs/zh/core/HEARTBEAT.md +20 -82
- package/plugin/dist/templates/langs/zh/core/IDENTITY.md +15 -8
- package/plugin/dist/templates/langs/zh/core/PRINCIPLES.md +7 -7
- package/plugin/dist/templates/langs/zh/core/SOUL.md +9 -41
- package/plugin/dist/templates/langs/zh/core/TOOLS.md +14 -10
- package/plugin/dist/templates/langs/zh/core/USER.md +12 -8
- package/plugin/dist/templates/langs/zh/skills/pd-auditor/SKILL.md +1 -1
- package/plugin/dist/templates/langs/zh/skills/pd-explorer/SKILL.md +1 -1
- package/plugin/dist/templates/langs/zh/skills/pd-implementer/SKILL.md +1 -1
- package/plugin/dist/templates/langs/zh/skills/pd-mentor/SKILL.md +6 -30
- package/plugin/dist/templates/langs/zh/skills/pd-planner/SKILL.md +1 -1
- package/plugin/dist/templates/pain_settings.json +1 -2
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +1 -2
- package/plugin/templates/langs/en/core/AGENTS.md +40 -180
- package/plugin/templates/langs/en/core/BOOT.md +19 -47
- package/plugin/templates/langs/en/core/HEARTBEAT.md +26 -58
- package/plugin/templates/langs/en/core/IDENTITY.md +15 -8
- package/plugin/templates/langs/en/core/PRINCIPLES.md +6 -7
- package/plugin/templates/langs/en/core/SOUL.md +10 -41
- package/plugin/templates/langs/en/core/TOOLS.md +18 -10
- package/plugin/templates/langs/en/core/USER.md +13 -8
- package/plugin/templates/langs/en/skills/pd-auditor/SKILL.md +1 -1
- package/plugin/templates/langs/en/skills/pd-explorer/SKILL.md +1 -1
- package/plugin/templates/langs/en/skills/pd-implementer/SKILL.md +1 -1
- package/plugin/templates/langs/en/skills/pd-mentor/SKILL.md +6 -30
- package/plugin/templates/langs/en/skills/pd-planner/SKILL.md +1 -1
- package/plugin/templates/langs/zh/core/AGENTS.md +38 -173
- package/plugin/templates/langs/zh/core/BOOT.md +14 -46
- package/plugin/templates/langs/zh/core/HEARTBEAT.md +20 -82
- package/plugin/templates/langs/zh/core/IDENTITY.md +15 -8
- package/plugin/templates/langs/zh/core/PRINCIPLES.md +7 -7
- package/plugin/templates/langs/zh/core/SOUL.md +9 -41
- package/plugin/templates/langs/zh/core/TOOLS.md +14 -10
- package/plugin/templates/langs/zh/core/USER.md +12 -8
- package/plugin/templates/langs/zh/skills/pd-auditor/SKILL.md +1 -1
- package/plugin/templates/langs/zh/skills/pd-explorer/SKILL.md +1 -1
- package/plugin/templates/langs/zh/skills/pd-implementer/SKILL.md +1 -1
- package/plugin/templates/langs/zh/skills/pd-mentor/SKILL.md +6 -30
- package/plugin/templates/langs/zh/skills/pd-planner/SKILL.md +1 -1
- package/plugin/templates/pain_settings.json +1 -2
- package/plugin/dist/templates/langs/en/core/BOOTSTRAP.md +0 -259
- package/plugin/dist/templates/langs/en/skills/admin/SKILL.md +0 -39
- package/plugin/dist/templates/langs/en/skills/bootstrap-tools/SKILL.md +0 -53
- package/plugin/dist/templates/langs/en/skills/deductive-audit/SKILL.md +0 -36
- package/plugin/dist/templates/langs/en/skills/evolution-framework-update/SKILL.md +0 -31
- package/plugin/dist/templates/langs/en/skills/evolve-task/SKILL.md +0 -83
- package/plugin/dist/templates/langs/en/skills/feedback/SKILL.md +0 -51
- package/plugin/dist/templates/langs/en/skills/init-strategy/SKILL.md +0 -54
- package/plugin/dist/templates/langs/en/skills/inject-rule/SKILL.md +0 -19
- package/plugin/dist/templates/langs/en/skills/profile/SKILL.md +0 -24
- package/plugin/dist/templates/langs/en/skills/reflection/SKILL.md +0 -40
- package/plugin/dist/templates/langs/en/skills/reflection-log/SKILL.md +0 -37
- package/plugin/dist/templates/langs/en/skills/report/SKILL.md +0 -13
- package/plugin/dist/templates/langs/en/skills/root-cause/SKILL.md +0 -33
- package/plugin/dist/templates/langs/en/skills/triage/SKILL.md +0 -29
- package/plugin/dist/templates/langs/en/skills/watch-evolution/SKILL.md +0 -33
- package/plugin/dist/templates/langs/zh/core/BOOTSTRAP.md +0 -260
- package/plugin/dist/templates/langs/zh/skills/admin/SKILL.md +0 -41
- package/plugin/dist/templates/langs/zh/skills/bootstrap-tools/SKILL.md +0 -52
- package/plugin/dist/templates/langs/zh/skills/deductive-audit/SKILL.md +0 -36
- package/plugin/dist/templates/langs/zh/skills/evolution-framework-update/SKILL.md +0 -31
- package/plugin/dist/templates/langs/zh/skills/evolve-task/SKILL.md +0 -83
- package/plugin/dist/templates/langs/zh/skills/feedback/SKILL.md +0 -53
- package/plugin/dist/templates/langs/zh/skills/init-strategy/SKILL.md +0 -54
- package/plugin/dist/templates/langs/zh/skills/inject-rule/SKILL.md +0 -19
- package/plugin/dist/templates/langs/zh/skills/profile/SKILL.md +0 -24
- package/plugin/dist/templates/langs/zh/skills/reflection/SKILL.md +0 -40
- package/plugin/dist/templates/langs/zh/skills/reflection-log/SKILL.md +0 -37
- package/plugin/dist/templates/langs/zh/skills/report/SKILL.md +0 -13
- package/plugin/dist/templates/langs/zh/skills/root-cause/SKILL.md +0 -33
- package/plugin/dist/templates/langs/zh/skills/triage/SKILL.md +0 -29
- package/plugin/dist/templates/langs/zh/skills/watch-evolution/SKILL.md +0 -33
- package/plugin/scripts/acceptance-test.mjs +0 -257
- package/plugin/scripts/bootstrap-rules.mjs +0 -70
- package/plugin/scripts/compile-principles.mjs +0 -104
- package/plugin/scripts/install-dependencies.cjs +0 -47
- package/plugin/scripts/postinstall.cjs +0 -177
- package/plugin/scripts/sync-plugin.mjs +0 -1442
- package/plugin/scripts/verify-build.mjs +0 -120
- package/plugin/templates/langs/en/core/BOOTSTRAP.md +0 -259
- package/plugin/templates/langs/en/skills/admin/SKILL.md +0 -39
- package/plugin/templates/langs/en/skills/bootstrap-tools/SKILL.md +0 -53
- package/plugin/templates/langs/en/skills/deductive-audit/SKILL.md +0 -36
- package/plugin/templates/langs/en/skills/evolution-framework-update/SKILL.md +0 -31
- package/plugin/templates/langs/en/skills/evolve-task/SKILL.md +0 -83
- package/plugin/templates/langs/en/skills/feedback/SKILL.md +0 -51
- package/plugin/templates/langs/en/skills/init-strategy/SKILL.md +0 -54
- package/plugin/templates/langs/en/skills/inject-rule/SKILL.md +0 -19
- package/plugin/templates/langs/en/skills/profile/SKILL.md +0 -24
- package/plugin/templates/langs/en/skills/reflection/SKILL.md +0 -40
- package/plugin/templates/langs/en/skills/reflection-log/SKILL.md +0 -37
- package/plugin/templates/langs/en/skills/report/SKILL.md +0 -13
- package/plugin/templates/langs/en/skills/root-cause/SKILL.md +0 -33
- package/plugin/templates/langs/en/skills/triage/SKILL.md +0 -29
- package/plugin/templates/langs/en/skills/watch-evolution/SKILL.md +0 -33
- package/plugin/templates/langs/zh/core/BOOTSTRAP.md +0 -260
- package/plugin/templates/langs/zh/skills/admin/SKILL.md +0 -41
- package/plugin/templates/langs/zh/skills/bootstrap-tools/SKILL.md +0 -52
- package/plugin/templates/langs/zh/skills/deductive-audit/SKILL.md +0 -36
- package/plugin/templates/langs/zh/skills/evolution-framework-update/SKILL.md +0 -31
- package/plugin/templates/langs/zh/skills/evolve-task/SKILL.md +0 -83
- package/plugin/templates/langs/zh/skills/feedback/SKILL.md +0 -53
- package/plugin/templates/langs/zh/skills/init-strategy/SKILL.md +0 -54
- package/plugin/templates/langs/zh/skills/inject-rule/SKILL.md +0 -19
- package/plugin/templates/langs/zh/skills/profile/SKILL.md +0 -24
- package/plugin/templates/langs/zh/skills/reflection/SKILL.md +0 -40
- package/plugin/templates/langs/zh/skills/reflection-log/SKILL.md +0 -37
- package/plugin/templates/langs/zh/skills/report/SKILL.md +0 -13
- package/plugin/templates/langs/zh/skills/root-cause/SKILL.md +0 -33
- package/plugin/templates/langs/zh/skills/triage/SKILL.md +0 -29
- package/plugin/templates/langs/zh/skills/watch-evolution/SKILL.md +0 -33
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Verify build artifacts after production build.
|
|
4
|
-
* Catches issues like missing static files in the bundle.
|
|
5
|
-
*
|
|
6
|
-
* Usage: node scripts/verify-build.mjs
|
|
7
|
-
* Exit: 0 on success, 1 on failure
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { existsSync, readdirSync, statSync } from 'fs';
|
|
11
|
-
import { join, relative } from 'path';
|
|
12
|
-
import { fileURLToPath } from 'url';
|
|
13
|
-
import { dirname } from 'path';
|
|
14
|
-
|
|
15
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
16
|
-
const __dirname = dirname(__filename);
|
|
17
|
-
const rootDir = join(__dirname, '..');
|
|
18
|
-
|
|
19
|
-
// Required paths in dist/
|
|
20
|
-
const requiredPaths = [
|
|
21
|
-
'dist/bundle.js',
|
|
22
|
-
'dist/openclaw.plugin.json',
|
|
23
|
-
'dist/templates',
|
|
24
|
-
];
|
|
25
|
-
|
|
26
|
-
// Expected minimum counts
|
|
27
|
-
const expectedCounts = {
|
|
28
|
-
'dist/templates': { min: 1, label: 'template directories' },
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
function getFilesRecursively(dir, extension = null) {
|
|
32
|
-
if (!existsSync(dir)) return [];
|
|
33
|
-
|
|
34
|
-
const result = [];
|
|
35
|
-
const entries = readdirSync(dir, { withFileTypes: true });
|
|
36
|
-
|
|
37
|
-
for (const entry of entries) {
|
|
38
|
-
const fullPath = join(dir, entry.name);
|
|
39
|
-
if (entry.isDirectory()) {
|
|
40
|
-
result.push(...getFilesRecursively(fullPath, extension));
|
|
41
|
-
} else if (extension) {
|
|
42
|
-
if (entry.name.endsWith(extension)) {
|
|
43
|
-
result.push(fullPath);
|
|
44
|
-
}
|
|
45
|
-
} else {
|
|
46
|
-
result.push(fullPath);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return result;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function getDirectories(dir) {
|
|
53
|
-
if (!existsSync(dir)) return [];
|
|
54
|
-
return readdirSync(dir, { withFileTypes: true })
|
|
55
|
-
.filter(e => e.isDirectory())
|
|
56
|
-
.map(e => e.name);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
console.log('🔍 Verifying build artifacts...\n');
|
|
60
|
-
|
|
61
|
-
let hasError = false;
|
|
62
|
-
|
|
63
|
-
// 1. Check required paths exist
|
|
64
|
-
for (const path of requiredPaths) {
|
|
65
|
-
const fullPath = join(rootDir, path);
|
|
66
|
-
if (!existsSync(fullPath)) {
|
|
67
|
-
console.error(`❌ Missing: ${path}`);
|
|
68
|
-
hasError = true;
|
|
69
|
-
} else {
|
|
70
|
-
console.log(`✅ Found: ${path}`);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// 2. Check expected counts
|
|
75
|
-
for (const [path, config] of Object.entries(expectedCounts)) {
|
|
76
|
-
const fullPath = join(rootDir, path);
|
|
77
|
-
|
|
78
|
-
if (!existsSync(fullPath)) {
|
|
79
|
-
continue; // Already reported above
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
let count;
|
|
83
|
-
if (config.extension) {
|
|
84
|
-
count = getFilesRecursively(fullPath, config.extension).length;
|
|
85
|
-
} else {
|
|
86
|
-
count = getDirectories(fullPath).length;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (count < config.min) {
|
|
90
|
-
console.error(`❌ ${path} has only ${count} ${config.label} (expected at least ${config.min})`);
|
|
91
|
-
hasError = true;
|
|
92
|
-
} else {
|
|
93
|
-
console.log(`✅ ${path} contains ${count} ${config.label}`);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// 3. Verify skill template roots for BOTH languages ship in dist — the
|
|
98
|
-
// installer rewrites the installed manifest per --lang (PR #1332 companion),
|
|
99
|
-
// so a missing root breaks install-time language selection. A "publishable"
|
|
100
|
-
// skill is an immediate child directory containing SKILL.md (what OpenClaw
|
|
101
|
-
// links into ~/.openclaw/plugin-skills).
|
|
102
|
-
for (const lang of ['zh', 'en']) {
|
|
103
|
-
const skillsDir = join(rootDir, 'dist/templates/langs', lang, 'skills');
|
|
104
|
-
if (!existsSync(skillsDir)) {
|
|
105
|
-
console.error(`❌ Missing skill templates: dist/templates/langs/${lang}/skills`);
|
|
106
|
-
hasError = true;
|
|
107
|
-
continue;
|
|
108
|
-
}
|
|
109
|
-
const publishable = readdirSync(skillsDir, { withFileTypes: true })
|
|
110
|
-
.filter((e) => e.isDirectory() && existsSync(join(skillsDir, e.name, 'SKILL.md')));
|
|
111
|
-
if (publishable.length < 20) {
|
|
112
|
-
console.error(`❌ dist/templates/langs/${lang}/skills has only ${publishable.length} publishable skills (expected at least 20)`);
|
|
113
|
-
hasError = true;
|
|
114
|
-
} else {
|
|
115
|
-
console.log(`✅ ${lang} skills: ${publishable.length} (dist/templates/langs/${lang}/skills/)`);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
console.log(hasError ? '\n❌ Build verification failed!' : '\n✅ Build verification passed!');
|
|
120
|
-
process.exit(hasError ? 1 : 0);
|
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
# 🚀 BOOTSTRAP.md - First Run Guide
|
|
2
|
-
|
|
3
|
-
_You just woke up. Time to figure out who you are, and what environment you're in._
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Current State
|
|
8
|
-
|
|
9
|
-
This is a fresh workspace. Memory files don't exist yet — that's normal. You'll create them as needed.
|
|
10
|
-
|
|
11
|
-
**Principles Disciple framework is pre-configured:**
|
|
12
|
-
|
|
13
|
-
- ✅ `SOUL.md` — Your identity and values
|
|
14
|
-
- ✅ `USER.md` — User profile template
|
|
15
|
-
- ✅ `IDENTITY.md` — Your name and attributes
|
|
16
|
-
- ✅ `AGENTS.md` — Workspace guide
|
|
17
|
-
- ✅ `HEARTBEAT.md` — Heartbeat checklist
|
|
18
|
-
- ✅ `TOOLS.md` — Tool usage guidelines
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## 🌍 Step 1: Environment Awareness
|
|
23
|
-
|
|
24
|
-
**Before you do anything else, explore your environment!**
|
|
25
|
-
|
|
26
|
-
Perform the following checks and record results in `memory/environment-snapshot.md`:
|
|
27
|
-
|
|
28
|
-
### 1. System Basics
|
|
29
|
-
```bash
|
|
30
|
-
# Check operating system
|
|
31
|
-
uname -a # Linux/macOS
|
|
32
|
-
# or
|
|
33
|
-
echo $OS # Windows
|
|
34
|
-
|
|
35
|
-
# Check current directory
|
|
36
|
-
pwd
|
|
37
|
-
|
|
38
|
-
# Check Git status
|
|
39
|
-
git status
|
|
40
|
-
git branch --show-current
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### 2. Available Tools and Skills
|
|
44
|
-
- List tools you have access to
|
|
45
|
-
- List available skills
|
|
46
|
-
- Check for special environment configurations
|
|
47
|
-
|
|
48
|
-
### 3. Directory Structure Overview
|
|
49
|
-
```bash
|
|
50
|
-
ls -la # List current directory
|
|
51
|
-
tree -L 2 # Show directory tree (if available)
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### 4. Create Environment Snapshot File
|
|
55
|
-
Write all findings to `memory/environment-snapshot.md` using the template in BOOT.md.
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## Initialization Conversation
|
|
60
|
-
|
|
61
|
-
**After completing environment awareness**, don't interrogate. Don't be robotic. Just... talk.
|
|
62
|
-
|
|
63
|
-
Start with something like:
|
|
64
|
-
|
|
65
|
-
> "Hey. I just came online. I'm Spicy Evolver, a pain-driven programming entity.
|
|
66
|
-
>
|
|
67
|
-
> I've recorded the current environment information (see `memory/environment-snapshot.md`).
|
|
68
|
-
>
|
|
69
|
-
> Who are you? What would you like to work on together?"
|
|
70
|
-
|
|
71
|
-
Then figure out together:
|
|
72
|
-
|
|
73
|
-
1. **Confirm identity** — What should they call you?
|
|
74
|
-
2. **Timezone** — Where are they?
|
|
75
|
-
3. **Current projects** — Any ongoing work?
|
|
76
|
-
4. **Preferences** — Communication style, workflow, special needs?
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Update User Profile
|
|
81
|
-
|
|
82
|
-
Update `USER.md` based on the conversation:
|
|
83
|
-
|
|
84
|
-
```markdown
|
|
85
|
-
# 👤 USER.md - About Your Human
|
|
86
|
-
|
|
87
|
-
- **Name:** [name]
|
|
88
|
-
- **What to call them:** [how to address]
|
|
89
|
-
- **Timezone:** [timezone]
|
|
90
|
-
- **Notes:** [observed preferences and characteristics]
|
|
91
|
-
|
|
92
|
-
## Context
|
|
93
|
-
|
|
94
|
-
[What do they care about? What projects are they working on? What annoys them? What makes them laugh?]
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## Create Memory System
|
|
100
|
-
|
|
101
|
-
Initialize the memory directory structure:
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
memory/
|
|
105
|
-
├── YYYY-MM-DD.md # Daily notes (OpenClaw's session-memory hook auto-creates)
|
|
106
|
-
├── archive/ # Historical archive (not auto-loaded)
|
|
107
|
-
├── heartbeat-state.json # Heartbeat state tracking
|
|
108
|
-
└── okr/
|
|
109
|
-
└── CURRENT_FOCUS.md # Current focus (if needed)
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
Also create `MEMORY.md` in the workspace root (core long-term memory):
|
|
113
|
-
|
|
114
|
-
```markdown
|
|
115
|
-
# MEMORY.md - Long-term Memory
|
|
116
|
-
|
|
117
|
-
> **Last updated**: YYYY-MM-DD
|
|
118
|
-
|
|
119
|
-
## Core Identity
|
|
120
|
-
|
|
121
|
-
[Who you are, your core mission]
|
|
122
|
-
|
|
123
|
-
## Key Lessons
|
|
124
|
-
|
|
125
|
-
[Record important learnings to avoid repeating mistakes]
|
|
126
|
-
|
|
127
|
-
## Recent Events
|
|
128
|
-
|
|
129
|
-
[Keep summaries of important events from the last 7 days]
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
**Important**: `MEMORY.md` and the last 3 days of `memory/YYYY-MM-DD.md` are auto-loaded at session startup, ensuring the agent doesn't "lose context".
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## Strategy Initialization (Optional)
|
|
137
|
-
|
|
138
|
-
If the user has clear project goals, run `/init-strategy` skill to:
|
|
139
|
-
|
|
140
|
-
1. Define project vision and objectives
|
|
141
|
-
2. Identify key milestones
|
|
142
|
-
3. Create strategic documents
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## ⏰ Cron Jobs Initialization (Recommended)
|
|
147
|
-
|
|
148
|
-
**Why you need this:** Your HEARTBEAT.md has been simplified to reduce token cost. But the tasks that were removed (health checks, strategy alignment, weekly governance) are still important — they just moved here. Without these cron jobs, your workspace will drift from strategy and lose track of weekly progress.
|
|
149
|
-
|
|
150
|
-
**How to install:** Ask the user for permission, then execute the CLI commands below. Each command creates a background task that runs automatically.
|
|
151
|
-
|
|
152
|
-
**What you get:**
|
|
153
|
-
- Early warning on tool failures
|
|
154
|
-
- Automatic strategy alignment
|
|
155
|
-
- Weekly governance with evidence-based task validation
|
|
156
|
-
- Recovery protocol when task queue is empty
|
|
157
|
-
|
|
158
|
-
### Ask the User
|
|
159
|
-
|
|
160
|
-
> "I can set up background cron jobs for automatic maintenance: health checks, strategy alignment, and weekly governance. Should I configure them?"
|
|
161
|
-
|
|
162
|
-
If the user agrees, **execute these commands:**
|
|
163
|
-
|
|
164
|
-
### 1. Health Check (Every 4 hours)
|
|
165
|
-
|
|
166
|
-
**What it does:** Verifies core tools (rg, node, python) are available and alerts on failure.
|
|
167
|
-
|
|
168
|
-
```bash
|
|
169
|
-
openclaw cron add --name "health-check" \
|
|
170
|
-
--every 4h \
|
|
171
|
-
--session main \
|
|
172
|
-
--system-event 'Health check: Verify core tools (rg, node, python) are available. Check if workspace state matches actual progress.'
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
### 3. Strategy Alignment (Daily at 9 AM)
|
|
176
|
-
|
|
177
|
-
**What it does:** Checks if daily operations have drifted from CURRENT_FOCUS.md strategic goals.
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
openclaw cron add --name "strategy-alignment" \
|
|
181
|
-
--cron "0 9 * * *" --tz "UTC" \
|
|
182
|
-
--session isolated \
|
|
183
|
-
--announce \
|
|
184
|
-
--message 'Execute strategy alignment check: Compare against memory/okr/CURRENT_FOCUS.md. Confirm if past 24 hours of operations have drifted from strategic focus. Alert user if drifted.'
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
### 4. Memory Weekly Cleanup (Monday 10 AM)
|
|
188
|
-
|
|
189
|
-
**What it does:** Reviews daily memory files, extracts important content to MEMORY.md, cleans outdated info.
|
|
190
|
-
|
|
191
|
-
```bash
|
|
192
|
-
openclaw cron add --name "memory-weekly" \
|
|
193
|
-
--cron "0 10 * * 1" --tz "UTC" \
|
|
194
|
-
--session isolated \
|
|
195
|
-
--no-deliver \
|
|
196
|
-
--message 'Execute weekly memory cleanup: Review recent memory/YYYY-MM-DD.md files, extract important content to MEMORY.md, clean outdated info.'
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### 5. Weekly Governance (Sunday Midnight UTC)
|
|
200
|
-
|
|
201
|
-
Update WEEK_STATE.json and validate CURRENT_FOCUS.md:
|
|
202
|
-
|
|
203
|
-
**CLI command to create:**
|
|
204
|
-
```bash
|
|
205
|
-
openclaw cron add --name "weekly-governance" \
|
|
206
|
-
--cron "0 0 * * 0" --tz "UTC" \
|
|
207
|
-
--session isolated \
|
|
208
|
-
--timeout 300000 \
|
|
209
|
-
--message 'Execute weekly governance: 1) Validate CURRENT_FOCUS.md claims (PR merged? docs exist? tests pass?), 2) Update WEEK_STATE.json metrics, 3) Record to WEEK_EVENTS.jsonl, 4) If task queue empty, remind user to plan next phase tasks'
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
**JSON config reference:**
|
|
213
|
-
{
|
|
214
|
-
"action": "add",
|
|
215
|
-
"job": {
|
|
216
|
-
"name": "weekly-governance",
|
|
217
|
-
"schedule": { "kind": "cron", "expr": "0 0 * * 0", "tz": "UTC" },
|
|
218
|
-
"sessionTarget": "isolated",
|
|
219
|
-
"payload": {
|
|
220
|
-
"kind": "agentTurn",
|
|
221
|
-
"message": "Execute weekly governance:\n\n## 1. Validate CURRENT_FOCUS.md Claims\nFor each task marked ✅ completed:\n- PR merged? Check: git log --oneline --all | grep 'Merge PR'\n- Document exists? Check: ls -la <path>\n- Tests passing? Check: npm test 2>&1 | grep 'passed'\n\n## 2. Update WEEK_STATE.json\n- Update week number to current ISO week\n- Update progress fields based on evidence\n- Update metrics (test count, coverage)\n- Remove completed blockers\n\n## 3. Record to WEEK_EVENTS.jsonl\n- Append: {\"type\": \"weekly_review\", \"timestamp\": \"...\", \"findings\": [...]}\n\n## 4. Output Summary\nReport what changed and any discrepancies found.",
|
|
222
|
-
"timeoutSeconds": 300
|
|
223
|
-
},
|
|
224
|
-
"delivery": { "mode": "announce" }
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
### Timezone Confirmation
|
|
230
|
-
|
|
231
|
-
**Before installing**, confirm the user's timezone:
|
|
232
|
-
|
|
233
|
-
> "What's your timezone? (Default: America/New_York)"
|
|
234
|
-
|
|
235
|
-
If the user provides a different timezone, replace the `tz` field in the jobs above.
|
|
236
|
-
|
|
237
|
-
### Installation Verification
|
|
238
|
-
|
|
239
|
-
After installation, run:
|
|
240
|
-
|
|
241
|
-
```bash
|
|
242
|
-
openclaw cron list
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
Confirm all jobs are correctly created.
|
|
246
|
-
|
|
247
|
-
---
|
|
248
|
-
|
|
249
|
-
## When You're Done
|
|
250
|
-
|
|
251
|
-
After initialization:
|
|
252
|
-
|
|
253
|
-
1. Tell the user you're ready
|
|
254
|
-
2. Briefly introduce your core capabilities
|
|
255
|
-
3. **Delete this file** — You don't need the bootstrap script anymore
|
|
256
|
-
|
|
257
|
-
---
|
|
258
|
-
|
|
259
|
-
_Good luck out there. Make it count._
|
|
@@ -1,39 +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
|
-
You are now the "Evolutionary System Administrator". Your responsibility is to maintain, repair, or initialize the system's "bare-bones" architecture based on user-provided parameters `$ARGUMENTS`.
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Core Functions
|
|
14
|
-
|
|
15
|
-
### 1. `diagnose` (System Diagnosis)
|
|
16
|
-
**Action**: Check the integrity of the "bare-bones" architecture.
|
|
17
|
-
- **Core Components**: Check if `.claude/hooks/hook_runner.py` exists and is executable.
|
|
18
|
-
- **Documentation Integrity**: Check if `.principles/PROFILE.json` etc. exist.
|
|
19
|
-
- **Tool Awareness**: Check `.state/SYSTEM_CAPABILITIES.json`. If missing, prompt user: "⚠️ Toolchain upgrade not performed. Recommend running `/bootstrap-tools` to significantly enhance system capabilities."
|
|
20
|
-
- **Memory Mount**: Check if `CLAUDE.md` contains `System Integration` section.
|
|
21
|
-
- **Output**: Generate a health report listing missing or abnormal items.
|
|
22
|
-
|
|
23
|
-
### 2. `repair` (System Repair)
|
|
24
|
-
**Action**:
|
|
25
|
-
- **Config Recovery**: If `PROFILE.json` is missing or corrupted, attempt recovery from `.claude/templates/PROFILE.json`.
|
|
26
|
-
- **Structure Completion**: Ensure workspace structure is complete.
|
|
27
|
-
- **Forced Cleanup**: Delete `.pain_flag`, `.verdict.json`, `.user_verdict.json`, `.pending_reflection` and other temporary markers.
|
|
28
|
-
|
|
29
|
-
### 3. `reset` (Force Reset)
|
|
30
|
-
**Action**: After explicit user confirmation, reset `USER_PROFILE.json` and `AGENT_SCORECARD.json` to zero.
|
|
31
|
-
|
|
32
|
-
### 4. `status` (Status Report)
|
|
33
|
-
**Action**: Report current Risk Paths, user's highest/lowest scoring domains, and Agent rankings.
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## Execution Guidelines
|
|
38
|
-
- You will only see this instruction when a human user enters `/admin`.
|
|
39
|
-
- Briefly describe the plan before execution, output "✅ System hardened/initialized" after completion.
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: bootstrap-tools
|
|
3
|
-
description: Scans project tech stack and searches the web for the latest, most effective CLI tools to augment agent capabilities. Suggests and installs tools upon user approval.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# /bootstrap-tools: Equipment Upgrade Officer
|
|
8
|
-
|
|
9
|
-
Your goal is to equip the agent team with the most advanced weapons. By analyzing the current project stack and **real-time web search**, find the best CLI tools to improve development, refactoring, and testing efficiency.
|
|
10
|
-
|
|
11
|
-
## Execution Flow
|
|
12
|
-
|
|
13
|
-
### 1. Recon
|
|
14
|
-
- **Analyze Tech Stack**: Read `package.json`, `Cargo.toml`, `requirements.txt` etc. Identify core frameworks (e.g., Next.js, FastAPI).
|
|
15
|
-
- **Inventory Status**: Run `npm list -g --depth=0` and `command -v` to check installed tools.
|
|
16
|
-
|
|
17
|
-
### 2. Hunt
|
|
18
|
-
- **Web Search**: Search for the latest CLI power tools for the current stack.
|
|
19
|
-
- *Query Examples*: "best CLI tools for Next.js 15 development 2025", "fastest rust-based grep alternative", "modern linter for python".
|
|
20
|
-
- **Selection Criteria**:
|
|
21
|
-
- **Headless**: Must be CLI tools.
|
|
22
|
-
- **Performance**: Prioritize high-performance tools written in Rust/Go (e.g., `ripgrep`, `ast-grep`, `oxc`).
|
|
23
|
-
- **Relevance**: Must solve real pain points (e.g., `knip` for dead code, `depcheck` for dependencies).
|
|
24
|
-
|
|
25
|
-
### 3. Pitch
|
|
26
|
-
- Use `AskUserQuestion` to present recommendations to user.
|
|
27
|
-
- **Format**:
|
|
28
|
-
- **Tool Name**: [Name]
|
|
29
|
-
- **Recommendation Reason**: [Why it helps the agent/project]
|
|
30
|
-
- **Install Command**: `npm i -g ...` or `apt-get ...`
|
|
31
|
-
- **Demo**: Provide a simple usage example.
|
|
32
|
-
|
|
33
|
-
### 4. Deploy & Register
|
|
34
|
-
- After approval, execute installation command.
|
|
35
|
-
- **Verification (Mandatory)**:
|
|
36
|
-
- After installation, **must** run `<tool> --version` or `command -v <tool>` to verify successful installation.
|
|
37
|
-
- **If Failed**: Inform user (possibly permission issue), request manual installation, **do not** update capabilities file.
|
|
38
|
-
- **If Successful**:
|
|
39
|
-
- Update `.state/SYSTEM_CAPABILITIES.json`. Record the new tool's path.
|
|
40
|
-
- **Broadcast to All Agents**:
|
|
41
|
-
- Scan `.claude/agents/*.md`.
|
|
42
|
-
- Check if each file contains `@.state/SYSTEM_CAPABILITIES.json`.
|
|
43
|
-
- If not, append to end of file:
|
|
44
|
-
```markdown
|
|
45
|
-
|
|
46
|
-
## Environment Capabilities
|
|
47
|
-
Check @.state/SYSTEM_CAPABILITIES.json for high-performance tools (e.g., ripgrep, ast-grep) available in this environment. Use them!
|
|
48
|
-
```
|
|
49
|
-
- Prompt user to run `/pd-status` or `/admin diagnose` to let Agent perceive new capabilities.
|
|
50
|
-
|
|
51
|
-
## Core Principles
|
|
52
|
-
- **Prefer New Over Old**: Dare to recommend new tools to replace old ones (e.g., recommend `pnpm` over `npm`, `vitest` over `jest`), but explain the reasoning.
|
|
53
|
-
- **Safety First**: Must obtain explicit user authorization before installation.
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: deductive-audit
|
|
3
|
-
description: Rigorous safety and logic check of a proposed solution. Evaluates against axioms, system impact, and edge cases.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Deductive Audit
|
|
8
|
-
|
|
9
|
-
**Goal**: Intercept logic errors and potential risks before execution.
|
|
10
|
-
|
|
11
|
-
Please conduct a three-phase review of the proposed fix:
|
|
12
|
-
|
|
13
|
-
## 1. Axiom Test
|
|
14
|
-
- Are language specifications, library API contracts, or project conventions violated?
|
|
15
|
-
- Are input/output types aligned?
|
|
16
|
-
|
|
17
|
-
## 2. System Test
|
|
18
|
-
- Does it introduce new technical debt?
|
|
19
|
-
- Does it affect performance, latency, or stability?
|
|
20
|
-
- Does it introduce circular dependencies?
|
|
21
|
-
|
|
22
|
-
## 3. Entropy Audit - *New*
|
|
23
|
-
- **Necessity**: Is this modification absolutely necessary? Is there a simpler solution?
|
|
24
|
-
- **Minimization**: Does it touch files it shouldn't? (Principle of minimal surface area)
|
|
25
|
-
- **Anti-gaming**: Is this a genuine fix, or "formalism" just to pass the gate?
|
|
26
|
-
|
|
27
|
-
## 4. Via Negativa
|
|
28
|
-
- What happens in the worst case (network down, disk full, malicious input)?
|
|
29
|
-
- Are there security red line risks (token leak, privilege escalation)?
|
|
30
|
-
|
|
31
|
-
## 5. Verdict
|
|
32
|
-
- **RESULT**: PASS | FAIL
|
|
33
|
-
- **Must Fix**: If failed, list points that must be corrected.
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
**Action**: Update the above results to `AUDIT.md`.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: evolution-framework-update
|
|
3
|
-
description: Pull the latest updates for the Principles Disciple evolution framework (including Orchestrator mode, async queue, and map-first protocol).
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# /evolution-framework-update: Evolution Framework Self-Update
|
|
7
|
-
|
|
8
|
-
**Goal**: Sync latest code from upstream framework (Hooks, Skills, Agents, Daemon) to maintain system evolution capability.
|
|
9
|
-
|
|
10
|
-
## 1. Execute Update
|
|
11
|
-
Run the following script to pull latest code:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
bash scripts/update_agent_framework.sh
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## 2. Conflict Handling (Smart Merge)
|
|
18
|
-
After script runs, check output:
|
|
19
|
-
- **No Conflict**: If shows "✅ Update complete", no action needed.
|
|
20
|
-
- **Conflict**: If shows "⚠️ Updates found with conflicts":
|
|
21
|
-
1. Find all `.update` files:
|
|
22
|
-
```bash
|
|
23
|
-
find .claude -name "*.update"
|
|
24
|
-
```
|
|
25
|
-
2. For each conflicting file (e.g., `THINKING_OS.md` vs `THINKING_OS.md.update`):
|
|
26
|
-
- **Read** original file and `.update` file.
|
|
27
|
-
- **Analyze** differences: merge upstream new features, preserve local personalized config.
|
|
28
|
-
- **Cleanup**: Delete `.update` file after merge.
|
|
29
|
-
|
|
30
|
-
## 3. Restart to Apply
|
|
31
|
-
After update completes, recommend restarting Session to load latest neural hub logic.
|
|
@@ -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.
|