docs(v0): pyfallow / fallow-ts integration plan (Wizji-Wartości D4) #59

Merged
pdurlej merged 1 commit from claude/patchwarden-pyfallow-integration-plan into main 2026-05-27 16:34:47 +02:00
Collaborator

What

Wizji-Wartości Wave step D4 — final. New file docs/operations/pyfallow-integration-plan.md (+234 lines). Architectural decision document (PLAN, not execution) for closing Luka 3 from operator mental-model discovery.

Per D21: planning permitted under amended M2; execution stays parked until M2 evidence supports it. Doc captures the shape so when evidence lands, integration isn't invented under time pressure.

Why this plan

Operator mental model step 1 ("PR → deterministic Python/TS code quality check") is Luka 3 in current dogfood loop. fallow-ts alpha shipped 5 months ahead of plan (2026-05-19), making this plannable now. M2-compatible because planning ≠ binding runtime deps.

What's in it

Section Purpose
Why this plan exists Luka 3 framing + why fallow-ts alpha unlocks planning
What needs integrating pyfallow + fallow-ts shape; scope reminder (structural evidence, NOT linter)
4 architectural options A (subprocess), B (lib import — parked), C (MCP server), D (workflow pre-step) — with per-option trade-offs
Recommended path Option D for v0 (M2-compatible), Option A for v1 (post-M2 + evidence)
Decision triggers What evidence unlocks execution (M2 interviews, dogfood evidence on #523, M3 operator decision)
Pre-conditions What must be true before execution (regardless of option)
Wrongness signals When integration is WRONG choice
Open questions for M3 Captured now to avoid time-pressure invention later
Anti-scope What plan does NOT cover (execution timeline, schemas, linter wiring)

v0 (now → post-M2): Option D — external workflow pre-step in each client repo. Uses Patchwarden's existing --findings-file flag. Zero CLI changes. Already-validated pattern from pdurlej/platform#523 workflow shape. Failure isolation maximal. Each repo opts in/out independently.

v1 (post-M2 + discovery confirms demand): Option A — subprocess from new code_checks.py module. Keeps stdlib-only, type-safe, no runtime dep in pyproject.toml.

Explicit avoid through 2027: Option B (lib import) — license + dep-creep risks exceed value; explicitly parked under D21.

Per D21 — M2-permitted

Planning of architectural integration is explicitly permitted under amended M2 (D21 §"Permitted: Documentation + ADRs"). Plan does NOT:

  • Propose new features
  • Bind new runtime deps
  • Change policy schema
  • Add new CLI subcommand

Execution remains parked under D21 hard-manual classes until evidence + M3 review.

Atomic per ADR-0017

  • 1 new file (docs/operations/pyfallow-integration-plan.md), +234 lines
  • Existing docs/operations/ directory
  • 0 src changes, 0 test changes
  • base=main post-D2 merge
  • 152/152 tests still green

Wizji-Wartości Wave — COMPLETE after this merges 🎯

PR What Status
D1 (#57) D21 amendment — legalize wave merged
D2 (#58) dogfood actual-vs-mental-model merged
D3 (platform#523 → #524) workflow wiring — Ollama + post-findings codex shipped
D4 (this PR) pyfallow-integration-plan final

After this merges + codex's pdurlej/platform#524 merges + smoke PR validates the loop end-to-end, Wave is fully delivered. Next layer of integration (pyfallow execution per Option D/A) waits for M2 evidence.

Token-accounting

~4% weekly Opus. Synthesis from architecture.md + decisions.md + crosscheck snapshot + dogfood-actual-vs-mental-model — all already loaded. The hard part was thinking through 4 options × trade-offs, not source-gathering.

## What **Wizji-Wartości Wave step D4 — final.** New file `docs/operations/pyfallow-integration-plan.md` (+234 lines). Architectural decision document (**PLAN, not execution**) for closing Luka 3 from operator mental-model discovery. Per D21: planning permitted under amended M2; execution stays parked until M2 evidence supports it. Doc captures the shape so when evidence lands, integration isn't invented under time pressure. ## Why this plan Operator mental model step 1 ("PR → deterministic Python/TS code quality check") is Luka 3 in current dogfood loop. fallow-ts alpha shipped 5 months ahead of plan (2026-05-19), making this **plannable now**. M2-compatible because planning ≠ binding runtime deps. ## What's in it | Section | Purpose | |---|---| | Why this plan exists | Luka 3 framing + why fallow-ts alpha unlocks planning | | What needs integrating | pyfallow + fallow-ts shape; scope reminder (structural evidence, NOT linter) | | 4 architectural options | A (subprocess), B (lib import — parked), C (MCP server), D (workflow pre-step) — with per-option trade-offs | | Recommended path | Option D for v0 (M2-compatible), Option A for v1 (post-M2 + evidence) | | Decision triggers | What evidence unlocks execution (M2 interviews, dogfood evidence on #523, M3 operator decision) | | Pre-conditions | What must be true before execution (regardless of option) | | Wrongness signals | When integration is WRONG choice | | Open questions for M3 | Captured now to avoid time-pressure invention later | | Anti-scope | What plan does NOT cover (execution timeline, schemas, linter wiring) | ## Recommended path summary **v0 (now → post-M2)**: **Option D — external workflow pre-step in each client repo.** Uses Patchwarden's existing `--findings-file` flag. Zero CLI changes. Already-validated pattern from `pdurlej/platform#523` workflow shape. Failure isolation maximal. Each repo opts in/out independently. **v1 (post-M2 + discovery confirms demand)**: **Option A — subprocess from new `code_checks.py` module.** Keeps stdlib-only, type-safe, no runtime dep in `pyproject.toml`. **Explicit avoid through 2027**: Option B (lib import) — license + dep-creep risks exceed value; explicitly parked under D21. ## Per D21 — M2-permitted Planning of architectural integration is explicitly permitted under amended M2 (D21 §"Permitted: Documentation + ADRs"). Plan does NOT: - Propose new features - Bind new runtime deps - Change policy schema - Add new CLI subcommand Execution remains **parked under D21 hard-manual classes** until evidence + M3 review. ## Atomic per ADR-0017 - 1 new file (`docs/operations/pyfallow-integration-plan.md`), +234 lines - Existing `docs/operations/` directory - 0 src changes, 0 test changes - `base=main` post-D2 merge - 152/152 tests still green ## Wizji-Wartości Wave — COMPLETE after this merges 🎯 | PR | What | Status | |---|---|---| | D1 (#57) | D21 amendment — legalize wave | ✅ merged | | D2 (#58) | dogfood actual-vs-mental-model | ✅ merged | | D3 (platform#523 → #524) | workflow wiring — Ollama + post-findings | ✅ codex shipped | | **D4 (this PR)** | pyfallow-integration-plan | ⏳ final | After this merges + codex's `pdurlej/platform#524` merges + smoke PR validates the loop end-to-end, Wave is **fully delivered**. Next layer of integration (pyfallow execution per Option D/A) waits for M2 evidence. ## Token-accounting ~4% weekly Opus. Synthesis from architecture.md + decisions.md + crosscheck snapshot + dogfood-actual-vs-mental-model — all already loaded. The hard part was thinking through 4 options × trade-offs, not source-gathering.
Wizji-Wartości Wave step D4 — final. Architectural decision document
(PLAN, not execution) for closing Luka 3 from operator mental-model
discovery: pyfallow + fallow-ts integration into Patchwarden's
deterministic content-check layer.

Per D21: planning is permitted under amended M2; execution stays parked
until M2 evidence supports it. This doc captures the shape so when
evidence lands, the integration isn't invented under time pressure.

## What's in it

- **Why this plan exists** — Luka 3 framing, why fallow-ts alpha
  (shipped 5mo early) makes this plannable now
- **What needs integrating** — pyfallow (Python L1) + fallow-ts (TS L1'),
  with scope reminder (structural evidence, NOT linter / formatter)
- **Four architectural options** with per-option trade-offs:
  - A: Runtime subprocess (`subprocess.run` from new code_checks.py)
  - B: Python lib import (pyfallow as runtime dep) — parked per D21
  - C: HTTP MCP server (long-lived `pyfallow-mcp`)
  - D: External pre-step in client repo workflow (NOT in Patchwarden CLI)
- **Recommended path**: Option D for v0 (M2-compatible), Option A for
  v1 (post-M2, after discovery confirms demand)
- **Decision triggers** — what evidence unlocks execution
  (M2 interview signal, dogfood evidence on platform after #523, M3
  operator decision; anti-triggers if Bet 1 wrongness fires)
- **Pre-conditions** before execution (regardless of option)
- **Wrongness signals** — when integration is WRONG choice
- **Open questions for M3** — captured now to avoid time-pressure
  invention later
- **Anti-scope** — what plan does NOT cover (execution timeline,
  specific schemas, performance, linter wiring, Cloud)

## Recommended path rationale

Option D (workflow pre-step) is recommended for v0 because:
- Zero changes to Patchwarden CLI — uses existing `--findings-file` path
- Already validated pattern (Ollama integration in `pdurlej/platform#523`
  uses similar workflow-step shape)
- Failure isolation maximal (pyfallow crash = workflow step fail, never
  touches Patchwarden process)
- M2-compatible per D21 — no runtime dep, no new CLI capability,
  no new module
- Each client repo opts in/out independently

Option B (Python lib import) explicitly avoided through 2027 — license
+ dep-creep risks exceed value, and explicitly parked under D21.

## Per D21 — this is M2-permitted

Planning of architectural integration is explicitly permitted under
amended M2 (D21 §"Permitted: Documentation"). Plan does NOT propose
new features, does NOT bind new runtime deps, does NOT change policy
schema. Execution remains parked until M2 evidence + M3 review.

## Test impact

None — docs-only. 152/152 tests still green.

## Atomic per ADR-0017

- 1 new file (`docs/operations/pyfallow-integration-plan.md`), +236 lines
- Existing `docs/operations/` directory
- 0 src changes, 0 test changes
- base=main (post-D2 merge)

## Wizji-Wartości Wave — COMPLETE after this PR

- D1 (#57): D21 amendment  merged
- D2 (#58): dogfood actual-vs-mental-model  merged
- D3 (platform#523): workflow wiring  codex shipped #524
- D4 (this PR): pyfallow-integration-plan  final

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
agent/claude-code
agent/codex
agent/gemini
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
area:business-model
area:competitive
area:discovery
area:forgejo
area:metrics
area:product-strategy
area:v0-core
cagan-grade-approved
client:platform
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
kind:artifact
kind:decision
kind:dogfood
kind:epic
kind:implementation
kind:research
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
priority:p0
priority:p1
priority:p2
priority:p3
ready-for-agent
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
size/large
size/medium
size/small
size/tiny
size/unknown
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:blocked-on-discovery
status:cagan-grade-review-pending
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:needs-operator-decision
status:operator-needed
status:parked
tier:0-anchor
tier:0-platform-substrate
tier:1-core
tier:1-iskra-value-layer
tier:2-supporting
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
wave:1-foundation
wave:2-positioning
wave:3-validation
wave:4-economics
wave:5-operating
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pdurlej/patchwarden!59
No description provided.