refactor(daemon): remove context snapshot, let agent fetch data via CLI

Replace the frozen context snapshot pattern with a CLI-driven approach:
agents now use `multica` CLI commands to fetch issue details, comments,
and workspace context on demand, always getting the latest data.

- Remove buildContextSnapshot and snapshot generation from enqueue
- Claim endpoint now returns fresh agent name + skills from DB
- Daemon resolves provider from local runtimeIndex, not snapshot
- Prompt instructs agent to use `multica issue get` / `comment list`
- Meta skill (CLAUDE.md/AGENTS.md) documents all available CLI commands
- Skills still injected as filesystem files (static agent config)
- Simplify daemon types: remove TaskContext/IssueContext/RuntimeContext

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
yushen 2026-03-27 15:31:22 +08:00
parent 6733262a63
commit 1deae2a1e9
12 changed files with 176 additions and 238 deletions

View file

@ -29,11 +29,9 @@ type PrepareParams struct {
// TaskContextForEnv is the subset of task context used for writing context files.
type TaskContextForEnv struct {
IssueTitle string
IssueDescription string
WorkspaceContext string
AgentName string
AgentSkills []SkillContextForEnv
IssueID string
AgentName string
AgentSkills []SkillContextForEnv
}
// SkillContextForEnv represents a skill to be written into the execution environment.