Refactor repository structure and agent harness - #8
Merged
RojhatToptamus merged 2 commits intoJul 21, 2026
Conversation
RojhatToptamus
marked this pull request as ready for review
July 21, 2026 16:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR applies the repository-wide structural refactor and agent-harness improvements identified during the architecture review while preserving Task Monki's workflow, evidence, provider, storage, and protocol invariants.
Repository and architecture boundaries
Renderer structure
Backend structure
Agent harness and documentation
Why
Responsibilities had accumulated in a few large composition roots and UI modules, while important dependency rules were mostly implicit. Tests existed but were harder for agents and maintainers to discover and run by subsystem. This increased change risk and slowed feedback.
The refactor uses incremental extraction and enforceable boundaries rather than a broad rewrite. Backend changes follow verified behavior and existing state ownership; no speculative domain layers or compatibility abstractions were introduced.
Packaged Electron acceptance testing
The built macOS ARM64 Electron application was exercised against an isolated user-data profile and the disposable
RojhatToptamus/test-monkirepository. The pass covered both success and failure states and included application restarts.The acceptance pass discovered the blank GitHub review-decision persistence defect described above. The exact rejected profile was retained, the fix was applied, the packaged app was rebuilt, and that same profile then loaded successfully with the invalid field durably removed.
Verification
npm run verifynpm run dist:dirand packaged Electron launch/restart passed.git diff --checkpassed.Independent review
The structural changes were reviewed independently from backend and frontend/agent-harness perspectives. Earlier review findings involving shutdown gating, stale documentation references, and unintentional extraction drift were corrected.
The E2E-discovered storage repair and test-harness change received a separate follow-up review. It confirmed that the repair is current-schema-only, field/value-specific, idempotent, atomically persisted, and still subject to full record/relationship validation. No actionable findings remain.
Risks and validation limits
.taskmonki/preview.yamlrecipe. If automatic Vite discovery is a release requirement, that remains follow-up work.