VFS FEDERATION STUDIO v0.0.11 — P4 DIRECT VFS TRAINING HANDOFF
==============================================================

OUTCOME
-------
This cut makes Monk Loom trainable from an explicit verified corpus stored directly in Federation
Image v2. Monk Spindle deterministically converts named signals to bounded features. Training emits
an uncommitted candidate attachment and complete ledger; the source VFS never changes.

START HERE
----------
1. docs/architecture/MONK_SPINDLE_DIRECT_TRAINING_CONTRACT.md
2. docs/architecture/LIVE_PROGRESS_WORKER_CONTRACT.md
3. docs/architecture/P4_DIRECT_TRAINING_STATUS.md
4. docs/architecture/P4_DIRECT_TRAINING_EVIDENCE.md
5. examples/monk_loom/README.md
6. src/vfs_federation_studio/domain/training.py
7. src/vfs_federation_studio/federation/training.py
8. perl_runtime_templates/compatibility/VFS/Federation/MonkSpindle.pm

FROZEN v0.0.11 DECISIONS
------------------------
- Training documents are ordinary root-owned VFS files; the Federation v2 wire format is unchanged.
- Schema v1 ownership_scope is root-image only.
- Corpus paths are explicit, exact reads; no crawling and no Monk READ fallback.
- Canonical JSON may carry one terminal LF, excluded from document identity.
- Evidence digest is over exact evidence-file bytes.
- Spindle bindings exactly match model feature order and use integer-only transforms.
- Training order is epoch-major, then manifest record order.
- Every step is existing verified-head proposal-only adaptation.
- A successful run returns candidate JSON plus a canonical report; it performs no VFS write.
- Python and core-only Perl must match candidate and report fingerprints.
- Training work runs in a spawned worker; live progress is a bounded latest-state channel.
- Cancellation is checked at bounded record/adaptation boundaries and publishes no partial candidate.

PRIMARY API
-----------
Python:
  V2FederationRuntime.neural_train_from_vfs(manifest_path, progress=..., cancellation_requested=...)
  MonkSpindleRecipe / SpindleBinding / MonkTrainingManifest / MonkTrainingRecord
  MonkSpindleEngine / NeuralTrainingResult / NeuralTrainingReport

Perl:
  $runtime->neural_train_from_vfs($manifest_path, progress => ..., cancellation_requested => ...)
  VFS::Federation::MonkSpindle

CLI / worker:
  vfs-federation-neural IMAGE MANIFEST_PATH --proposal-out ... --report-out ...
  TRAIN_MONK_LOOM_FROM_VFS

NEXT SAFE DEVELOPMENT SLICE
---------------------------
Add the presentation-only Studio model/evidence/training surface over these headless contracts and
wire F1 to the stable training/progress help contexts. Keep parsing, exact reads, extraction,
training, report search, and model acceptance outside Qt. Require explicit candidate review before
placing a proposed attachment in a candidate project.

Do not widen ownership scope, train hidden layers, or accept proposals automatically without a
separate signed-evidence, concurrency, rollback, resource-governance, and policy design.

REMAINING CROSS-PROJECT WORK
----------------------------
- P3 regex wall-clock/preemption hardening.
- Bounded/mapped large diagnostic-image opening.
- Real PySide6 platform/accessibility/high-DPI qualification.
- Exact target-language confirmation before widening i18n catalogs.
- Project-store persistence for evidence/report history and reviewed proposal acceptance.
- Optional cryptographic verifier/signature contract.

VERIFICATION
------------
Use P4_DIRECT_TRAINING_EVIDENCE.md. Final observed gates are 155 Python passes with two documented
optional-PySide skips, 93/93 Pure-Perl assertions, eight Perl modules syntax-clean, deterministic
Python/Perl training parity, a clean-installed functional wheel, and a 261-entry source manifest
verified after clean extraction.
