Skip to content

Commit 95e01b0

Browse files
committed
Fix init lane collisions and refresh eventness docs
1 parent 4983961 commit 95e01b0

13 files changed

Lines changed: 423 additions & 19 deletions

README.CORE.EVENTNESS.md

Lines changed: 75 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ Short version:
3535
- routing is prefix/base-driven
3636
- attention is suffix-driven
3737

38+
Operational repo shape often looks like:
39+
40+
`<prefix>.<base>.<suffix>[.<eventness>][.<ext>]`
41+
42+
In practice:
43+
- `suffix` is usually the durable artifact or lane anchor
44+
- the extra right-hand eventness chain expands or collapses current interest
45+
- `.ext` is optional; most files have one, some do not
46+
3847
---
3948

4049
## Meaning of Each Part
@@ -93,6 +102,58 @@ This avoids hardcoding base depth.
93102

94103
---
95104

105+
## Operational Lifecycle
106+
107+
This repo uses eventness as a recurring pattern:
108+
109+
### 1) Expansion
110+
111+
When interest is live, expand around a stable subject:
112+
113+
`prefix.base.suffix[.expanding.eventness][.ext]`
114+
115+
Examples:
116+
- `main.command.trace-id.test.todo.current.md`
117+
- `main.command.trace-id.test.todo.current.reference.md`
118+
- `main.command.trace-id.test.todo.trigger.event.md`
119+
120+
Expanded files can hold:
121+
- resume context
122+
- hypotheses
123+
- exact `recur` commands to run next
124+
- references to related files or lanes
125+
126+
### 2) Interest Discovery
127+
128+
During expansion, use `recur` commands to discover what is actually interesting now.
129+
The files do not replace query-time discovery; they improve it.
130+
131+
Typical loop:
132+
- `recur files "**.current" -d docs/`
133+
- `recur files "**.trigger.event" -d docs/`
134+
- `recur tree "main" --sep . --sep _ --show-sep`
135+
- `recur find "<symbol-or-text>" --scope "**" -d src/`
136+
137+
This is why eventness works well with humans and LLMs: the repo stores both the current state and the next useful queries.
138+
139+
### 3) Collapse
140+
141+
Once the interest has paid off, collapse the expanded state:
142+
143+
`prefix.base.suffix[.collapsing.eventness][.ext]`
144+
145+
Typical outcomes:
146+
- keep a stable completion record: `*.complete.*`
147+
- keep a lower-intensity reminder: `*.future-plan.*`
148+
- keep a durable rediscovery point: `*.recurring.*`
149+
- remove the ephemeral file entirely when no residue is worth keeping
150+
151+
### 4) Recurring Rediscovery
152+
153+
`recurring` is apt when the value is not "this is active now" but "this workflow or pattern should be easy to find again later."
154+
155+
---
156+
96157
## Eventness Score
97158

98159
Eventness is a ranking score for "what should get attention now."
@@ -102,7 +163,7 @@ Suggested formula:
102163
`eventness = suffix_weight + prefix_prior + freshness + impact + anomaly_bonus`
103164

104165
Where:
105-
- `suffix_weight`: strongest signal (blocked > current > todo > complete)
166+
- `suffix_weight`: strongest signal (blocked > current > todo > recurring > complete)
106167
- `prefix_prior`: domain urgency prior (`ops` may outrank `research`)
107168
- `freshness`: time decay / staleness
108169
- `impact`: downstream references, dependency fan-out
@@ -121,6 +182,7 @@ You can detect useful surprises even when not explicitly planned.
121182
Examples:
122183
- new suffix pattern appears (`todo.blocker`, `risk.critical`) not in policy
123184
- missing expected suffix chain (`todo` exists, `todo.current` missing)
185+
- expanded eventness never collapsed after the interest window closed
124186
- sudden rise in refs/callers around one base
125187
- new prefix/base combination with no historical pattern
126188

@@ -146,7 +208,9 @@ This model supports both layers from IMPROVEMENT9:
146208

147209
- `main.command.tree.todo.current`
148210
- `main.command.tree.todo.trigger.event`
211+
- `main.command.trace-id.test.todo.current.reference`
149212
- `main.command.checkpoint.todo.next`
213+
- `main.package.crates-io.recurring`
150214
- `ops.incident.auth.outage.todo.blocker`
151215
- `release.v2_3.rc1.risk.high`
152216

