You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The top-level sync workflow file coordinates the sync verb; it should not be a bucket for all sync helper behavior. Source/quiet parsing, transcript-to-repo candidate shaping, sweep-summary projection, and sync Absorb prompt context each have named files under `src/services/sync/`. `src/services/sync/sync.ts` keeps config activation lookup and lifecycle Absorb handoff because those are workflow decisions of the sync product verb.
133
133
134
+
The sync sweep file coordinates candidate iteration. It may show the order of eligibility checks, repo locks, ledger reconciliation, transcript snapshot reads, cursor decisions, Absorb enqueue attempts, and summary accounting. It should not own the implementation details for candidate eligibility, internal-Almanac-session lookup, or ready-cursor-to-Absorb enqueue transitions. Those live in `candidate-eligibility.ts`, `internal-sessions.ts`, and `absorb-enqueue.ts`, respectively. Sweep-result files own summary shapes only, not prompt context text.
135
+
134
136
### Automation scheduler contracts are service-owned; launchd is platform
135
137
136
138
`src/services/automation/` owns automation product workflows: task selection, interval validation, install/status/uninstall results, legacy migration semantics, and setup cleanup verbs. It talks to an injected `AutomationScheduler` contract from `src/services/automation/scheduler.ts`. `src/platform/automation/scheduler.ts` implements that contract with launchd/plist mechanics: default plist paths, log paths, launch PATH construction, plist writes, launchctl activation/removal/status, legacy capture detection, and XML-to-command-array normalization. CLI/setup/uninstall edges create the launchd scheduler because they are the concrete runtime composition points.
The branch has more than 280 committed rewrite commits past `dev`. The worklog records 232 production slices so far.
8
+
The branch has more than 280 committed rewrite commits past `dev`. The worklog records 233 production slices so far.
9
9
10
10
The diff is broad: more than 490 files changed, with tens of thousands of lines reshaped.
11
11
@@ -56,6 +56,7 @@ This is no longer a small cleanup branch. It is a real ownership rewrite.
56
56
- Moved concrete transcript discovery/snapshot composition behind an injected sync transcript runtime contract, with `src/platform/transcripts/runtime.ts` wired by the CLI sync edge.
57
57
- Moved sync's internal-Almanac-session lookup behind a jobs-service provider-session helper, so sync no longer reads job record storage shape directly.
58
58
- Split sync workflow helpers into owned files for input parsing, transcript candidate shaping, summary projection, and Absorb context rendering.
59
+
- Split sync sweep helpers into owned files for candidate eligibility, internal-session detection, and Absorb enqueue/ledger transitions.
59
60
- Moved lifecycle operation construction and Absorb input/source handling into `src/services/lifecycle/` and removed the old top-level `src/operations/` and `src/absorb/` source buckets.
60
61
- Normalized lifecycle operation failures into lifecycle-owned result contracts before command rendering sees them.
61
62
- Moved init prompt context construction out of the operation command adapter and into lifecycle workflows, so command code only shapes flags into service requests and renders service results.
@@ -108,7 +109,7 @@ This is no longer a small cleanup branch. It is a real ownership rewrite.
108
109
109
110
## Latest Checkpoint
110
111
111
-
The latest slice split the sync workflow helper logic into owned files so `src/services/sync/sync.ts` reads as orchestration instead of a mixed helper bucket.
112
+
The latest slice split sync sweep helper logic into owned files so `src/services/sync/sweep.ts` reads as candidate orchestration instead of a mixed eligibility/session/enqueue bucket.
112
113
113
114
Verification passed:
114
115
@@ -117,8 +118,8 @@ Verification passed:
117
118
-`npx vitest run test/architecture-boundaries.test.ts test/sync.test.ts`
118
119
-`npm test`
119
120
-`npm run build`
120
-
-`node dist/launcher.js sync status --json --quiet 1m`
121
121
-`node dist/launcher.js sync status --help`
122
+
-`node dist/launcher.js sync status --from codex --quiet 999999999s --json`
Copy file name to clipboardExpand all lines: docs/intentional-architecture-rewrite-2026-06-27/worklog.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1630,3 +1630,13 @@ Two-hundred-thirty-second production slice:
1630
1630
- Kept config `sync_since` lookup and lifecycle Absorb handoff in `sync.ts` because those are the workflow decisions the top-level sync verb coordinates.
1631
1631
- Reduced `src/services/sync/sync.ts` from a large mixed file to a small orchestrator over named sync helpers.
1632
1632
- Strengthened architecture-boundary tests so sync parsing, summary projection, repo candidate shaping, and Absorb context rendering stay in their owned files.
1633
+
1634
+
Two-hundred-thirty-third production slice:
1635
+
1636
+
- Split `src/services/sync/sweep.ts` so it stays focused on per-candidate sweep orchestration instead of owning every helper decision inline.
1637
+
- Added `src/services/sync/candidate-eligibility.ts` for activation and quiet-window eligibility checks.
1638
+
- Added `src/services/sync/internal-sessions.ts` for the internal-Almanac-session skip check over job provider session ids.
1639
+
- Added `src/services/sync/absorb-enqueue.ts` for ready-cursor-to-Absorb-job handoff, sync cursor context text, and the resulting ledger transition.
1640
+
- Kept ledger loading/reconciliation, repo sync locking, transcript snapshot reads, and summary accounting visible in `sweep.ts` because those are the sweep workflow steps.
1641
+
- Moved cursor context text out of `sweep-results.ts`, leaving that file as summary projection only.
1642
+
- Strengthened architecture-boundary tests so `sweep.ts` does not regain provider-session lookup or cursor context text.
0 commit comments