teddy-cli 0.2.3.dev1514__py3-none-any.whl → 0.2.3.dev1516__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.3.dev1514
3
+ Version: 0.2.3.dev1516
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
@@ -149,18 +149,18 @@ teddy_executor/resources/config/prompts/debugger.md,sha256=UkS5ReAnIJIfp3YqHo87E
149
149
  teddy_executor/resources/config/prompts/developer.md,sha256=Mzd0wW1QLjt-YExV4q4k0dr0CP-8VG5HkrZhCIcmsEs,16051
150
150
  teddy_executor/resources/config/prompts/pathfinder.md,sha256=8gJtTqiVFN14e7wyaJhiE8wgARcd44LTRNdFS8C7nOg,4857
151
151
  teddy_executor/resources/config/prompts/prototyper.md,sha256=yIb_rpiNeOl5edHlZ3682WPZnKD0y_7RQ5VYpWssluA,4770
152
- teddy_executor/resources/templates/ARCHITECTURE.md,sha256=6j0JeLzhzWIJkE8AeTt9fCgI0ivM7WYYfIrBpe4jksw,7562
153
- teddy_executor/resources/templates/PROJECT.md,sha256=RzwjBUa-cwBrlWNpj2Is-SkM2lJ6uWoqzhYrSP8mWck,6023
152
+ teddy_executor/resources/templates/ARCHITECTURE.md,sha256=-9Ce7rVi3YNGAT4xXLXVndKx4gLZaYQJ_8dga0d4eIs,7841
153
+ teddy_executor/resources/templates/PROJECT.md,sha256=freLnMDGmaa9DzIi-i12DUl0fOEpl0oLjEqKoWSzO8k,6361
154
154
  teddy_executor/resources/templates/case-file.md,sha256=gKhoFCum2c4Fk4E3lKGcmfV9_IOYVygjWXNu076TL1Q,1578
155
- teddy_executor/resources/templates/ci.md,sha256=vuDQ1nnrlYCUa8fRaX3y8Rsc10V65ainarK0O9EEy1k,6460
155
+ teddy_executor/resources/templates/ci.md,sha256=mymFC4Q1nuRdFAxX2ORO76BgtBJIR3GOBrW5zYNlds4,8902
156
156
  teddy_executor/resources/templates/component-design.md,sha256=GgR7hS2yIugxih2H_czLx-pEdrM6LAmnznMf2AMer-k,2155
157
- teddy_executor/resources/templates/makefile.md,sha256=pLtrD1cDNj0fn5mZtaKigxEJ1QF_SzBTAFnthG8Mvho,26207
157
+ teddy_executor/resources/templates/makefile.md,sha256=0OmQVTLbUk8XIkb7OJDDCWH_qdbOcoK5pWMuiLnZYFI,26228
158
158
  teddy_executor/resources/templates/milestone.md,sha256=PwHedgzqRQnKQq4M4GILmmv7YHBsDJCaC8rxD2MDMBE,863
159
- teddy_executor/resources/templates/pre-commit.md,sha256=bc2DDAmY-X4huxLBXhKrG6JWrmf4Mn1uYy6PjM3RZqY,7626
159
+ teddy_executor/resources/templates/pre-commit.md,sha256=NqllfAw8Z0yvt51QJ6OBW18dccrJniLGibSylkatvRM,7684
160
160
  teddy_executor/resources/templates/specification-document.md,sha256=skYPZ7E0m2n2STEWOKCHeiuqNtsshYzI49rmsNSKAuA,671
161
161
  teddy_executor/resources/templates/vertical-slice.md,sha256=Cn8Y_rb6BZvy9bKBDNXhGfoSgMpsZbIBfyFQgrdx8Jg,5563
