Skip to content

stevenchouai/digital-twin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

13 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Digital Twin Banner

digital-twin

Your Personal Agent Operating Layer.
Build an AI that inherits your logic, style, and memory, instead of just answering prompts.

Stars License Docs

TL;DR

digital-twin is a file-first blueprint for building a personal agent operating layer: keep your knowledge in inspectable files, route work to focused capabilities, produce durable outputs, and write reusable lessons back into the system.

If you only have 5 minutes, start here:

  1. Read the thesis to understand the operating model.
  2. Open playground/ to see the file structure of a personal twin.
  3. Follow TRY_IT.md to run a small writing/research workflow against local files.
  4. Browse the live docs: https://stevenchouai.github.io/digital-twin/.

๐Ÿš€ Why digital-twin?

Most AI agents start from scratch every time you talk to them. They don't know what you know, how you think, or where you save things.

digital-twin is different. It is not a prompt pack, a generic RAG demo, or a chatbot persona. It is a Personal Agent Operating Layer blueprint: a file-based template for making an agent inherit your long-running knowledge, workflows, skills, and learning loop.

This repository currently ships the operating model and workspace structure, not a hosted runtime. The point is to show how to organize a personal AI system so any capable coding agent or AI IDE can run it against real files.

  • ๐Ÿ›‘ Traditional AI: Prompt -> Answer -> End.
  • ๐ŸŸข Digital Twin: Understand Intent -> Retrieve your Knowledge -> Route to your Skills -> Execute -> Write Back & Learn.
Digital Twin Architecture

How the system works: Raw Input โ†’ Knowledge Wiki โ†’ Capability Router โ†’ Execute & Write Back โ†’ Learning Loop

๐Ÿ›  Capability Routing โ€” The Brain of Your Twin

What makes a digital twin powerful is not a mega-prompt โ€” it's knowing which skill to use for which task.

The twin doesn't do everything the same way. It detects your intent, then routes to the right capability module โ€” each with its own workflow, constraints, and output format.

Intent Capability What It Does
ๅ†™ๆ–‡็ซ ใ€ๆ•ด็†ๅฃ่ฏญ่ฎฐๅฝ• Content Creation Reads wiki & style guide โ†’ drafts โ†’ publishes to Blog/
ๅˆทๆ–ฐ็Ÿฅ่ฏ†ๅบ“ใ€ingest ่ต„ๆ–™ Wiki Management Scans raw/ for increments โ†’ creates summaries โ†’ updates index
็ ”็ฉถไปฃ็ ๅบ“ใ€ๅˆ†ๆžๆžถๆž„ Codebase Research Builds mental model โ†’ extracts value โ†’ produces research report
ๆ”น็ฝ‘็ซ™ใ€ไผ˜ๅŒ– SEO Site Improvement Checks existing positioning โ†’ edits files โ†’ writes back rules
ๆ”น็ฎ€ๅކใ€JD ๅˆ†ๆž Resume Craft Reads career context โ†’ tailors to JD โ†’ outputs draft
ๅค็›˜ใ€ๆฒ‰ๆท€็ป้ชŒ Learning Loop Asks 4 questions โ†’ extracts durable rules โ†’ writes to wiki
review ็Ÿฅ่ฏ†ๅบ“ใ€่š็ฑปๆ•ด็† Knowledge Growth Syncs state โ†’ digests new notes โ†’ clusters topics โ†’ reviews timeline

Each capability is a standalone file. You can add, remove, or modify them without touching the core system.

โœจ Core Features

  • ๐Ÿง  Personal Wiki First: Pulls from your wiki/, prior outputs, style rules, and agent-learnings/ before acting.
  • ๐Ÿงญ Intent Routing: Classifies the request before execution, then chooses the right capability instead of forcing everything through one mega-prompt.
  • ๐Ÿ›  Skills / Capabilities: Keeps reusable workflows in standalone capability files for writing, research, wiki management, resume work, site improvement, and learning loops.
  • ๐Ÿ’พ Write-back System: Generates durable files in your workspace, not just chat bubbles.
  • ๐Ÿ”„ Learning Loop: Distills new preferences, failure modes, and reusable rules into future context.

