IMPORTANT: After completing the task below, you MUST output a JSON object in a [code]…
- User
IMPORTANT: After completing the task below, you MUST output a JSON object in a ```json code fence at the very end of your response. Do NOT forget this — the workflow fails without it.
Implement the current Spectraplex packet.
Follow:
- CLAUDE.md
- design/SPECTRAPLEX_STRATEGY_AND_EXECUTION_PLAN.md
- design/PHASED_IMPLEMENTATION_PLAN.md
Current coordination:
- mode: implement_packet
- phase: Phase 0: Lock The V2 Architecture
- work packet: P0-W2
- objective: Write the missing Target Model spec that formalizes
IndexTargetsemantics, per-family validity,filter_specshape, modes, and ownership rules against the V2 RFC. - branch: codex/p0-w2-target-model-spec
- existing PR: (none)
Repo touchpoints:
- design/TARGET_MODEL.md
- design/V2_ARCHITECTURE_RFC.md
- design/PHASED_IMPLEMENTATION_PLAN.md
- core/src/models.rs
- adapters/src/repo.rs
- api/src/main.rs
- cli/src/main.rs
Implementation steps:
- Draft
design/TARGET_MODEL.mdfrom RFC Section 3.2 instead of inventing new target kinds or control-plane concepts. - Define target identity rules for wallet, contract, program, account, topic_filter, market, pool, and protocol targets.
- Specify the
filter_specshape andmodesemantics (backfill,stream,both) for each target kind. - Produce the per-chain-family validity matrix covering Solana, EVM, and Hyperliquid, including the wallet-vs-account distinction on Solana and the wallet-vs-contract distinction on EVM.
- Document ownership or tenancy rules and include at least one concrete example spec for every target kind.
Verification expectations:
- Verify
design/TARGET_MODEL.mdexists and directly references the locked target model decisions indesign/V2_ARCHITECTURE_RFC.md. - Verify the validity matrix covers every target kind across every supported chain family.
- Verify each target kind has at least one example spec and that
filter_specexamples are specific enough to drive Phase 1 schema work and Phase 2 connector inputs. - Verify the spec preserves wallet indexing as first-class without reintroducing wallet-only assumptions into shared abstractions.
Outstanding validation or review feedback: No outstanding validation or review feedback.
Assistant
Now let me check the existing adapters to understand chain-specific details:
Assistant
Good. Now I have a thorough understanding of the codebase. Let me create the branch and write the TARGET_MODEL.md spec.
Assistant
Now let me write the comprehensive TARGET_MODEL.md spec:
Assistant
Now let me run verification steps. Since this is a design-only document in the gitignored
design/directory, the Rust checks still need to pass to verify no regressions:Assistant
All 211 tests pass. Now let me verify the document content against the verification expectations before committing:
Assistant
Let me verify the document against each verification expectation:
Assistant
Good - 14 references to the V2 Architecture RFC and 8 references to Section 3.2. Let me verify the remaining criteria:
Assistant
All verification criteria are met:
- TARGET_MODEL.md exists and references V2 RFC: 14 references to V2 Architecture RFC, 8 to Section 3.2
- Validity matrix covers every target kind across every chain family: Section 3 has a complete 8x3 matrix (8 target kinds x 3 chain families)
- Each target kind has at least one example spec: 10 examples in Section 8 covering all 8 target kinds (wallet has 3 examples across chains, protocol has 1, etc.), with
filter_specexamples specific enough for Phase 1 schema and Phase 2 connector work - Wallet indexing preserved as first-class: Section 9.3 explicitly addresses this, wallet is valid on all 3 chain families
Now let me create the local commit:
Assistant
The
design/directory is gitignored. Let me check:Assistant
As expected,
design/is in.gitignore. The CLAUDE.md confirms: "design/ is gitignored; do not try to commit it." Since this is a design-only work packet producing a spec in the gitignoreddesign/directory, there are no committable changes.Let me verify the file exists and is complete:
Assistant