eidos
Core workflow for repositories governed by Eidos living specs (eidos/). Load before editing code, tests, or specs, refactoring, adding features, onboarding repos, capturing team memory, or reviewing changes. Covers discovery (eidos context/index), Direct vs. Planned mode, specs,
Install
npx skills add https://github.com/mchawa/eidos/tree/main/assets/plugin_reference/skills/eidos
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install mchawa-eidos@llmmart
git clone https://github.com/mchawa/eidos.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole mchawa/eidos collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
Eidos: Master Architecture & Engineering Orchestrator
This repository uses Eidos to keep living specifications (eidos/), source code, and tests synchronized. Follow these guardrails whenever inspecting, planning, implementing, refactoring, or reviewing changes.
1. Constitutional Guardrails (Non-Negotiable)
- Single Source of Truth: Domains, capabilities, personas, C4 containers/components, contracts, design systems, and policies live in
eidos/as.adocfiles with YAML frontmatter (§6). - Zero ADRs: NEVER create standalone ADRs (
docs/adr/,eidos/adr/,ADR-*.md). Record rationale and rejected alternatives in the owning spec'sdecisions:block (CNT-*,CMP-*,CTR-*,CAP-*), and govern architectural changes via SpecDeltas (eidos/deltas/dlt-*.adoc). - Dual Workflow Mode: Select Direct or Planned Mode before writing code (§3).
- Invariant-Test Traceability: Every
INV-*declarestest_binding: path/to/test_file::test_function, and the bound test references itsINV-*ID. - CLI-First Discovery & Scaffolding: Run Eidos discovery commands (§2,
--json) before raw reads orgrep/find. Never hand-write.adocspecs or SpecDeltas from scratch: scaffold witheidos spec create <type> <ID> --title "..."oreidos delta create --title "..." --slug --kind <kind>, and inspect exact keys witheidos spec schema <type> [--json]. - Subagent Context Propagation: If your harness supports subagents, pass the relevant
eidos context --jsonslice in subagent prompts and instruct them to trust it without re-reading summarized.adocfiles. - Zero Unreconciled Drift: Never finish with failing schemas or drift (§5, Stage 1).
- Mandatory Post-Implementation Adversarial Review: Never finish without running
git diffand an adversarial falsification review, fixing every finding before responding (§5, Stage 2).
2. Step 1: Discovery-First Context & Code Graph Intelligence (eidos context & eidos index)
STOP before running blind grep, find, or reading random files. Eidos maintains an embedded SQLite + AST knowledge graph (eidos/.cache/index.db) resolving files, symbols, specs, and dependencies in milliseconds. In monorepos with multiple eidos/ directories (packages/<pkg>/eidos/), pass -p <subproject>/eidos (or run inside <subproject>) for eidos index, eidos spec, eidos delta, eidos memory, and eidos drift (eidos context -f <path>, eidos index blast-radius <path>, and eidos drift --uncommitted auto-route from the root).
2.1 Mandatory Tool Replacement Matrix
Whenever you need to orient in the codebase, locate a symbol, search specs, or assess impact, prefer the Eidos CLI command first—even when the user attaches a @[file] path (call eidos context -f <attached_file> --json alongside or before reading it):
| Instead of doing this... | ALWAYS run this Eidos command FIRST | Why |
|---|---|---|
Running find / ls -R or reading many files to orient |
eidos index repo-map --max-tokens 1500 |
AST outline of all containers and modules (~85% fewer tokens). |
| Grepping source files for a class, function, method, or route | eidos index find-symbol "<SymbolName>" --json |
Exact location.file and line_start..line_end (pass to read_file instead of reading full files), plus CNT-* / CMP-*. |
Grepping eidos/ for domain concepts, rules, capabilities, or spikes |
eidos index search "<keywords>" --json |
BM25 + synonym search (optional hybrid semantic via --semantic) over specs, DEC-*, and INV-*. |
Editing or reviewing files/globs (including @[file]) without knowing governance |
eidos context -f "<path_or_glob>" --json (or -f a,b / -t "<task>" / -c <ID>) |
Owning CNT-*/CMP-*, DOM-*, CAP-*, PER-*, POL-*, design, INV-*, DEC-*, CTR-*, and provenance_tags in one call (always quote globs; trust without re-reading .adoc files). |
| Guessing what breaks when modifying an entity, symbol, or file | eidos index blast-radius <SYMBOL_OR_PATH> --depth 2 --min-confidence derived --json |
Upstream/downstream k-hop dependents filtered by epistemic certainty (observed, derived, or inferred default). |
2.2 Context Slicing Tiers (eidos context)
Choose the --tier flag matching your task scope:
| Tier | Flag | Budget | Contents Included | When to Use |
|---|---|---|---|---|
| Anchor | --tier anchor |
~140 tokens |
Owning CNT-* / CMP-*, runtime, source_path, bound domain, compact DEC-*, direct CTR-* signatures. |
Quick single-file bug fixes, minor localized edits. |
| Guardrails (Default) | --tier guardrails |
~300–900 tokens |
Anchor + DEC-* rationale, domain_path, design (CLT-*/DS-*), capabilities (CAP-* with personas, policies, experience), active INV-*, and POL-*. |
Standard feature work, refactoring, test updates. |
| Deep | --tier deep |
~500–1,500 tokens |
Guardrails + C4 Level 3 building blocks, full contract schemas, full policies, and downstream dependents. | Cross-container refactors, SpecDelta authoring, architectural reviews. |
eidos index repo-map --max-tokens 1500
eidos index find-symbol "JwtValidator" --json
eidos index search "authentication" --json
eidos context -f src/auth/jwt_validator.py --json
eidos context -f "apps/*/Dockerfile" --tier guardrails --json
eidos context -c CNT-AUTH-SERVICE --tier guardrails --json
eidos context -t "rate limiting and token expiration" --tier deep --json
eidos index blast-radius CNT-AUTH-SERVICE --depth 2 --json
3. Step 2: Select Your Workflow Mode
Using the ownership and dependency insights from Step 1 (eidos context and eidos index blast-radius), classify the user's request before writing code:
| Criteria | ⚡ Direct Mode (In-Place Co-Evolution) | 📐 Planned Mode (SpecDelta Lifecycle) |
|---|---|---|
| Typical Tasks | Bug fixes, localized refactors, adding a helper/flag within an existing container, doc/test updates, UI polish. | New/removed containers (CNT-*) or components (CMP-*), breaking contract (CTR-*) changes, cross-domain features, new policies (POL-*). |
| Blast Radius | Confined to 1 existing container/component (eidos index blast-radius); no breaking contract changes. |
Spans multiple containers/domains or alters public interfaces/schemas. |
| Spec Mechanism | Update .adoc specs in eidos/ on structural changes (new/renamed/removed public symbols, files, INV-*, or DEC-*; skip on body-only fixes). |
Create a SpecDelta (eidos delta create), implement code + spec changes, verify (eidos delta verify), and reconcile (eidos delta apply). |
| Verification | eidos drift --uncommitted --json |
eidos delta verify <ID>, eidos delta apply <ID>, eidos drift --uncommitted --json |
4. Step 3: Execute the Selected Workflow
Workflow A: Direct Mode Execution (eidos drift)
- Slice Context & Locate Symbols: Run
eidos context -f "<touched_file_or_glob>" --json(plusfind-symbol/searchas needed) to resolve owningCNT-*/CMP-*andINV-*. - Implement Code & Tests: Modify source code and update or add automated tests preserving
INV-*references. - Co-Evolve Living Specs on Structural Changes (skip on body-only fixes where no public symbol, file, contract,
INV-*, orDEC-*changed; read references/spec.md or runeidos spec schema <type> [--json]):- New internal module or file: Update
source_pathin the owningCNT-*/CMP-*spec (or scaffold viaeidos spec create component <ID> --title "..."). - New package/contract boundary export (
__init__.py,index.ts,mod.rs,lib.rs,__all__, orspecification_file): Anchor the export or route in the owning/neighbor spec (CNT-*,CMP-*,CTR-*, orCAP-*). - Removed or renamed public symbol: Remove or rename backticked symbol references in the owning
CNT-*,CMP-*(== Public Surface), orCTR-*spec body (stale_removed_symbol). - Module-internal helper function: Covered by a substantive update to the owning
CNT-*/CMP-*spec—never pollute C4 specs with helper names (trivially_covered_files). - New invariant or design trade-off: Add
INV-*(test_binding: file::func) toCAP-*(technical.invariants) or top-levelinvariants:(POL-*/CNT-*/CMP-*), or addDEC-*underdecisions:. - Domain vocabulary, persona, policy, or UI/design change: Co-evolve bound
DOM-*(ubiquitous_language),PER-*,POL-*, ordesign/*(DS-*,UIC-*,CLT-*,SCR-*,FLOW-*,tokens.json) specs surfaced byeidos context.
- New internal module or file: Update
- Verify Zero Drift: Run
eidos drift --uncommitted --json(--strictalso requires 1-hop spec or bound test co-evolution on body-only edits).
Workflow B: Planned Mode Execution (Read references/plan.md)
When introducing/removing containers or components, making breaking contract changes, or spanning domains, read references/plan.md:
- Discover Scope & Blast Radius:
eidos context -t "<feature or architectural change>" --tier deep --json eidos index blast-radius <TARGET-ENTITY-ID> --depth 2 --json - Scaffold SpecDelta (auto-generates ID, slug, and 4-hex suffix; commands accept short prefixes like
DLT-YYYY-NNN):eidos delta create --title "..." --kind <feature|enabler|bug> - Declare Mutations, Reconcile Plan & Self-Review: Populate
mutations:(operation,target,expect: { body, frontmatter };eidos spec schema delta—neveraffects:/blast_radius:) and== Problem Statement/== Proposed Specification Changes/== Implementation Plan. Slice every planned file or quoted glob (eidos context -f "<path_or_glob>" --tier guardrails --jsonor-f a,b) to declare 1-hop owners (CMP-*, parentCNT-*,CTR-*,CAP-*) +design/*(SYS-*/ARCH-*cover only unmapped files), annotate unchanged parent/non-structural files inline ((covered via parent CNT-*)/(body-only; no spec mutation)) to avoidUNMODIFIED, pair tests withINV-*(expect.frontmatter: { rule, test_binding }), verify live CLI flags/paths/symlinks, and runreferences/plan.md§3's 5-Dimension Review autonomously before presenting. - Implement Code, Specs & Tests: Apply changes across code,
eidos/, andtests/. - Verify & Apply:
eidos delta verify <DLT-ID> --json eidos delta apply <DLT-ID>
5. Step 4: Pre-Completion Gate & Adversarial Gap Self-Review
Before concluding any task or presenting your final response, complete both verification stages:
Stage 1: Deterministic Engine Gate (eidos drift)
eidos drift --uncommitted --json
eidos driftrunseidos validateinternally (v1 schemas,x-eidos-ref,source_path/specification_file,import_boundaries,== Public Surface, and bidirectional contract parity across all canonicaltech/contractprotocols) plus Git diff ownership, workflow mode, substantive diff,stale_removed_symbol,--strictbody drift, and polyglotINV-*test_bindingchecks. (Useeidos validate eidos --jsonoutside Git.)- If
is_clean: falseordrift_detected: true: Followremediation_suggestions,boundary_violations(remove forbidden imports/HTTP calls or adjustratchet_baselinevia SpecDelta), andvalidation_errorsuntil exit0(ratchet_shrink_candidatesare advisory).
Stage 2: Mandatory Post-Implementation Adversarial Diff Review
Before responding, inspect your actual diff adversarially—never rely on memory:
git diff -- <file> # inspect each modified file untruncated
On multi-file (>=3) or contract/schema edits, prefer delegating this read-only audit (git diff, eidos context --uncommitted --json, eidos drift --uncommitted --json) to a fresh-context subagent; otherwise audit untruncated per-file diffs directly:
- Requirements Completeness: Verify every requirement is met with zero
TODOs, stubs, or partial paths. - Adversarial Falsification: Break at least 2 assumptions in your diff:
- Heuristics & preconditions: Could regex/substring checks misfire on comments, prose, case, or dot-paths (
.github/,.agents/), or skip downstream preconditions? - Sibling consumers & shared state: Inspect
untouched_consumersfromeidos driftplus readers/writers (eidos index find-symbol) of touched helpers, schemas, or tables. - Boundaries & fallbacks: Check empty/
None/unmatched inputs,IN (...)batching, parent↔child inheritance, and multi-container edge cases.
- Heuristics & preconditions: Could regex/substring checks misfire on comments, prose, case, or dot-paths (
- Contract & Public Surface (
CTR-*,CMP-*): Sync flags, routes, schemas,== Public Surface, and coupled clauses (exit codes, docs, SemVer). - Invariant & Diff-Line Tests (
INV-*): Verify tests cover newly added diff branches and edge cases, binding everyINV-*(test_binding: file::func). - Decisions & Co-Evolution (
DEC-*,DOM-*,PER-*,POL-*,design/*): Record trade-offs indecisions:and co-evolve affected domain, persona, policy, or design specs. - Team Memory (
references/memory.md): Check whether any non-obvious build/test/runtime/UI/tooling gotcha or bug root cause should be saved/updated viaeidos memory add --from-diff/eidos memory update, and reconcilestale/expiredaffected_memories.
Autonomous Remediation: Fix every finding, re-run tests and eidos drift --uncommitted --json, then report gate status (clean) and verified edge cases.
6. Living Specification Directory Layout & Progressive Reference Guides
eidos/
├── system.adoc # C4 Level 1 System Context (SYS-*)
├── architecture/
│ ├── system-architecture.adoc # Arc42 Sections 1-12 & C4 Level 2 Topology (ARCH-*)
│ ├── containers/ # C4 Level 2 Containers (CNT-*)
│ ├── components/ # Standalone C4 Level 3 Components (CMP-*)
│ └── contracts/ # Interface Contracts: OpenAPI, Protobuf, GraphQL, CLI (CTR-*)
├── domains/<domain-slug>/
│ ├── domain.adoc # Bounded Context & Ubiquitous Language (DOM-*)
│ └── capabilities/ # Functional Capabilities, JTBD & Invariants (CAP-*)
├── design/ # Optional Multi-Design Systems & Client UX
│ ├── systems/<slug>/ # Design Systems (DS-*), tokens.json & UI Components (UIC-*)
│ ├── clients/<app>/ # Client Apps (CLT-*) & Screen State Machines (SCR-*)
│ └── flows/ # User Interaction Flows (FLOW-*)
├── personas/ # Actor Personas (PER-*)
├── policies/ # System-wide Governance & NFR Policies (POL-*)
├── memory/ # Shared Team Operational Memories (MEM-*)
├── explorations/ # Technical Spikes & Feasibility Discovery (EXP-*)
└── deltas/ # SpecDelta Mutations (DLT-*)
Read the matching reference file on demand:
- references/setup.md: Installing
eidos,eidos init,eidos/eidos.yaml(eidos config),eidos plugin, andeidos doctor. - references/spec.md: Creating/editing
.adocspecs undereidos/or bindingINV-*to tests (eidos spec). - references/plan.md: Planned Mode:
EXP-*spikes,DLT-*SpecDeltas (eidos delta),expect:post-conditions, and 5-Dimension reviews. - references/ops.md: Greenfield/brownfield extraction (
eidos init,eidos spec discover), index/semantic ops, andeidos portal. - references/memory.md: Corrections/gotchas, reconciling stale/expired memories, and auditing/promoting team notes (
eidos memory).
Files (eidos)
-
references
-
memory.md 3.2 KB
Loading… -
ops.md 6.6 KB
Loading… -
plan.md 13.7 KB
Loading… -
setup.md 4.2 KB
Loading… -
spec.md 18.6 KB
Loading…
-
-
SKILL.md 16.2 KB
--- name: eidos description: "Core workflow for repositories governed by Eidos living specs (eidos/). Load before editing code, tests, or specs, refactoring, adding features, onboarding repos, capturing team memory, or reviewing changes. Covers discovery (eidos context/index), Direct vs. Planned mode, specs, ops, memory, and eidos drift." license: MIT metadata: author: mchawa version: "2.0.2" --- # Eidos: Master Architecture & Engineering Orchestrator This repository uses **Eidos** to keep living specifications (`eidos/`), source code, and tests synchronized. Follow these guardrails whenever inspecting, planning, implementing, refactoring, or reviewing changes. --- ## 1. Constitutional Guardrails (Non-Negotiable) 1. **Single Source of Truth**: Domains, capabilities, personas, C4 containers/components, contracts, design systems, and policies live in `eidos/` as `.adoc` files with YAML frontmatter (§6). 2. **Zero ADRs**: NEVER create standalone ADRs (`docs/adr/`, `eidos/adr/`, `ADR-*.md`). Record rationale and rejected alternatives in the owning spec's `decisions:` block (`CNT-*`, `CMP-*`, `CTR-*`, `CAP-*`), and govern architectural changes via SpecDeltas (`eidos/deltas/dlt-*.adoc`). 3. **Dual Workflow Mode**: Select Direct or Planned Mode *before* writing code (§3). 4. **Invariant-Test Traceability**: Every `INV-*` declares `test_binding: path/to/test_file::test_function`, and the bound test references its `INV-*` ID. 5. **CLI-First Discovery & Scaffolding**: Run Eidos discovery commands (§2, `--json`) *before* raw reads or `grep`/`find`. Never hand-write `.adoc` specs or SpecDeltas from scratch: scaffold with `eidos spec create <type> <ID> --title "..."` or `eidos delta create --title "..." --slug --kind <kind>`, and inspect exact keys with `eidos spec schema <type> [--json]`. 6. **Subagent Context Propagation**: If your harness supports subagents, pass the relevant `eidos context --json` slice in subagent prompts and instruct them to trust it without re-reading summarized `.adoc` files. 7. **Zero Unreconciled Drift**: Never finish with failing schemas or drift (§5, Stage 1). 8. **Mandatory Post-Implementation Adversarial Review**: Never finish without running `git diff` and an adversarial falsification review, fixing every finding before responding (§5, Stage 2). --- ## 2. Step 1: Discovery-First Context & Code Graph Intelligence (`eidos context` & `eidos index`) **STOP before running blind `grep`, `find`, or reading random files.** Eidos maintains an embedded SQLite + AST knowledge graph (`eidos/.cache/index.db`) resolving files, symbols, specs, and dependencies in milliseconds. In **monorepos with multiple `eidos/` directories** (`packages/<pkg>/eidos/`), pass `-p <subproject>/eidos` (or run inside `<subproject>`) for `eidos index`, `eidos spec`, `eidos delta`, `eidos memory`, and `eidos drift` (`eidos context -f <path>`, `eidos index blast-radius <path>`, and `eidos drift --uncommitted` auto-route from the root). ### 2.1 Mandatory Tool Replacement Matrix Whenever you need to orient in the codebase, locate a symbol, search specs, or assess impact, **prefer the Eidos CLI command first**—even when the user attaches a `@[file]` path (call `eidos context -f <attached_file> --json` alongside or before reading it): | Instead of doing this... | ALWAYS run this Eidos command FIRST | Why | | :--- | :--- | :--- | | Running `find` / `ls -R` or reading many files to orient | `eidos index repo-map --max-tokens 1500` | AST outline of all containers and modules (~85% fewer tokens). | | Grepping source files for a class, function, method, or route | `eidos index find-symbol "<SymbolName>" --json` | Exact `location.file` and `line_start`..`line_end` (pass to `read_file` instead of reading full files), plus `CNT-*` / `CMP-*`. | | Grepping `eidos/` for domain concepts, rules, capabilities, or spikes | `eidos index search "<keywords>" --json` | BM25 + synonym search (optional hybrid semantic via `--semantic`) over specs, `DEC-*`, and `INV-*`. | | Editing or reviewing files/globs (including `@[file]`) without knowing governance | `eidos context -f "<path_or_glob>" --json` *(or `-f a,b` / `-t "<task>"` / `-c <ID>`)* | Owning `CNT-*`/`CMP-*`, `DOM-*`, `CAP-*`, `PER-*`, `POL-*`, `design`, `INV-*`, `DEC-*`, `CTR-*`, and `provenance_tags` in one call (always quote globs; trust without re-reading `.adoc` files). | | Guessing what breaks when modifying an entity, symbol, or file | `eidos index blast-radius <SYMBOL_OR_PATH> --depth 2 --min-confidence derived --json` | Upstream/downstream k-hop dependents filtered by epistemic certainty (`observed`, `derived`, or `inferred` default). | ### 2.2 Context Slicing Tiers (`eidos context`) Choose the `--tier` flag matching your task scope: | Tier | Flag | Budget | Contents Included | When to Use | | :--- | :--- | :--- | :--- | :--- | | **Anchor** | `--tier anchor` | `~140 tokens` | Owning `CNT-*` / `CMP-*`, runtime, `source_path`, bound domain, compact `DEC-*`, direct `CTR-*` signatures. | Quick single-file bug fixes, minor localized edits. | | **Guardrails** *(Default)* | `--tier guardrails` | `~300–900 tokens` | Anchor + `DEC-*` rationale, `domain_path`, `design` (`CLT-*`/`DS-*`), capabilities (`CAP-*` with `personas`, `policies`, `experience`), active `INV-*`, and `POL-*`. | Standard feature work, refactoring, test updates. | | **Deep** | `--tier deep` | `~500–1,500 tokens` | Guardrails + C4 Level 3 building blocks, full contract schemas, full policies, and downstream dependents. | Cross-container refactors, SpecDelta authoring, architectural reviews. | ```bash eidos index repo-map --max-tokens 1500 eidos index find-symbol "JwtValidator" --json eidos index search "authentication" --json eidos context -f src/auth/jwt_validator.py --json eidos context -f "apps/*/Dockerfile" --tier guardrails --json eidos context -c CNT-AUTH-SERVICE --tier guardrails --json eidos context -t "rate limiting and token expiration" --tier deep --json eidos index blast-radius CNT-AUTH-SERVICE --depth 2 --json ``` --- ## 3. Step 2: Select Your Workflow Mode Using the ownership and dependency insights from Step 1 (`eidos context` and `eidos index blast-radius`), classify the user's request *before* writing code: | Criteria | ⚡ Direct Mode (In-Place Co-Evolution) | 📐 Planned Mode (SpecDelta Lifecycle) | | :--- | :--- | :--- | | **Typical Tasks** | Bug fixes, localized refactors, adding a helper/flag within an existing container, doc/test updates, UI polish. | New/removed containers (`CNT-*`) or components (`CMP-*`), breaking contract (`CTR-*`) changes, cross-domain features, new policies (`POL-*`). | | **Blast Radius** | Confined to 1 existing container/component (`eidos index blast-radius`); no breaking contract changes. | Spans multiple containers/domains or alters public interfaces/schemas. | | **Spec Mechanism** | Update `.adoc` specs in `eidos/` on structural changes (new/renamed/removed public symbols, files, `INV-*`, or `DEC-*`; skip on body-only fixes). | Create a SpecDelta (`eidos delta create`), implement code + spec changes, verify (`eidos delta verify`), and reconcile (`eidos delta apply`). | | **Verification** | `eidos drift --uncommitted --json` | `eidos delta verify <ID>`, `eidos delta apply <ID>`, `eidos drift --uncommitted --json` | --- ## 4. Step 3: Execute the Selected Workflow ### Workflow A: Direct Mode Execution (`eidos drift`) 1. **Slice Context & Locate Symbols**: Run `eidos context -f "<touched_file_or_glob>" --json` (plus `find-symbol` / `search` as needed) to resolve owning `CNT-*`/`CMP-*` and `INV-*`. 2. **Implement Code & Tests**: Modify source code and update or add automated tests preserving `INV-*` references. 3. **Co-Evolve Living Specs on Structural Changes** (skip on body-only fixes where no public symbol, file, contract, `INV-*`, or `DEC-*` changed; read [references/spec.md](references/spec.md) or run `eidos spec schema <type> [--json]`): * **New internal module or file**: Update `source_path` in the owning `CNT-*` / `CMP-*` spec (or scaffold via `eidos spec create component <ID> --title "..."`). * **New package/contract boundary export** (`__init__.py`, `index.ts`, `mod.rs`, `lib.rs`, `__all__`, or `specification_file`): Anchor the export or route in the owning/neighbor spec (`CNT-*`, `CMP-*`, `CTR-*`, or `CAP-*`). * **Removed or renamed public symbol**: Remove or rename backticked symbol references in the owning `CNT-*`, `CMP-*` (`== Public Surface`), or `CTR-*` spec body (`stale_removed_symbol`). * **Module-internal helper function**: Covered by a substantive update to the owning `CNT-*` / `CMP-*` spec—never pollute C4 specs with helper names (`trivially_covered_files`). * **New invariant or design trade-off**: Add `INV-*` (`test_binding: file::func`) to `CAP-*` (`technical.invariants`) or top-level `invariants:` (`POL-*`/`CNT-*`/`CMP-*`), or add `DEC-*` under `decisions:`. * **Domain vocabulary, persona, policy, or UI/design change**: Co-evolve bound `DOM-*` (`ubiquitous_language`), `PER-*`, `POL-*`, or `design/*` (`DS-*`, `UIC-*`, `CLT-*`, `SCR-*`, `FLOW-*`, `tokens.json`) specs surfaced by `eidos context`. 4. **Verify Zero Drift**: Run `eidos drift --uncommitted --json` (`--strict` also requires 1-hop spec or bound test co-evolution on body-only edits). ### Workflow B: Planned Mode Execution (Read `references/plan.md`) When introducing/removing containers or components, making breaking contract changes, or spanning domains, read [references/plan.md](references/plan.md): 1. **Discover Scope & Blast Radius**: ```bash eidos context -t "<feature or architectural change>" --tier deep --json eidos index blast-radius <TARGET-ENTITY-ID> --depth 2 --json ``` 2. **Scaffold SpecDelta** (auto-generates ID, slug, and 4-hex suffix; commands accept short prefixes like `DLT-YYYY-NNN`): ```bash eidos delta create --title "..." --kind <feature|enabler|bug> ``` 3. **Declare Mutations, Reconcile Plan & Self-Review**: Populate `mutations:` (`operation`, `target`, `expect: { body, frontmatter }`; `eidos spec schema delta`—never `affects:`/`blast_radius:`) and `== Problem Statement` / `== Proposed Specification Changes` / `== Implementation Plan`. Slice every planned file or **quoted** glob (`eidos context -f "<path_or_glob>" --tier guardrails --json` or `-f a,b`) to declare 1-hop owners (`CMP-*`, parent `CNT-*`, `CTR-*`, `CAP-*`) + `design/*` (`SYS-*`/`ARCH-*` cover only unmapped files), annotate unchanged parent/non-structural files inline (`(covered via parent CNT-*)` / `(body-only; no spec mutation)`) to avoid `UNMODIFIED`, pair tests with `INV-*` (`expect.frontmatter: { rule, test_binding }`), verify live CLI flags/paths/symlinks, and run `references/plan.md` §3's 5-Dimension Review autonomously before presenting. 4. **Implement Code, Specs & Tests**: Apply changes across code, `eidos/`, and `tests/`. 5. **Verify & Apply**: ```bash eidos delta verify <DLT-ID> --json eidos delta apply <DLT-ID> ``` --- ## 5. Step 4: Pre-Completion Gate & Adversarial Gap Self-Review Before concluding **any** task or presenting your final response, complete both verification stages: ### Stage 1: Deterministic Engine Gate (`eidos drift`) ```bash eidos drift --uncommitted --json ``` * **`eidos drift`** runs `eidos validate` internally (v1 schemas, `x-eidos-ref`, `source_path`/`specification_file`, `import_boundaries`, `== Public Surface`, and **bidirectional contract parity** across all canonical `tech/contract` protocols) plus Git diff ownership, workflow mode, substantive diff, `stale_removed_symbol`, `--strict` body drift, and polyglot `INV-*` `test_binding` checks. (Use `eidos validate eidos --json` outside Git.) * **If `is_clean: false` or `drift_detected: true`**: Follow `remediation_suggestions`, `boundary_violations` (remove forbidden imports/HTTP calls or adjust `ratchet_baseline` via SpecDelta), and `validation_errors` until exit `0` (`ratchet_shrink_candidates` are advisory). ### Stage 2: Mandatory Post-Implementation Adversarial Diff Review **Before responding**, inspect your actual diff adversarially—never rely on memory: ```bash git diff -- <file> # inspect each modified file untruncated ``` On multi-file (`>=3`) or contract/schema edits, prefer delegating this read-only audit (`git diff`, `eidos context --uncommitted --json`, `eidos drift --uncommitted --json`) to a fresh-context subagent; **otherwise audit untruncated per-file diffs directly**: 1. **Requirements Completeness**: Verify every requirement is met with zero `TODO`s, stubs, or partial paths. 2. **Adversarial Falsification**: Break at least 2 assumptions in your diff: * *Heuristics & preconditions*: Could regex/substring checks misfire on comments, prose, case, or dot-paths (`.github/`, `.agents/`), or skip downstream preconditions? * *Sibling consumers & shared state*: Inspect `untouched_consumers` from `eidos drift` plus readers/writers (`eidos index find-symbol`) of touched helpers, schemas, or tables. * *Boundaries & fallbacks*: Check empty/`None`/unmatched inputs, `IN (...)` batching, parent↔child inheritance, and multi-container edge cases. 3. **Contract & Public Surface (`CTR-*`, `CMP-*`)**: Sync flags, routes, schemas, `== Public Surface`, and coupled clauses (exit codes, docs, SemVer). 4. **Invariant & Diff-Line Tests (`INV-*`)**: Verify tests cover **newly added diff branches** and edge cases, binding every `INV-*` (`test_binding: file::func`). 5. **Decisions & Co-Evolution (`DEC-*`, `DOM-*`, `PER-*`, `POL-*`, `design/*`)**: Record trade-offs in `decisions:` and co-evolve affected domain, persona, policy, or design specs. 6. **Team Memory (`references/memory.md`)**: Check whether any non-obvious build/test/runtime/UI/tooling gotcha or bug root cause should be saved/updated via `eidos memory add --from-diff` / `eidos memory update`, and reconcile `stale`/`expired` `affected_memories`. **Autonomous Remediation**: Fix every finding, re-run tests and `eidos drift --uncommitted --json`, then report gate status (`clean`) and verified edge cases. --- ## 6. Living Specification Directory Layout & Progressive Reference Guides ```text eidos/ ├── system.adoc # C4 Level 1 System Context (SYS-*) ├── architecture/ │ ├── system-architecture.adoc # Arc42 Sections 1-12 & C4 Level 2 Topology (ARCH-*) │ ├── containers/ # C4 Level 2 Containers (CNT-*) │ ├── components/ # Standalone C4 Level 3 Components (CMP-*) │ └── contracts/ # Interface Contracts: OpenAPI, Protobuf, GraphQL, CLI (CTR-*) ├── domains/<domain-slug>/ │ ├── domain.adoc # Bounded Context & Ubiquitous Language (DOM-*) │ └── capabilities/ # Functional Capabilities, JTBD & Invariants (CAP-*) ├── design/ # Optional Multi-Design Systems & Client UX │ ├── systems/<slug>/ # Design Systems (DS-*), tokens.json & UI Components (UIC-*) │ ├── clients/<app>/ # Client Apps (CLT-*) & Screen State Machines (SCR-*) │ └── flows/ # User Interaction Flows (FLOW-*) ├── personas/ # Actor Personas (PER-*) ├── policies/ # System-wide Governance & NFR Policies (POL-*) ├── memory/ # Shared Team Operational Memories (MEM-*) ├── explorations/ # Technical Spikes & Feasibility Discovery (EXP-*) └── deltas/ # SpecDelta Mutations (DLT-*) ``` Read the matching reference file on demand: * **[references/setup.md](references/setup.md)**: Installing `eidos`, `eidos init`, `eidos/eidos.yaml` (`eidos config`), `eidos plugin`, and `eidos doctor`. * **[references/spec.md](references/spec.md)**: Creating/editing `.adoc` specs under `eidos/` or binding `INV-*` to tests (`eidos spec`). * **[references/plan.md](references/plan.md)**: Planned Mode: `EXP-*` spikes, `DLT-*` SpecDeltas (`eidos delta`), `expect:` post-conditions, and 5-Dimension reviews. * **[references/ops.md](references/ops.md)**: Greenfield/brownfield extraction (`eidos init`, `eidos spec discover`), index/semantic ops, and `eidos portal`. * **[references/memory.md](references/memory.md)**: Corrections/gotchas, reconciling stale/expired memories, and auditing/promoting team notes (`eidos memory`).
Reviews (0)
No reviews yet.
Comments
Sign in to join the conversation.
No comments yet. Start the conversation.