principles-disciple 1.208.1 → 1.209.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.
package/README.md CHANGED
@@ -1,42 +1,143 @@
1
- <!-- generated-by: gsd-doc-writer -->
2
- # principles-disciple
1
+ # Principles Disciple
3
2
 
4
- Native OpenClaw plugin for Principles Disciple: an evolutionary programming agent framework with strategic guardrails and reflection loops.
3
+ **Stop correcting the same AI behavior across sessions.**
4
+
5
+ Principles Disciple (PD) is a native OpenClaw plugin that captures the moments
6
+ where you correct your agent, turns repeated corrections into reviewable
7
+ principle proposals, and — only after you approve them — lets those principles
8
+ influence how the agent behaves in future sessions.
9
+
10
+ **Owner-controlled · Observable · Reversible**
11
+
12
+ ## The problem
13
+
14
+ Every session starts from zero. You correct the agent — "confirm scope before
15
+ cross-module edits", "don't touch generated files", "ask before deleting" —
16
+ it complies, the session ends, and the next session makes the same mistake.
17
+ Your corrections vanish; you pay for them again and again.
18
+
19
+ ## A typical moment
20
+
21
+ **Without PD**
22
+
23
+ > You tell the agent: *"Before changing multiple modules, confirm the scope
24
+ > first."* It complies. A few sessions later, you are correcting it again.
25
+
26
+ **With PD**
27
+
28
+ ```text
29
+ Repeated behavioral evidence (the same correction, again)
30
+
31
+ A behavioral pattern becomes reviewable
32
+
33
+ PD proposes a principle
34
+
35
+ You review the evidence, adjust the wording, approve it
36
+
37
+ The principle can influence future sessions — injected into the agent's
38
+ context, or enforced through tool hooks
39
+
40
+ The agent proactively presents a change scope and verification plan
41
+ ```
42
+
43
+ If a principle later causes side effects, roll it back with one command.
44
+
45
+ PD does not promise that N corrections automatically produce a principle, and
46
+ it never applies anything without you. It makes your repeated judgment
47
+ **durable** instead of disposable.
48
+
49
+ ## How PD works
50
+
51
+ 1. **You correct the agent** — or PD captures behavioral evidence through
52
+ OpenClaw hooks (tool failures, risky edits, blocked operations).
53
+ 2. **Evidence is recorded locally** as part of the agent's behavior history.
54
+ 3. **Recurring patterns become reviewable** — you can inspect the raw
55
+ evidence before deciding anything.
56
+ 4. **PD proposes a principle** describing the behavior change.
57
+ 5. **You review, edit, approve, or reject.** Nothing activates without owner
58
+ approval.
59
+ 6. **Approved principles can influence future behavior** — via context
60
+ injection (`prompt`) or hook-based enforcement (`code_tool_hook` /
61
+ RuleHost). You choose the channel; some corrections can also be deferred
62
+ or archived instead of activated.
63
+ 7. **Everything is reversible** — activated principles can be disabled or
64
+ rolled back, with the evidence trail intact.
65
+
66
+ ## You stay in control
67
+
68
+ - **No autonomous value decisions.** PD only internalizes behavior you have
69
+ reviewed and approved.
70
+ - **Local-first.** Evidence, principles, and decision logs live in your local
71
+ workspace (files + SQLite). No cloud service required.
72
+ - **Reversible by design.** `/pd-principle-rollback` rolls a principle back
73
+ and blacklists its pattern; implementation changes can be disabled or
74
+ archived.
75
+ - **Observable.** `/pd-status`, `/pd-samples`, and `/pd-export` show what PD
76
+ knows, what it proposed, and what you decided.
77
+
78
+ ## More than memory
79
+
80
+ Memory helps preserve *what happened*. PD focuses on turning behavioral
81
+ evidence and owner feedback into explicit, reviewable guidance for *how the
82
+ agent should behave next time*. PD does keep local records — but remembering
83
+ history is the input; governing future behavior is the point. Every step of
84
+ that governance stays reviewable and reversible.
5
85
 
6
86
  ## Installation
7
87
 
88
+ ### Recommended — install from ClawHub
89
+
90
+ ```bash
91
+ openclaw plugins install clawhub:principles-disciple
92
+ ```
93
+
94
+ Then restart your OpenClaw gateway so the plugin loads.
95
+
96
+ ### Manual / npm installation
97
+
8
98
  ```bash
9
99
  npm install principles-disciple
10
100
  ```
11
101
 
12
102
  Requires OpenClaw `>=2026.4.4` as a peer dependency.
13
103
 
14
- ## Usage
104
+ ## Quick start
15
105
 
16
- This plugin integrates with OpenClaw to provide an evolutionary programming framework. It intercepts agent operations through hooks to enforce security guardrails, track pain points, collect trajectory data, and enable deep reflection capabilities.
106
+ 1. Run `/pd-init` to initialize the PD workspace files.
107
+ 2. Work with your agent as usual — correct it as usual.
108
+ 3. Run `/pd-samples` to see captured correction samples and review them
109
+ (`review approve|reject <sample-id>`).
110
+ 4. Run `/pd-context` to control what gets injected into agent context.
111
+ 5. Run `/pd-status` for a single view of the system state.
17
112
 