162
- teddy_cli-0.2.3.dev1514.dist-info/METADATA,sha256=vGiu9KYsb8VIPbec8tonG92M65Knz1WgEiCIhhTbTrY,30646
163
- teddy_cli-0.2.3.dev1514.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
164
- teddy_cli-0.2.3.dev1514.dist-info/entry_points.txt,sha256=3KaK1-CWsscLZeHduI6Jgime9aw_gfmdQZ7AUkA0QDg,54
165
- teddy_cli-0.2.3.dev1514.dist-info/licenses/LICENSE,sha256=HBL2C3ynq_mk-EYtJI7aXEc6gXnXgKJ-K6KZ13N0Ojs,35270
166
- teddy_cli-0.2.3.dev1514.dist-info/RECORD,,
162
+ teddy_cli-0.2.3.dev1516.dist-info/METADATA,sha256=yHRQZgxpKX0CZ-M1n39gKehLNJmKtI7RfCRpN8slDWI,30646
163
+ teddy_cli-0.2.3.dev1516.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
164
+ teddy_cli-0.2.3.dev1516.dist-info/entry_points.txt,sha256=3KaK1-CWsscLZeHduI6Jgime9aw_gfmdQZ7AUkA0QDg,54
165
+ teddy_cli-0.2.3.dev1516.dist-info/licenses/LICENSE,sha256=HBL2C3ynq_mk-EYtJI7aXEc6gXnXgKJ-K6KZ13N0Ojs,35270
166
+ teddy_cli-0.2.3.dev1516.dist-info/RECORD,,
@@ -15,9 +15,9 @@ This section defines foundational engineering practices. Each entry MUST be a sp
15
15
  - **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.
16
16
  - **Dependency Injection:** Constructor injection mandate; forbid Service Locator and global containers.
17
17
  - **Centralized Configuration:** Config file location, prohibition of magic numbers.
18
- - **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).
19
- - **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).
20
- - **Deterministic Boundary & Anti-Pattern Enforcement:** Architectural layer boundaries (e.g., Hexagonal Core isolation), `spikes/` isolation, banned test doubles (`mock.patch`, bare mocks), and banned footgun APIs outside adapters MUST be codified as deterministic linter or structural checker rules (staged lints or non-blocking CI `manual`-stage checks) rather than relying solely on prose documentation.
18
+ - **Continuous Integration:** Parallel CI jobs: 1) Blocking OS matrix test suite. 2) Blocking static-analysis job on a single OS running deterministic, diff-actionable checks (formatters, linters, security scanners, type checkers, and structural checkers). 3) Non-blocking (`continue-on-error: true`) quality-metrics job for aggregate, repository-wide checks (test-pyramid ratios, file-length caps, duplication thresholds) that no single commit can satisfy. 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).
19
+ - **Local Quality Gates:** Local pre-commit hooks MUST stay fast, checking only staged files (formatters, secret detection, merge conflict markers). Heavier static analysis runs in the blocking static-analysis CI job, keeping the local commit loop fast. 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).
20
+ - **Deterministic Boundary & Anti-Pattern Enforcement:** Architectural layer boundaries (e.g., Hexagonal Core isolation), `spikes/` isolation, banned test doubles (`mock.patch`, bare mocks), and banned footgun APIs outside adapters MUST be codified as deterministic linter or structural checker rules (staged lints or CI `manual`-stage checks in the blocking static-analysis job) rather than relying solely on prose documentation.
21
21
  - **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.
22
22
  - **Experimental Code:** The `spikes/` directory is reserved for rapid, isolated experimentation (`debug/`, `prototypes/`) and is explicitly excluded from all quality gates (linters, type checkers, test suites). `src/`, `scripts/`, `tests/`, and `Makefile` targets (except `make probe`) MUST NOT import or depend on `spikes/`. Spikes may invoke `src/` or `scripts/` to avoid duplicating boilerplate.
23
23
  - **Directory Conventions:**
@@ -76,4 +76,4 @@ A living list of upcoming Milestones and their high-level features.
76
76
  - **Project Readme:** Create a minimal `README.md` focused strictly on the end-user entry point: product overview, prerequisites, and installation/usage instructions.
