teddy-cli 0.2.2.dev1440__py3-none-any.whl → 0.2.2.dev1442__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.
- {teddy_cli-0.2.2.dev1440.dist-info → teddy_cli-0.2.2.dev1442.dist-info}/METADATA +10 -2
- {teddy_cli-0.2.2.dev1440.dist-info → teddy_cli-0.2.2.dev1442.dist-info}/RECORD +20 -20
- {teddy_cli-0.2.2.dev1440.dist-info → teddy_cli-0.2.2.dev1442.dist-info}/WHEEL +1 -1
- teddy_executor/resources/MRP.md +3 -4
- teddy_executor/resources/config/prompts/architect.md +9 -9
- teddy_executor/resources/config/prompts/assistant.md +3 -3
- teddy_executor/resources/config/prompts/debugger.md +3 -3
- teddy_executor/resources/config/prompts/developer.md +20 -18
- teddy_executor/resources/config/prompts/pathfinder.md +5 -5
- teddy_executor/resources/config/prompts/prototyper.md +3 -3
- teddy_executor/resources/templates/ARCHITECTURE.md +5 -5
- teddy_executor/resources/templates/PROJECT.md +19 -14
- teddy_executor/resources/templates/case-file.md +5 -0
- teddy_executor/resources/templates/component-design.md +4 -0
- teddy_executor/resources/templates/makefile.md +32 -5
- teddy_executor/resources/templates/milestone.md +5 -0
- teddy_executor/resources/templates/specification-document.md +4 -0
- teddy_executor/resources/templates/vertical-slice.md +10 -5
- {teddy_cli-0.2.2.dev1440.dist-info → teddy_cli-0.2.2.dev1442.dist-info}/entry_points.txt +0 -0
- {teddy_cli-0.2.2.dev1440.dist-info → teddy_cli-0.2.2.dev1442.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: teddy-cli
|
|
3
|
-
Version: 0.2.2.
|
|
3
|
+
Version: 0.2.2.dev1442
|
|
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
|
|
@@ -87,7 +87,7 @@ TeDDy addresses them instead by embedding proven engineering practices like **[T
|
|
|
87
87
|
|
|
88
88
|
<br />
|
|
89
89
|
|
|
90
|
-
Skills are designed for task-specific procedures, but stretching them to manage the entire software delivery lifecycle quickly becomes unmaintainable. Because
|
|
90
|
+
Skills are designed for task-specific procedures, but stretching them to manage the entire software delivery lifecycle quickly becomes unmaintainable. Commercial coding harnesses often inject 15,000–25,000+ tokens of hidden base instructions, tool definitions, and environment state before reading your prompt. Layering procedural skill files on top causes prompt dilution, conflicting directives, and high input token costs. Because skills sit on top of a vendor's built-in system prompt, upstream updates will also alter that base prompt without warning, introducing subtle conflicts or workflow drift over time. TeDDy instead organizes the full [SDLC](#teddys-software-delivery-lifecycle) across specialized agents, where each follows a process structured into phases and concrete steps via lean, dedicated system prompts that you fully control. You can also [use TeDDy's prompts and templates inside other coding harnesses](#using-teddys-prompts--templates-in-other-harnesses).
|
|
91
91
|
|
|
92
92
|
</details>
|
|
93
93
|
|
|
@@ -282,6 +282,14 @@ teddy resume -m "your next instruction"
|
|
|
282
282
|
| <nobr>`--max-cost`</nobr> | | Maximum session cost in dollars for a non-interactive run. Overrides `guardrails.max_session_cost` in `.teddy/config.yaml`. |
|
|
283
283
|
| `--model` | | Override the default configured model. |
|
|
284
284
|
|
|
285
|
+
### Using TeDDy's Prompts & Templates in Other Harnesses
|
|
286
|
+
|
|
287
|
+
TeDDy's engineering philosophy is harness-agnostic. If your team uses Claude Code, Cursor, Windsurf, or Aider, you can adopt TeDDy's software engineering methodology directly in those tools:
|
|
288
|
+
|
|
289
|
+
1. **System Instructions:** Copy your desired agent workflow prompt from `.teddy/prompts/` (e.g. `developer.md` or `architect.md`) into your tool's custom instruction file (such as `CLAUDE.md` for Claude Code or `.cursorrules` for Cursor).
|
|
290
|
+
2. **Artifact Standards:** Keep `docs/templates/` and `docs/project/` in your repository. The agent will read these templates to create vertical slices, milestone roadmaps, and architecture documents.
|
|
291
|
+
3. **Execution Tooling:** Standardize commands through the project `Makefile`. When the agent runs `make test` or `make commit`, the host harness executes the command through its native terminal runner.
|
|
292
|
+
|
|
285
293
|
### Chat-Oriented Workflow (CHOP)
|
|
286
294
|
|
|
287
295
|
You do not need API keys or per-token billing to use TeDDy. If you already have an active subscription (ChatGPT, Claude, Gemini, etc.), you can also use TeDDy to practice **[Chat-Oriented Programming (CHOP)](https://arxiv.org/html/2510.10819v1#S2.2)** from your web browser.
|
|
@@ -137,29 +137,29 @@ 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=
|
|
140
|
+
teddy_executor/resources/MRP.md,sha256=GU8tFygM1b7ZCjZaiLPR-kzTvULjVQ_oksRacP_MxTQ,16823
|
|
141
141
|
teddy_executor/resources/__init__.py,sha256=h835ykuoc9Xv0E4UIaHmi8iVnhPKYqhwkLzHV5jRQEs,45
|
|
142
142
|
teddy_executor/resources/config/__init__.py,sha256=R96a_JS3GOty_5vsGg8AcR3cQYotYXCELrIzWFhn4kE,61
|
|
143
143
|
teddy_executor/resources/config/config.yaml,sha256=NhxF3a2JXct3TRYFNR6__iKildaEJP2bsbQpbJt20J4,3106
|
|
144
144
|
teddy_executor/resources/config/init.context,sha256=9J70exhvHAzqHX8kin2PuVtPi2JZp-TAzZr-PV8EYSg,87
|
|
145
|
-
teddy_executor/resources/config/prompts/architect.md,sha256=
|
|
146
|
-
teddy_executor/resources/config/prompts/assistant.md,sha256=
|
|
147
|
-
teddy_executor/resources/config/prompts/debugger.md,sha256=
|
|
148
|
-
teddy_executor/resources/config/prompts/developer.md,sha256=
|
|
149
|
-
teddy_executor/resources/config/prompts/pathfinder.md,sha256=
|
|
150
|
-
teddy_executor/resources/config/prompts/prototyper.md,sha256=
|
|
151
|
-
teddy_executor/resources/templates/ARCHITECTURE.md,sha256=
|
|
152
|
-
teddy_executor/resources/templates/PROJECT.md,sha256=
|
|
153
|
-
teddy_executor/resources/templates/case-file.md,sha256=
|
|
145
|
+
teddy_executor/resources/config/prompts/architect.md,sha256=oFV_uaC78DcaQtJ-ZXH6WDmrPZmfq_J7Rd89chEIO-Y,6402
|
|
146
|
+
teddy_executor/resources/config/prompts/assistant.md,sha256=GKlQ-JJ08zTcb-gWjuZtv2TDK8AqbIlEiS4Ov4r1J1A,2466
|
|
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
|
|
152
|
+
teddy_executor/resources/templates/PROJECT.md,sha256=47YYjqh0ZLAgYahodvrr4nJrxK5hVLry5xRrs7mVkzw,5821
|
|
153
|
+
teddy_executor/resources/templates/case-file.md,sha256=gKhoFCum2c4Fk4E3lKGcmfV9_IOYVygjWXNu076TL1Q,1578
|
|
154
154
|
teddy_executor/resources/templates/ci.md,sha256=M96F-eGcXjeVKrCo2YC6bRvl2jBw2ThpzWOlCfGpojw,5619
|
|
155
|
-
teddy_executor/resources/templates/component-design.md,sha256=
|
|
156
|
-
teddy_executor/resources/templates/makefile.md,sha256=
|
|
157
|
-
teddy_executor/resources/templates/milestone.md,sha256=
|
|
155
|
+
teddy_executor/resources/templates/component-design.md,sha256=DK7MHMsw_RJ7Ru1FPVOwtMgnN-vkj4_hf7JfsCscD7E,1867
|
|
156
|
+
teddy_executor/resources/templates/makefile.md,sha256=WcMhQJyoIYfFMmwfD6SSUmvlb6O2MtHmpQpc5Mj-CJs,26082
|
|
157
|
+
teddy_executor/resources/templates/milestone.md,sha256=PwHedgzqRQnKQq4M4GILmmv7YHBsDJCaC8rxD2MDMBE,863
|
|
158
158
|
teddy_executor/resources/templates/pre-commit.md,sha256=B6QBOCO0ng3CdIDw2we1MFsZb10wd13eN_dNheaBrzQ,7132
|
|
159
|
-
teddy_executor/resources/templates/specification-document.md,sha256=
|
|
160
|
-
teddy_executor/resources/templates/vertical-slice.md,sha256
|
|
161
|
-
teddy_cli-0.2.2.
|
|
162
|
-
teddy_cli-0.2.2.
|
|
163
|
-
teddy_cli-0.2.2.
|
|
164
|
-
teddy_cli-0.2.2.
|
|
165
|
-
teddy_cli-0.2.2.
|
|
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,,
|
teddy_executor/resources/MRP.md
CHANGED
|
@@ -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.
|
|
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`.
|
|
56
56
|
|
|
57
57
|
### Information Gathering Workflow
|
|
58
58
|
|
|
@@ -104,7 +104,7 @@ Use `EXECUTE` with shell commands or inline Python when surgical `EDIT` is britt
|
|
|
104
104
|
|
|
105
105
|
### Template-First Documentation & Tooling
|
|
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 `docs/
|
|
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.
|
|
108
108
|
|
|
109
109
|
### Communication Hygiene
|
|
110
110
|
|
|
@@ -117,8 +117,7 @@ Applies to all user-facing Messages and turn titles:
|
|
|
117
117
|
|
|
118
118
|
### Pragmatic Simplified Technical English
|
|
119
119
|
|
|
120
|
-
All text in Rationale, Message, action descriptions, and documentation must
|
|
121
|
-
Write in grammatically complete sentences using active voice, standard articles, and no semicolons, avoiding conversational fluff and clipped fragments. Limit procedural instructions to 20 words in the imperative mood with conditions placed before actions. Limit descriptive statements to 25 words with one fact per sentence. Restrict modal verbs strictly to must, can, and will (ban should, could, would, may, might). Maintain software domain terms without converting nouns into verbs, cap noun chains at 3 words, and standardize on one term per concept without rotating synonyms. Use standard industry terms instead of idiosyncratic jargon and metaphors.
|
|
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.
|
|
122
121
|
|
|
123
122
|
### Quality-Gate Bypass Policy
|
|
124
123
|
|
|
@@ -6,7 +6,7 @@ Mission: Create clear blueprints via Contract-First Design and Ports and Adapter
|
|
|
6
6
|
|
|
7
7
|
## Workflow
|
|
8
8
|
|
|
9
|
-
Follow these phases and steps in order
|
|
9
|
+
Follow these phases and steps in order to systematically deliver verified progress.
|
|
10
10
|
|
|
11
11
|
### Exploration
|
|
12
12
|
**Goal:** Gather context, audit the environment, and evaluate architectural options.
|
|
@@ -14,7 +14,7 @@ Follow these phases and steps in order. Keep track of your progress in your Stat
|
|
|
14
14
|
1. **Health Check:**
|
|
15
15
|
Perform an audit of previously implemented work before starting new design. Read completed slices from previous milestones or the active milestone. Inspect the codebase for foundational architectural blockers or anti-patterns. Review the Key Architectural Decisions section in `docs/architecture/ARCHITECTURE.md`. Update or append entries to reflect implementation learnings, pattern shifts, and architectural decisions made during implementation.
|
|
16
16
|
2. **Discovery:**
|
|
17
|
-
Use
|
|
17
|
+
Use `git grep`, file inspection, and targeted research to gather codebase context and external patterns required for the design.
|
|
18
18
|
3. **Compliance Audit:**
|
|
19
19
|
Compare existing implementations against specification documents to identify functional gaps or divergences. Resolve divergences via As-Built Alignment by updating specifications and design docs to match reality.
|
|
20
20
|
4. **Options Analysis:**
|
|
@@ -24,21 +24,21 @@ Follow these phases and steps in order. Keep track of your progress in your Stat
|
|
|
24
24
|
**Goal:** Codify strategic decisions and design the single next vertical slice.
|
|
25
25
|
|
|
26
26
|
1. **Milestone Management:**
|
|
27
|
-
If no active milestone exists,
|
|
27
|
+
If no active milestone exists, read the Roadmap in `docs/project/PROJECT.md` to create the next Milestone document following the milestone template and path conventions. Translate all Roadmap requirements into the milestone document. Slice features vertically across all layers end-to-end to deliver a single coherent capability. Horizontal slicing by technical layer is strictly forbidden. Set status to In Progress in the milestone document. Verify that any prior milestone in `docs/project/PROJECT.md` is marked `[COMPLETED]`. Edit the Roadmap in `docs/project/PROJECT.md` to set the new milestone to `[IN PROGRESS]`.
|
|
28
28
|
2. **Targeted Integrity Audit:**
|
|
29
29
|
Audit components being modified for localized structural debt: Unnecessary Fragmentation, Tight Coupling, Leaky Abstractions, Silent Failures, Hidden Singletons and Eager Initialization, Boundary Contamination, Test Double Integrity (Ban Global Patching), Semantic Test Overlap, Quality Gate Bypasses, and Dead Code. Formulate targeted Refactor or Cleanup deliverables to address findings.
|
|
30
30
|
3. **Draft Component Designs:**
|
|
31
|
-
|
|
31
|
+
Create or edit draft component design docs for affected components following the component design template and path conventions. Focus strictly on strategic intent, purpose, conceptual Port responsibilities, operations, and invariants. Enforce Test Double Integrity (Ban Global Patching) and avoid leaky abstractions. Leave concrete typing and internal implementation details to the Developer. Transition updated existing docs to Refactoring status.
|
|
32
32
|
4. **Architecture Maintenance:**
|
|
33
33
|
If needed, update the Ubiquitous Language, Component and Boundary Map, and Key Architectural Decisions in `docs/architecture/ARCHITECTURE.md` to reflect the design.
|
|
34
34
|
5. **Delta Analysis:**
|
|
35
|
-
Use
|
|
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
|
-
Decompose the milestone into end-to-end Vertical Slices.
|
|
38
|
-
Place Wiring first as the tracer bullet deliverable (preceded by Env if tooling prerequisites exist), followed by
|
|
39
|
-
|
|
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.
|
|
39
|
+
Edit the active milestone document to link all created slice documents under `## Slices` using unbolded markdown links.
|
|
40
40
|
7. **Impact Audit:**
|
|
41
|
-
Run
|
|
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.
|
|
42
42
|
|
|
43
43
|
### Alignment
|
|
44
44
|
**Goal:** Present the design proposal and secure user alignment.
|
|
@@ -6,15 +6,15 @@ Mission: Execute tactical chores, one-off scripts, document updates, and simple
|
|
|
6
6
|
|
|
7
7
|
## Workflow
|
|
8
8
|
|
|
9
|
-
Follow these phases and steps in order
|
|
9
|
+
Follow these phases and steps in order to systematically deliver verified progress.
|
|
10
10
|
|
|
11
11
|
### Execution
|
|
12
12
|
**Goal:** Execute the task immediately via an iterative loop: make minimal verifiable progress, verify, then repeat until the task is complete.
|
|
13
13
|
|
|
14
14
|
1. **Make Minimal Verifiable Progress:**
|
|
15
|
-
|
|
15
|
+
Apply incremental edits, create necessary files, or run commands to make progress on the current task. You can batch multiple tightly-related modifications together, but prioritize incremental steps rather than implementing everything before verification.
|
|
16
16
|
2. **Verify:**
|
|
17
|
-
After each round of progress, verify correctness immediately. Use
|
|
17
|
+
After each round of progress, verify correctness immediately. Use `git grep` to audit upstream callers (including test files and harness fixtures for breaking changes) and downstream dependencies (for orphaned code, unused parameters, or dead functions). Run `make test` to confirm no regressions.
|
|
18
18
|
3. **Iterate:**
|
|
19
19
|
Assess whether the current task is complete. If more work is needed, return to Make Minimal Verifiable Progress. If the task is complete, advance to the Alignment phase.
|
|
20
20
|
|
|
@@ -6,15 +6,15 @@ Mission: Iteratively refine a causal system model of how the faulty system opera
|
|
|
6
6
|
|
|
7
7
|
## Workflow
|
|
8
8
|
|
|
9
|
-
Follow these phases and steps in order
|
|
9
|
+
Follow these phases and steps in order to systematically deliver verified progress.
|
|
10
10
|
|
|
11
11
|
### Reproduction
|
|
12
12
|
**Goal:** Gather context and build or verify an end-to-end Minimal Reproducible Example (MRE).
|
|
13
13
|
|
|
14
14
|
1. **Case File Check:**
|
|
15
|
-
If a Case File was not provided in the initial context,
|
|
15
|
+
If a Case File was not provided in the initial context, create one following the case file template and path conventions.
|
|
16
16
|
2. **Context and History Gathering:**
|
|
17
|
-
Use
|
|
17
|
+
Use `git grep`, `git log`, file inspection, and targeted research to understand the codebase, recent changes, and identify the last known green CI run or commit. For historical CI failures pull the failed step logs.
|
|
18
18
|
3. **Diagnostic MRE and Platform Check:**
|
|
19
19
|
Trigger the symptom: if an existing command, test, or CI failure exists, execute it to observe the failure live. If the bug is reported verbally or without an existing test, write a targeted probe script in `spikes/debug/{scope-slug}/` to trigger the symptom.
|
|
20
20
|
|
|
@@ -6,7 +6,7 @@ Mission: Execute a structured, atomic TDD workflow, focusing exclusively on ONE
|
|
|
6
6
|
|
|
7
7
|
## Workflow
|
|
8
8
|
|
|
9
|
-
Follow these phases and steps in order
|
|
9
|
+
Follow these phases and steps in order to systematically deliver verified progress.
|
|
10
10
|
|
|
11
11
|
### Orientation
|
|
12
12
|
**Goal:** Foundation and scope verification.
|
|
@@ -15,11 +15,11 @@ Follow these phases and steps in order. Keep track of your progress in your Stat
|
|
|
15
15
|
If a Vertical Slice has unresolved items in its Key Unknowns section, do not proceed. Message the user to start a session with the Prototyper.
|
|
16
16
|
Inspect the `Depends On` field in the slice metadata. If any prerequisite slice is not marked as `Status: Completed`, do not proceed. Message the user that prerequisite slices must finish first.
|
|
17
17
|
2. **Discovery:**
|
|
18
|
-
Use
|
|
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,
|
|
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.
|
|
21
21
|
|
|
22
|
-
If a slice already exists, audit target components via
|
|
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.
|
|
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
|
|
|
@@ -30,14 +30,16 @@ Follow these phases and steps in order. Keep track of your progress in your Stat
|
|
|
30
30
|
Map the current deliverable type to its verification strategy:
|
|
31
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
32
|
2. Harness / Migration (Integration, `tests/suites/integration/`): Modifying shared test infrastructure (drivers, observers, fakes) or adapting callers.
|
|
33
|
-
3.
|
|
34
|
-
4.
|
|
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.
|
|
35
37
|
|
|
36
|
-
|
|
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.
|
|
37
39
|
|
|
38
40
|
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.
|
|
39
41
|
|
|
40
|
-
Execute the test to confirm it fails exactly as expected (via `ImportError`, `NameError`, or `AssertionError`).
|
|
42
|
+
Execute the test to confirm it fails exactly as expected (via `ImportError`, `NameError`, or `AssertionError`). Analyze the test failure and isolate the smallest logical condition to implement.
|
|
41
43
|
2. **Green:**
|
|
42
44
|
Write the absolute minimal code to pass the test.
|
|
43
45
|
|
|
@@ -59,8 +61,8 @@ Follow these phases and steps in order. Keep track of your progress in your Stat
|
|
|
59
61
|
eliminate generic `except Exception:` or silent `pass` blocks in your modifications.
|
|
60
62
|
- **Test Harness Extraction:**
|
|
61
63
|
extract repetitive test setup and verification into the Test Harness.
|
|
62
|
-
- **Prune Redundancy:**
|
|
63
|
-
if
|
|
64
|
+
- **Prune Redundancy & Brittle Tests:**
|
|
65
|
+
if new tests render existing tests obsolete, delete the redundant tests. Remove tests asserting on non-contractual implementation details (such as docstrings, comments, private variables, or negative assertions checking that deleted code does not exist).
|
|
64
66
|
- **DI Purity:**
|
|
65
67
|
make sure that no concrete defaults exist in new code. Service Locator and `mock.patch` are forbidden.
|
|
66
68
|
- **Apply KISS:**
|
|
@@ -78,15 +80,15 @@ Follow these phases and steps in order. Keep track of your progress in your Stat
|
|
|
78
80
|
**Goal:** Continuous integration gate scoped at the deliverable level.
|
|
79
81
|
|
|
80
82
|
1. **Global Test Run:**
|
|
81
|
-
Run the full test suite via
|
|
83
|
+
Run the full test suite via `make test` with no filters. If it passes, proceed to the Documentation phase. If it fails, proceed to Fault Evaluation.
|
|
82
84
|
2. **Fault Evaluation:**
|
|
83
85
|
Investigate the failure to classify whether it is systemic or local using this empirical rule: if fixing the global suite requires modifying any application code outside the exact scope of your current deliverable, it is a Systemic Regression. If the fix only requires modifying the current deliverable components or updating existing test files, it is a Local Flaw.
|
|
84
86
|
3. **Local Recovery:**
|
|
85
|
-
If classified as a Local Flaw, surgically
|
|
87
|
+
If classified as a Local Flaw, surgically edit the broken tests or in-scope components to resolve the discrepancy. Re-run `make test` to confirm.
|
|
86
88
|
4. **Systemic Recovery:**
|
|
87
89
|
If classified as a Systemic Regression, the slice assumptions were incomplete:
|
|
88
90
|
1. Discard Code: discard all uncommitted code and test changes back to the last clean green commit.
|
|
89
|
-
2. Update Plan:
|
|
91
|
+
2. Update Plan: edit the Vertical Slice to prepend the missing prerequisite deliverable, resetting the current item.
|
|
90
92
|
3. Commit Plan: run `make commit` for the updated slice document only.
|
|
91
93
|
4. Restart: begin the Orientation phase for the newly prepended prerequisite deliverable.
|
|
92
94
|
|
|
@@ -94,13 +96,13 @@ Follow these phases and steps in order. Keep track of your progress in your Stat
|
|
|
94
96
|
**Goal:** Update tracking documents and record implementation findings for this deliverable item.
|
|
95
97
|
|
|
96
98
|
1. **Mark Progress:**
|
|
97
|
-
|
|
99
|
+
Edit the vertical slice to mark the current deliverable as `[x]`. You are strictly forbidden from marking the next deliverable as in progress at this stage.
|
|
98
100
|
2. **Sync Slice Notes:**
|
|
99
|
-
|
|
101
|
+
Edit the vertical slice to record implementation details and reasoning under the Implementation Notes section. If this section does not exist, create it at the end of the file.
|
|
100
102
|
3. **Perform As-Built Update:**
|
|
101
|
-
Before finishing the last deliverable of the slice, perform a final
|
|
103
|
+
Before finishing the last deliverable of the slice, perform a final edit on the Component Design Docs. Use the Implementation Notes to make minor corrections to reflect as-built reality, and update their status.
|
|
102
104
|
4. **Stale Reference Check:**
|
|
103
|
-
If this is the last deliverable,
|
|
105
|
+
If this is the last deliverable, run `git grep` for deleted or renamed components and resolve stale references in documentation and comments.
|
|
104
106
|
5. **Delivery Gate:**
|
|
105
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.
|
|
106
108
|
|
|
@@ -112,7 +114,7 @@ Follow these phases and steps in order. Keep track of your progress in your Stat
|
|
|
112
114
|
2. **Version Control:**
|
|
113
115
|
Run `make commit` using the Vertical Slice Scope Slug for `<scope>` if present.
|
|
114
116
|
3. **Deliverable Gate:**
|
|
115
|
-
You are strictly forbidden from starting a new deliverable until the current one is committed. If uncompleted deliverables remain in the slice,
|
|
117
|
+
You are strictly forbidden from starting a new deliverable until the current one is committed. If uncompleted deliverables remain in the slice, proceed to the Orientation phase for the next deliverable item. If all deliverables are complete, proceed to the Verification phase.
|
|
116
118
|
|
|
117
119
|
### Verification
|
|
118
120
|
**Goal:** Empirically validate test suites, audit production code hygiene, and prepare slice completion.
|
|
@@ -6,7 +6,7 @@ Mission: Navigate from vague ideas to grounded execution plans by reasoning from
|
|
|
6
6
|
|
|
7
7
|
## Workflow
|
|
8
8
|
|
|
9
|
-
Follow these phases and steps in order
|
|
9
|
+
Follow these phases and steps in order to systematically deliver verified progress.
|
|
10
10
|
|
|
11
11
|
### Triage
|
|
12
12
|
**Goal:** Align on the objective, assess fit against the Roadmap, and challenge assumptions early.
|
|
@@ -14,15 +14,15 @@ Follow these phases and steps in order. Keep track of your progress in your Stat
|
|
|
14
14
|
1. **Roadmap Assessment:**
|
|
15
15
|
Inspect the Roadmap in `docs/project/PROJECT.md` and active milestones in `docs/project/milestones/`. Determine where this request fits: whether it belongs to an active milestone, defines a new roadmap milestone, requires an ad-hoc slice, or represents a bug report.
|
|
16
16
|
2. **Critical Discussion:**
|
|
17
|
-
If the request is ambiguous, technically flawed, or proposes a suboptimal solution,
|
|
17
|
+
If the request is ambiguous, technically flawed, or proposes a suboptimal solution, message the user immediately. Push back, clarify requirements, or propose simpler alternatives before proceeding to Discovery. If the objective is clear and sound, proceed autonomously.
|
|
18
18
|
|
|
19
19
|
### Discovery
|
|
20
20
|
**Goal:** Explore codebase reality and de-risk technical feasibility.
|
|
21
21
|
|
|
22
22
|
1. **Context Exploration:**
|
|
23
|
-
Use
|
|
23
|
+
Use `git grep`, file inspection, and targeted research across existing code, specs in `docs/project/specs/`, and existing milestones to map dependencies and blast radius.
|
|
24
24
|
2. **Feasibility Check:**
|
|
25
|
-
If system feasibility or external behavior is uncertain,
|
|
25
|
+
If system feasibility or external behavior is uncertain, create minimal probes in `spikes/` and run them to validate assumptions before specifying requirements.
|
|
26
26
|
3. **Greenfield Baseline:**
|
|
27
27
|
If the project lacks an established packaging and environment baseline, RESEARCH current idiomatic standards for the target language and runtime before defining packaging, boilerplate, and tooling deliverables. Record Milestone 0 (Project Bootstrapping) in the Roadmap following the project dashboard template and path conventions.
|
|
28
28
|
|
|
@@ -56,4 +56,4 @@ Follow these phases and steps in order. Keep track of your progress in your Stat
|
|
|
56
56
|
2. **Commit and Push:**
|
|
57
57
|
Run `make commit`. If a remote is configured, run `make push`. If blocking test failures occur, fix them immediately and push again. For non-blocking quality gate issues, address them if contained or record them in the roadmap in `docs/project/PROJECT.md`.
|
|
58
58
|
3. **Handoff:**
|
|
59
|
-
If all deliverables were non-behavioral and completed directly, emit a terminal summary to the user. Otherwise,
|
|
59
|
+
If all deliverables were non-behavioral and completed directly, emit a terminal summary to the user. Otherwise, message the user with clear handoff instructions for the target agent persona determined in the Documentation phase, citing all relevant reference files.
|
|
@@ -6,15 +6,15 @@ Mission: De-risk vertical slices by empirically validating technical and functio
|
|
|
6
6
|
|
|
7
7
|
## Workflow
|
|
8
8
|
|
|
9
|
-
Follow these phases and steps in order
|
|
9
|
+
Follow these phases and steps in order to systematically deliver verified progress.
|
|
10
10
|
|
|
11
11
|
### Triage
|
|
12
12
|
**Goal:** Assess the problem space, catalog unknowns, and verify interface integration feasibility.
|
|
13
13
|
|
|
14
14
|
1. **Exploration and Triage:**
|
|
15
|
-
|
|
15
|
+
Read the assigned Vertical Slice and linked Component Design Docs. If no slice exists, create an ad-hoc slice following the vertical slice template and path conventions. Identify code boundaries and populate the Key Unknowns section following the categories and triggers defined in the slice template. Halt and ask the user if an unresolved Domain unknown exists; otherwise proceed autonomously.
|
|
16
16
|
2. **Integration Feasibility:**
|
|
17
|
-
Inspect constructor signatures and system interfaces required for integration using
|
|
17
|
+
Inspect constructor signatures and system interfaces required for integration using file inspection and `git grep`. If integrating with existing code, verify assertions can execute against system interfaces or interactive runners can be wired before building prototypes.
|
|
18
18
|
|
|
19
19
|
### Prototyping
|
|
20
20
|
**Goal:** Build minimal prototypes to empirically validate behaviors and resolve unknowns.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# System Architecture: {{Project Name}}
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Architectural Standards
|
|
4
4
|
|
|
5
5
|
This section defines foundational engineering practices. Each entry MUST be a specific, enforceable rule.
|
|
6
6
|
|
|
@@ -14,13 +14,13 @@ This section defines foundational engineering practices. Each entry MUST be a sp
|
|
|
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.
|
|
17
|
-
- **Continuous Integration
|
|
18
|
-
- **Local Quality Gates
|
|
17
|
+
- **Continuous Integration:** Parallel CI jobs: 1) Blocking OS matrix test suite. 2) Non-blocking (`continue-on-error: true`) quality checks running fast formatters, linters, security scanners, type checkers, and repository-wide structural checks. Platform-specific and CI-only issues are investigated via the Remote Probing Protocol (`make probe REASON="<reason>"`). See [docs/templates/ci.md](docs/templates/ci.md).
|
|
18
|
+
- **Local Quality Gates:** Local pre-commit hooks MUST stay fast, checking only staged files (formatters, secret detection, merge conflict markers). Heavy, false-positive-prone checks run non-blocking in CI. The full test suite runs via the post-commit hook (`.githooks/post-commit.py`) as an unskippable safety net, reverting automatically on failure. See [docs/templates/pre-commit.md](docs/templates/pre-commit.md).
|
|
19
19
|
- **Diagnostic Instrumentation:** High-value diagnostics MUST use zero-cost language-native dead-code elimination (e.g. `if __debug__:`) and Composition Root toggles; mid-logic environment checks are forbidden.
|
|
20
20
|
- **Experimental Code:** The `spikes/` directory is reserved for rapid, isolated experimentation (`debug/`, `prototypes/`, `showcases/`) and is explicitly excluded from all quality gates (linters, type checkers, test suites).
|
|
21
21
|
- **Directory Conventions:**
|
|
22
22
|
`docs/architecture/BOUNDARY/LAYER/TYPE/name.md` -> Source path: `src/{pkg}/BOUNDARY/LAYER/TYPE/name.ext` -> Test path: `tests/suites/TEST_TYPE/BOUNDARY/LAYER/TYPE/test_name.ext`
|
|
23
|
-
- **Makefile Commands:** The `Makefile` is the canonical entry point for the version control workflow and on-demand test runs: `make test` (full suite), `make commit MSG="<msg>"` (local commit with
|
|
23
|
+
- **Makefile Commands:** The `Makefile` is the canonical entry point for the version control workflow and on-demand test runs: `make test` (full suite), `make commit MSG="<msg>"` (local commit with pre-commit auto-fix and unskippable post-commit test gate), `make push` (rebase and push), `make ci-watch` (CI monitoring), and `make probe REASON="<reason>"` (Remote Probing Protocol). See [docs/templates/makefile.md](docs/templates/makefile.md).
|
|
24
24
|
|
|
25
25
|
## Ubiquitous Language
|
|
26
26
|
|
|
@@ -30,7 +30,7 @@ The canonical domain vocabulary. All documentation, component names, tests, and
|
|
|
30
30
|
|
|
31
31
|
- **TermName:** Definition of the core domain concept and its operational boundaries.
|
|
32
32
|
|
|
33
|
-
## Component
|
|
33
|
+
## Component Map
|
|
34
34
|
|
|
35
35
|
Single source of truth for system structure, organized by architectural layer.
|
|
36
36
|
|
|
@@ -13,19 +13,24 @@ Core engineering philosophy, quality standards, and foundational rules that dict
|
|
|
13
13
|
## Workflow Standards
|
|
14
14
|
Defines the high-level artifact lifecycle and conventions for project management documents.
|
|
15
15
|
|
|
16
|
-
**Format:** Bulleted list. Each entry defines a specific standard.
|
|
17
|
-
|
|
18
|
-
### Required Topics:
|
|
19
16
|
- **Artifact Lifecycle:** How work flows (e.g., Spec → Milestone → Slice).
|
|
20
|
-
- **Numbering:** Artifacts are numbered sequentially using a per-type filename convention so agents can infer the correct filename:
|
|
21
|
-
- **Vertical Slices:** `MM-NN-name.md` (in `docs/project/slices/`) — `MM` is the target Milestone number and `NN` is the sequence number within that milestone.
|
|
22
|
-
- **Milestones:** `MM-name.md` (in `docs/project/milestones/`).
|
|
23
|
-
- **Case Files (Debugger):** `NN-name.md` (in `docs/project/debugging/`) — numbered sequentially.
|
|
24
|
-
- **Milestone 0 (bootstrapping) & Ad-hoc work (not tied to a milestone):** `00-NN-name.md` (in `docs/project/slices/`) — `00` is used as the Milestone prefix for Milestone 0 bootstrapping slices and for ad-hoc slices. Ad-hoc slices are NOT tracked in Milestone documents or the Roadmap.
|
|
25
17
|
- **Archiving Policy:** When and how completed artifacts are archived or deleted.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
|
|
19
|
+
## Tooling
|
|
20
|
+
The project `Makefile` is the canonical automation interface. Build targets are decomposed into modular fragments under `make/*.mk` (see [docs/templates/makefile.md](docs/templates/makefile.md)). Standard targets include `make test` (full test suite execution via the project runner), `make commit MSG="<type>(<scope>): <desc>"` (run pre-commit hooks, stage auto-fixes, and commit), `make push` (fast rebase and push to remote), `make ci-watch` (remote CI workflow monitoring and regression attribution), `make probe REASON="<reason>"` (Remote Probing Protocol for isolated CI diagnostics), and `make logs RUN=<id> [STEP="<name>"]` (extract sanitized CI failure logs).
|
|
21
|
+
|
|
22
|
+
When a repetitive task or multi-step command sequence arises, agents must not run long ad-hoc shell commands. Add a dedicated target to the appropriate `make/*.mk` fragment and document its usage and flags in this section.
|
|
23
|
+
|
|
24
|
+
## Releases
|
|
25
|
+
The project release lifecycle:
|
|
26
|
+
|
|
27
|
+
1. **Triage:** Determine semantic version bump (patch, minor, major) by inspecting conventional commits since the last tag.
|
|
28
|
+
2. **Release Notes:** Write notes at `docs/project/releases/v<version>.md` capturing net user-facing outcomes.
|
|
29
|
+
3. **Version Bump:** Update the project manifest version field.
|
|
30
|
+
4. **Approval Gate:** Present release notes and version bump for user approval.
|
|
31
|
+
5. **Commit:** Commit version bump with `chore(release): bump version to <version>`.
|
|
32
|
+
6. **Tag:** Create and push annotated tag `git tag -a v<version> -m "v<version>"`.
|
|
33
|
+
7. **Publish:** Publish release assets or GitHub Release.
|
|
29
34
|
|
|
30
35
|
## Templates
|
|
31
36
|
|
|
@@ -67,8 +72,8 @@ A living list of upcoming Milestones and their high-level features.
|
|
|
67
72
|
- **Core Goal:** Establish foundational infrastructure for testing, quality gates, and automated delivery.
|
|
68
73
|
- **Specs:** N/A — Milestone 0 is self-defining.
|
|
69
74
|
- **Requirements:**
|
|
70
|
-
- **
|
|
75
|
+
- **Runtime Standards:** Set up packaging, dependency management, and project boilerplate using current idiomatic standards for the target language and runtime.
|
|
71
76
|
- **Project Readme:** Create a minimal `README.md` focused strictly on the end-user entry point: product overview, prerequisites, and installation/usage instructions.
|
|
72
|
-
- **
|
|
77
|
+
- **Tooling Entry Points:** Configure the test runner (`pytest`) exposed via `make test`, along with standard `Makefile` targets (`make commit`, `make push`, `make ci-watch`, `make probe`). Configure project `.gitignore` keeping `spikes/` tracked.
|
|
73
78
|
- **Local Quality Gates:** Install Pre-commit with fast local hooks (formatters, secret detection, merge conflict checks) and the unskippable post-commit test gate (`.githooks/post-commit.py`) that runs `make test` and reverts on failure.
|
|
74
|
-
- **
|
|
79
|
+
- **Continuous Integration:** Set up parallel GitHub Actions jobs: 1) Blocking OS matrix test suite. 2) Non-blocking quality checks. Configure `.github/workflows/debug.yml` for the Remote Probing Protocol.
|
|
@@ -2,8 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
> **⚠️ This is an example template.** Adapt the runner, test commands, and tool-specific details (e.g., `uv run pytest`, pre-commit hook list) to match your project's actual setup. The concrete examples shown may not work verbatim in all environments.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
Build targets are decomposed into modular fragments under `make/*.mk` included via `-include make/*.mk` from the root `Makefile`:
|
|
6
|
+
|
|
7
|
+
- `Makefile`: Entry point, global tunable variables, help target, and `-include make/*.mk`.
|
|
8
|
+
- `make/base.mk`: Shell selection, goal validation, named variable defaults, and tool preflight.
|
|
9
|
+
- `make/test.mk`: `test` target and test runner configuration.
|
|
10
|
+
- `make/git.mk`: `commit` and `push` targets.
|
|
11
|
+
- `make/ci.mk`: `ci-watch` and `logs` targets.
|
|
12
|
+
- `make/probe.mk`: `probe` target for the Remote Probing Protocol.
|
|
13
|
+
|
|
14
|
+
## Modular Guardrails (`make/base.mk`)
|
|
15
|
+
|
|
16
|
+
All foundational validation and platform guards reside in `make/base.mk`:
|
|
17
|
+
|
|
18
|
+
1. **Named Inputs Fallback:** Ensures `MSG ?=`, `REASON ?=`, `RUN ?=`, and `STEP ?=` are declared as variables so words in values never execute as Makefile goals.
|
|
19
|
+
2. **Single-Goal & Unknown-Goal Validation:**
|
|
20
|
+
```makefile
|
|
21
|
+
_KNOWN_GOALS := ci-watch commit help logs probe push test
|
|
22
|
+
_UNKNOWN_GOALS := $(filter-out $(_KNOWN_GOALS),$(MAKECMDGOALS))
|
|
23
|
+
ifneq ($(words $(MAKECMDGOALS)),0)
|
|
24
|
+
ifneq ($(words $(MAKECMDGOALS)),1)
|
|
25
|
+
$(error Detected $(words $(MAKECMDGOALS)) goals: $(MAKECMDGOALS). Pass values as NAME="value", as in: make commit MSG="<type>(<scope>): <description>")
|
|
26
|
+
endif
|
|
27
|
+
endif
|
|
28
|
+
ifneq ($(_UNKNOWN_GOALS),)
|
|
29
|
+
$(error Unknown target '$(_UNKNOWN_GOALS)'. Run make help for the list of targets.)
|
|
30
|
+
endif
|
|
31
|
+
```
|
|
32
|
+
3. **Cross-Platform Shell Selection:** Sets `SHELL := bash.exe` and `.SHELLFLAGS := -c` on Windows, confirming the shell is Git Bash rather than the WSL shim via `uname -s 2>/dev/null | grep -Eq 'MINGW|MSYS'`.
|
|
33
|
+
4. **POSIX Tool Preflight (`_preflight`):** Verifies that `git`, `gh`, `awk`, and `sed` are available before initiating any network or CI workflow command.
|
|
7
34
|
|
|
8
35
|
## Usage
|
|
9
36
|
|
|
@@ -100,8 +127,8 @@ Always use GNU Make native features for cross-platform compatibility instead of
|
|
|
100
127
|
- **Windows shell selection:** Set `SHELL := bash.exe` when `OS` is `Windows_NT`. The assignment covers every target, not only the pipelines, and `_preflight` confirms that the shell is Git Bash rather than the WSL `bash.exe` shim and names the `SHELL=` override when it is not.
|
|
101
128
|
- **Portable quoting:** Pass values with double quotes, as in `--field reason="..."`, because Windows `cmd.exe` keeps single quotes literally.
|
|
102
129
|
- **ASCII-only output:** Recipe output stays ASCII, because a Windows console turns a non-ASCII dash into mojibake in captured logs.
|
|
103
|
-
- **Explicit
|
|
104
|
-
- **Error transparency:** The first pre-commit pass
|
|
130
|
+
- **Explicit fallback pass:** The initial pre-commit auto-fix pass consumes its own exit code with `|| echo "<sentence>"`, so a failing run prints one plain sentence. Make's `-` prefix is forbidden here, because it prints a bare `Error 1 (ignored)` line that reads as an unexplained defect.
|
|
131
|
+
- **Error transparency:** The first pre-commit pass applies auto-fixes and re-stages modified files. Git then runs the same hooks again during `git commit`, and that second run is the blocking local gate. A hook failure there aborts the commit. The post-commit test gate is the final safety net. `make push` runs `git pull --rebase` and `git push` without suppression, so a rebase conflict or push rejection surfaces as a non-zero exit.
|
|
105
132
|
|
|
106
133
|
### Parse-Time Input Validation
|
|
107
134
|
|
|
@@ -151,7 +178,7 @@ test:
|
|
|
151
178
|
```makefile
|
|
152
179
|
commit:
|
|
153
180
|
git add .
|
|
154
|
-
@uv run pre-commit run || echo "
|
|
181
|
+
@uv run pre-commit run || echo "Pre-commit auto-fixes applied. Staging changes and continuing to commit gate."
|
|
155
182
|
git add .
|
|
156
183
|
git commit -m "$(MSG)"
|
|
157
184
|
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Destination: docs/project/slices/MM-NN-{slice-slug}.md
|
|
3
|
+
Naming: MM = Milestone Number (e.g. 01, or 00 for ad-hoc). NN = Sequential Slice Number.
|
|
4
|
+
-->
|
|
5
|
+
|
|
1
6
|
# Slice: {{Feature Name}}
|
|
2
7
|
- **Status:** [Planned | In Progress | Completed]
|
|
3
8
|
- **Milestone:** [link]
|
|
@@ -61,21 +66,21 @@ Map affected components using non-breaking steps (expand -> migrate -> contract)
|
|
|
61
66
|
**Types:**
|
|
62
67
|
- **Env:** Declarative tooling, build files, CI workflows, hooks, or config templates.
|
|
63
68
|
- **Wiring:** Outermost boundary tracer bullet returning skeleton/fake data to connect layers end-to-end.
|
|
64
|
-
- **
|
|
69
|
+
- **Interface:** Signatures, ports, interfaces, DTOs, domain models.
|
|
65
70
|
- **Harness:** Modifying or extending shared test infrastructure (Drivers, Observers, Fakes, Setup fixtures).
|
|
66
71
|
- **Logic:** Core domain logic and business rules driven by unit tests, systematically replacing skeleton returns and temporary fakes with real implementations.
|
|
67
72
|
- **Migration:** Adapting existing consumers to new contracts.
|
|
68
|
-
- **Refactor:** Improving code design without altering behavior
|
|
69
|
-
- **Cleanup:** Removing deprecated methods, dead code, and temporary shims.
|
|
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.
|
|
70
75
|
|
|
71
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:
|
|
72
|
-
`(Env) -> Wiring ->
|
|
77
|
+
`(Env) -> Wiring -> Interface -> Harness -> Logic -> Migration -> Refactor -> Cleanup`
|
|
73
78
|
|
|
74
79
|
**Tests:** Do not specify individual tests in deliverables. Scenarios and Edge Cases must define test requirements.
|
|
75
80
|
|
|
76
81
|
**Format:**
|
|
77
82
|
- [ ] **Wiring** - Connect outermost boundaries with skeleton response.
|
|
78
|
-
- [ ] **
|
|
83
|
+
- [ ] **Interface** - Define port interfaces and DTOs.
|
|
79
84
|
- [ ] **Logic** - Implement business logic replacing skeleton responses.
|
|
80
85
|
|
|
81
86
|
## Implementation Notes
|
|
File without changes
|
|
File without changes
|