@@ -168,6 +232,11 @@ recur files "main.command.*.todo.trigger.event" -d docs/
168232
recur files "main_command_*_todo_trigger_event" -d src/ --sep _
169233
```
170234

235+
### Recurring rediscovery (today)
236+
```bash
237+
recur files "**.recurring" -d docs/
238+
```
239+
171240
### Interest extraction (IMPROVEMENT9 target)
172241
```bash
173242
recur files "main.command.**" -d docs/ \
@@ -209,8 +278,9 @@ Then resolve IDs to files with existing file-layer commands and pull detailed co
209278
3. Resolve selected IDs to files (`recur files ...`) and extract suffix-bearing IDs (interest signals).
210279
4. Rank by eventness.
211280
5. Execute required triggers.
212-
6. Run recurring completion checklist items (update docs, commit, push).
213-
7. Rotate current lane.
281+
6. Collapse the expanded eventness to the right durable residue.
282+
7. Run recurring completion checklist items (update docs, commit, push).
283+
8. Rotate current lane.
214284

215285
Humans and LLMs should run the same loop over the same semantic list plus resolved file context.
216286

@@ -223,7 +293,8 @@ Keep this lightweight:
223293
1. Maintain a suffix policy map (suffix -> weight/severity).
224294
2. Enforce one active `*.todo.current` per lane.
225295
3. Require `*.todo.trigger.event` for recurring start/complete workflows.
226-
4. Run drift checks (missing suffix chains, unresolved refs).
296+
4. Collapse stale expanded eventness once the interest window closes.
297+
5. Run drift checks (missing suffix chains, unresolved refs).
227298

228299
---
229300

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ The tribute is also personal. I had the chance to speak with Dennis Ritchie brie
575575
576576
- [Full Tribute](RECUR-TRIBUTE.md) — the Dennis Ritchie note
577577
- [White Paper](docs/recur.white.paper.docx) — design and philosophy
578+
- [Eventness Explained](docs/eventness_explained_whitepaper.docx) - eventness explained in equation form
578579
- [Proposal](RECUR-PROPOSAL.md) — technical design
579580
- [Contributing](CONTRIBUTING.md) — how to contribute
580581
- [Implementation](IMPLEMENTATION-COMPLETE.md) — code walkthrough
22.1 KB
Binary file not shown.

docs/main.command.config.readme.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ recur related "main.command.config.trait" -d docs/ --sep .
1212

1313
## Commands
1414

15-
main.command.config.trait list/get/set trait parameters in `.recur/config.toml`
16-
main.command.config.init initialize `.recur/` directory with full default config
15+
main.command.config.trait - list/get/set trait parameters in `.recur/config.toml`
16+
main.command.config.init - initialize `.recur/` directory with full default config
1717

1818
## trait
1919