77
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.
78
78
  - **Local Quality Gates:** Install Pre-commit with fast local hooks (formatters, banned-pattern lint rules, secret detection, merge conflict checks) and the unskippable post-commit test gate (`.githooks/post-commit.py`) that runs `make test` and reverts on failure.
79
- - **Continuous Integration:** Set up parallel GitHub Actions jobs: 1) Blocking OS matrix test suite. 2) Non-blocking quality checks (including architectural boundary and structural checks). Configure `.github/workflows/debug.yml` for the Remote Probing Protocol.
79
+ - **Continuous Integration:** Set up parallel GitHub Actions jobs: 1) Blocking OS matrix test suite. 2) Blocking single-OS static-analysis job holding the deterministic, diff-actionable checks (formatters, linters, secret scanners, security audits, type checkers, and structural checkers). 3) Non-blocking (`continue-on-error: true`) quality-metrics job for the aggregate checks (test-pyramid ratios, file-length caps, duplication thresholds) that no single commit can satisfy. Configure `.github/workflows/debug.yml` for the Remote Probing Protocol. See [docs/templates/ci.md](docs/templates/ci.md).
@@ -6,7 +6,9 @@ This template documents how to set up Continuous Integration and the Debug Workf
6
6
 
7
7
  ## CI Pipeline
8
8
 
9
- The CI pipeline consists of two parallel jobs:
9
+ The CI pipeline consists of three parallel jobs. Two are merge gates; one is advisory.
10
+
11
+ A check earns a merge veto only when it is deterministic (the verdict is reproducible locally) and diff-actionable (the author can fix it within the commit that triggered it). Deterministic static analysis meets that bar for a project that starts at zero debt. Aggregate, repository-wide metrics do not: no single commit can satisfy a test-pyramid ratio, a file-length cap, or a duplication threshold without unrelated refactoring.
10
12
 
11
13
  ### Job 1: Blocking OS Matrix Test Suite
12
14
  - Runs on each push and pull request.
@@ -16,16 +18,21 @@ The CI pipeline consists of two parallel jobs:
16
18
  - Carries a wall-clock cap (`timeout-minutes`) so a hung test cannot occupy a runner indefinitely.
17
19
  - **Blocking:** If this job fails, the CI pipeline is marked as failed.
18
20
 
19
- ### Job 2: Non-Blocking Quality Checks
20
- - Runs granular quality checks in separate steps with `if: success() || failure()`, ensuring that all checks execute and report their outcomes even if an earlier check fails.
21
- - Scopes heavy checks (type checkers, security/dependency scanners, structural checkers) to the non-default `manual` stage so they never slow down the local pre-commit loop.
21
+ ### Job 2: Blocking Static Analysis
22
+ - Runs on a single OS (ubuntu-latest): type and lint verdicts rarely depend on the OS, so a matrix here triples cost without adding signal on deterministic checks.
23
+ - Runs deterministic, diff-actionable checks, each in its own step with `if: success() || failure()` so every check reports even when an earlier one fails: formatters, linters, secret scanners, security audits, type checkers, and structural checkers.
24
+ - Scopes the heavy checks (type checkers, security/dependency scanners, structural checkers) to the non-default `manual` stage so they never slow down the local pre-commit loop.
22
25
  - Excludes sandboxes (`spikes/`) and third-party dependencies.
23
- - **Non-Blocking:** Configured with `continue-on-error: true` so quality failures do not block the pipeline.
26
+ - **Blocking:** Configured with `continue-on-error: false`. A failure fails the pipeline.
27
+
28
+ ### Job 3: Advisory Quality Metrics
29
+ - Runs aggregate, repository-wide checks that no single commit can satisfy without unrelated refactoring: test-pyramid ratios, file-length caps, and duplication thresholds.
30
+ - **Advisory:** Configured with `continue-on-error: true`. Findings surface as triage items, not merge blockers; a ratchet that fails only when a metric worsens is an acceptable upgrade.
24
31
 
25
32
  ```shell
26
33
  # Fast hooks (default stage)
27
34
  {runner} pre-commit run --all-files
28
- # Heavy hooks (CI-only manual stage)
35
+ # Heavy hooks (CI-only manual stage, run by the blocking static-analysis job)
29
36
  {runner} pre-commit run --all-files --hook-stage manual
30
37
  ```
31
38
 
@@ -81,11 +88,12 @@ jobs:
81
88
  - name: Run Tests
82
89
  run: {runner} pytest
83
90
 
84
- # Job 2: Non-blocking quality checks (continue-on-error).
85
- quality-checks:
86
- name: Quality Checks
91
+ # Job 2: Blocking static analysis (deterministic checks, single OS).
92
+ static-analysis:
93
+ name: Static Analysis
87
94
  runs-on: ubuntu-latest
88
- continue-on-error: true
95
+ timeout-minutes: 10
96
+ continue-on-error: false
89
97
  steps:
90
98
  - name: Check out repository
91
99
  uses: actions/checkout@v5
@@ -102,7 +110,7 @@ jobs:
102
110
  run: {runner} sync --frozen
103
111
 
104
112
  # Each check runs with `if: success() || failure()` so all checks run
105
- # even if an earlier check fails.
113
+ # even if an earlier check fails. Every deterministic check blocks merge.
106
114
  - name: "Secrets Check (detect-secrets)"
107
115
  if: success() || failure()
108
116
  run: |
@@ -139,6 +147,46 @@ jobs:
139
147
  if: success() || failure()
140
148
  run: |
141
149
  {runner} pre-commit run pip-audit --all-files --hook-stage manual
