Skip to content

feat(twin): Digital Twin Agent — clones workflow patterns, drafts in user voice (#745) - #861

Merged
AmitoVrito merged 2 commits into
SynapseKit:mainfrom
DhruvGarg111:feat/issue-745-digital-twin
Jul 29, 2026
Merged

AmitoVrito merged 2 commits into
SynapseKit:mainfrom
DhruvGarg111:feat/issue-745-digital-twin

Conversation

@DhruvGarg111

@DhruvGarg111 DhruvGarg111 commented Jul 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Implements the DigitalTwin agent system as requested in #745.

Key Components Added:

  • StyleProfile: Versioned, human-editable style.md file storing learned patterns (tone, structure, vocabulary, review style).
  • VoiceMatcher: Evaluates candidate draft match against reference samples using composite scoring (n-gram overlap, vocabulary match, structure match) with optional LLM judge.
  • DelegationPolicy: Channel-level approval gates (draft, draft_with_approval, never_send_auto) and DraftResult with explicit provenance and attribution (drafted by twin vN).
  • DigitalTwinAgent: Facade orchestrating profile management, voice matching, delegation policies, and drafting of commit messages, PR descriptions, and reviews.

Verification:

  • Added comprehensive unit test suite in tests/twin/test_twin.py (9 tests covering all components end-to-end).
  • Type checking (mypy) passed with zero errors across all 5 source files.
  • Linting and formatting (ruff check / ruff format) passed cleanly.

Closes #745

@AmitoVrito
AmitoVrito merged commit d17004f into SynapseKit:main Jul 29, 2026
16 checks passed
@AmitoVrito

Copy link
Copy Markdown
Collaborator

Merged, thanks Dhruv. I tightened the delegation gate so never_send_auto actually blocks a send (it was advisory before), moved the style.md IO off the event loop, and added the coroutine assertions. You're co-author on that commit. Solid feature.

ayushbhatt1224 pushed a commit to ayushbhatt1224/SynapseKit that referenced this pull request Aug 12, 2026
ayushbhatt1224 pushed a commit to ayushbhatt1224/SynapseKit that referenced this pull request Aug 12, 2026
AST checker that fails CI on any blocking file/subprocess/sleep/network
call directly inside an async def (offload via asyncio.to_thread /
run_in_executor). Skips nested sync helpers and awaited calls; supports a
# allow-blocking escape hatch. Guards the async-first invariant that let
blocking IO slip past review in SynapseKit#860/SynapseKit#861/SynapseKit#862.
ayushbhatt1224 pushed a commit to ayushbhatt1224/SynapseKit that referenced this pull request Aug 12, 2026
Formatting drift from the SynapseKit#860/SynapseKit#861 async fixes broke `ruff format --check`.

Co-authored-by: Dhruv Garg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v2.1: Digital Twin Agent — clones your workflow patterns, drafts in your voice

2 participants