From 92c22dce8ae1b6e9d019921a2a888c6435d964f2 Mon Sep 17 00:00:00 2001 From: Kawa Date: Fri, 10 Apr 2026 10:45:42 +0200 Subject: [PATCH] docs: create roadmap (5 phases) --- .planning/REQUIREMENTS.md | 60 ++++++++++---------- .planning/ROADMAP.md | 115 ++++++++++++++++++++++++++++++++++++++ .planning/STATE.md | 61 ++++++++++++++++++++ 3 files changed, 206 insertions(+), 30 deletions(-) create mode 100644 .planning/ROADMAP.md create mode 100644 .planning/STATE.md diff --git a/.planning/REQUIREMENTS.md b/.planning/REQUIREMENTS.md index 41f08d3..e43c335 100644 --- a/.planning/REQUIREMENTS.md +++ b/.planning/REQUIREMENTS.md @@ -83,39 +83,39 @@ Which phases cover which requirements. Updated during roadmap creation. | Requirement | Phase | Status | |-------------|-------|--------| -| DRV-01 | — | Pending | -| DRV-02 | — | Pending | -| DRV-03 | — | Pending | -| DRV-04 | — | Pending | -| DRV-05 | — | Pending | -| PRNT-01 | — | Pending | -| PRNT-02 | — | Pending | -| PRNT-03 | — | Pending | -| PRNT-04 | — | Pending | -| PRNT-05 | — | Pending | -| PRNT-06 | — | Pending | -| PRNT-07 | — | Pending | -| PRNT-08 | — | Pending | -| PRNT-09 | — | Pending | -| PRNT-10 | — | Pending | -| SCRPT-01 | — | Pending | -| SCRPT-02 | — | Pending | -| SCRPT-03 | — | Pending | -| SCRPT-04 | — | Pending | -| SCRPT-05 | — | Pending | -| PKG-01 | — | Pending | -| PKG-02 | — | Pending | -| PKG-03 | — | Pending | -| PKG-04 | — | Pending | -| PKG-05 | — | Pending | -| INFRA-01 | — | Pending | -| INFRA-02 | — | Pending | +| INFRA-01 | Phase 1 | Pending | +| INFRA-02 | Phase 1 | Pending | +| DRV-01 | Phase 2 | Pending | +| DRV-02 | Phase 2 | Pending | +| DRV-03 | Phase 2 | Pending | +| DRV-04 | Phase 2 | Pending | +| DRV-05 | Phase 2 | Pending | +| PRNT-01 | Phase 3 | Pending | +| PRNT-02 | Phase 3 | Pending | +| PRNT-03 | Phase 3 | Pending | +| PRNT-04 | Phase 3 | Pending | +| PRNT-05 | Phase 3 | Pending | +| PRNT-06 | Phase 3 | Pending | +| PRNT-07 | Phase 3 | Pending | +| PRNT-08 | Phase 3 | Pending | +| PRNT-09 | Phase 3 | Pending | +| PRNT-10 | Phase 3 | Pending | +| SCRPT-01 | Phase 4 | Pending | +| SCRPT-02 | Phase 4 | Pending | +| SCRPT-03 | Phase 4 | Pending | +| SCRPT-04 | Phase 4 | Pending | +| SCRPT-05 | Phase 4 | Pending | +| PKG-01 | Phase 5 | Pending | +| PKG-02 | Phase 5 | Pending | +| PKG-03 | Phase 5 | Pending | +| PKG-04 | Phase 5 | Pending | +| PKG-05 | Phase 5 | Pending | **Coverage:** - v1 requirements: 27 total -- Mapped to phases: 0 -- Unmapped: 27 +- Mapped to phases: 27 +- Unmapped: 0 --- *Requirements defined: 2026-04-10* -*Last updated: 2026-04-10 after initial definition* +*Last updated: 2026-04-10 after roadmap creation* diff --git a/.planning/ROADMAP.md b/.planning/ROADMAP.md new file mode 100644 index 0000000..972d1f8 --- /dev/null +++ b/.planning/ROADMAP.md @@ -0,0 +1,115 @@ +# Roadmap: ImpTune + +## Overview + +ImpTune ships in five phases ordered by risk and dependency. The foundation phase validates the highest-risk unknown (.intunewin format) before anything else is built. Driver management comes next because the printer form's driver dropdown depends on parsed INF data. Printer configuration and persistence follow. Script generation builds the PowerShell output that both export formats wrap. Finally, package export assembles all prior work into downloadable deployment artifacts. + +## Phases + +**Phase Numbering:** +- Integer phases (1, 2, 3): Planned milestone work +- Decimal phases (2.1, 2.2): Urgent insertions (marked with INSERTED) + +Decimal phases appear between their surrounding integers in numeric order. + +- [ ] **Phase 1: Foundation** - Docker container scaffold, SQLite schema, and .intunewin format spike +- [ ] **Phase 2: Driver Management** - Driver ZIP upload, INF parsing, DriverDesc dropdown, volume persistence +- [ ] **Phase 3: Printer Configuration** - Full printer config form, client/tenant labels, SQLite persistence +- [ ] **Phase 4: Script Generation** - PowerShell install/uninstall/detection scripts with all correctness guards +- [ ] **Phase 5: Package Export** - .intunewin and NinjaRMM ZIP export, icon upload, command preview + +## Phase Details + +### Phase 1: Foundation +**Goal**: A running Docker container with the app scaffold, data schema, and a validated .intunewin generation capability +**Depends on**: Nothing (first phase) +**Requirements**: INFRA-01, INFRA-02 +**Success Criteria** (what must be TRUE): + 1. Running `docker compose up` starts the app and serves a response on localhost + 2. The container has no Node.js dependency and starts from a single image + 3. A Python-generated .intunewin file uploads successfully to a real Intune tenant without format errors + 4. SQLite database initializes automatically on first run with the correct schema +**Plans**: TBD + +Plans: +- [ ] 01-01: Docker container scaffold (Dockerfile, python:3.12-slim-bookworm, volume, healthcheck) +- [ ] 01-02: SQLite schema and data models (peewee ORM, driver + printer + client tables) +- [ ] 01-03: .intunewin format spike (AES-256-CBC encrypted ZIP-in-ZIP with detection.xml, validated against real Intune) + +### Phase 2: Driver Management +**Goal**: Technicians can upload driver packages and select driver names from parsed INF data — no free-text entry +**Depends on**: Phase 1 +**Requirements**: DRV-01, DRV-02, DRV-03, DRV-04, DRV-05 +**Success Criteria** (what must be TRUE): + 1. User can upload a ZIP file containing INF + supporting files via the browser + 2. After upload, user sees a dropdown of driver names extracted from the INF (DriverDesc values), not a text field + 3. Uploaded driver packages survive container restarts (persisted to Docker volume) + 4. System flags files in the driver package that are not referenced by the INF, with a count or list +**Plans**: TBD + +Plans: +- [ ] 02-01: Driver upload endpoint and volume storage (SHA256-keyed, deduplication) +- [ ] 02-02: INF parser (DriverDesc extraction, multi-model INF support) +- [ ] 02-03: Driver library UI (upload form, driver list, unused-file hints) + +### Phase 3: Printer Configuration +**Goal**: Technicians can configure all printer parameters, assign printers to clients, and retrieve saved configs without re-uploading drivers +**Depends on**: Phase 2 +**Requirements**: PRNT-01, PRNT-02, PRNT-03, PRNT-04, PRNT-05, PRNT-06, PRNT-07, PRNT-08, PRNT-09, PRNT-10 +**Success Criteria** (what must be TRUE): + 1. User can fill in a printer form (name, IP, port, duplex, color/BW, paper size, collate) and save it + 2. Saved printer appears under its client/tenant label after page refresh + 3. System auto-populates the port name field from the entered IP address (user can edit it) + 4. User can open a saved printer config and regenerate its package without uploading the driver again +**Plans**: TBD + +Plans: +- [ ] 03-01: Printer config form and CRUD API (all fields, validation, SQLite persistence) +- [ ] 03-02: Client/tenant organization (label assignment, printer list grouped by client) +- [ ] 03-03: Saved config retrieval and regeneration flow + +### Phase 4: Script Generation +**Goal**: The system produces correct, production-ready PowerShell scripts that handle all Intune and RMM execution contexts +**Depends on**: Phase 3 +**Requirements**: SCRPT-01, SCRPT-02, SCRPT-03, SCRPT-04, SCRPT-05 +**Success Criteria** (what must be TRUE): + 1. Generated install script runs successfully on a clean Windows endpoint via Intune (pnputil staging + port + driver + printer + settings) + 2. Generated install script self-elevates via UAC when run interactively by a standard user + 3. Generated install script relaunches in 64-bit PowerShell when Intune's 32-bit process triggers it (WOW64 guard) + 4. Generated uninstall script removes printer, driver, and port cleanly + 5. Generated detection script returns exit 0 when the printer is installed and exit 1 when it is not +**Plans**: TBD + +Plans: +- [ ] 04-01: Jinja2 PS install script template (pnputil two-step, SYSTEM vs user detection, WOW64 guard, idempotency) +- [ ] 04-02: Uninstall and detection script templates +- [ ] 04-03: Script generation API endpoint (accepts printer config, returns script content) + +### Phase 5: Package Export +**Goal**: Technicians can download a complete, ready-to-deploy package for either Intune or NinjaRMM in one click +**Depends on**: Phase 4 +**Requirements**: PKG-01, PKG-02, PKG-03, PKG-04, PKG-05 +**Success Criteria** (what must be TRUE): + 1. User can download a .intunewin file that Intune accepts as a Win32 app without errors + 2. User can download a NinjaRMM ZIP containing the install script and driver folder + 3. User can upload a custom PNG icon (256x256, max 750KB) and it is embedded in the .intunewin package + 4. User can preview and copy the Intune install command string and uninstall command string before exporting +**Plans**: TBD + +Plans: +- [ ] 05-01: NinjaRMM ZIP builder (script + driver folder, StreamingResponse download) +- [ ] 05-02: .intunewin builder (reuse Phase 1 spike, wire to printer config + drivers + detection script) +- [ ] 05-03: Icon upload and Intune command preview UI + +## Progress + +**Execution Order:** +Phases execute in numeric order: 1 → 2 → 3 → 4 → 5 + +| Phase | Plans Complete | Status | Completed | +|-------|----------------|--------|-----------| +| 1. Foundation | 0/3 | Not started | - | +| 2. Driver Management | 0/3 | Not started | - | +| 3. Printer Configuration | 0/3 | Not started | - | +| 4. Script Generation | 0/3 | Not started | - | +| 5. Package Export | 0/3 | Not started | - | diff --git a/.planning/STATE.md b/.planning/STATE.md new file mode 100644 index 0000000..544e6f4 --- /dev/null +++ b/.planning/STATE.md @@ -0,0 +1,61 @@ +# Project State + +## Project Reference + +See: .planning/PROJECT.md (updated 2026-04-10) + +**Core value:** Generate a complete, working printer deployment package (script + drivers + icon) in minutes instead of manually scripting each printer setup. +**Current focus:** Phase 1 - Foundation + +## Current Position + +Phase: 1 of 5 (Foundation) +Plan: 0 of 3 in current phase +Status: Ready to plan +Last activity: 2026-04-10 — Roadmap created, 5 phases derived from 27 requirements + +Progress: [░░░░░░░░░░] 0% + +## Performance Metrics + +**Velocity:** +- Total plans completed: 0 +- Average duration: - +- Total execution time: 0 hours + +**By Phase:** + +| Phase | Plans | Total | Avg/Plan | +|-------|-------|-------|----------| +| - | - | - | - | + +**Recent Trend:** +- Last 5 plans: - +- Trend: - + +*Updated after each plan completion* + +## Accumulated Context + +### Decisions + +Decisions are logged in PROJECT.md Key Decisions table. +Recent decisions affecting current work: + +- Phase 1: .intunewin reimplemented natively in Python (IntuneWinAppUtil.exe is a Windows PE binary, cannot run in Linux container) +- Phase 1: Stack is Python 3.12 + FastAPI + Jinja2 + HTMX + SQLite + pycryptodome + +### Pending Todos + +None yet. + +### Blockers/Concerns + +- Phase 1: .intunewin byte-level format compliance is MEDIUM confidence — must validate Python-generated package against a real Intune tenant before Phase 5 export work begins +- Phase 3: pnputil + $PSScriptRoot path resolution under SYSTEM context needs validation on a real Intune-managed device + +## Session Continuity + +Last session: 2026-04-10 +Stopped at: Roadmap created — ready to plan Phase 1 +Resume file: None