xiaoju
fe829d9ae6
feat(workflow): add preparer role as first step in solve-issue workflow
...
- New package: @uncaged/workflow-role-preparer with PreparerMeta type,
schema, system prompt, and extract prompt
- Preparer locates/clones repo, detects toolchain and conventions
- Moderator updated: preparer → planner → coder → reviewer → committer
- solve-issue template re-exports preparer types
- Tests updated for new flow (129 pass, 0 fail)
Fixes #28
2026-05-07 10:12:59 +00:00
xiaoju
341ff656dc
feat(planner,coder,moderator): integrate CAS for phase tracking
...
Phase 2 of #23 :
- Planner schema compact: {hash, title} only, details stored via CAS CLI
- Planner prompt instructs agent to shell out `cas put` for each phase
- Coder prompt instructs agent to `cas get` for phase details, report hash
- Moderator compares hashes instead of names
- Removed COMPLETED_PHASE_SENTINELS — hash matching eliminates ambiguity
Refs #23
2026-05-07 04:54:25 +00:00
xiaoju
96fc3e220a
fix(solve-issue): handle one-shot coder completing all phases at once
...
The moderator now treats completedPhase matching the last planned phase name
as full completion. Also recognizes sentinel values (all-done, all_done,
complete) for robustness.
Fixes #21
小橘 🍊 (NEKO Team)
2026-05-07 03:13:44 +00:00
xiaoju
d472de1247
refactor: three-phase context (Moderator/Agent/Extract) + extractPrompt + unified ExtractFn
...
- ModeratorContext → AgentContext → ExtractContext progressive types
- ThreadContext is now alias for AgentContext
- RoleDefinition adds extractPrompt field
- ExtractFn = (schema, ctx: ExtractContext) => Promise<T>
- createWorkflow takes ExtractFn, engine loop: moderator → agent → extract
- Remove ExtractConfig, extractMetaOrThrow, extract-meta.ts
小橘 <xiaoju@shazhou.work >
2026-05-07 01:05:31 +00:00
xiaoju
45bb5af99a
feat: per-role agent config + phased planner/coder in solve-issue template
...
- SolveIssueRolesConfig.agents allows per-role AgentFn overrides
- PlannerMeta now outputs phases (name, description, acceptance)
- CoderMeta reports completedPhase, works one phase at a time
- Moderator routes coder→coder until all phases done, then reviewer
小橘 <xiaoju@shazhou.work >
2026-05-06 11:35:45 +00:00
xiaoju
196562c82a
feat: committer distinguishes recoverable vs unrecoverable failures
...
CommitterMeta is now a 3-way discriminated union:
- committed: success with branch + commitSha
- recoverable: coder can fix (hook failures, lint, test, conflicts)
- unrecoverable: can't be fixed by code (auth, permissions, disk)
Moderator routes recoverable → coder for retry.
2026-05-06 10:53:17 +00:00
xiaoju
4b27943871
refactor: simplify reviewer — discriminated union meta, minimal prompt
...
- ReviewerMeta → discriminated union: approved | rejected (with issues)
- Remove method-heavy prompt — agent has built-in code review capability
- Prompt now just says: project path, threadId for context, approve or reject
- No non-blocking suggestions (they get ignored anyway)
- ReviewerConfig simplified to just { cwd }
2026-05-06 10:29:48 +00:00
xiaoju
db5cbd49e2
feat: @uncaged/workflow-template-solve-issue — first workflow template
...
planner → coder → reviewer → committer flow with retry logic.
- createSolveIssueWorkflow factory (agent-agnostic)
- buildSolveIssueDescriptor with zod@4 JSON Schema
- Moderator: reviewer reject → coder retry, maxRounds → END
- 103 tests pass, biome clean
Closes #13
小橘 <xiaoju@shazhou.work >
2026-05-06 07:04:28 +00:00