Skip to content

[codex] Implement phase 2 write interpretation#72

Draft
MaxLinCode wants to merge 1 commit intomainfrom
claude/phase2-write-interpretation
Draft

[codex] Implement phase 2 write interpretation#72
MaxLinCode wants to merge 1 commit intomainfrom
claude/phase2-write-interpretation

Conversation

@MaxLinCode
Copy link
Copy Markdown
Owner

What changed

This replaces the write-path slot-extractor seam with a unified interpretWriteTurn stage and rewires the router to use classifyTurn -> interpretWriteTurn -> writeCommit -> decideTurnPolicy.

Why

Phase 1 landed PendingWriteOperation, but the active router path still pre-gated schedule extraction and committed only flat extracted schedule fields. This change moves operation-aware interpretation into one LLM call, keeps commit responsible for required-field derivation from operationKind, and updates the code map/docs to match the landed architecture.

Impact

Write-capable turns now use one interpretation boundary instead of a separate router-owned slot-extraction pass. The commit layer now evaluates grouped field paths, preserves the existing confidence thresholds, and still keeps classifier-owned entity resolution in place for now.

Validation

  • pnpm --filter @atlas/core test
  • pnpm --filter @atlas/web test
  • pnpm --filter @atlas/integrations test
  • pnpm test
  • pnpm typecheck

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
atlas-web Error Error Mar 28, 2026 9:46pm

@MaxLinCode
Copy link
Copy Markdown
Owner Author

Suggestion for follow-up architecture work:

PR 72 is a solid step forward, but the split between turnType and operationKind still feels more redundant than ideal on the write path. Right now we need to reason about turnType for gating (should this turn be interpreted for writes?) and operationKind for workflow contract (what fields are required, and do we merge or reset prior state?). That separation is defensible, especially for clarification_answer, but it also creates a mismatch surface where discourse classification and workflow interpretation can diverge in surprising ways.

For a future pass, I’d suggest tightening that boundary so only one layer owns write-workflow semantics. A few possible directions: keep turnType purely discourse-oriented and make operationKind exist only on write-capable turns; or reduce the classifier to a simpler write vs non-write decision and let the write interpreter own workflow kind end-to-end. Either way, the goal would be to reduce overlap, make invariants easier to state, and shrink the number of cases where a turn can be “write-like” in one representation but not the other.

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.

1 participant