๐Ÿ“ˆ Why This Fits the 2026 Agent Trend

The market is moving from "ask a model a question" toward personal agent systems that can remember context, call tools, and operate inside a user's real workflow. digital-twin maps that trend into a practical local blueprint:

Trend What it means in practice How this repo handles it today
Agent memory Useful agents need durable context across sessions, not just a longer chat window. Uses wiki/, published outputs, and agent-learnings/ as inspectable memory files.
MCP / tools / skills Agents increasingly need standard ways to reach files, apps, tools, and repeatable workflows. Models capabilities as modular skill files that can later be connected to MCP servers or AI IDE tools.
Personal AI workflow The differentiator is not a generic assistant; it is whether the agent follows one person's actual operating model. Routes by intent, reads Steven-style assets, executes in the workspace, then writes back rules.
Local-first / BYO knowledge Users need control over private notes, project files, and knowledge boundaries. Keeps the template file-based and bring-your-own-knowledge instead of requiring a proprietary memory store.

The project is intentionally honest about its current state: it is a blueprint/template for a Personal Agent OS, not a claim that every connector, scheduler, memory service, or UI has already been implemented.

๐ŸŒŸ Showcase: The "Elon Musk" Digital Clone

We don't just talk about it โ€” we built a complete demo to prove it. The Elon Musk Digital Twin shows how the system uses real public resources to operate with his logic.

What's in the demo?

  • 4 raw sources โ€” Starship engineering feedback, Tesla production lessons, SpaceX culture, AI risk stance
  • 4 wiki pages โ€” Management rules, First Principles, Decision-Making framework, Communication style
  • Each resource has a reason โ€” See SHOWCASE.md for why each was collected and how they connect

Before vs After (quick preview)

Without wiki With wiki loaded
Opening "Dear Team, I wanted to provide an update..." "The tile process has an Idiot Index problem."
Instruction "I'd like to suggest we explore improvements..." "DELETE the manual gap check. Effective immediately."
Sign-off "Best regards, Elon" "This is not optional. Elon"

๐Ÿ— Architecture Workflow

graph TD
    A[User Intent] --> B(1. Understand Intent)
    B --> C(2. Retrieve Context)
    C -->|Reads wiki/ & learnings/| D(3. Route to Capability)
    D --> E(4. Execute & Write Back)
    E -->|Saves files| F(5. Learning Loop)
    F -->|Updates rules| C
Loading

๐Ÿ Quick Start (Run the Steven Workflow Demo)

You don't need a massive database to start. The playground/ folder is a lightweight Steven-style workflow demo that shows the full operating loop with real files.

What the demo shows

Step File / Action What to observe
Input playground/raw/thoughts/2026-04-23-why-most-ai-feels-generic.md Raw thought material enters the system.
Knowledge retrieval playground/wiki/_index.md, prior blog posts, and learning notes The agent checks existing context before writing.
Capability routing capabilities/content-creation.md The request routes to content creation instead of generic chat.
Execution playground/Blog/Published/ The expected output is a durable draft file.
Write-back learning playground/wiki/outputs/agent-learnings/ The run should leave reusable writing rules for next time.

Run it

  1. Open playground/ in Cursor, Claude Code, Codex, Windsurf, or your agent runner of choice.
  2. Open playground/FIRST_PROMPT.md.
  3. Ask the agent to execute it inside the workspace.
  4. Check that it writes a blog draft under playground/Blog/Published/ and a learning note under playground/wiki/outputs/agent-learnings/.

If the agent only returns a chat answer, the demo failed: the operating layer is about retrieval, routing, execution, and write-back. For a stricter proof check, use the Steven Workflow success checklist.

To make it yours, replace the files in playground/raw/thoughts/ and wiki/ with your own notes, transcripts, and rules. Keep the loop.

๐Ÿ“š Documentation

Dive deeper into the philosophy and architecture:

๐Ÿค Contributing

Contributions are welcome when they make the operating loop easier to inspect, run, or adapt. Please read CONTRIBUTING.md before opening a PR.

๐Ÿ“„ License

This project is licensed under the MIT License.

About

File-first blueprint for a personal agent operating layer with identity, style, memory, and workflows

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors