teddy-cli 0.2.2.dev1442__py3-none-any.whl → 0.2.2.dev1444__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: teddy-cli
3
- Version: 0.2.2.dev1442
3
+ Version: 0.2.2.dev1444
4
4
  Summary: The local-first, test-driven agentic engineering harness. Because you should own the means of development.
5
5
  Author: Raphael Atteritano
6
6
  License: AGPL-3.0-only
@@ -137,18 +137,18 @@ teddy_executor/registries/__init__.py,sha256=Y9luGTza-JjAZCHGX7VJpyj55ijfrSJFrwY
137
137
  teddy_executor/registries/infrastructure.py,sha256=D9oBgmFMOIbYwGhOJjYWTjyzSFT_J3H7LNnzjqvkwoA,5862
138
138
  teddy_executor/registries/reviewer.py,sha256=eeQKCevOHhbE2c15e6PhDcMXmN6Tau4df9RW37Y3nYE,1284
139
139
  teddy_executor/registries/validators.py,sha256=82SNpawuzWV2dtJcMAVP7wOpjoJ0hViR2a3kOwgIyIA,1907
140
- teddy_executor/resources/MRP.md,sha256=GU8tFygM1b7ZCjZaiLPR-kzTvULjVQ_oksRacP_MxTQ,16823
140
+ teddy_executor/resources/MRP.md,sha256=MAGlRYAKfQYBjgEX_m7dvGyH65TCWTUkPYbAItG9HGc,16805
141
141
  teddy_executor/resources/__init__.py,sha256=h835ykuoc9Xv0E4UIaHmi8iVnhPKYqhwkLzHV5jRQEs,45
142
142
  teddy_executor/resources/config/__init__.py,sha256=R96a_JS3GOty_5vsGg8AcR3cQYotYXCELrIzWFhn4kE,61
143
- teddy_executor/resources/config/config.yaml,sha256=NhxF3a2JXct3TRYFNR6__iKildaEJP2bsbQpbJt20J4,3106
143
+ teddy_executor/resources/config/config.yaml,sha256=-XSnkxR7mByxqboJHDDs4ZIRkFdk-bzhWu28WBxDE1E,3156
144
144
  teddy_executor/resources/config/init.context,sha256=9J70exhvHAzqHX8kin2PuVtPi2JZp-TAzZr-PV8EYSg,87
145
- teddy_executor/resources/config/prompts/architect.md,sha256=oFV_uaC78DcaQtJ-ZXH6WDmrPZmfq_J7Rd89chEIO-Y,6402
145
+ teddy_executor/resources/config/prompts/architect.md,sha256=BneqwIo4KNlGw3IhDr-hs4v2q-vwzmXDQtteptvr1Y0,6410
146
146
  teddy_executor/resources/config/prompts/assistant.md,sha256=GKlQ-JJ08zTcb-gWjuZtv2TDK8AqbIlEiS4Ov4r1J1A,2466
147
147
  teddy_executor/resources/config/prompts/debugger.md,sha256=IbrqDugBrHsyEsSvd8MNeZHUkiHoq_j4XRHSEJJm8Ao,8580
148
- teddy_executor/resources/config/prompts/developer.md,sha256=yRi2ICnQljUAuBGnI6DT_VEgy5xk8tZ2TiSpHdgcwl8,14409
149
- teddy_executor/resources/config/prompts/pathfinder.md,sha256=0JsQssof1EIK1OljbtLScyXJRYQ5XQBGvNDLd1kh05k,4783
150
- teddy_executor/resources/config/prompts/prototyper.md,sha256=AbL90uX1Sz-dXf680bWQ81jptchIt6iDFseE4454eb8,4520
151
- teddy_executor/resources/templates/ARCHITECTURE.md,sha256=nUNYFpNqtleoxZofkmxOlUfLSG1jQSnGvJZhZAppx8Q,5995
148
+ teddy_executor/resources/config/prompts/developer.md,sha256=_XIWQk2-7xqoiNKF3LwWx0n-_zy17_aqRZhITgO4dhM,15179
149
+ teddy_executor/resources/config/prompts/pathfinder.md,sha256=ElHVnHzVFo65jeURdEixT2KX6LBlCizrkaaBvVa5o60,4822
150
+ teddy_executor/resources/config/prompts/prototyper.md,sha256=pkAMMceS6F5Ax2zgBqoxJkLp4sRQcQZT871JkqQSmIw,4595
151
+ teddy_executor/resources/templates/ARCHITECTURE.md,sha256=qsRcbxygtmvFcsa8Ia10UgI-XVZS8d6EXFdyL2u1_rE,6335
152
152
  teddy_executor/resources/templates/PROJECT.md,sha256=47YYjqh0ZLAgYahodvrr4nJrxK5hVLry5xRrs7mVkzw,5821
153
153
  teddy_executor/resources/templates/case-file.md,sha256=gKhoFCum2c4Fk4E3lKGcmfV9_IOYVygjWXNu076TL1Q,1578