@@ -27,19 +27,27 @@ recur trait set trace_id.producer_keywords "publish,emit" # write a value
2727
```
2828

2929
Current trait sections:
30-
- `[traits.trace_id]` — keyword vocabulary for trace-id classification
31-
- `[traits.traversal_budget]` — depth cap and guardrail defaults
30+
- `[traits.content_search]` - file-size and binary-file policy for content search commands
31+
- `[traits.separator_merge]` - merge-specific project policy lane
32+
- `[traits.stdin]` - stdin path resolution and missing-path policy
33+
- `[traits.trace_id]` - keyword vocabulary for trace-id classification
34+
- `[traits.traversal_budget]` - depth cap and guardrail defaults
3235

3336
## init
3437

3538
`recur init` scaffolds the `.recur/` directory with:
36-
- `config.toml` full default config including all `[traits.*]` sections
39+
- `config.toml` - full default config including all `[traits.*]` sections
3740
- Ready for `recur trait set` customization per project
41+
- Deduplicated lane section names when different directories normalize to the same key
3842

3943
## References
4044

4145
- `docs/main.command.trait.readme.md`
4246
- `docs/main.command.init.readme.md`
47+
- `docs/main.command.init.lane-name-collision.complete.md`
4348
- `docs/main.command.map.readme.md`
49+
- `julia-tests/main.command.init.test.jl`
50+
- `julia-tests/main.command.trait.test.jl`
51+
- `src/main_command_init_impl.rs`
4452
- `src/main_command_trait_impl.rs`
4553
- `src/trait/trace_id.rs`
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Command: init lane-name collision handling - Complete
2+
3+
Status: `complete`
4+
Date: 2026-04-04
5+
6+
## What Landed
7+
8+
`recur init` now deduplicates generated lane section names when two directories
9+
normalize to the same config key.
10+
11+
Example collision:
12+
13+
- `test-quick/`
14+
- `test_quick/`
15+
16+
Both normalize to `test-quick`. Before this fix, `recur init --force` could emit
17+
duplicate TOML sections and leave `.recur/config.toml` unparsable. Now the later
18+
lane is suffixed (`test-quick-2`, `test-quick-3`, and so on) so the generated
19+
config remains valid and `recur trait` can read it immediately.
20+
21+
## Docs + Test Surface
22+
23+
- `docs/main.command.init.readme.md` updated with lane-name collision behavior
24+
- `docs/main.command.config.readme.md` updated to reflect the full trait surface
25+
- `julia-tests/main.command.init.test.jl` added as the command-level wrapper
26+
- `julia-tests/runtests.init.jl` added for init CLI, analyze-mode, and collision coverage
27+
28+
## Evidence
29+
30+
- `cargo test project_config -- --nocapture`
31+
- `julia julia-tests/main.command.init.test.jl`
32+
33+
## Files
34+
35+
- `src/project_config.rs`
36+
- `docs/main.command.init.readme.md`
37+
- `docs/main.command.config.readme.md`
38+
- `julia-tests/main.command.init.test.jl`
39+
- `julia-tests/runtests.init.jl`

docs/main.command.init.readme.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,23 @@ recur init
1515
Creates:
1616
- `.recur/config.toml` with detected lanes (for example `src/`, `docs/`, `julia-tests/`)
1717
- `.recur/checkpoints.md` (if missing)
18+
- all default `[traits.*]` sections used by `recur trait`
19+
20+
Generated lane names are normalized to lowercase kebab-case section names.
21+
If two directories collapse to the same normalized lane name, `recur init`
22+
appends a numeric suffix so the generated TOML stays valid.
23+
24+
Example:
25+
26+
```toml
27+
[test-quick]
28+
dir = "test-quick/"
29+
sep = "-"
30+
31+
[test-quick-2]
32+
dir = "test_quick/"
33+
sep = "."
34+
```
1835

1936
## Analyze mode
2037

@@ -52,3 +69,13 @@ recur files "main_command_**" -d src/ --count
5269
```
5370

5471
works without explicitly passing `--sep _` when `src/` is mapped to `_` in config.
72+
73+
## Testing
74+
75+
- `julia-tests/main.command.init.test.jl` - command-level wrapper for init CLI coverage
76+
- `julia-tests/runtests.init.jl` - init command contract, analyze mode, and collision tests
77+
78+
## Related
79+
80+
- `docs/main.command.config.readme.md`
81+
- `docs/main.command.init.lane-name-collision.complete.md`

docs/main.command.trait.complete.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Command: trait Complete
1+
# Command: trait - Complete
22

33
Status: `complete`
44
Date: 2026-03-06
@@ -17,15 +17,15 @@ to a first-class `Commands::Trait` enum variant in `main.rs`.
1717

1818
## Files Changed
1919

20-
- `src/main_command_trait_impl.rs` pub TraitSubcommand, new execute(), removed side-channel
21-
- `src/main.rs` Trait variant in Commands enum, match arm, after_help updated
22-
- `docs/main.command.trait.readme.md` created (permanent docs)
23-
- `docs/main.improvement.8.trace-id.todo.current.md` corrected deferred/implemented status
20+
- `src/main_command_trait_impl.rs` - pub TraitSubcommand, new execute(), removed side-channel
21+
- `src/main.rs` - Trait variant in Commands enum, match arm, after_help updated
22+
- `docs/main.command.trait.readme.md` - created (permanent docs)
23+
- `docs/main.improvement.8.trace-id.todo.current.md` - corrected deferred/implemented status
2424

