Skip to content

feat(dag): integrate optimized DAG core contract#3142

Open
Zpankz wants to merge 9 commits into
multica-ai:mainfrom
Zpankz:letta/multica-dag-core
Open

feat(dag): integrate optimized DAG core contract#3142
Zpankz wants to merge 9 commits into
multica-ai:mainfrom
Zpankz:letta/multica-dag-core

Conversation

@Zpankz
Copy link
Copy Markdown

@Zpankz Zpankz commented May 23, 2026

Summary

Integrates the optimized DAG core contract from the calumalpass project into the multica-dag fork.

Changes

  • Migration 108: adds dag_event, dag_record_projection, dag_link_projection, dag_fact_projection, dag_citation_chain_projection, dag_conflict_state, dag_schema_dependency tables
  • internal/dagcore: pure Go DVT causality, event validation, inverse-link detection, acyclic schema validation, deterministic fact ordering, citation-chain validation, contradiction detection, concurrent field conflict detection
  • internal/daggraph: cycle detection (DFS), topological sort (Kahn), critical path computation
  • internal/service/dag: transactional AppendEvent with projection maintenance
  • cmd/backfill_dag: one-shot backfill from existing issue/issue_dependency rows into DAG event log
  • internal/handler/dag: POST /api/dag/events, GET /api/dag/analysis
  • e2e/dag-api.spec.ts: Playwright E2E tests (4 tests pass)
  • sqlc queries: generated models and queries for DAG tables

Testing

  • Unit tests: all new packages pass (go test ./internal/dagcore ./internal/daggraph ./internal/service ./internal/handler)
  • Full server suite: no regressions
  • E2E: 4/4 API-level tests pass against live backend

Design notes

  • Append-only event model (no mutations, only projections)
  • Transactional projection updates in single TX
  • Deterministic graph analysis (robot-mode for agents)
  • Idempotent backfill via upsert semantics

Next steps (future PR)

  • Wire DAG event generation into issue creation/update handlers for automatic sync
  • Add agent-facing robot-triage CLI output
  • Connect DAG state to UI flows

Generated with Letta Code

Co-Authored-By: Letta Code noreply@letta.com

Implements the full DAG core integration slice:
- Migration 108: dag_event, dag_record_projection, dag_link_projection,
  dag_fact_projection, dag_citation_chain_projection, dag_conflict_state,
  dag_schema_dependency tables
- internal/dagcore: pure Go DVT causality, event validation, inverse-link
  detection, acyclic schema validation, deterministic fact ordering,
  citation-chain validation, contradiction detection, concurrent field
  conflict detection
- internal/daggraph: graph analysis (cycles, topological sort, critical path)
- internal/service/dag: transactional AppendEvent with projection maintenance
- cmd/backfill_dag: one-shot backfill from issue/issue_dependency into DAG
- internal/handler/dag: POST /api/dag/events, GET /api/dag/analysis
- e2e/dag-api.spec.ts: Playwright E2E tests (4 tests pass)
- sqlc queries and generated models for DAG tables

All server tests pass (except pre-existing repocache failure).
E2E validated against live backend.

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 23, 2026

@Zpankz is attempting to deploy a commit to the IndexLabs Team on Vercel.

A member of the Team first needs to authorize it.

Zpankz and others added 8 commits May 24, 2026 05:28
issue_dependency does not have a workspace_id column.
Join with issue table to resolve the correct workspace for each dependency.

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>
Automatically append DAG events when issues are created, updated, or deleted:
- CreateIssue: emits OperationCreate after tx commit
- UpdateIssue: emits OperationUpdate with changed fields (status, priority,
  title, assignee) after successful update
- DeleteIssue: emits OperationDelete (tombstone) after deletion

Uses fire-and-forget goroutine so DAG projection never blocks HTTP response.
Errors are logged but not surfaced to the caller.

Adds DAGService field to Handler struct, initialized in New().

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>
Restructures docs to reflect completed vs future work.
All 8 implementation items are now marked complete.

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>
Adds getDAGAnalysis() and appendDAGEvent() to ApiClient,
plus DAGAnalysisResponse and DAGEvent types in packages/core.

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>
Adds `dagAnalysisOptions` query hook and `dagKeys` cache key factory
in `packages/core/dag/queries.ts`, exported from `packages/core/index.ts`.

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>
…lls, autopilots

Adds complete deferred work tracking section to dag-core.md:
- 14 issues across 5 work streams (frontend viz, dependency API, robot CLI,
  conformance gate, schema validation)
- 6 specialized agents with assigned skills
- 6 squads with agent leaders
- 6 autopilots for continuous work generation

All tracked in workspace 'pex' with parent tracker issue.

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>
Machine-readable manifest of all deferred work entities created via
multica CLI: 3 projects, 6 agents, 6 squads, 6 skills, 6 autopilots,
15 issues across 5 work streams.

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>
…t and Hallmark design skills

Enriches dag-frontend-viz agent with:
- 9050 chars of nuanced instructions (up from 1609)
- Single-file HTML artifact generation patterns from
  julianoczkowski/html, thariqs/html-effectiveness, Azhi-ss/html-effectiveness
- Hallmark anti-slop design system from nutlope/hallmark:
  22 themes, 4 verbs (build/audit/redesign/study), 65 slop-test gates,
  pre-emit self-critique, macrostructure variety
- New skills: dag-html-artifact-viz, dag-hallmark-design
- Updated manifest v1.2.0 with design references

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>
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