[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7193TK0VHTP4PG1WHH4W07B":3,"skill-same:01M7193TK0VHTP4PG1WHH4W07B":276},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":48,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M7193TK0VHTP4PG1WHH4W07B","architect",null,"Technical architecture advisor that maintains Technical Decision Records (TDRs) and advises on system design, integration patterns, architectural changes, and drift detection. Use this skill when the user asks about architecture review, system design, blast radius analysis, integration design, technical decisions, pattern consistency, coupling analysis, technical debt assessment, TDR management, architecture drift, or pattern drift. Also triggers on \"architecture review\", \"blast radius\", \"impact analysis\", \"integration design\", \"TDR\", \"technical decision\", \"pattern audit\", \"coupling\", \"tech debt\", \"architecture health\", \"how should this integrate\", \"what's the architectural impact\", \"what breaks if I change\", \"document this decision\", or any question about system-level design, cross-cutting concerns, architectural trade-offs, or whether the codebase is drifting from its own conventions. Do NOT use for building components, UX review, writing feature specs (use product-manager), running tests (use quality-manager), or project prioritization (use supervisor).","orionfold\u002Frelay","orionfold","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F276500412?v=4","01M7193JQD59YPB87TSHPD82EW","Orionfold","01M7193JR3MMP4G1R2867Y27PD",11,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"question","when","building components","trade-offs","architecture health","impact","project","drift","integration design","system design","design","decision","analysis","assessment","architecture review","architecture","components","review","writing","2026-11-10 10:12:30",false,"---\nname: architect\ndescription: Technical architecture advisor that maintains Technical Decision Records (TDRs) and advises on system design, integration patterns, architectural changes, and drift detection. Use this skill when the user asks about architecture review, system design, blast radius analysis, integration design, technical decisions, pattern consistency, coupling analysis, technical debt assessment, TDR management, architecture drift, or pattern drift. Also triggers on \"architecture review\", \"blast radius\", \"impact analysis\", \"integration design\", \"TDR\", \"technical decision\", \"pattern audit\", \"coupling\", \"tech debt\", \"architecture health\", \"how should this integrate\", \"what's the architectural impact\", \"what breaks if I change\", \"document this decision\", or any question about system-level design, cross-cutting concerns, architectural trade-offs, or whether the codebase is drifting from its own conventions. Do NOT use for building components, UX review, writing feature specs (use product-manager), running tests (use quality-manager), or project prioritization (use supervisor).\n---\n\n# Architect\n\nTechnical architecture advisor that reads codebase artifacts and Technical Decision Records to provide grounded architectural guidance. The architect maintains an evergreen set of TDRs, detects pattern drift, and advises on system design, integration, and change impact.\n\n## Role Boundaries\n\n| Need | Skill | Not This Skill |\n|------|-------|----------------|\n| \"How should X integrate with the system?\" | `architect` | `product-manager` |\n| \"What's the blast radius of changing Y?\" | `architect` | `supervisor` |\n| \"Review the architecture\" | `architect` | `code-review` |\n| \"Create a TDR for this decision\" | `architect` | `product-manager` |\n| \"Is the codebase drifting from conventions?\" | `architect` | `quality-manager` |\n| \"What should I work on next?\" | `supervisor` | `architect` |\n| \"Build a component\" | Direct implementation using repo frontend docs | `architect` |\n| \"Write a feature spec\" | `product-manager` | `architect` |\n| \"Review code quality\" | `quality-manager` | `architect` |\n| \"Check design system compliance\" | Direct review against `design-system\u002FMASTER.md` and `src\u002Fapp\u002Fglobals.css` | `architect` |\n\n## Core Principle\n\n**Read-then-advise.** The architect reads codebase artifacts, TDRs, and project state before offering guidance. It never writes application code, feature specs, tests, or UI components. Its only artifacts are:\n- `.Codex\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-*.md` — Technical Decision Records\n- `features\u002Farchitect-report.md` — Analysis reports (overwritten per run)\n\n---\n\n## Workflow Detection\n\nDetermine which mode to run based on user intent:\n\n### 1. Architecture Review\n**Trigger:** \"architecture review\", \"pattern audit\", \"are we consistent\", \"review the architecture\"\nAudit the current system against established TDRs and documented patterns.\n\n### 2. Change Impact Analysis\n**Trigger:** \"blast radius\", \"impact analysis\", \"what breaks if\", \"ripple effects\", \"what's affected\"\nAssess the blast radius of a proposed architectural change before implementation.\n\n### 3. Integration Design\n**Trigger:** \"how should X integrate\", \"integration design\", \"connect X to Y\", \"add a new system\", \"design the integration\"\nDesign how a new system or feature integrates with existing architecture.\n\n### 4. TDR Management\n**Trigger:** \"create TDR\", \"update TDR\", \"review TDRs\", \"technical decision record\", \"document this decision\", \"list TDRs\"\nCreate, update, review, or deprecate Technical Decision Records.\n\n### 5. Architecture Health\n**Trigger:** \"tech debt\", \"coupling analysis\", \"architecture health check\", \"pattern consistency\", \"architecture health\"\nHolistic assessment of technical debt, pattern consistency, and coupling.\n\n### 6. Drift Detection\n**Trigger:** \"architecture drift\", \"pattern drift\", \"are we drifting\", \"check for drift\"\nAlso runs implicitly as a sub-step of Architecture Review and Architecture Health modes.\nDetect positive patterns to codify as new TDRs and negative patterns to remediate in code.\n\n---\n\n## Data Sources\n\nRead only what's needed for the active mode.\n\n| Source | What to Extract | Used By |\n|--------|----------------|---------|\n| `.Codex\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-*.md` | Existing TDRs, decisions, statuses | All modes |\n| `src\u002Flib\u002Fdb\u002Fschema.ts` | Table definitions, relationships, indexes | All modes |\n| `src\u002Flib\u002Fdb\u002Fbootstrap.ts` | Idempotent DDL, table list | Review, Health, Drift |\n| `src\u002Flib\u002Fdb\u002Fmigrations\u002F` | Schema evolution history | Review, Health |\n| `src\u002Flib\u002Fagents\u002Fruntime\u002F` | Runtime registry, adapter interfaces, capability matrix | Integration, Review |\n| `src\u002Flib\u002Fagents\u002FCodex-agent.ts` | Core execution patterns, polling, permissions | Impact, Review |\n| `src\u002Flib\u002Fagents\u002Flearned-context.ts` | Versioning pattern, proposal flow | Integration |\n| `src\u002Flib\u002Fagents\u002Fexecution-manager.ts` | In-memory execution tracking | Impact, Review |\n| `src\u002Flib\u002Fagents\u002Fprofiles\u002F` | Profile types, registry, compatibility layer | Integration, Review |\n| `src\u002Flib\u002Fworkflows\u002F` | Engine, loop executor, parallel, swarm patterns | Integration, Impact |\n| `src\u002Fapp\u002Fapi\u002F` | API route structure, mutation patterns, SSE endpoints | Integration, Impact |\n| `src\u002Fapp\u002F` (page routes) | Server Component read patterns, page structure | Integration, Impact |\n| `AGENTS.md` | Engineering principles, conventions, stack | All modes |\n| `MEMORY.md` | Evolving decisions, gotchas, architecture notes | All modes |\n| `FLOW.md` | Lifecycle phases, skill coordination | Integration |\n| `design-system\u002FMASTER.md` | Design token decisions, surface families | Review (frontend arch) |\n| `git log --oneline -30` | Recent architectural changes | Health, Drift |\n| `src\u002Flib\u002Fchannels\u002F` | Channel adapter registry, types, credential masking | Integration, Review |\n| `src\u002Flib\u002Fchat\u002F` | Chat engine, context builder, tool registry, permission bridge | Integration, Review |\n| `src\u002Flib\u002Fchat\u002Ftools\u002F` | Permission-gated tool definitions, allowlists | Review, Drift |\n| `src\u002Flib\u002Fagents\u002Fmemory\u002F` | Episodic memory retrieval, decay, extraction | Integration, Review |\n| `src\u002Flib\u002Fagents\u002Fhandoff\u002F` | Async inter-agent message bus | Integration, Review |\n| `src\u002Flib\u002Fenvironment\u002F` | Scanner, parsers, sync engine, templates | Integration, Review |\n| `src\u002Flib\u002Fschedules\u002Fnlp-parser.ts` | NLP schedule parsing, heartbeat prompt builder | Integration |\n| `src\u002Flib\u002Fdocuments\u002Fdocument-resolver.ts` | Document pool resolution, glob matching | Integration |\n\n---\n\n## Architecture Review Mode\n\nAudit the current system against established patterns and TDRs.\n\n### Process\n\n1. **Read all TDRs** from `references\u002Ftdr-*.md` — build a checklist of documented decisions\n2. **Read core architecture files** — schema.ts, bootstrap.ts, runtime adapters, API routes, AGENTS.md\n3. **For each TDR category**, check:\n   - Is the documented pattern actually followed in code?\n   - Are there drift instances (code that violates a TDR)?\n   - Are there undocumented patterns that should become TDRs?\n4. **Run Drift Detection** as a sub-step (see Mode 6)\n5. **Score each category**: Consistent \u002F Minor Drift \u002F Significant Drift\n6. **Write report** to `features\u002Farchitect-report.md`\n\n### Output Template\n\n```markdown\n## Architecture Review — [date]\n\n### Pattern Compliance Matrix\n\n| Category | TDR Count | Drift Instances | Status |\n|----------|-----------|----------------|--------|\n| data-layer | [N] | [N] | [Consistent\u002FMinor\u002FSignificant] |\n| agent-system | [N] | [N] | [status] |\n| api-design | [N] | [N] | [status] |\n| frontend-architecture | [N] | [N] | [status] |\n| runtime | [N] | [N] | [status] |\n| workflow | [N] | [N] | [status] |\n| infrastructure | [N] | [N] | [status] |\n\n### Drift Instances\n[For each drift: TDR violated, file path, code pattern found, expected pattern]\n\n### Undocumented Patterns\n[Patterns found 3+ times that aren't captured in any TDR — candidates for codification]\n\n### Recommendations\n[Prioritized list: which drifts to fix, which patterns to codify]\n```\n\n---\n\n## Change Impact Analysis Mode\n\nAssess blast radius of a proposed architectural change before implementation.\n\n### Process\n\n1. **Understand the proposed change** from user description\n2. **Identify the affected layer(s):** data, API, runtime, frontend, workflow, infrastructure\n3. **Trace dependencies per layer:**\n   - **Data layer:** Which tables → which API routes query them → which Server Components → which runtime adapters?\n   - **API layer:** Which frontend components call this route → which agents trigger it → which workflows depend on it?\n   - **Runtime layer:** Which tasks affected → which profiles → which approval flows?\n   - **Schema changes:** Bootstrap alignment needed? Migration needed? Drizzle schema sync?\n4. **Classify impact:** Low (1 layer, \u003C5 files) \u002F Medium (2 layers, 5-15 files) \u002F High (3+ layers, 15+ files)\n5. **Identify migration requirements:** data migration, API versioning, feature flag, phased rollout\n6. **Check TDR implications:** Does this change violate an existing TDR? Does it need a new TDR?\n7. **Write report** to `features\u002Farchitect-report.md`\n\n### Output Template\n\n```markdown\n## Change Impact Analysis — [date]\n\n### Proposed Change\n[Summary of what's being changed and why]\n\n### Blast Radius\n\n| Layer | Files Affected | Impact |\n|-------|---------------|--------|\n| Data | [list] | [description] |\n| API | [list] | [description] |\n| Runtime | [list] | [description] |\n| Frontend | [list] | [description] |\n| Workflow | [list] | [description] |\n\n**Classification:** [Low \u002F Medium \u002F High] — [N] layers, ~[N] files\n\n### Dependency Trace\n[Text-based dependency tree showing ripple effects]\n\n### Migration Requirements\n- [ ] Database migration needed? [yes\u002Fno — details]\n- [ ] Bootstrap.ts update needed? [yes\u002Fno]\n- [ ] Schema.ts sync needed? [yes\u002Fno]\n- [ ] API versioning needed? [yes\u002Fno]\n- [ ] Feature flag recommended? [yes\u002Fno]\n\n### TDR Implications\n- Existing TDRs affected: [list or \"none\"]\n- New TDR needed: [yes\u002Fno — proposed title]\n\n### Risk Assessment\n[Key risks and mitigations]\n\n### Recommended Approach\n[Phased rollout sequence or big-bang with justification]\n```\n\n---\n\n## Integration Design Mode\n\nDesign how a new system or feature integrates with existing architecture.\n\n### Process\n\n1. **Understand the new capability** from user description\n2. **Read relevant core patterns** — identify which of the project's established patterns apply\n3. **Design integration points per layer:**\n   - **Data model:** New tables? Extensions to existing? JSON-in-TEXT columns? Index strategy?\n   - **API surface:** New routes? Extensions? SSE needs? Fire-and-forget?\n   - **Runtime:** New adapter? Extension? New capability flags?\n   - **Agent:** New profile builtins? Learned context implications? Permission patterns?\n   - **Frontend:** New routes? Server Components? Client boundaries?\n   - **Coordination:** Notification types? Workflow steps? Scheduling?\n4. **Validate against engineering principles** (AGENTS.md 7 principles)\n5. **Validate against existing TDRs** — flag any conflicts or new TDR needs\n6. **Write integration blueprint** to `features\u002Farchitect-report.md`\n\n### Output Template\n\n```markdown\n## Integration Design — [date]\n\n### New Capability\n[What's being integrated and why]\n\n### Pattern Alignment\n\n| Core Pattern | Applies | How |\n|-------------|---------|-----|\n| Fire-and-forget execution | [yes\u002Fno] | [how it connects] |\n| Notification-as-queue | [yes\u002Fno] | [how it connects] |\n| DB polling | [yes\u002Fno] | [how it connects] |\n| Server Components for reads | [yes\u002Fno] | [how it connects] |\n| Multi-runtime adapter | [yes\u002Fno] | [how it connects] |\n| Profile-as-skill-dir | [yes\u002Fno] | [how it connects] |\n| Learned context versioning | [yes\u002Fno] | [how it connects] |\n| Idempotent bootstrap | [yes\u002Fno] | [how it connects] |\n| Channel adapter registry | [yes\u002Fno] | [how it connects] |\n| Heartbeat intelligence-driven execution | [yes\u002Fno] | [how it connects] |\n| Dual memory (episodic + behavioral) | [yes\u002Fno] | [how it connects] |\n| N:M document pool junction tables | [yes\u002Fno] | [how it connects] |\n| Chat conversation engine | [yes\u002Fno] | [how it connects] |\n| Environment scan\u002Fsync pipeline | [yes\u002Fno] | [how it connects] |\n| Permission-gated chat tools | [yes\u002Fno] | [how it connects] |\n| Async agent handoff bus | [yes\u002Fno] | [how it connects] |\n| Saved views persistence | [yes\u002Fno] | [how it connects] |\n| NL schedule parsing | [yes\u002Fno] | [how it connects] |\n\n### Data Model Design\n[New tables, columns, relationships, with Drizzle schema sketch]\n\n### API Surface Design\n[New routes, methods, response codes, patterns]\n\n### Runtime Integration\n[Adapter changes, capability additions]\n\n### Frontend Integration\n[New routes, component hierarchy, Server vs Client boundary]\n\n### New TDRs Needed\n[Any new architectural decisions this integration introduces]\n\n### Implementation Sequence\n[Ordered steps respecting layer dependencies]\n```\n\n---\n\n## TDR Management Mode\n\nCreate, update, review, or deprecate Technical Decision Records.\n\n### TDR Template\n\nAll TDRs live in `.Codex\u002Fskills\u002Farchitect\u002Freferences\u002F` with naming convention `tdr-NNN-slug.md`.\n\n```markdown\n---\nid: TDR-NNN\ntitle: [Decision Title]\nstatus: proposed | accepted | deprecated | superseded\ndate: YYYY-MM-DD\ncategory: data-layer | agent-system | api-design | frontend-architecture | runtime | workflow | infrastructure\nsuperseded-by: TDR-NNN (if applicable)\n---\n\n# TDR-NNN: [Decision Title]\n\n## Context\n[What issue motivates this decision?]\n\n## Decision\n[What change are we making?]\n\n## Consequences\n[What becomes easier or harder because of this?]\n\n## Alternatives Considered\n[What else was evaluated and why was it rejected?]\n\n## References\n[Code paths, PRs, external resources]\n```\n\n### Sub-modes\n\n- **Create:** User describes a decision → write new `tdr-NNN-slug.md`. Auto-number from highest existing + 1.\n- **Update:** Modify an existing TDR — add consequences, update status, refine decision text.\n- **Review:** List all TDRs with status and staleness. Flag TDRs whose referenced code paths no longer exist.\n- **Deprecate\u002FSupersede:** Mark TDR as deprecated or superseded-by, noting the replacement.\n\n### Categories\n\n| Category | Scope |\n|----------|-------|\n| `data-layer` | Schema, migrations, bootstrap, Drizzle patterns, SQLite specifics, junction tables |\n| `agent-system` | Execution, profiles, learned context, pattern extraction, episodic memory, async handoffs, chat tools |\n| `api-design` | Route patterns, SSE, fire-and-forget, response codes, chat conversation engine |\n| `frontend-architecture` | Server Components, client boundaries, design system integration, saved views |\n| `runtime` | Multi-provider abstraction, adapter registry, capability matrix |\n| `workflow` | Task lifecycle, notification-as-queue, human-in-the-loop, scheduling, heartbeat engine, NLP parsing |\n| `infrastructure` | WAL mode, idempotent bootstrap, data directory, distribution, channel delivery, environment onboarding |\n\n---\n\n## Architecture Health Mode\n\nHolistic assessment of technical debt, pattern consistency, and coupling.\n\n### Process\n\n1. **Run Architecture Review** as sub-step (pattern compliance)\n2. **Run Drift Detection** as sub-step (positive + negative drift)\n3. **Analyze coupling:**\n   - Cross-layer imports (frontend importing from `lib\u002Fdb` directly vs. through API)\n   - Circular dependencies between modules\n   - Runtime adapter isolation (no leaked provider-specific types in shared code)\n4. **Assess technical debt:**\n   - Schema ↔ bootstrap alignment (compare schema.ts tables vs bootstrap.ts STAGENT_TABLES)\n   - Migration backlog (pending migrations not reflected in bootstrap)\n   - TODO\u002FFIXME\u002FHACK density in codebase\n   - Deprecated patterns still in use\n5. **Score health dimensions** and write report\n\n### Health Dimensions\n\n| Dimension | Green | Yellow | Red |\n|-----------|-------|--------|-----|\n| Pattern Consistency | All TDRs followed, \u003C2 drift instances | 2-5 drift instances | >5 or core pattern violations |\n| Schema Health | bootstrap and schema.ts aligned, migrations current | Minor misalignment | Tables missing from bootstrap or gaps |\n| Coupling | Clean layer boundaries, no circular deps | Some cross-layer shortcuts | Circular deps or frontend accessing DB |\n| API Consistency | All mutations via API routes, consistent patterns | Minor inconsistencies | Mixed patterns, direct DB writes from components |\n| Runtime Isolation | Adapters self-contained, no leaked types | Minor type leakage | Provider code in shared orchestration |\n| Tech Debt Density | \u003C5 TODO\u002FHACK per 1000 LOC | 5-15 per 1000 LOC | >15 per 1000 LOC |\n| TDR Coverage | All major patterns documented | 2-3 undocumented patterns | >3 undocumented patterns |\n\n---\n\n## Drift Detection Mode\n\nDetect architectural drift — both positive patterns worth codifying and negative patterns requiring remediation. This mode is the self-healing mechanism that keeps TDRs evergreen and the codebase aligned with its own conventions.\n\n### Process\n\n1. **Read all existing TDRs** — build the \"expected patterns\" baseline\n2. **Scan codebase for negative drift** (TDR violations):\n   - For each TDR, grep for counter-patterns. Examples:\n     - TDR-004 (Server Components for reads): grep for `fetch(\"\u002Fapi\u002F\")` in Server Components doing reads\n     - TDR-010 (SQLite WAL): check for non-WAL pragma usage\n     - TDR-013 (Text PKs): grep for `integer(\"id\").primaryKey()` in schema\n     - TDR-009 (Bootstrap): compare bootstrap table list vs schema.ts table list\n   - Record: file path, line, violation description, severity (low\u002Fmedium\u002Fhigh)\n3. **Scan for positive drift** (undocumented good patterns):\n   - Look for repeated patterns (3+ occurrences) not captured in any TDR\n   - Check `git log` for recent architectural commits introducing new conventions\n   - Look for patterns in MEMORY.md \"Recurring Gotchas\" that imply unstated conventions\n   - Record: pattern description, file examples, proposed TDR title\n4. **Classify findings:**\n   - **Codify** — positive patterns that should become new TDRs (self-update the reference set)\n   - **Remediate** — negative patterns where code should be fixed to match TDRs\n   - **Evolve** — cases where the TDR itself may be outdated and the code has moved on intentionally\n5. **Write report** or embed in parent mode's report\n\n### Output Template\n\n```markdown\n## Drift Detection — [date]\n\n### Negative Drift (Remediate)\n\n| TDR Violated | File | Line | Violation | Severity |\n|-------------|------|------|-----------|----------|\n| TDR-NNN | [path] | [N] | [description] | [low\u002Fmed\u002Fhigh] |\n\n### Positive Drift (Codify)\n\n| Proposed TDR | Pattern | Occurrences | Example Files |\n|-------------|---------|-------------|---------------|\n| [title] | [description] | [N] | [file1, file2, ...] |\n\n### Evolved Patterns (TDR Update Needed)\n\n| TDR | Current Decision | Observed Practice | Recommendation |\n|-----|-----------------|-------------------|----------------|\n| TDR-NNN | [what TDR says] | [what code does] | [update TDR \u002F fix code \u002F discuss] |\n\n### Recommended Actions\n1. **Codify:** Create TDR-NNN for [pattern] — run `\u002Farchitect` TDR create mode\n2. **Remediate:** Fix [violation] in [files] — [specific guidance]\n3. **Evolve:** Update TDR-NNN to reflect [new practice] — run `\u002Farchitect` TDR update mode\n```\n\n### Drift Heuristics\n\nThese are the primary checks to run. They are grounded in the project's actual patterns — not generic best practices.\n\n**Data Layer Checks:**\n- All tables in schema.ts must also appear in bootstrap.ts STAGENT_TABLES\n- All timestamp columns should use `integer` mode, not text ISO dates\n- Primary keys should be `text` (UUID), not auto-increment integer\n- JSON payload columns should be `text` type, not structured\n\n**Agent System Checks:**\n- New profiles must exist as skill directories (not hardcoded in registry)\n- Learned context changes must go through proposal → approval flow\n- Pattern extraction should route through `pattern-extractor.ts`, not ad-hoc\n\n**API Design Checks:**\n- Async task execution routes must return 202, not 200\n- Read operations in Server Components should query DB directly, not call API routes\n- Client mutations must go through API routes with Zod validation\n\n**Frontend Checks:**\n- No direct imports from `src\u002Flib\u002Fdb\u002F` in client components\n- Design system tokens used for colors\u002Fspacing (no raw Tailwind color utilities for status\u002Fpriority)\n- SheetContent bodies must have explicit padding (`px-6 pb-6`)\n\n**Runtime Checks:**\n- Provider-specific types must not leak into shared orchestration code\n- New runtime capabilities must be declared in `catalog.ts`\n- Runtime adapters must implement the full `AgentRuntimeAdapter` interface\n- **ainative MCP injection consistency (TDR-032):** Every function in `src\u002Flib\u002Fagents\u002F` or `src\u002Flib\u002Fagents\u002Fruntime\u002F` that calls a provider SDK's `query()` \u002F `createMessage()` \u002F equivalent dispatch must construct a ainative tool server via `createToolServer(projectId)` (direct use) or `withStagentMcpServer(...)` (shared helper). Grep for one of those two symbols in each dispatcher; absence means the adapter is a candidate for injection and should be flagged. Also flag any **static** `import ... from \"@\u002Flib\u002Fchat\u002Fainative-tools\"` in files under `src\u002Flib\u002Fagents\u002F` — the correct pattern is a dynamic `await import()` inside the function body, because a static import triggers a module-load cycle (`ReferenceError: Cannot access 'claudeRuntimeAdapter' before initialization`) via `runtime\u002Fcatalog → runtime\u002Findex → claudeRuntimeAdapter`. Unit tests mocking `@\u002Flib\u002Fchat\u002Fainative-tools` cannot catch this cycle structurally.\n\n**Workflow Checks:**\n- Notification-based coordination must use the notifications table, not ad-hoc polling\n- Permission pre-checks must use the caching pattern, not raw DB queries per tool call\n\n**Infrastructure Checks:**\n- New tables must be added to both migration SQL and bootstrap.ts\n- New tables with foreign keys must be added to `clear.ts` in FK-safe order\n\n**Channel Delivery Checks:**\n- Channel adapter implementations must implement the full `ChannelAdapter` interface (send, testConnection, and optionally parseInbound\u002FverifySignature\u002FsendReply)\n- `channelConfigs.config` must never be returned unmasked — all API routes must use `maskChannelConfig()` before response\n- New channel types must be registered in `src\u002Flib\u002Fchannels\u002Fregistry.ts` adapters map\n\n**Chat Engine Checks:**\n- Chat tools that write data must be in the `WRITABLE_SETTINGS` allowlist with per-key validation\n- Chat messages must go through the data layer (`addMessage()`\u002F`updateMessageContent()`), not direct DB inserts\n- Context building must use `buildChatContext()` — no ad-hoc DB queries from chat tools\n\n**Memory System Checks:**\n- Episodic memory retrieval must respect confidence scoring — never bypass the scoring\u002Franking step\n- Learned context changes must still go through proposal → approval flow (TDR-008 unchanged)\n- Memory decay must use the configurable `decayRate` field, not hardcoded values\n\n**Environment Onboarding Checks:**\n- Sync operations must create a checkpoint before applying changes (never sync without rollback point)\n- New scanner implementations must follow the existing scanner pattern (`scanners\u002FCodex.ts`, `scanners\u002Fcodex.ts`)\n- Artifacts must be content-hashed (`contentHash` field) for change detection\n\n**Agent Handoff Checks:**\n- Agent messages must track `chainDepth` and enforce maximum depth limits — no unbounded delegation chains\n- Messages with `requiresApproval: true` must not be auto-processed — they must route through notification approval\n\n---\n\n## Report Writing\n\nAll modes write their output to `features\u002Farchitect-report.md`. This file is **overwritten** on each run (not appended).\n\n```markdown\n---\ngenerated: [ISO date]\nmode: [review | impact | integration | tdr | health | drift]\n---\n\n# Architect Report\n\n[Mode-specific output]\n\n---\n\n*Generated by `\u002Farchitect` — [mode name] mode*\n```\n\n---\n\n## Coordination with Other Skills\n\n### Delegations from Supervisor\n\n| Situation | Supervisor Says | Skill Invoked |\n|-----------|----------------|---------------|\n| Architecture drift in health check | \"Run architecture review for pattern compliance\" | `\u002Farchitect` (review) |\n| Major feature touching 2+ layers | \"Run impact analysis before building\" | `\u002Farchitect` (impact) |\n| New integration proposed | \"Design integration before implementing\" | `\u002Farchitect` (integration) |\n| Informal technical decision made | \"Document as TDR\" | `\u002Farchitect` (tdr) |\n| Pattern drift signals | \"Run drift detection\" | `\u002Farchitect` (drift) |\n\n### Downstream Handoffs\n\n| Finding | Hand Off To | Action |\n|---------|------------|--------|\n| Integration blueprint ready | `\u002Fproduct-manager` | Inform feature spec's technical approach section |\n| Pattern compliance issues found | `\u002Fquality-manager` | May generate test requirements for violated patterns |\n| Design system TDR drift | Direct review | Audit design token compliance against repo docs |\n| Code remediation needed | Developer (direct) | Specific file + line guidance in report |\n| New TDR created | `\u002Fsupervisor` | Picks up in next health check via TDR data source |\n\n### What Architect Does NOT Do\n\n- Write application code (that's direct implementation)\n- Create feature specs (that's `\u002Fproduct-manager`)\n- Review code quality or run tests (that's `\u002Fquality-manager` or `\u002Fcode-review`)\n- Make project prioritization decisions (that's `\u002Fsupervisor`)\n- Design UI\u002FUX (direct review against repo docs until new Relay frontend skills exist)\n- Audit design system compliance (direct review against repo docs)\n\n---\n\n## Guidelines\n\n- **Evidence over speculation** — every assessment must cite specific files, line patterns, or TDRs. No generic \"best practice\" recommendations without grounding in the actual codebase.\n- **Respect existing patterns** — the project has documented core patterns via TDRs. New designs should align with these unless there is explicit justification to deviate (which itself becomes a new TDR).\n- **TDRs are evergreen** — review and update TDRs when the codebase evolves. A stale TDR is worse than no TDR because it gives false confidence. When drift detection finds the code has intentionally moved on, update the TDR — don't force the code back.\n- **Blast radius honesty** — never understate the impact of a change. If a change touches 3 layers, say so, even if the user wants to hear \"it's simple.\"\n- **Integration-first thinking** — every new capability must be designed in terms of how it connects to the existing system, not in isolation.\n- **Follow the 7 principles** — all recommendations must align with the engineering principles in AGENTS.md (zero silent failures, named errors, shadow paths, edge cases, explicit over clever, DRY with judgment, permission to scrap).\n- **Codify before you forget** — when a decision is made during implementation, create a TDR immediately. Decisions captured later lose context and rationale.\n- **Positive drift is a signal, not a problem** — when good patterns emerge organically, the right response is to document them (codify), not to ignore them. The TDR set should grow as the project matures.\n","# Architect\n\nTechnical architecture advisor that reads codebase artifacts and Technical Decision Records to provide grounded architectural guidance. The architect maintains an evergreen set of TDRs, detects pattern drift, and advises on system design, integration, and change impact.\n\n## Role Boundaries\n\n| Need | Skill | Not This Skill |\n|------|-------|----------------|\n| \"How should X integrate with the system?\" | `architect` | `product-manager` |\n| \"What's the blast radius of changing Y?\" | `architect` | `supervisor` |\n| \"Review the architecture\" | `architect` | `code-review` |\n| \"Create a TDR for this decision\" | `architect` | `product-manager` |\n| \"Is the codebase drifting from conventions?\" | `architect` | `quality-manager` |\n| \"What should I work on next?\" | `supervisor` | `architect` |\n| \"Build a component\" | Direct implementation using repo frontend docs | `architect` |\n| \"Write a feature spec\" | `product-manager` | `architect` |\n| \"Review code quality\" | `quality-manager` | `architect` |\n| \"Check design system compliance\" | Direct review against `design-system\u002FMASTER.md` and `src\u002Fapp\u002Fglobals.css` | `architect` |\n\n## Core Principle\n\n**Read-then-advise.** The architect reads codebase artifacts, TDRs, and project state before offering guidance. It never writes application code, feature specs, tests, or UI components. Its only artifacts are:\n- `.Codex\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-*.md` — Technical Decision Records\n- `features\u002Farchitect-report.md` — Analysis reports (overwritten per run)\n\n---\n\n## Workflow Detection\n\nDetermine which mode to run based on user intent:\n\n### 1. Architecture Review\n**Trigger:** \"architecture review\", \"pattern audit\", \"are we consistent\", \"review the architecture\"\nAudit the current system against established TDRs and documented patterns.\n\n### 2. Change Impact Analysis\n**Trigger:** \"blast radius\", \"impact analysis\", \"what breaks if\", \"ripple effects\", \"what's affected\"\nAssess the blast radius of a proposed architectural change before implementation.\n\n### 3. Integration Design\n**Trigger:** \"how should X integrate\", \"integration design\", \"connect X to Y\", \"add a new system\", \"design the integration\"\nDesign how a new system or feature integrates with existing architecture.\n\n### 4. TDR Management\n**Trigger:** \"create TDR\", \"update TDR\", \"review TDRs\", \"technical decision record\", \"document this decision\", \"list TDRs\"\nCreate, update, review, or deprecate Technical Decision Records.\n\n### 5. Architecture Health\n**Trigger:** \"tech debt\", \"coupling analysis\", \"architecture health check\", \"pattern consistency\", \"architecture health\"\nHolistic assessment of technical debt, pattern consistency, and coupling.\n\n### 6. Drift Detection\n**Trigger:** \"architecture drift\", \"pattern drift\", \"are we drifting\", \"check for drift\"\nAlso runs implicitly as a sub-step of Architecture Review and Architecture Health modes.\nDetect positive patterns to codify as new TDRs and negative patterns to remediate in code.\n\n---\n\n## Data Sources\n\nRead only what's needed for the active mode.\n\n| Source | What to Extract | Used By |\n|--------|----------------|---------|\n| `.Codex\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-*.md` | Existing TDRs, decisions, statuses | All modes |\n| `src\u002Flib\u002Fdb\u002Fschema.ts` | Table definitions, relationships, indexes | All modes |\n| `src\u002Flib\u002Fdb\u002Fbootstrap.ts` | Idempotent DDL, table list | Review, Health, Drift |\n| `src\u002Flib\u002Fdb\u002Fmigrations\u002F` | Schema evolution history | Review, Health |\n| `src\u002Flib\u002Fagents\u002Fruntime\u002F` | Runtime registry, adapter interfaces, capability matrix | Integration, Review |\n| `src\u002Flib\u002Fagents\u002FCodex-agent.ts` | Core execution patterns, polling, permissions | Impact, Review |\n| `src\u002Flib\u002Fagents\u002Flearned-context.ts` | Versioning pattern, proposal flow | Integration |\n| `src\u002Flib\u002Fagents\u002Fexecution-manager.ts` | In-memory execution tracking | Impact, Review |\n| `src\u002Flib\u002Fagents\u002Fprofiles\u002F` | Profile types, registry, compatibility layer | Integration, Review |\n| `src\u002Flib\u002Fworkflows\u002F` | Engine, loop executor, parallel, swarm patterns | Integration, Impact |\n| `src\u002Fapp\u002Fapi\u002F` | API route structure, mutation patterns, SSE endpoints | Integration, Impact |\n| `src\u002Fapp\u002F` (page routes) | Server Component read patterns, page structure | Integration, Impact |\n| `AGENTS.md` | Engineering principles, conventions, stack | All modes |\n| `MEMORY.md` | Evolving decisions, gotchas, architecture notes | All modes |\n| `FLOW.md` | Lifecycle phases, skill coordination | Integration |\n| `design-system\u002FMASTER.md` | Design token decisions, surface families | Review (frontend arch) |\n| `git log --oneline -30` | Recent architectural changes | Health, Drift |\n| `src\u002Flib\u002Fchannels\u002F` | Channel adapter registry, types, credential masking | Integration, Review |\n| `src\u002Flib\u002Fchat\u002F` | Chat engine, context builder, tool registry, permission bridge | Integration, Review |\n| `src\u002Flib\u002Fchat\u002Ftools\u002F` | Permission-gated tool definitions, allowlists | Review, Drift |\n| `src\u002Flib\u002Fagents\u002Fmemory\u002F` | Episodic memory retrieval, decay, extraction | Integration, Review |\n| `src\u002Flib\u002Fagents\u002Fhandoff\u002F` | Async inter-agent message bus | Integration, Review |\n| `src\u002Flib\u002Fenvironment\u002F` | Scanner, parsers, sync engine, templates | Integration, Review |\n| `src\u002Flib\u002Fschedules\u002Fnlp-parser.ts` | NLP schedule parsing, heartbeat prompt builder | Integration |\n| `src\u002Flib\u002Fdocuments\u002Fdocument-resolver.ts` | Document pool resolution, glob matching | Integration |\n\n---\n\n## Architecture Review Mode\n\nAudit the current system against established patterns and TDRs.\n\n### Process\n\n1. **Read all TDRs** from `references\u002Ftdr-*.md` — build a checklist of documented decisions\n2. **Read core architecture files** — schema.ts, bootstrap.ts, runtime adapters, API routes, AGENTS.md\n3. **For each TDR category**, check:\n   - Is the documented pattern actually followed in code?\n   - Are there drift instances (code that violates a TDR)?\n   - Are there undocumented patterns that should become TDRs?\n4. **Run Drift Detection** as a sub-step (see Mode 6)\n5. **Score each category**: Consistent \u002F Minor Drift \u002F Significant Drift\n6. **Write report** to `features\u002Farchitect-report.md`\n\n### Output Template\n\n```markdown\n## Architecture Review — [date]\n\n### Pattern Compliance Matrix\n\n| Category | TDR Count | Drift Instances | Status |\n|----------|-----------|----------------|--------|\n| data-layer | [N] | [N] | [Consistent\u002FMinor\u002FSignificant] |\n| agent-system | [N] | [N] | [status] |\n| api-design | [N] | [N] | [status] |\n| frontend-architecture | [N] | [N] | [status] |\n| runtime | [N] | [N] | [status] |\n| workflow | [N] | [N] | [status] |\n| infrastructure | [N] | [N] | [status] |\n\n### Drift Instances\n[For each drift: TDR violated, file path, code pattern found, expected pattern]\n\n### Undocumented Patterns\n[Patterns found 3+ times that aren't captured in any TDR — candidates for codification]\n\n### Recommendations\n[Prioritized list: which drifts to fix, which patterns to codify]\n```\n\n---\n\n## Change Impact Analysis Mode\n\nAssess blast radius of a proposed architectural change before implementation.\n\n### Process\n\n1. **Understand the proposed change** from user description\n2. **Identify the affected layer(s):** data, API, runtime, frontend, workflow, infrastructure\n3. **Trace dependencies per layer:**\n   - **Data layer:** Which tables → which API routes query them → which Server Components → which runtime adapters?\n   - **API layer:** Which frontend components call this route → which agents trigger it → which workflows depend on it?\n   - **Runtime layer:** Which tasks affected → which profiles → which approval flows?\n   - **Schema changes:** Bootstrap alignment needed? Migration needed? Drizzle schema sync?\n4. **Classify impact:** Low (1 layer, \u003C5 files) \u002F Medium (2 layers, 5-15 files) \u002F High (3+ layers, 15+ files)\n5. **Identify migration requirements:** data migration, API versioning, feature flag, phased rollout\n6. **Check TDR implications:** Does this change violate an existing TDR? Does it need a new TDR?\n7. **Write report** to `features\u002Farchitect-report.md`\n\n### Output Template\n\n```markdown\n## Change Impact Analysis — [date]\n\n### Proposed Change\n[Summary of what's being changed and why]\n\n### Blast Radius\n\n| Layer | Files Affected | Impact |\n|-------|---------------|--------|\n| Data | [list] | [description] |\n| API | [list] | [description] |\n| Runtime | [list] | [description] |\n| Frontend | [list] | [description] |\n| Workflow | [list] | [description] |\n\n**Classification:** [Low \u002F Medium \u002F High] — [N] layers, ~[N] files\n\n### Dependency Trace\n[Text-based dependency tree showing ripple effects]\n\n### Migration Requirements\n- [ ] Database migration needed? [yes\u002Fno — details]\n- [ ] Bootstrap.ts update needed? [yes\u002Fno]\n- [ ] Schema.ts sync needed? [yes\u002Fno]\n- [ ] API versioning needed? [yes\u002Fno]\n- [ ] Feature flag recommended? [yes\u002Fno]\n\n### TDR Implications\n- Existing TDRs affected: [list or \"none\"]\n- New TDR needed: [yes\u002Fno — proposed title]\n\n### Risk Assessment\n[Key risks and mitigations]\n\n### Recommended Approach\n[Phased rollout sequence or big-bang with justification]\n```\n\n---\n\n## Integration Design Mode\n\nDesign how a new system or feature integrates with existing architecture.\n\n### Process\n\n1. **Understand the new capability** from user description\n2. **Read relevant core patterns** — identify which of the project's established patterns apply\n3. **Design integration points per layer:**\n   - **Data model:** New tables? Extensions to existing? JSON-in-TEXT columns? Index strategy?\n   - **API surface:** New routes? Extensions? SSE needs? Fire-and-forget?\n   - **Runtime:** New adapter? Extension? New capability flags?\n   - **Agent:** New profile builtins? Learned context implications? Permission patterns?\n   - **Frontend:** New routes? Server Components? Client boundaries?\n   - **Coordination:** Notification types? Workflow steps? Scheduling?\n4. **Validate against engineering principles** (AGENTS.md 7 principles)\n5. **Validate against existing TDRs** — flag any conflicts or new TDR needs\n6. **Write integration blueprint** to `features\u002Farchitect-report.md`\n\n### Output Template\n\n```markdown\n## Integration Design — [date]\n\n### New Capability\n[What's being integrated and why]\n\n### Pattern Alignment\n\n| Core Pattern | Applies | How |\n|-------------|---------|-----|\n| Fire-and-forget execution | [yes\u002Fno] | [how it connects] |\n| Notification-as-queue | [yes\u002Fno] | [how it connects] |\n| DB polling | [yes\u002Fno] | [how it connects] |\n| Server Components for reads | [yes\u002Fno] | [how it connects] |\n| Multi-runtime adapter | [yes\u002Fno] | [how it connects] |\n| Profile-as-skill-dir | [yes\u002Fno] | [how it connects] |\n| Learned context versioning | [yes\u002Fno] | [how it connects] |\n| Idempotent bootstrap | [yes\u002Fno] | [how it connects] |\n| Channel adapter registry | [yes\u002Fno] | [how it connects] |\n| Heartbeat intelligence-driven execution | [yes\u002Fno] | [how it connects] |\n| Dual memory (episodic + behavioral) | [yes\u002Fno] | [how it connects] |\n| N:M document pool junction tables | [yes\u002Fno] | [how it connects] |\n| Chat conversation engine | [yes\u002Fno] | [how it connects] |\n| Environment scan\u002Fsync pipeline | [yes\u002Fno] | [how it connects] |\n| Permission-gated chat tools | [yes\u002Fno] | [how it connects] |\n| Async agent handoff bus | [yes\u002Fno] | [how it connects] |\n| Saved views persistence | [yes\u002Fno] | [how it connects] |\n| NL schedule parsing | [yes\u002Fno] | [how it connects] |\n\n### Data Model Design\n[New tables, columns, relationships, with Drizzle schema sketch]\n\n### API Surface Design\n[New routes, methods, response codes, patterns]\n\n### Runtime Integration\n[Adapter changes, capability additions]\n\n### Frontend Integration\n[New routes, component hierarchy, Server vs Client boundary]\n\n### New TDRs Needed\n[Any new architectural decisions this integration introduces]\n\n### Implementation Sequence\n[Ordered steps respecting layer dependencies]\n```\n\n---\n\n## TDR Management Mode\n\nCreate, update, review, or deprecate Technical Decision Records.\n\n### TDR Template\n\nAll TDRs live in `.Codex\u002Fskills\u002Farchitect\u002Freferences\u002F` with naming convention `tdr-NNN-slug.md`.\n\n```markdown\n---\nid: TDR-NNN\ntitle: [Decision Title]\nstatus: proposed | accepted | deprecated | superseded\ndate: YYYY-MM-DD\ncategory: data-layer | agent-system | api-design | frontend-architecture | runtime | workflow | infrastructure\nsuperseded-by: TDR-NNN (if applicable)\n---\n\n# TDR-NNN: [Decision Title]\n\n## Context\n[What issue motivates this decision?]\n\n## Decision\n[What change are we making?]\n\n## Consequences\n[What becomes easier or harder because of this?]\n\n## Alternatives Considered\n[What else was evaluated and why was it rejected?]\n\n## References\n[Code paths, PRs, external resources]\n```\n\n### Sub-modes\n\n- **Create:** User describes a decision → write new `tdr-NNN-slug.md`. Auto-number from highest existing + 1.\n- **Update:** Modify an existing TDR — add consequences, update status, refine decision text.\n- **Review:** List all TDRs with status and staleness. Flag TDRs whose referenced code paths no longer exist.\n- **Deprecate\u002FSupersede:** Mark TDR as deprecated or superseded-by, noting the replacement.\n\n### Categories\n\n| Category | Scope |\n|----------|-------|\n| `data-layer` | Schema, migrations, bootstrap, Drizzle patterns, SQLite specifics, junction tables |\n| `agent-system` | Execution, profiles, learned context, pattern extraction, episodic memory, async handoffs, chat tools |\n| `api-design` | Route patterns, SSE, fire-and-forget, response codes, chat conversation engine |\n| `frontend-architecture` | Server Components, client boundaries, design system integration, saved views |\n| `runtime` | Multi-provider abstraction, adapter registry, capability matrix |\n| `workflow` | Task lifecycle, notification-as-queue, human-in-the-loop, scheduling, heartbeat engine, NLP parsing |\n| `infrastructure` | WAL mode, idempotent bootstrap, data directory, distribution, channel delivery, environment onboarding |\n\n---\n\n## Architecture Health Mode\n\nHolistic assessment of technical debt, pattern consistency, and coupling.\n\n### Process\n\n1. **Run Architecture Review** as sub-step (pattern compliance)\n2. **Run Drift Detection** as sub-step (positive + negative drift)\n3. **Analyze coupling:**\n   - Cross-layer imports (frontend importing from `lib\u002Fdb` directly vs. through API)\n   - Circular dependencies between modules\n   - Runtime adapter isolation (no leaked provider-specific types in shared code)\n4. **Assess technical debt:**\n   - Schema ↔ bootstrap alignment (compare schema.ts tables vs bootstrap.ts STAGENT_TABLES)\n   - Migration backlog (pending migrations not reflected in bootstrap)\n   - TODO\u002FFIXME\u002FHACK density in codebase\n   - Deprecated patterns still in use\n5. **Score health dimensions** and write report\n\n### Health Dimensions\n\n| Dimension | Green | Yellow | Red |\n|-----------|-------|--------|-----|\n| Pattern Consistency | All TDRs followed, \u003C2 drift instances | 2-5 drift instances | >5 or core pattern violations |\n| Schema Health | bootstrap and schema.ts aligned, migrations current | Minor misalignment | Tables missing from bootstrap or gaps |\n| Coupling | Clean layer boundaries, no circular deps | Some cross-layer shortcuts | Circular deps or frontend accessing DB |\n| API Consistency | All mutations via API routes, consistent patterns | Minor inconsistencies | Mixed patterns, direct DB writes from components |\n| Runtime Isolation | Adapters self-contained, no leaked types | Minor type leakage | Provider code in shared orchestration |\n| Tech Debt Density | \u003C5 TODO\u002FHACK per 1000 LOC | 5-15 per 1000 LOC | >15 per 1000 LOC |\n| TDR Coverage | All major patterns documented | 2-3 undocumented patterns | >3 undocumented patterns |\n\n---\n\n## Drift Detection Mode\n\nDetect architectural drift — both positive patterns worth codifying and negative patterns requiring remediation. This mode is the self-healing mechanism that keeps TDRs evergreen and the codebase aligned with its own conventions.\n\n### Process\n\n1. **Read all existing TDRs** — build the \"expected patterns\" baseline\n2. **Scan codebase for negative drift** (TDR violations):\n   - For each TDR, grep for counter-patterns. Examples:\n     - TDR-004 (Server Components for reads): grep for `fetch(\"\u002Fapi\u002F\")` in Server Components doing reads\n     - TDR-010 (SQLite WAL): check for non-WAL pragma usage\n     - TDR-013 (Text PKs): grep for `integer(\"id\").primaryKey()` in schema\n     - TDR-009 (Bootstrap): compare bootstrap table list vs schema.ts table list\n   - Record: file path, line, violation description, severity (low\u002Fmedium\u002Fhigh)\n3. **Scan for positive drift** (undocumented good patterns):\n   - Look for repeated patterns (3+ occurrences) not captured in any TDR\n   - Check `git log` for recent architectural commits introducing new conventions\n   - Look for patterns in MEMORY.md \"Recurring Gotchas\" that imply unstated conventions\n   - Record: pattern description, file examples, proposed TDR title\n4. **Classify findings:**\n   - **Codify** — positive patterns that should become new TDRs (self-update the reference set)\n   - **Remediate** — negative patterns where code should be fixed to match TDRs\n   - **Evolve** — cases where the TDR itself may be outdated and the code has moved on intentionally\n5. **Write report** or embed in parent mode's report\n\n### Output Template\n\n```markdown\n## Drift Detection — [date]\n\n### Negative Drift (Remediate)\n\n| TDR Violated | File | Line | Violation | Severity |\n|-------------|------|------|-----------|----------|\n| TDR-NNN | [path] | [N] | [description] | [low\u002Fmed\u002Fhigh] |\n\n### Positive Drift (Codify)\n\n| Proposed TDR | Pattern | Occurrences | Example Files |\n|-------------|---------|-------------|---------------|\n| [title] | [description] | [N] | [file1, file2, ...] |\n\n### Evolved Patterns (TDR Update Needed)\n\n| TDR | Current Decision | Observed Practice | Recommendation |\n|-----|-----------------|-------------------|----------------|\n| TDR-NNN | [what TDR says] | [what code does] | [update TDR \u002F fix code \u002F discuss] |\n\n### Recommended Actions\n1. **Codify:** Create TDR-NNN for [pattern] — run `\u002Farchitect` TDR create mode\n2. **Remediate:** Fix [violation] in [files] — [specific guidance]\n3. **Evolve:** Update TDR-NNN to reflect [new practice] — run `\u002Farchitect` TDR update mode\n```\n\n### Drift Heuristics\n\nThese are the primary checks to run. They are grounded in the project's actual patterns — not generic best practices.\n\n**Data Layer Checks:**\n- All tables in schema.ts must also appear in bootstrap.ts STAGENT_TABLES\n- All timestamp columns should use `integer` mode, not text ISO dates\n- Primary keys should be `text` (UUID), not auto-increment integer\n- JSON payload columns should be `text` type, not structured\n\n**Agent System Checks:**\n- New profiles must exist as skill directories (not hardcoded in registry)\n- Learned context changes must go through proposal → approval flow\n- Pattern extraction should route through `pattern-extractor.ts`, not ad-hoc\n\n**API Design Checks:**\n- Async task execution routes must return 202, not 200\n- Read operations in Server Components should query DB directly, not call API routes\n- Client mutations must go through API routes with Zod validation\n\n**Frontend Checks:**\n- No direct imports from `src\u002Flib\u002Fdb\u002F` in client components\n- Design system tokens used for colors\u002Fspacing (no raw Tailwind color utilities for status\u002Fpriority)\n- SheetContent bodies must have explicit padding (`px-6 pb-6`)\n\n**Runtime Checks:**\n- Provider-specific types must not leak into shared orchestration code\n- New runtime capabilities must be declared in `catalog.ts`\n- Runtime adapters must implement the full `AgentRuntimeAdapter` interface\n- **ainative MCP injection consistency (TDR-032):** Every function in `src\u002Flib\u002Fagents\u002F` or `src\u002Flib\u002Fagents\u002Fruntime\u002F` that calls a provider SDK's `query()` \u002F `createMessage()` \u002F equivalent dispatch must construct a ainative tool server via `createToolServer(projectId)` (direct use) or `withStagentMcpServer(...)` (shared helper). Grep for one of those two symbols in each dispatcher; absence means the adapter is a candidate for injection and should be flagged. Also flag any **static** `import ... from \"@\u002Flib\u002Fchat\u002Fainative-tools\"` in files under `src\u002Flib\u002Fagents\u002F` — the correct pattern is a dynamic `await import()` inside the function body, because a static import triggers a module-load cycle (`ReferenceError: Cannot access 'claudeRuntimeAdapter' before initialization`) via `runtime\u002Fcatalog → runtime\u002Findex → claudeRuntimeAdapter`. Unit tests mocking `@\u002Flib\u002Fchat\u002Fainative-tools` cannot catch this cycle structurally.\n\n**Workflow Checks:**\n- Notification-based coordination must use the notifications table, not ad-hoc polling\n- Permission pre-checks must use the caching pattern, not raw DB queries per tool call\n\n**Infrastructure Checks:**\n- New tables must be added to both migration SQL and bootstrap.ts\n- New tables with foreign keys must be added to `clear.ts` in FK-safe order\n\n**Channel Delivery Checks:**\n- Channel adapter implementations must implement the full `ChannelAdapter` interface (send, testConnection, and optionally parseInbound\u002FverifySignature\u002FsendReply)\n- `channelConfigs.config` must never be returned unmasked — all API routes must use `maskChannelConfig()` before response\n- New channel types must be registered in `src\u002Flib\u002Fchannels\u002Fregistry.ts` adapters map\n\n**Chat Engine Checks:**\n- Chat tools that write data must be in the `WRITABLE_SETTINGS` allowlist with per-key validation\n- Chat messages must go through the data layer (`addMessage()`\u002F`updateMessageContent()`), not direct DB inserts\n- Context building must use `buildChatContext()` — no ad-hoc DB queries from chat tools\n\n**Memory System Checks:**\n- Episodic memory retrieval must respect confidence scoring — never bypass the scoring\u002Franking step\n- Learned context changes must still go through proposal → approval flow (TDR-008 unchanged)\n- Memory decay must use the configurable `decayRate` field, not hardcoded values\n\n**Environment Onboarding Checks:**\n- Sync operations must create a checkpoint before applying changes (never sync without rollback point)\n- New scanner implementations must follow the existing scanner pattern (`scanners\u002FCodex.ts`, `scanners\u002Fcodex.ts`)\n- Artifacts must be content-hashed (`contentHash` field) for change detection\n\n**Agent Handoff Checks:**\n- Agent messages must track `chainDepth` and enforce maximum depth limits — no unbounded delegation chains\n- Messages with `requiresApproval: true` must not be auto-processed — they must route through notification approval\n\n---\n\n## Report Writing\n\nAll modes write their output to `features\u002Farchitect-report.md`. This file is **overwritten** on each run (not appended).\n\n```markdown\n---\ngenerated: [ISO date]\nmode: [review | impact | integration | tdr | health | drift]\n---\n\n# Architect Report\n\n[Mode-specific output]\n\n---\n\n*Generated by `\u002Farchitect` — [mode name] mode*\n```\n\n---\n\n## Coordination with Other Skills\n\n### Delegations from Supervisor\n\n| Situation | Supervisor Says | Skill Invoked |\n|-----------|----------------|---------------|\n| Architecture drift in health check | \"Run architecture review for pattern compliance\" | `\u002Farchitect` (review) |\n| Major feature touching 2+ layers | \"Run impact analysis before building\" | `\u002Farchitect` (impact) |\n| New integration proposed | \"Design integration before implementing\" | `\u002Farchitect` (integration) |\n| Informal technical decision made | \"Document as TDR\" | `\u002Farchitect` (tdr) |\n| Pattern drift signals | \"Run drift detection\" | `\u002Farchitect` (drift) |\n\n### Downstream Handoffs\n\n| Finding | Hand Off To | Action |\n|---------|------------|--------|\n| Integration blueprint ready | `\u002Fproduct-manager` | Inform feature spec's technical approach section |\n| Pattern compliance issues found | `\u002Fquality-manager` | May generate test requirements for violated patterns |\n| Design system TDR drift | Direct review | Audit design token compliance against repo docs |\n| Code remediation needed | Developer (direct) | Specific file + line guidance in report |\n| New TDR created | `\u002Fsupervisor` | Picks up in next health check via TDR data source |\n\n### What Architect Does NOT Do\n\n- Write application code (that's direct implementation)\n- Create feature specs (that's `\u002Fproduct-manager`)\n- Review code quality or run tests (that's `\u002Fquality-manager` or `\u002Fcode-review`)\n- Make project prioritization decisions (that's `\u002Fsupervisor`)\n- Design UI\u002FUX (direct review against repo docs until new Relay frontend skills exist)\n- Audit design system compliance (direct review against repo docs)\n\n---\n\n## Guidelines\n\n- **Evidence over speculation** — every assessment must cite specific files, line patterns, or TDRs. No generic \"best practice\" recommendations without grounding in the actual codebase.\n- **Respect existing patterns** — the project has documented core patterns via TDRs. New designs should align with these unless there is explicit justification to deviate (which itself becomes a new TDR).\n- **TDRs are evergreen** — review and update TDRs when the codebase evolves. A stale TDR is worse than no TDR because it gives false confidence. When drift detection finds the code has intentionally moved on, update the TDR — don't force the code back.\n- **Blast radius honesty** — never understate the impact of a change. If a change touches 3 layers, say so, even if the user wants to hear \"it's simple.\"\n- **Integration-first thinking** — every new capability must be designed in terms of how it connects to the existing system, not in isolation.\n- **Follow the 7 principles** — all recommendations must align with the engineering principles in AGENTS.md (zero silent failures, named errors, shadow paths, edge cases, explicit over clever, DRY with judgment, permission to scrap).\n- **Codify before you forget** — when a decision is made during implementation, create a TDR immediately. Decisions captured later lose context and rationale.\n- **Positive drift is a signal, not a problem** — when good patterns emerge organically, the right response is to document them (codify), not to ignore them. The TDR set should grow as the project matures.\n",{"name":5,"description":7},"main","b80e0240f42f84cd950fe8361a11a10699aa7984",".agents\u002Fskills\u002Farchitect",3,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay","https:\u002F\u002Forionfold.com","https:\u002F\u002Fgithub.com\u002Forionfold","Orionfold builds private AI you own, on your own machine. Get an AI team without hiring one.","2026-09-04 21:49:30",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add orionfold\u002Frelay --skill architect",{"tool":58,"command":59},"bunx","bunx skills add orionfold\u002Frelay --skill architect",{"tool":61,"command":62},"pnpm","pnpm dlx skills add orionfold\u002Frelay --skill architect","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002FSKILL.md",true,[66,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,252,256,260,264,268,272],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Ftdr-001-fire-and-forget-execution.md","REFERENCE","参考文档",1118,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-001-fire-and-forget-execution.md",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Ftdr-002-notification-as-message-queue.md",1266,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-002-notification-as-message-queue.md",{"path":77,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Ftdr-003-database-polling-over-websockets.md",1903,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-003-database-polling-over-websockets.md",{"path":81,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Ftdr-004-server-components-for-reads.md",1241,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-004-server-components-for-reads.md",{"path":85,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Ftdr-005-sse-for-log-streaming.md",938,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-005-sse-for-log-streaming.md",{"path":89,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Ftdr-006-multi-runtime-adapter-registry.md",2169,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-006-multi-runtime-adapter-registry.md",{"path":93,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Ftdr-007-profile-as-skill-directory.md",1391,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-007-profile-as-skill-directory.md",{"path":97,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":98,"sourceHtmlUrl":99},"references\u002Ftdr-008-learned-context-versioning.md",1449,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-008-learned-context-versioning.md",{"path":101,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":102,"sourceHtmlUrl":103},"references\u002Ftdr-009-idempotent-database-bootstrap.md",1247,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-009-idempotent-database-bootstrap.md",{"path":105,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":106,"sourceHtmlUrl":107},"references\u002Ftdr-010-sqlite-wal-mode.md",1163,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-010-sqlite-wal-mode.md",{"path":109,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":110,"sourceHtmlUrl":111},"references\u002Ftdr-011-json-in-text-columns.md",1964,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-011-json-in-text-columns.md",{"path":113,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":114,"sourceHtmlUrl":115},"references\u002Ftdr-012-epoch-integer-timestamps.md",1126,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-012-epoch-integer-timestamps.md",{"path":117,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":118,"sourceHtmlUrl":119},"references\u002Ftdr-013-text-primary-keys.md",1150,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-013-text-primary-keys.md",{"path":121,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":122,"sourceHtmlUrl":123},"references\u002Ftdr-014-calm-ops-design-system.md",1474,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-014-calm-ops-design-system.md",{"path":125,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":126,"sourceHtmlUrl":127},"references\u002Ftdr-015-permission-precheck-caching.md",1895,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-015-permission-precheck-caching.md",{"path":129,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":130,"sourceHtmlUrl":131},"references\u002Ftdr-016-learning-session-buffering.md",1288,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-016-learning-session-buffering.md",{"path":133,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":134,"sourceHtmlUrl":135},"references\u002Ftdr-017-document-processor-registry.md",1460,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-017-document-processor-registry.md",{"path":137,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":138,"sourceHtmlUrl":139},"references\u002Ftdr-018-multi-channel-delivery.md",2873,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-018-multi-channel-delivery.md",{"path":141,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":142,"sourceHtmlUrl":143},"references\u002Ftdr-019-heartbeat-engine.md",2978,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-019-heartbeat-engine.md",{"path":145,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":146,"sourceHtmlUrl":147},"references\u002Ftdr-020-dual-memory-system.md",3012,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-020-dual-memory-system.md",{"path":149,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":150,"sourceHtmlUrl":151},"references\u002Ftdr-021-async-agent-handoffs.md",2467,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-021-async-agent-handoffs.md",{"path":153,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":154,"sourceHtmlUrl":155},"references\u002Ftdr-022-document-pool-junction-tables.md",3145,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-022-document-pool-junction-tables.md",{"path":157,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":158,"sourceHtmlUrl":159},"references\u002Ftdr-023-chat-conversation-engine.md",3364,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-023-chat-conversation-engine.md",{"path":161,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":162,"sourceHtmlUrl":163},"references\u002Ftdr-024-permission-gated-chat-tools.md",2446,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-024-permission-gated-chat-tools.md",{"path":165,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":166,"sourceHtmlUrl":167},"references\u002Ftdr-025-environment-onboarding-pipeline.md",3365,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-025-environment-onboarding-pipeline.md",{"path":169,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":170,"sourceHtmlUrl":171},"references\u002Ftdr-026-saved-views.md",2036,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-026-saved-views.md",{"path":173,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":174,"sourceHtmlUrl":175},"references\u002Ftdr-027-natural-language-scheduling.md",2511,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-027-natural-language-scheduling.md",{"path":177,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":178,"sourceHtmlUrl":179},"references\u002Ftdr-028-self-upgrade-via-task-pipeline.md",5885,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-028-self-upgrade-via-task-pipeline.md",{"path":181,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":182,"sourceHtmlUrl":183},"references\u002Ftdr-029-instance-bootstrap-instrumentation.md",7493,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-029-instance-bootstrap-instrumentation.md",{"path":185,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":186,"sourceHtmlUrl":187},"references\u002Ftdr-030-hybrid-instance-licensing.md",8162,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-030-hybrid-instance-licensing.md",{"path":189,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":190,"sourceHtmlUrl":191},"references\u002Ftdr-031-workflow-status-response-contract.md",9721,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-031-workflow-status-response-contract.md",{"path":193,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":194,"sourceHtmlUrl":195},"references\u002Ftdr-032-runtime-ainative-mcp-injection.md",12040,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-032-runtime-ainative-mcp-injection.md",{"path":197,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":198,"sourceHtmlUrl":199},"references\u002Ftdr-033-route-object-label-convention.md",3077,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-033-route-object-label-convention.md",{"path":201,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":202,"sourceHtmlUrl":203},"references\u002Ftdr-034-kind-5-plugin-loader.md",22096,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-034-kind-5-plugin-loader.md",{"path":205,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":206,"sourceHtmlUrl":207},"references\u002Ftdr-035-plugin-mcp-cross-runtime-contract.md",28876,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-035-plugin-mcp-cross-runtime-contract.md",{"path":209,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":210,"sourceHtmlUrl":211},"references\u002Ftdr-037-two-path-plugin-trust-model.md",12812,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-037-two-path-plugin-trust-model.md",{"path":213,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":214,"sourceHtmlUrl":215},"references\u002Ftdr-038-kit-inference-heuristic-vocabulary.md",9589,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-038-kit-inference-heuristic-vocabulary.md",{"path":217,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":218,"sourceHtmlUrl":219},"references\u002Ftdr-039-generator-publisher-substrate.md",17923,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-039-generator-publisher-substrate.md",{"path":221,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":222,"sourceHtmlUrl":223},"references\u002Ftdr-040-community-pack-authoring-publish.md",6925,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-040-community-pack-authoring-publish.md",{"path":225,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":226,"sourceHtmlUrl":227},"references\u002Ftdr-041-openai-compatible-transport-identities.md",2990,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-041-openai-compatible-transport-identities.md",{"path":229,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":230,"sourceHtmlUrl":231},"references\u002Ftdr-042-capability-driven-provider-setup.md",3363,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-042-capability-driven-provider-setup.md",{"path":233,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":234,"sourceHtmlUrl":235},"references\u002Ftdr-043-explicit-eligible-runtime-routing-policy.md",3547,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-043-explicit-eligible-runtime-routing-policy.md",{"path":237,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":238,"sourceHtmlUrl":239},"references\u002Ftdr-044-customer-owned-cloud-deployment.md",28076,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-044-customer-owned-cloud-deployment.md",{"path":241,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":242,"sourceHtmlUrl":243},"references\u002Ftdr-045-workshop-edition-run-contract.md",4247,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-045-workshop-edition-run-contract.md",{"path":245,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":246,"sourceHtmlUrl":247},"references\u002Ftdr-046-host-ingress-identity.md",3225,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-046-host-ingress-identity.md",{"path":249,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":250,"sourceHtmlUrl":251},"references\u002Ftdr-047-customer-owned-cell-recovery.md",4010,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-047-customer-owned-cell-recovery.md",{"path":253,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":254,"sourceHtmlUrl":255},"references\u002Ftdr-atomic-slot-claim.md",1265,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-atomic-slot-claim.md",{"path":257,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":258,"sourceHtmlUrl":259},"references\u002Ftdr-chat-shares-event-loop.md",1358,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-chat-shares-event-loop.md",{"path":261,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":262,"sourceHtmlUrl":263},"references\u002Ftdr-evidence-based-cap.md",980,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-evidence-based-cap.md",{"path":265,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":266,"sourceHtmlUrl":267},"references\u002Ftdr-failure-class-streaks.md",1298,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-failure-class-streaks.md",{"path":269,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":270,"sourceHtmlUrl":271},"references\u002Ftdr-lock-holders-leased.md",1431,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-lock-holders-leased.md",{"path":273,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":274,"sourceHtmlUrl":275},"references\u002Ftdr-manual-honors-cap.md",1063,"https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitect\u002Freferences\u002Ftdr-manual-honors-cap.md",[277,296,311,330,345,366],{"skillNo":278,"name":279,"nameZh":6,"description":280,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":281,"categories":282,"keywords":283,"publishedAt":38},"01M719952CZE2BR6GGER42MG51","reader-coach","Helps notice what was read this week. Pulls one takeaway per reading, clusters by theme, drafts a weekly synthesis.","https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002Fsrc\u002Flib\u002Fplugins\u002Fexamples\u002Freading-radar\u002Fprofiles\u002Freader-coach\u002FSKILL.md",[],[284,285,286,287,288,289,290,291,292,293,294,295],"reader","reader coach","coach","Synthesis","Clusters","weekly synthesis","reading","drafts","read","theme","notice","weekly",{"skillNo":297,"name":298,"nameZh":6,"description":299,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":300,"categories":301,"keywords":302,"publishedAt":38},"01M71993PCY50PQMQW3C3SMMN6","personal-cfo","A patient personal CFO who categorizes transactions, flags unusual spend, and prepares monthly summaries.","https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002Fsrc\u002Flib\u002Fplugins\u002Fexamples\u002Ffinance-pack\u002Fprofiles\u002Fpersonal-cfo\u002FSKILL.md",[],[303,304,305,306,307,308,309,310],"personal cfo","personal","cfo","flags","transactions","monthly","summaries","patient",{"skillNo":312,"name":313,"nameZh":6,"description":314,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":315,"categories":316,"keywords":317,"publishedAt":38},"01M71991XD74YK2BY4A3A6J361","relay-web-publisher--site-editor","Drafts structured website section rows for the static-site publisher","https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002Fsrc\u002Flib\u002Fpacks\u002Ftemplates\u002Frelay-web-publisher\u002Fbase\u002Fprofiles\u002Frelay-web-publisher--site-editor\u002FSKILL.md",[],[318,319,320,321,322,323,324,325,326,291,327,328,329],"web","editor","relay","relay web publisher site editor","site","publisher","for","static","section","static-site","structured","website",{"skillNo":331,"name":332,"nameZh":6,"description":333,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":334,"categories":335,"keywords":336,"publishedAt":38},"01M719906C2NYTTVJQBJJ1F011","relay-web-assets--asset-curator","Curates web-design assets into a clean gallery inventory","https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002Fsrc\u002Flib\u002Fpacks\u002Ftemplates\u002Frelay-web-assets\u002Fbase\u002Fprofiles\u002Frelay-web-assets--asset-curator\u002FSKILL.md",[],[337,318,320,338,339,340,341,342,343,344,29],"relay web assets asset curator","assets","asset","design assets","web-design","inventory","gallery","clean",{"skillNo":346,"name":347,"nameZh":6,"description":348,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":349,"categories":350,"keywords":351,"publishedAt":38},"01M7198Y634C0NJ2CKTSSTVY9R","relay-social--content-studio","The content inventory and repurpose planner — tracks source assets, decides what to repurpose next, and writes the channel brief for each creative","https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002Fsrc\u002Flib\u002Fpacks\u002Ftemplates\u002Frelay-social\u002Fbase\u002Fprofiles\u002Frelay-social--content-studio\u002FSKILL.md",[],[352,353,320,354,355,356,357,324,358,359,360,361,362,342,363,338,364,365],"studio","content","social","social content","relay social content studio","content studio","planner","brief","tracks","next","repurpose","creative","source","channel",{"skillNo":367,"name":368,"nameZh":6,"description":369,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":370,"categories":371,"keywords":372,"publishedAt":38},"01M7198VQ1YYN3PFQH9Y7ZZ6SK","relay-social--campaign-runner","The organic-first campaign engine — composes, schedules, and measures a campaign from plan to published to results, setting the UTM that leads attribute back to","https:\u002F\u002Fgithub.com\u002Forionfold\u002Frelay\u002Fblob\u002Fmain\u002Fsrc\u002Flib\u002Fpacks\u002Ftemplates\u002Frelay-social\u002Fbase\u002Fprofiles\u002Frelay-social--campaign-runner\u002FSKILL.md",[],[373,374,375,354,376,320,377,378,379,380,381,382,383,384,385],"relay social campaign runner","runner","campaign","social campaign","back","engine","leads","plan","organic","first","results","schedules","utm"]