150
+
151
+ # Job 3: Advisory quality metrics (aggregate checks, non-blocking).
152
+ quality-metrics:
153
+ name: Quality Metrics
154
+ runs-on: ubuntu-latest
155
+ continue-on-error: true
156
+ steps:
157
+ - name: Check out repository
158
+ uses: actions/checkout@v5
159
+
160
+ - name: Set up Python
161
+ uses: actions/setup-python@v6
162
+ with:
163
+ python-version: "3.14"
164
+
165
+ - name: Set up Node.js (for jscpd)
166
+ uses: actions/setup-node@v5
167
+ with:
168
+ node-version: "24"
169
+
170
+ - name: Install uv
171
+ uses: astral-sh/setup-uv@v8.3.2
172
+
173
+ - name: Install dependencies
174
+ run: {runner} sync --frozen
175
+
176
+ - name: "Verify Test Pyramid"
177
+ if: success() || failure()
178
+ run: |
179
+ {runner} python scripts/verify_test_pyramid.py
180
+
181
+ - name: "Check Python File Length (Max 300 Lines)"
182
+ if: success() || failure()
183
+ run: |
184
+ find src tests -name "*.py" | xargs wc -l | awk '$1 > 300 && $2 != "total" {print "File " $2 " is too long (" $1 " lines)."; exit 1}'
185
+
186
+ - name: "Detect Code Duplication (jscpd)"
187
+ if: success() || failure()
188
+ run: |
189
+ npx jscpd --min-tokens 25 --threshold 0 --ignore "**/.venv/**,**/ports/**,**/prompts/**,**/spikes/**"
142
190
  ```
143
191
 
144
192
  ## Debug Workflow (Remote Probing Protocol)
@@ -215,7 +215,7 @@ push:
215
215
 
216
216
  `make ci-watch` discovers **every** CI run for the target commit (`HEAD` by default, or `COMMIT=<sha>`), waits for and reports each workflow with its jobs. The target depends on `_preflight`, so a missing `gh`, `awk`, or Git Bash shell fails once with an actionable message. Before polling, it rejects an unknown `COMMIT` and a commit that no remote branch contains, because no run can exist for an un-pushed commit. Every blocking verdict prints to stdout for the log and repeats its reason on stderr. It answers ONE question: **did this commit turn a BLOCKING gate red?** Only push-triggered workflows are attributed; a downstream workflow that registers from a `workflow_run` event is not a regression in this commit. Only include and configure this target if a remote CI pipeline is configured or planned for the project.
217
217
 
218
- The pushed RUN's own conclusion is authoritative: it already folds in `continue-on-error`, so a **non-blocking** job (e.g. the CI `Quality Checks` job) can NEVER block the session — it is reported as a triage item instead. Only when the run-level conclusion is `failure` does attribution run, comparing the pushed run's failing-JOB set against the base run's:
218
+ The pushed RUN's own conclusion is authoritative: it already folds in `continue-on-error`, so a **non-blocking** job (e.g. the CI `Quality Metrics` job) can NEVER block the session — it is reported as a triage item instead. Only when the run-level conclusion is `failure` does attribution run, comparing the pushed run's failing-JOB set against the base run's:
219
219
 
220
220
  - **base green/absent/job-less → new red** = your regression → **exit non-zero** (fix before concluding).
221
221
  - **base red → new red (subset of the base's failing jobs)** = pre-existing → **report and exit 0** (do not wait, do not duplicate the fix).
@@ -410,7 +410,7 @@ logs: _preflight
410
410
  ## Implementation Notes
411
411
 
412
412
  - This project uses `uv run` as its designated runner.
413
- - Local pre-commit hooks include only fast auto-fixers (`ruff`) + `detect-secrets` + `check-merge-conflict`; heavier checks (`mypy`, `bandit`, `pip-audit`, and the structural checkers) run non-blocking in CI (see [pre-commit.md](./pre-commit.md)).
413
+ - Local pre-commit hooks include only fast auto-fixers (`ruff`) + `detect-secrets` + `check-merge-conflict`; heavier checks (`mypy`, `bandit`, `pip-audit`, and the structural checkers) run in the blocking static-analysis CI job (see [pre-commit.md](./pre-commit.md)).
414
414
  - Post-commit hook lives at `.githooks/post-commit.py` and runs the full `uv run pytest` suite.
415
415
  - Ensure `gh` (GitHub CLI) is authenticated for `make push`, the Remote Probing Protocol, and CI Log Extraction.
416
416
  - The `make logs` target abstracts the Debugger's CI-log extraction (Phase 1, Step 2). See [CI Log Extraction](#ci-log-extraction).
@@ -83,7 +83,7 @@ repos:
83
83
  pass_filenames: false
84
84
  ```
85
85
 
86
- **Local vs CI scope:** keep only fast auto-fixers (`ruff --fix`, `ruff format`, `trailing-whitespace`, `end-of-file-fixer`), `detect-secrets`, `check-merge-conflict`, and zero-false-positive anti-pattern lints (e.g. Ruff `TID251` banned-API rules for forbidden test mocks or raw adapter-only libraries) locally. Noisy, false-positive-prone static analysis (`mypy`, `bandit`, `pip-audit`) and repository-wide architectural boundary checkers belong in CI's `manual` stage, where they run non-blocking — the real friction is hook false positives forcing inline suppressions, not blocking. See the Quality-Gate Bypass Policy for the config-level-vs-inline bypass rule.
86
+ **Local vs CI scope:** keep only fast auto-fixers (`ruff --fix`, `ruff format`, `trailing-whitespace`, `end-of-file-fixer`), `detect-secrets`, `check-merge-conflict`, and zero-false-positive anti-pattern lints (e.g. Ruff `TID251` banned-API rules for forbidden test mocks or raw adapter-only libraries) locally. Noisy static analysis (`mypy`, `bandit`, `pip-audit`) and repository-wide architectural boundary checkers belong in CI's `manual` stage, run by the blocking static-analysis job — keeping them out of the local hook loop avoids the real friction, which is hook false positives forcing inline suppressions, not blocking at merge time. See the Quality-Gate Bypass Policy for the config-level-vs-inline bypass rule.
87
87
 
88
88
  **Tip:** Pin exact `rev` tags so every teammate runs identical checks.
89
89