Skip to content

Commit 763bfd6

Browse files
author
zenus
committed
docs: explain config and bitlesson systems
1 parent f7e88d0 commit 763bfd6

2 files changed

Lines changed: 70 additions & 1 deletion

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,26 @@ Requires [codex CLI](https://github.com/openai/codex) for review. See the full [
5555
humanize monitor rlcr
5656
```
5757

58+
## Config System
59+
60+
Humanize now uses a shared config hierarchy instead of scattering defaults across scripts.
61+
62+
Priority is:
63+
1. `config/default_config.json`
64+
2. `~/.config/humanize/config.json`
65+
3. `.humanize/config.json`
66+
4. CLI flags for commands that expose overrides
67+
68+
This keeps RLCR, PR loop, and `ask-codex` aligned on the same Codex defaults, while still letting each project pin its own behavior. The current config surface covers shared review settings such as `codex_model` and `codex_effort`, plus workflow toggles like `bitlesson_model`, `agent_teams`, and plan-generation preferences.
69+
70+
## BitLesson System
71+
72+
Humanize also includes a BitLesson system, which is the repository's Bitter Lesson-style knowledge capture workflow.
73+
74+
Each project keeps a local knowledge base at `.humanize/bitlesson.md`. The RLCR setup initializes that file from a strict template when it is missing. During each round, the loop reads the knowledge base, runs a selector for every task or sub-task, and requires the round summary to include a `## BitLesson Delta` section describing whether a reusable lesson was added, updated, or intentionally left unchanged.
75+
76+
The goal is to turn repeated failure-and-fix cycles into explicit project memory instead of rediscovering the same operational lessons every round.
77+
5878
## Monitor Dashboard
5979

6080
<p align="center">

docs/usage.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,17 @@ Humanize uses a 4-layer config hierarchy (lowest to highest priority):
140140
3. **Project config**: `.humanize/config.json`
141141
4. **CLI flags**: Command-line arguments (where available)
142142

143+
Current built-in keys:
144+
145+
| Key | Default | Description |
146+
|-----|---------|-------------|
147+
| `codex_model` | `gpt-5.4` | Shared default model for Codex-backed review and analysis |
148+
| `codex_effort` | `high` | Shared default reasoning effort (`xhigh`, `high`, `medium`, `low`) |
149+
| `bitlesson_model` | `haiku` | Model used by the BitLesson selector agent |
150+
| `agent_teams` | `false` | Project-level default for agent teams workflow |
151+
| `chinese_plan` | `false` | Project preference for Chinese plan generation |
152+
| `gen_plan_mode` | `discussion` | Default plan-generation mode |
153+
143154
### Codex Model Configuration
144155

145156
All Codex-using features (RLCR loop, PR loop, ask-codex) share the same model configuration:
@@ -154,7 +165,8 @@ To override, add to `.humanize/config.json`:
154165
```json
155166
{
156167
"codex_model": "gpt-5.2",
157-
"codex_effort": "xhigh"
168+
"codex_effort": "xhigh",
169+
"bitlesson_model": "sonnet"
158170
}
159171
```
160172

@@ -168,6 +180,43 @@ Codex model is resolved with this precedence:
168180
`loop_reviewer_model` or `loop_reviewer_effort`, they are silently ignored.
169181
Use `codex_model` and `codex_effort` instead.
170182

183+
### BitLesson Configuration
184+
185+
BitLesson is the repository's Bitter Lesson-style knowledge capture system for RLCR rounds.
186+
187+
The selector reads `bitlesson_model` from the merged config. Provider routing is automatic:
188+
189+
- `gpt-*`, `o1-*`, `o3-*` route to Codex
190+
- `claude-*`, `haiku`, `sonnet`, `opus` route to Claude
191+
192+
If the configured provider binary is missing, the selector falls back to the default Codex model so the loop can still proceed.
193+
194+
## BitLesson Workflow
195+
196+
Each project keeps its BitLesson knowledge base at `.humanize/bitlesson.md`.
197+
198+
When `start-rlcr-loop` begins:
199+
200+
1. The file is initialized from `templates/bitlesson.md` if it does not already exist
201+
2. Each task or sub-task runs through `scripts/bitlesson-select.sh`
202+
3. The selected lesson IDs are applied during implementation, or `NONE` is recorded when nothing matches
203+
4. The stop gate validates a required `## BitLesson Delta` section in every round summary
204+
205+
Required summary shape:
206+
207+
```markdown
208+
## BitLesson Delta
209+
- Action: none|add|update
210+
- Lesson ID(s): <IDs or NONE>
211+
- Notes: <what changed and why>
212+
```
213+
214+
Validation rules are strict:
215+
216+
- `Action: none` must use `Lesson ID(s): NONE` or leave the field empty
217+
- `Action: add` and `Action: update` must reference concrete `BL-YYYYMMDD-short-name` IDs that exist in `.humanize/bitlesson.md`
218+
- `--require-bitlesson-entry-for-none` can be used to block empty knowledge bases from repeatedly reporting `none`
219+
171220
## Monitoring
172221

173222
Set up the monitoring helper for real-time progress tracking:

0 commit comments

Comments
 (0)