2525
## Test Baseline
2626

2727
- Rust: 120 passed, 0 failed
28-
- Julia trait tests: `julia-tests/runtests.trait.jl` CLI contract + traversal budget passing,
28+
- Julia trait tests: `julia-tests/main.command.trait.test.jl` - CLI contract + traversal budget passing,
2929
`traversal_budget.min_depth` correctly marked `@test_broken` (future work)
3030

3131
## Related

docs/main.recur.expert.recurring.md

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ That gives the hierarchy room to add a base, suffix, and eventness cleanly over
1919

2020
Useful mental models:
2121

22-
- `prefix.base.suffix.[eventness-expanded].[ext]`
23-
- `prefix.base.suffix.[eventness-collapsed].[ext]`
22+
- `prefix.base.suffix[.expanding.eventness][.ext]`
23+
- `prefix.base.suffix[.collapsing.eventness][.ext]`
24+
25+
`.ext` is optional. Most files in this repo have one; some do not.
2426

2527
Examples in this repo:
2628

@@ -40,11 +42,24 @@ Treat it as a visible marker of interest:
4042

4143
- stable identity lives in `prefix.base.suffix`
4244
- expanded eventness carries live working context
45+
- during expansion, use `recur` commands to discover what is interesting and store exact `recur` commands inside the eventness files when that helps resume work
4346
- collapsed or closed eventness keeps only the amount of signal that still matters
47+
- collapse usually ends in `complete`, `future-plan`, `recurring`, or full removal of the ephemeral file
48+
49+
## Recurring Lifecycle
50+
51+
Treat eventness as a recurring operating pattern:
52+
53+
1. Expand interest around a stable subject.
54+
2. Use `recur` commands to discover the next useful questions and commands.
55+
3. Store those commands in the expanded eventness files when they improve rediscovery.
56+
4. Collapse once the interest window closes.
57+
5. Keep only the durable residue that still matters, or remove the file entirely.
4458

4559
## Eventness Reminder
4660

47-
`recurring` is a valid rediscovery/eventness concept, but most work in this repo is non-recurring improvement work.
61+
`recurring` is a valid rediscovery/eventness concept, and it is also a good collapsed form when the useful outcome is "remember this pattern next time."
62+
Most work in this repo is still non-recurring improvement work.
4863
In practice, expect more files like `todo`, `current`, `complete`, `future-plan`, `reference`, and `trigger.event` than `recurring`.
4964

5065
Use `recurring` when you want a durable "remember this workflow next time" rediscovery point.
@@ -62,8 +77,28 @@ In practice:
6277
- Use `complete` docs for baseline/history, not for deciding what is left
6378
- If a feature branch has already been merged, the remaining work usually lives in the `current` improvement and test lanes, not in the old feature branch name itself
6479

80+
## Fast Rehydration Order
81+
82+
When training Skippy or another LLM back into this repo, rehydrate in this order:
83+
84+
1. `docs/eventness_explained_whitepaper.docx` for the deeper eventness theory and equation framing.
85+
2. `README.CORE.EVENTNESS.md` for the operational model used in this repo.
86+
3. `docs/main.recur.expert.recurring.md` for the repo-specific rediscovery rules.
87+
4. `julia-expert/references/recur-playbook.md` for the concrete command workflow.
88+
89+
Then switch from reading to query-time discovery:
90+
91+
```powershell
92+
recur files "**.current" -d docs/
93+
recur files "**.recurring" -d docs/
94+
recur files "**.reference" -d docs/
95+
recur tree "main" --sep . --sep _ --show-sep
96+
```
97+
6598
## Canonical references
6699

100+
- `docs/eventness_explained_whitepaper.docx` - deeper eventness theory and equation framing
101+
- `README.CORE.EVENTNESS.md` - operational eventness model for this repo
67102
- `julia-expert/references/recur-playbook.md` - canonical prompt/playbook
68103
- `docs/AGENT.PROMPT.recur-expert.md` - pointer to canonical prompt
69104
- `ulu_docs/recur-agent.md` - supplemental older agent notes

0 commit comments

Comments
 (0)