Today is Monday, January 12, 2026, morning.
Woke up early today, reflecting on the AI Agent design issues discussed with C1 yesterday. I found some insights worth recording.
Referencing the previous context, I designed a module-level human-machine collaborative software engineering architecture.
I'm considering how to implement it.
In short, the key points are:
- Need to manage code repositories using the
git worktreecommand and provide a setup script for each Repo. - Need to invoke the AI Agent (Claude Code, OpenCode, ...etc) via CLI, pass in a prompt, and start a session.
- Need to receive a completion notification from the AI Agent.
- Need to access the intermediate conversation history of the AI Agent; otherwise, transparency cannot be achieved. Referencing the controllable trust issue mentioned in this document, we need in-process transparency and controllability.
Based on these capabilities, I can implement an automated script to accomplish module-level software engineering tasks.
Taking Claude Code as an example:
- Claude Code can start a new session directly via CLI by passing in a prompt.
- When Claude Code outputs results to stdout using the
-pparameter, it indicates completion. - Claude Code provides the ability to pass a session ID, allowing us to locate the corresponding conversation history file in the
.claudedirectory and retrieve the historical messages.
Given this, I can write a script to manage these tasks.
Each session is independent and clean, and each session will be assigned to an Agent to complete.
An Agent instance can be abstracted as an interface, regardless of whether it's Claude Code or something else underneath.
The scheduler will then dispatch different Agents to complete tasks based on our predefined workflow.
Why base it on an Agent rather than an LLM API? Because the Agent handles the underlying logic of exploring the codebase, invoking operating system commands, managing context, and adapting to the LLM API. This is a complex system, and I believe we don't need to reinvent the wheel unless it doesn't meet our requirements.
I plan to implement a minimal version first to verify the feasibility of this idea. Stay tuned for follow-up progress records.