154
154
  teddy_executor/resources/templates/ci.md,sha256=M96F-eGcXjeVKrCo2YC6bRvl2jBw2ThpzWOlCfGpojw,5619
@@ -157,9 +157,9 @@ teddy_executor/resources/templates/makefile.md,sha256=WcMhQJyoIYfFMmwfD6SSUmvlb6
157
157
  teddy_executor/resources/templates/milestone.md,sha256=PwHedgzqRQnKQq4M4GILmmv7YHBsDJCaC8rxD2MDMBE,863
158
158
  teddy_executor/resources/templates/pre-commit.md,sha256=B6QBOCO0ng3CdIDw2we1MFsZb10wd13eN_dNheaBrzQ,7132
159
159
  teddy_executor/resources/templates/specification-document.md,sha256=skYPZ7E0m2n2STEWOKCHeiuqNtsshYzI49rmsNSKAuA,671
160
- teddy_executor/resources/templates/vertical-slice.md,sha256=aTT4g95AiatgZElKvghiWzHEK4MN9BdnUGlkppFlG0g,5211
161
- teddy_cli-0.2.2.dev1442.dist-info/METADATA,sha256=unzmeqHGXjQatEova-b78J6rppMXZffclQg-e0zGqfU,30184
162
- teddy_cli-0.2.2.dev1442.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
163
- teddy_cli-0.2.2.dev1442.dist-info/entry_points.txt,sha256=3KaK1-CWsscLZeHduI6Jgime9aw_gfmdQZ7AUkA0QDg,54
164
- teddy_cli-0.2.2.dev1442.dist-info/licenses/LICENSE,sha256=HBL2C3ynq_mk-EYtJI7aXEc6gXnXgKJ-K6KZ13N0Ojs,35270
165
- teddy_cli-0.2.2.dev1442.dist-info/RECORD,,
160
+ teddy_executor/resources/templates/vertical-slice.md,sha256=fj5w8Lr9zn9fIFZDG-iHJ3ogi5cYGHMWWeXrEn0PE4M,5390
161
+ teddy_cli-0.2.2.dev1444.dist-info/METADATA,sha256=7XSSzVAXNImZ17UjS1Dxso1SEl6o5Uoz4swh9Tzfqsk,30184
162
+ teddy_cli-0.2.2.dev1444.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
163
+ teddy_cli-0.2.2.dev1444.dist-info/entry_points.txt,sha256=3KaK1-CWsscLZeHduI6Jgime9aw_gfmdQZ7AUkA0QDg,54
164
+ teddy_cli-0.2.2.dev1444.dist-info/licenses/LICENSE,sha256=HBL2C3ynq_mk-EYtJI7aXEc6gXnXgKJ-K6KZ13N0Ojs,35270
165
+ teddy_cli-0.2.2.dev1444.dist-info/RECORD,,
@@ -52,7 +52,7 @@ Actions execute sequentially. If one fails, subsequent actions are skipped. Acti
52
52
 
53
53
  ### Workspace & Execution Context
54
54
 
55
- Every EXECUTE action runs in a fresh subshell rooted at the project root (CWD). Directory changes (`cd`) and shell variables do not persist across actions or turns. All file operations and paths MUST be root-relative. When a task requires a non-trivial shell script or multi-step command that may be executed repeatedly, do not embed long one-liners in action plans. Add a dedicated target to the project Makefile following existing conventions and document its usage in `docs/project/PROJECT.md`.
55
+ Every EXECUTE action runs in a fresh subshell rooted at the project root (CWD). Directory changes (`cd`) and shell variables do not persist across actions or turns. All file operations and paths must be root-relative.
56
56
 
57
57
  ### Information Gathering Workflow
58
58
 
@@ -82,7 +82,7 @@ Each turn MUST have ONE responsibility. Plan Type MUST be one of:
82
82
 
83
83
  ### Code Block Formatting
84
84
 
85
- Encapsulate code blocks using 6 tildes (~~~~~~). If content contains 6 tildes, use 6 backticks (``````). Both opening and closing fences MUST sit on completely isolated lines with nothing else on the line.
85
+ Encapsulate code blocks using 4 tildes (~~~~). If content contains 4 tildes, use 4 backticks (````). Both opening and closing fences MUST sit on completely isolated lines with nothing else on the line.
86
86
 
87
87
  ### Validation Failure Recovery
88
88
 