18
- ### Slash Commands
113
+ ## Commands
19
114
 
20
115
  All commands support **short aliases** for easier input:
21
116
 
22
117
  | Short | Full Command | Description |
23
118
  |-------|--------------|-------------|
24
- | `/pdi` | `/pd-init` | Initialize workspace |
25
- | `/pdb` | `/pd-bootstrap` | Scan environment tools |
26
- | `/pdr` | `/pd-research` | Research tools and capabilities |
27
- | `/pdt` | `/pd-thinking` | Manage thinking models |
28
- | `/pdh` | `/pd-help` | Show command reference |
119
+ | `/pdi` | `/pd-init` | Initialize workspace (generate PRINCIPLES.md, THINKING_OS.md, etc.) |
120
+ | `/pdb` | `/pd-bootstrap` | Scan environment tools and suggest upgrades |
121
+ | `/pdr` | `/pd-research` | Research tool upgrade solutions |
122
+ | `/pdt` | `/pd-thinking` | Manage Thinking OS [status\|propose\|audit] (off by default) |
123
+ | `/pdh` | `/pd-help` | Show all commands and usage guide |
29
124
 
30
125
  | Command | Description |
31
126
  |---------|-------------|
32
- | `/pd-status` | View evolution status |
33
- | `/pd-context` | Control context injection |
34
- | `/pd-focus` | Focus file management |
35
- | `/pd-evolution-status` | View evolution state |
36
- | `/pd-rollback` | Rollback to previous state |
37
- | `/pd-export` | Export trajectory/correction data |
38
- | `/pd-samples` | Review correction samples |
39
- | `/pd-workflow-debug` | Debug workflow state |
127
+ | `/pd-status` | View system status (GFI, Pain dictionary) |
128
+ | `/pd-pain` | Report pain from the current OpenClaw session |
129
+ | `/pd-samples` | List or review correction samples (`review approve\|reject <sample-id> [note]`) |
130
+ | `/pd-context` | Control context injection [status\|thinking\|reflection\|focus\|preset] |
131
+ | `/pd-focus` | Manage CURRENT_FOCUS.md [status\|history\|compress\|rollback] |
132
+ | `/pd-evolution-status` | Show evolution loop status (candidate/probation/active) |
133
+ | `/pd-principle-rollback` | Roll back a principle and blacklist its pattern |
134
+ | `/pd-rollback` | Roll back an empathy event penalty (`<event-id>\|last`) |
135
+ | `/pd-export` | Export data [analytics\|corrections --redacted] |
136
+ | `/pd-workflow-debug` | Debug workflow state and events |
137
+
138
+ Advanced implementation lifecycle commands (`/pd-promote-impl`,
139
+ `/pd-disable-impl`, `/pd-archive-impl`, `/pd-rollback-impl`) are semi-deprecated
140
+ and kept for compatibility.
40
141
 
41
142
  ### Configuration
42
143
 
@@ -48,9 +149,31 @@ The plugin accepts the following configuration options:
48
149
  | `auditLevel` | `medium` | Security guardrail level (`low`, `medium`, `high`) |
49
150
  | `riskPaths` | `[]` | High-risk directories requiring explicit authorization |
50
151
 
152
+ ## Advanced concepts
153
+
154
+ - **Pain** — PD's technical name for incoming behavior evidence: a user
155
+ correction, tool failure, or blocked risky operation.
156
+ - **Trajectory** — the locally recorded stream of agent behavior and events.
157
+ - **Reflection** — generating principle proposals from evidence; output is
158
+ always owner-reviewed.
159
+ - **Evolution loop** — the candidate → probation → active lifecycle of
160
+ behavioral implementations (see `/pd-evolution-status`).
161
+ - **RuleHost / `code_tool_hook`** — hook-based enforcement channel for
162
+ approved principles.
163
+ - **Context injection** — feeding approved principles into the agent's
164
+ context (see `/pd-context`).
165
+ - **Thinking OS** — optional thinking-model management, off by default
166
+ (`/pd-thinking`, enable via `/pd-context thinking on`).
167
+
168
+ For the full architecture, runtime adapters (OpenClaw, Codex), and product
169
+ boundary, see the project documentation linked below.
170
+
51
171
  ## Part of the principles monorepo
52
172
 
53
- See the root [README.md](https://github.com/csuzngjh/principles#readme) for the full project overview.
173
+ See the root [README.md](https://github.com/csuzngjh/principles#readme) for
174
+ the full project overview, and
175
+ [PRODUCT_IDENTITY.md](https://github.com/csuzngjh/principles/blob/main/docs/product/PRODUCT_IDENTITY.md)
176
+ for the canonical product definition.
54
177
 
55
178
  ## License
56
179