Work Packages: Bulk Edit Occurrence Classification Guardrail
Mission: bulk-edit-occurrence-classification-guardrail-01KP423X Date: 2026-04-13 Spec: spec.md | Plan: plan.md
Subtask Index
| ID | Description | WP | Parallel |
|---|---|---|---|
| T001 | Add change_mode to MissionMetaOptional TypedDict + validation | WP01 | [P] |
| T002 | Unit tests for change_mode metadata field | WP01 | [D] |
| T003 | Create src/specify_cli/bulk_edit/ package with __init__.py | WP02 | [D] |
| T004 | Create occurrence_map.py — YAML loading, structural validation, admissibility | WP02 | [D] |
| T005 | Unit tests for occurrence map validation | WP02 | [D] |
| T006 | Create inference.py — weighted keyword scanning + threshold | WP03 | [D] |
| T007 | Unit tests for inference keyword scanning | WP03 | [D] |
| T008 | Create gate.py — ensure_occurrence_classification_ready() guard function | WP04 | |
| T009 | Wire gate into implement.py between planning validation and workspace allocation | WP04 | |
| T010 | Wire gate into workflow.py review function | WP04 | |
| T011 | Wire inference warning into implement path for non-bulk-edit missions | WP04 | |
| T012 | Integration tests for implement and review gate CLI behavior | WP04 | |
| T013 | Register occurrence_map_complete guard primitive in guards.py | WP05 | [D] |
| T014 | Update expected-artifacts.yaml with conditional occurrence_map.yaml | WP05 | [D] |
| T015 | Create doctrine directive 035 YAML | WP05 | [D] |
| T016 | Create occurrence-classification-workflow tactic YAML | WP05 | [D] |
| T017 | Update implement command template to reference occurrence map | WP06 | |
| T018 | Update review command template to reference occurrence map | WP06 |
Dependency Graph
WP01 (metadata) ──┐
WP02 (schema) ───┼── WP04 (gates + CLI wiring) ──┐
WP03 (inference) ─┘ ├── WP06 (templates)
WP02 (schema) ───── WP05 (guards + doctrine) ────┘
Parallelization: WP01, WP02, WP03 are fully parallel (no shared dependencies). WP04 fans in from all three. WP05 depends only on WP02. WP06 depends on WP04 and WP05.
Phase 1: Foundation (parallel)
WP01 — Mission Metadata: change_mode Field
Priority: P0 (foundation) Dependencies: none Prompt: tasks/WP01-mission-metadata-change-mode.md Estimated size: ~250 lines
- ✅ T001 Add
change_modetoMissionMetaOptionalTypedDict + validation (WP01) - ✅ T002 Unit tests for
change_modemetadata field (WP01)
WP02 — Occurrence Map Schema & Validation
Priority: P0 (foundation) Dependencies: none Prompt: tasks/WP02-occurrence-map-schema.md Estimated size: ~350 lines
- ✅ T003 Create
src/specify_cli/bulk_edit/package with__init__.py(WP02) - ✅ T004 Create
occurrence_map.py— YAML loading, structural validation, admissibility (WP02) - ✅ T005 Unit tests for occurrence map validation (WP02)
WP03 — Inference Warning System
Priority: P0 (foundation) Dependencies: none Prompt: tasks/WP03-inference-warning.md Estimated size: ~250 lines
- ✅ T006 Create
inference.py— weighted keyword scanning + threshold (WP03) - ✅ T007 Unit tests for inference keyword scanning (WP03)
Phase 2: Core Integration
WP04 — Gate Function & CLI Wiring
Priority: P0 (core) Dependencies: WP01, WP02, WP03 Prompt: tasks/WP04-gate-function-cli-wiring.md Estimated size: ~450 lines
- ✅ T008 Create
gate.py—ensure_occurrence_classification_ready()guard function (WP04) - ✅ T009 Wire gate into
implement.pybetween planning validation and workspace allocation (WP04) - ✅ T010 Wire gate into
workflow.pyreview function (WP04) - ✅ T011 Wire inference warning into implement path for non-bulk-edit missions (WP04)
- ✅ T012 Integration tests for implement and review gate CLI behavior (WP04)
Phase 3: Supporting Infrastructure (parallel)
WP05 — Guard Registration, Expected Artifacts & Doctrine
Priority: P1 (supporting) Dependencies: WP02 Prompt: tasks/WP05-guards-artifacts-doctrine.md Estimated size: ~350 lines
- ✅ T013 Register
occurrence_map_completeguard primitive inguards.py(WP05) - ✅ T014 Update
expected-artifacts.yamlwith conditionaloccurrence_map.yaml(WP05) - ✅ T015 Create doctrine directive 035 YAML (WP05)
- ✅ T016 Create
occurrence-classification-workflowtactic YAML (WP05)
Phase 4: Template Updates
WP06 — Command Template Updates
Priority: P1 (documentation) Dependencies: WP04, WP05 Prompt: tasks/WP06-command-template-updates.md Estimated size: ~250 lines
- ✅ T017 Update implement command template to reference occurrence map (WP06)
- ✅ T018 Update review command template to reference occurrence map (WP06)