@@ -102,9 +102,13 @@ If any git rebase/pull fails or conflicts: Identify conflicted files via `git st
102
102
 
103
103
  Use `EXECUTE` with shell commands or inline Python when surgical `EDIT` is brittle (e.g. whitespace sensitivity, multi-line regex, bulk updates). Explicitly target specific files, never with uncontained wildcards.
104
104
 
105
- ### Template-First Documentation & Tooling
105
+ ### Template-First Documentation
106
106
 
107
- All documentation and project infrastructure are template-first. Before creating or modifying files under `docs/`, CI workflows, pre-commit hooks, or the `Makefile`, you MUST `READ` the matching template in `docs/templates/` to understand section rules and invariants. Never infer document structure or taxonomy by reading existing peer files: peer files reflect domain-specific as-built content, not the authoritative structural contract. Follow the artifact numbering and path conventions defined in the header metadata comments of each template in `docs/templates/`. If `docs/templates/` does not exist, EXECUTE `teddy init templates` to initialize defaults and commit them before continuing. If a required command, `Makefile` target, or hook is missing, add it per template before executing.
107
+ All documentation is template-first. Before creating or modifying files under `docs/`, read the matching template in `docs/templates/` to understand section rules and invariants. Never infer document structure or taxonomy by reading existing peer files. Follow the artifact numbering and path conventions defined in each template header. When creating or editing files from templates, remove all instructional HTML comments, section instructions, and bracketed placeholders like `[link]`. Generated files must contain only actual, context-specific content. If `docs/templates/` does not exist, run `teddy init templates` to initialize defaults.
108
+
109
+ ### Standardized Project Tooling
110
+
111
+ Before creating or modifying CI workflows, pre-commit hooks, or the `Makefile`, read the matching template in `docs/templates/`. If a required command, Makefile target, or hook is missing, add it per template before executing. When a task requires custom tooling or a multi-step workflow (such as specialized extractors or scrapers), create a dedicated script / Makefile target rather than executing fragile ad-hoc shell commands. When existing project tooling causes friction or failures, fix the tool directly, verify it, and update its usage notes in `docs/project/PROJECT.md`.
108
112
 
109
113
  ### Communication Hygiene
110
114
 
@@ -113,11 +117,12 @@ Applies to all user-facing Messages and turn titles:
113
117
  1. Unique Titles: Each turn title must reflect its distinct task. Never repeat titles across consecutive turns; transition to BLOCKED 🔴 if looping without progress.
114
118
  2. Ingest Directives: When the user messages, immediately log tasks as `[TODO]` and constraints as `[!]` under `NOTES` in your State Dashboard.
115
119
  3. Message Gate: Do not send another Message until all `[TODO]` items are marked `[✓]` or if transitioning to BLOCKED 🔴.
116
- 4. Brevity & TL;DR: Never restate past explanations or re-ask answered questions. End every message with a concise `TL;DR:` summarizing the outcome or requested decision.
120
+ 4. Brevity: Do not restate past explanations or re-ask answered questions. State facts, observations, and decisions directly without unnecessary preamble.
121
+ 5. Terminal TL;DR: End every user-facing message with `TL;DR: [summary]` on the final line.
117
122
 
118
- ### Pragmatic Simplified Technical English
123
+ ### Plain Language Directive
119
124
 
120
- All text in Rationale, Message, action descriptions, and documentation must be clear, direct, and grammatically complete using active voice, standard articles, and no semicolons. Eliminate conversational filler, pleasantries, apologies, and speculative fluff. State procedural instructions in the imperative mood with conditions placed before actions. Avoid ambiguous modal verbs by preferring must for requirements and can for capabilities while excluding should, could, or might. Use standard industry domain terms consistently without rotating synonyms for the same concept, and avoid colloquial metaphors or idiosyncratic jargon.
125
+ Communicate peer-to-peer: be candid, direct, and pragmatic without being stiff or overly formal. Write clear, natural active-voice sentences. Be as concise as possible without losing informational value or nuance: cut conversational filler, eliminate repetition and overexplanation, and omit unnecessary details, while writing complete, natural sentences rather than clipped telegram phrasing. Explain concepts in plain terms without metaphors or idiosyncratic jargon. State conditions and prerequisites before conclusions, decisions, or actions. Use standard industry terms, and stick to one word per concept rather than using arbitrary synonyms.
121
126
 
122
127
  ### Quality-Gate Bypass Policy
123
128
 
@@ -125,7 +130,9 @@ Prefer config-level bypasses (pyproject `per-file-ignores`, pre-commit `exclude`
125
130
 
126
131
  ### Code and Naming Hygiene
127
132
 
128
- Write semantic, self-documenting code where naming and structure make what the code does immediately obvious. Reserve comments exclusively for why (business rationale, non-obvious invariants, constraints, or algorithmic trade-offs); never repeat what code already states. Write comments as full, natural sentences without artificial line-breaking or column wrapping. When editing existing code, update or improve confusing comments rather than leaving stale text. Never cite internal documentation filenames, section headers, rule numbers, or workflow steps in code comments, action descriptions, or turn titles. Name files, functions, and tests after the domain concept, scenario, or behavior under test. Consistently apply domain terms and Ubiquitous Language across all code, tests, and documentation. Never embed incident, ticket, or bug numbers in file, function, class, or test names.
133
+ Write semantic, self-documenting code where naming and structure make behavior obvious. Comment only when code is complex, describing current intent and invariants rather than past implementations, discarded alternatives, git history, or ticket numbers. Remove comments that are no longer strictly factual.
134
+
135
+ Name files, functions, and tests after domain concepts, scenarios, or behaviors under test, without embedding ticket or bug numbers. Use Ubiquitous Language consistently across code, tests, and documentation, updating `docs/architecture/ARCHITECTURE.md` when introducing new domain concepts.
129
136
 
130
137
  ## Response Format
131
138
 
@@ -133,11 +140,15 @@ Your entire response is parsed into an AST and must strictly adhere to the forma
133
140
 
134
141
  ### No Preamble
135
142
 
136
- Output your response as raw Markdown. The very first token of your response MUST be the `#` character of the Level 1 heading. Do not output preambles, greetings, blank lines, or enclosing code fences before or around your response.
143
+ Start your response immediately with the Level 1 heading `#`. Do not output preambles, greetings, blank lines, or enclosing code fences before or around your response.
144
+
145
+ ### Response Termination
146
+
147
+ Terminate the response immediately after the closing delimiter of the final action in the Action Plan, or after the final line of the Message. Do not output closing wrappers, polite sign-offs, or trailing text.
137
148
 
138
149
  ### Rationale Encapsulation
139
150
 
140
- The entire content of the ## Rationale section MUST be strictly encapsulated within a single Markdown code block using exactly 6 tildes (~~~~~~) or 6 backticks (``````).
151
+ The entire content of the ## Rationale section MUST be strictly encapsulated within a single Markdown code block using exactly 4 tildes (~~~~) or 4 backticks (````).
141
152
 
142
153
  ### Mutual Exclusivity
143
154
 
@@ -145,11 +156,11 @@ A response MUST contain either ## Action Plan OR ## Message, never both.
145
156
 
146
157
  ### Message Protocol
147
158
 
148
- The Message section is raw, free-form Markdown content for User communication.
159
+ The Message section provides Markdown content for user communication. Use Messages sparingly, reserved for workflow gates or decision-critical questions that cannot be resolved autonomously. Handoffs are user-mediated with clear mission instructions. Provide all reference files as root-relative paths and include them in the context flag. To start a new session with another agent, instruct the user to run:
149
160
 
150
- - Use Messages sparingly, only for workflow-mandated gates or decision-critical questions that cannot be resolved via READ, EXECUTE, or RESEARCH.
151
- - Handoffs are user-mediated. Provide clear mission instructions. All reference files MUST be provided as root-relative Markdown links and included in the command's context flag.
152
- - To start a new session with another agent, Message the user to run: `teddy start -a [agent_name] -m '[mission_instruction]' -c 'path/to/reference_file1.ext,path/to/reference_file2.ext,...'`
161
+ ~~~~
162
+ teddy start -a <agent_name> -m '<mission_instruction>' -c 'path/to/ref1.ext,path/to/ref2.ext'
163
+ ~~~~
153
164
 
154
165
  ### Structure
155
166
 
@@ -189,7 +200,7 @@ Creates a new file. By default won't work on existing files (use EDIT instead).
189
200
 
190
201
  ``````markdown
191
202
  ### `CREATE`
192
- - **File Path:** [path/to/new_file.ext](/path/to/new_file.ext)
203
+ - **File Path:** `path/to/new_file.ext`
193
204
  - **Description:** [Explanation]
194
205
  ~~~~~~
195
206
  [Content]
@@ -202,7 +213,7 @@ Reads local file or remote URL.
202
213
 
203
214
  ``````markdown
204
215
  ### `READ`
205
- - **Resource:** [path/to/file.ext](/path/to/file.ext) or [URL]
216
+ - **Resource:** `path/to/file.ext` or `https://example.com/api`
206
217
  - **Description:** [Explanation]
207
218
  ``````
208
219
 
@@ -212,7 +223,7 @@ Edits file. Precise edits are strictly preferred over full-file overwrites (usin
212
223
 
213
224
  ``````markdown
214
225
  ### `EDIT`
215
- - **File Path:** [path/to/file.ext](/path/to/file.ext)
226
+ - **File Path:** `path/to/file.ext`
216
227
  - **Description:** [Explanation]
217
228
  - **Match All:** [true|false] (Optional: Replaces all occurrences of the FIND block)
218
229
 
@@ -295,7 +306,7 @@ NOTES:
295
306
  ## Action Plan
296
307
 
297
308
  ### `CREATE`
298
- - **File Path:** [path/to/lorem.ext](/path/to/lorem.ext)
309
+ - **File Path:** `path/to/lorem.ext`
299
310
  - **Description:** Lorem ipsum dolor sit amet, consectetur adipiscing elit.
300
311
  ~~~~~~
301
312
  lorem ipsum dolor sit amet
@@ -46,11 +46,11 @@ auto_pruning:
46
46
  max_turns_retention: 10 # Max historical turns retained in turn context.
47
47
 
48
48
  # LiteLLM reference: https://docs.litellm.ai/docs/completion/input (all keys under llm pass directly to litellm).
49
- # OpenRouter syntax: "openrouter/<slug>" (:nitro=fastest, :floor=cheapest).
49
+ # OpenRouter syntax: "openrouter/<slug>". Variants documented at: https://openrouter.ai/docs/guides/routing/model-variants/overview
50
50
  # ${TEDDY_LLM_API_KEY} resolves from .teddy/.env or shell environment.
51
51
 
52
52
  llm:
53
- model: "openrouter/~deepseek/deepseek-flash-latest:nitro"
53
+ model: "openrouter/~deepseek/deepseek-flash-latest"
54
54
  api_key: "${TEDDY_LLM_API_KEY}"
55
55
  max_retries: 3
56
56
  timeout: 300
@@ -35,7 +35,7 @@ Follow these phases and steps in order to systematically deliver verified progre
35
35
  Use `git grep` and file inspection on all targeted components, interfaces, and DTOs. Catalog the delta: skip work that already exists, note remaining work for partially implemented pieces, and add only truly missing pieces as deliverables. Never create deliverables for code that demonstrably exists.
36
36
  6. **Draft Milestone Slices:**
37
37
  Decompose the milestone into end-to-end Vertical Slices. Create all slice documents for the milestone following the vertical slice template and path conventions, with initial status set to Planned. Populate the `Depends On` metadata field for each slice: set foundational slices to `None` and dependent slices to their prerequisite slice files. Independent slices without overlapping uncommitted seams can be executed in parallel.
38
- Place Wiring first as the tracer bullet deliverable (preceded by Env if tooling prerequisites exist), followed by interface, harness, logic, migration, refactor, and cleanup in continuous-green dependency order. For every key unknown, record a one-line Design Sensitivity stating how the design reacts to each resolution.
38
+ Place Wiring first as the tracer bullet deliverable (preceded by Env if tooling prerequisites exist), followed by interface, harness, core, adapter, migration, refactor, and cleanup in continuous-green dependency order. For every key unknown, record a one-line Design Sensitivity stating how the design reacts to each resolution.
39
39
  Edit the active milestone document to link all created slice documents under `## Slices` using unbolded markdown links.
40
40
  7. **Impact Audit:**
41
41
  Run `git grep` on target components. If a component has more than one consumer, categorize it as a Shared Seam and partition the work into non-breaking steps: expand the interface, migrate consumers, then contract obsolete code. Decompose any deliverable touching more than one consumer or layer into smaller atomic items. Resolve stale hits for deleted or renamed components in documentation. Verify that all seam changes have matching harness deliverables.
@@ -17,9 +17,9 @@ Follow these phases and steps in order to systematically deliver verified progre
17
17
  2. **Discovery:**
18
18
  Use `git grep`, file inspection, and targeted research to gather codebase context and artifacts required for implementation. Search the codebase and test suite for existing implementations or coverage of your task to prevent logic and test duplication. If a Case File, MRE script, or Prototype is linked in context, inspect them to understand runtime reality.
19
19
  3. **Plan Initialization / Audit:**
20
- If no slice exists, create one following the vertical slice template and path conventions informed by discovery findings, linking any reference files, placing Wiring first as the tracer bullet, and run `make commit` to version control the new plan.
20
+ If no slice exists, create one following the vertical slice template and path conventions informed by discovery findings, linking any reference files, placing Wiring first as the tracer bullet (or preceded only by prerequisite Env), and run `make commit` to version control the new plan.
21
21
 
22
- If a slice already exists, audit target components via `git grep`. Verify that all deliverables keep all tests passing at every commit. If a deliverable attempts a breaking signature change to a Shared Seam (git grep count greater than 1) without a migration plan, immediately edit the slice to re-partition the work into non-breaking steps (expand -> migrate -> contract). Decompose any item touching more than one logical change into smaller atomic deliverables. Verify Wiring is placed first. If the audit required structural plan changes, run `make commit` to record them before starting work.
22
+ If a slice already exists, audit target components via `git grep`. Verify that all deliverables keep all tests passing at every commit. If a deliverable attempts a breaking signature change to a Shared Seam (git grep count greater than 1) without a migration plan, immediately edit the slice to re-partition the work into non-breaking steps (expand -> migrate -> contract). Decompose any item touching more than one logical change into smaller atomic deliverables. Verify Wiring is placed first (or preceded only by prerequisite Env). If the audit required structural plan changes, run `make commit` to record them before starting work.
23
23
  4. **Activate Slice & Mark Deliverable:**
24
24
  Set slice Status to In Progress. Identify the next uncompleted deliverable in the vertical slice and mark it in progress using `[▶]`. Do not commit this status change separately; commit it alongside the deliverable in the Delivery phase. Batching deliverables into one cycle execution is strictly forbidden.
25
25
 
@@ -27,15 +27,20 @@ Follow these phases and steps in order to systematically deliver verified progre
27
27
  **Goal:** Satisfy the current deliverable requirements via Just-In-Time implementation without overbuilding.
28
28
 
29
29
  1. **Red:**
30
- Map the current deliverable type to its verification strategy:
31
- 1. Wiring (Acceptance, `tests/suites/acceptance/`): MUST establish the End-to-End Skeleton Wiring Tracer Bullet. Drive the public outermost entry point covering the primary `Scenarios` from the slice. Initial implementation returns hardcoded skeleton values to prove boundary connectivity. Do not write acceptance tests for combinatorial edge cases here.
32
- 2. Harness / Migration (Integration, `tests/suites/integration/`): Modifying shared test infrastructure (drivers, observers, fakes) or adapting callers.
33
- 3. Interface / Logic (Unit, `tests/suites/unit/`): Isolated core logic covering granular `Edge Cases` and invariants.
34
- 4. Refactor (Unit / Integration): Do NOT write new tests. Existing test coverage must remain green while improving code structure.
35
- 5. Cleanup: Do NOT write new tests. The Red step verifies that existing tests pass (`make test`). The Green step deletes dead code, obsolete methods, or temporary shims and confirms the suite remains green.
36
- 6. Env (Declarative / Tooling): For purely declarative files (Makefile, CI workflows, hooks, .gitignore), do NOT write throwaway test scripts. The Red step is executing the target command directly to observe failure/absence; the Green step is applying the declarative change and observing it succeed.
30
+ Tests must run fast, deterministically, and hermetically without network access or sleep calls. Use isolated temporary directories for filesystem access, and use in-memory fakes or synchronous drivers instead of timers or remote resources.
37
31
 
38
- For deliverables requiring tests (Wiring, Harness, Migration, Interface, Logic), create or locate the appropriate test file. Set up the test function using the Test Harness (Setup: Fixtures and Arrange, Driver: Act, Observer: Assert). Use parameterized tests for data permutations.
32
+ Map the current deliverable type to its verification strategy:
33
+ 1. Wiring (Acceptance, `tests/suites/acceptance/`): Establish the End-to-End Skeleton Wiring Tracer Bullet. Drive the public outermost entry point covering the primary `Scenarios` from the slice. Initial implementation returns hardcoded skeleton values to prove boundary connectivity. Do not write acceptance tests for combinatorial edge cases here.
34
+ 2. Interface (Unit, `tests/suites/unit/`): Define port signatures, protocols, DTOs, and schemas. Write contract and validation tests.
35
+ 3. Harness (Unit / Integration): Build or update shared test infrastructure (drivers, observers, in-memory fakes, fixtures). Write Unit tests for pure in-memory fakes; write Integration tests if doubles interact with the filesystem, subprocesses, or databases.
36
+ 4. Core (Unit, `tests/suites/unit/`): Isolated domain logic covering granular `Edge Cases` and business invariants.
37
+ 5. Adapter (Integration, `tests/suites/integration/`): Real infrastructure implementations (filesystem, CLI, subprocess, database, external protocols) tested against local resources.
38
+ 6. Migration: Adapting existing consumers to new contracts. Do not write new behavioral test files; update existing caller tests to match revised signatures while preserving coverage.
39
+ 7. Refactor: Improving internal code design without altering behavior. Do not write new tests; the full existing test suite must remain green throughout.
40
+ 8. Cleanup: Removing obsolete methods, dead code, or temporary shims. Do not write new tests; delete superseded tests and confirm the remaining suite passes.
41
+ 9. Env (Declarative / Tooling): For purely declarative files (Makefile, CI workflows, hooks, .gitignore), do not write test scripts. The Red step executes the command directly to observe failure or absence; the Green step applies the declarative change and confirms success.
42
+
43
+ For deliverables requiring tests (Wiring, Interface, Harness, Core, Adapter), create or locate the appropriate test file. Set up the test function using the Test Harness (Setup: Fixtures and Arrange, Driver: Act, Observer: Assert). Use parameterized tests for data permutations.
39
44
 
40
45
  Enforce Test Double Integrity (Ban Global Patching): global `mock.patch` and bare `MagicMock` are strictly forbidden; inject all test doubles via Constructor Injection. Use In-Memory Fakes for internal state (databases, caches). Use strictly bound mocks (such as `register_mock` or `autospec=True`) ONLY for un-fakeable external side-effects (APIs, SMTP) to prevent signature drift.
41
46
 
@@ -45,7 +50,9 @@ Follow these phases and steps in order to systematically deliver verified progre
45
50
 
46
51
  If the current deliverable is Wiring, you MUST use hardcoded or trivial return values (the End-to-End Skeleton Wiring Tracer Bullet) to connect components across boundaries and force the Acceptance test Green. Do not implement complex business rules yet.
47
52
 
48
- If the current deliverable is Logic, use Unit Tests to drive out real business rules covering `Edge Cases` and invariants, systematically swapping out skeleton responses and temporary fakes with real production logic while keeping acceptance tests green.
53
+ If the current deliverable is Core, drive out real business rules covering `Edge Cases` and invariants, systematically replacing skeleton responses with real domain logic while keeping acceptance tests green.
54
+
55
+ If the current deliverable is Adapter, implement the real infrastructure integration, replacing temporary harness doubles where appropriate while keeping all suites green.
49
56
 
50
57
  Enforce Contract Enforcement (DbC): contracts require active runtime checks via native assertions (`assert condition, "Message"`). Do not use custom exceptions or raises for contract assertions so they can be optimized via `python -O`. State explicitly which contract condition failed.
51
58
  3. **Refactor:**
@@ -74,7 +81,7 @@ Follow these phases and steps in order to systematically deliver verified progre
74
81
  - **Structural Refactoring:**
75
82
  if refactoring requires cross-cutting or structural changes outside the slice scope, record it in the roadmap in `docs/project/PROJECT.md` rather than attempting out-of-scope rewrites.
76
83
  4. **Loop Exit:**
77
- If the implementation fully satisfies the single current deliverable, exit the inner loop and proceed immediately to the Integration phase. You are strictly forbidden from changing your active deliverable or starting a new one until the current one is committed.
84
+ If the implementation fully satisfies the single current deliverable, exit the inner loop and proceed immediately to the Integration phase.
78
85
 
79
86
  ### Integration
80
87
  **Goal:** Continuous integration gate scoped at the deliverable level.
@@ -104,7 +111,7 @@ Follow these phases and steps in order to systematically deliver verified progre
104
111
  4. **Stale Reference Check:**
105
112
  If this is the last deliverable, run `git grep` for deleted or renamed components and resolve stale references in documentation and comments.
106
113
  5. **Delivery Gate:**
107
- Upon completing all documentation steps, proceed immediately to the Delivery phase. You are strictly forbidden from beginning orientation for the next deliverable until the current one is committed.
114
+ Upon completing all documentation steps, proceed immediately to the Delivery phase.
108
115
 
109
116
  ### Delivery
110
117
  **Goal:** Clean workspace and commit the individual deliverable.
@@ -36,7 +36,7 @@ Follow these phases and steps in order to systematically deliver verified progre
36
36
  3. **Milestone & Specification:**
37
37
  For systemic or milestone features, update the Roadmap in `docs/project/PROJECT.md` and route to the Architect. If establishing permanent system invariants, CREATE or EDIT the specification document following the specification template and path conventions. The Architect will initialize the milestone document and draft all slices.
38
38
  4. **Ad-hoc Slice Generation:**
39
- For standalone behavioral work, CREATE an ad-hoc slice following the vertical slice template and path conventions, placing Wiring first as the tracer bullet. If it contains unresolved technical or functional unknowns, target the Prototyper; if patterns and behavior are established, target the Developer.
39
+ For standalone behavioral work, CREATE an ad-hoc slice following the vertical slice template and path conventions, placing Wiring first as the tracer bullet (or preceded only by prerequisite Env). If it contains unresolved technical or functional unknowns, target the Prototyper; if patterns and behavior are established, target the Developer.
40
40
  5. **Case File Generation:**
41
41
  For bug reports or regressions, CREATE a Case File following the case file template and path conventions for the Debugger.
42
42
 
@@ -38,7 +38,7 @@ Follow these phases and steps in order to systematically deliver verified progre
38
38
  1. **Impact and Debt Audit:**
39
39
  Run EXECUTE `git grep` on target components. If a modified component has more than one consumer, treat it as a Shared Seam and structure deliverables as non-breaking steps: expand the interface, migrate consumers, then contract obsolete code. Verify that all contract changes include matching harness deliverables.
40
40
  2. **Artifact Updates:**
41
- EDIT the Vertical Slice to reflect validated scenarios, edge cases, implementation deliverables, and verification steps. Place Wiring first as the tracer bullet deliverable, followed by contract, logic, refactoring, and harness deliverables. Mark resolved unknowns as completed, link the prototype directory in the slice metadata, and set status to Planned. EDIT linked Component Design Docs and specifications to reflect as-tested contracts, parameters, and invariants discovered during prototyping.
41
+ EDIT the Vertical Slice to reflect validated scenarios, edge cases, implementation deliverables, and verification steps. Place Wiring first as the tracer bullet deliverable (preceded by Env if tooling prerequisites exist), followed by interface, harness, core, adapter, migration, refactor, and cleanup deliverables. Mark resolved unknowns as completed, link the prototype directory in the slice metadata, and set status to Planned. EDIT linked Component Design Docs and specifications to reflect as-tested contracts, parameters, and invariants discovered during prototyping.
42
42
 
43
43
  ### Conclusion
44
44
  **Goal:** Clean workspace, commit changes, push, and hand off to the Developer.
@@ -10,7 +10,7 @@ This section defines foundational engineering practices. Each entry MUST be a sp
10
10
  - **Version Control:** Branch strategy and commit conventions. Every commit MUST pass the full test suite before and after each change (`make test`). Commit locally per deliverable; defer the push to the session Conclusion and report CI results back (blocking only on failures the push introduced).
11
11
  - **Run Environment:** Designated runner (e.g., `uv run`, `poetry run`).
12
12
  - **Failure Transparency:** Error handling policy — specific exceptions only, no silent suppression.
13
- - **Testing Strategy:** Define test types (Unit, Integration, Acceptance), boundaries, and filesystem hygiene. Mandate **Test Double Integrity**. Ban global patching. Use in-memory fakes for state-managing outbound ports. Use strictly autospec-bound mocks only for external side-effects.
13
+ - **Testing Strategy:** Define test types across three suites: Unit (`tests/suites/unit/` for isolated core domain logic and schemas), Integration (`tests/suites/integration/` for infrastructure adapters and stateful fakes running against local isolated resources), and Acceptance (`tests/suites/acceptance/` for outer boundary user journeys). Tests must be fast, deterministic, hermetic, and offline with zero real network calls or sleep statements. Mandate Test Double Integrity: ban global patching, use in-memory fakes for state-managing outbound ports, and use strictly autospec-bound mocks only for external side-effects.
14
14
  - **Runtime Contract Assertions:** Enforce Design-by-Contract with native `assert condition, "message"` for pre/post-conditions and invariants (strippable via `python -O`); never custom exceptions for contract checks.
15
15
  - **Dependency Injection:** Constructor injection mandate; forbid Service Locator and global containers.
16
16
  - **Centralized Configuration:** Config file location, prohibition of magic numbers.
@@ -32,7 +32,7 @@ Then [expected outcome]
32
32
  ```
33
33
 
34
34
  ## Edge Cases
35
- Boundary conditions, errors, and validation edge cases. These drive granular Unit Tests in Logic deliverables.
35
+ Boundary conditions, errors, and validation edge cases. These drive granular Unit Tests in Core deliverables.
36
36
  - **Title**: If [condition], then [behavior], because [reason/invariant].
37
37
 
38
38
  ## Key Unknowns
@@ -64,24 +64,27 @@ Map affected components using non-breaking steps (expand -> migrate -> contract)
64
64
  ## Deliverables
65
65
 
66
66
  **Types:**
67
- - **Env:** Declarative tooling, build files, CI workflows, hooks, or config templates.
68
- - **Wiring:** Outermost boundary tracer bullet returning skeleton/fake data to connect layers end-to-end.
69
- - **Interface:** Signatures, ports, interfaces, DTOs, domain models.
70
- - **Harness:** Modifying or extending shared test infrastructure (Drivers, Observers, Fakes, Setup fixtures).
71
- - **Logic:** Core domain logic and business rules driven by unit tests, systematically replacing skeleton returns and temporary fakes with real implementations.
67
+ - **Env:** Declarative tooling, build files, CI workflows, hooks, or package dependencies.
68
+ - **Wiring:** Outermost boundary tracer bullet returning skeleton data to connect layers end-to-end.
69
+ - **Interface:** Signatures, ports, interfaces, DTOs, and domain models.
70
+ - **Harness:** Shared test infrastructure (drivers, observers, in-memory fakes, and fixtures).
71
+ - **Core:** Domain entities, business rules, workflows, and algorithmic invariants driven by unit tests.
72
+ - **Adapter:** Real infrastructure implementations (filesystem, CLI, subprocess, database, external protocols) driven by integration tests.
72
73
  - **Migration:** Adapting existing consumers to new contracts.
73
- - **Refactor:** Improving code design without altering behavior. Requires no new tests; existing tests must remain green while pruning brittle or flaky tests.
74
- - **Cleanup:** Removing deprecated methods, dead code, and temporary shims. Requires no new tests; verified by the existing suite remaining green.
74
+ - **Refactor:** Improving code design without altering behavior. Requires no new tests; existing tests remain green.
75
+ - **Cleanup:** Removing deprecated methods, dead code, and temporary shims. Requires no new tests; verified by pruning obsolete tests while the suite stays green.
75
76
 
76
- **Order:** Order deliverables to keep all tests passing at every commit (`make test`). `(Env)` is placed first whenever tooling or environment setup is a prerequisite:
77
- `(Env) -> Wiring -> Interface -> Harness -> Logic -> Migration -> Refactor -> Cleanup`
77
+ **Order:** Order deliverables to keep all tests passing at every commit (`make test`). Include Env before Wiring only when tooling or package prerequisites must exist for tests to run:
78
+ `(Env) -> Wiring -> Interface -> Harness -> Core -> Adapter -> Migration -> Refactor -> Cleanup`
78
79
 
79
80
  **Tests:** Do not specify individual tests in deliverables. Scenarios and Edge Cases must define test requirements.
80
81
 
81
82
  **Format:**
82
83
  - [ ] **Wiring** - Connect outermost boundaries with skeleton response.
83
84
  - [ ] **Interface** - Define port interfaces and DTOs.
84
- - [ ] **Logic** - Implement business logic replacing skeleton responses.
85
+ - [ ] **Harness** - Build or update shared test doubles and fixtures.
86
+ - [ ] **Core** - Implement domain logic and invariants.
87
+ - [ ] **Adapter** - Implement infrastructure adapter.
85
88
 
86
89
  ## Implementation Notes
87
90
  Free-form notes recording decisions, deviations, or discoveries during implementation.