Plock — Demo Readiness

Canonical PLOCK baseline package, QA review, and narrow verification notes.

Demo Readiness — Index

Source: ~/ALAI/products/Plock/docs/demo-readiness/INDEX.md


PLOCK Demo Readiness — Canonical Baseline Index

Date: 2026-03-14
Purpose: Entry point for all agents and humans working on PLOCK demo-readiness, documentation QA, and subsequent backlog generation.


Read in This Order

  1. 00-canonical-source-of-truth.md
  2. 01-user-stories-baseline.md
  3. 02-feature-baseline.md
  4. 03-gaps-and-next-steps.md
  5. 04-qa-checklist-baseline.md
  6. 05-initial-package-review.md
  7. 06-api-spec-verification-pass.md

Working Rules


Status

This package is a manually curated canonical baseline created after discovering:

It is the temporary source of truth until a fuller reviewed demo-readiness package replaces it.

Canonical Source of Truth

Source: ~/ALAI/products/Plock/docs/demo-readiness/00-canonical-source-of-truth.md


PLOCK — Canonical Source of Truth

Date: 2026-03-14
Purpose: Define which files are authoritative for PLOCK and which files are stale/conflicting, so all future documentation, QA, and implementation work is based on real system state.


1. Why This Exists

PLOCK currently has a real codebase and substantial documentation, but not all documentation reflects the same architecture.

Without a canonical source-of-truth map:

This document defines what is authoritative and what is not.


2. Authority Order

When files conflict, use this precedence:

  1. Actual code and repository structure
  2. Database migrations and runtime configuration
  3. BUILD-BLUEPRINT.md
  4. README.md
  5. Runbooks and operational docs
  6. ADR documents
  7. PRD / GTM / Regulatory docs
  8. API-SPEC.md (reference only unless confirmed against code)
  9. Stale/conflicting docs must not be used as source of truth

3. Authoritative Sources

3.1 Codebase

The following repo areas are authoritative:

3.2 Primary Architecture / Build Docs

These are currently the strongest documentation sources:

3.3 Product / Business / Compliance Docs

These are authoritative for product intent, market framing, compliance assumptions, and user-level needs — but must still be reconciled against code:

3.4 ADRs

Use as authoritative for declared decisions when they match repo reality:


4. Current Real Architecture

Based on actual code and authoritative docs, the real current system is:

Backend

Frontend

Infrastructure / Deployment

Multi-tenancy

Integrations


5. Semi-Authoritative / Needs Verification

docs/API-SPEC.md

This file is useful as a product/API intent document, but it must be verified against the real Ktor routing and actual backend implementation before being treated as canonical.

Use it as:

Do not use it as final truth without code verification.


6. Stale / Conflicting Sources

docs/ARCHITECTURE.md

This file is currently stale/conflicting and must not be used as the main architecture source.

It describes a different architecture, including:

That conflicts with the actual repo and stronger sources, which show:

Rule: docs/ARCHITECTURE.md may be used only as historical/stale material until rewritten or archived.


7. Operational Constraints

7.1 Agent Output Is Not Source of Truth

The following are not authoritative:

7.2 Deliverable Existence Is Required

Any documentation task that claims output files must be verified against the actual filesystem. A claimed file path is not considered real unless:


8. What Future Docs Must Be Based On

The next canonical PLOCK documentation pass must be based on:

User Stories

Feature Catalog

ADR / BDR

Test Scenarios


9. Current Remaining Gaps

The baseline canonical package now exists under docs/demo-readiness/, but important follow-up artifacts and cleanups still remain.

Current remaining gaps:

Current hygiene issue:


10. Working Rule for All Remaining PLOCK Work

Until a new canonical documentation package exists:


11. Decision

This document is the baseline authority map for all remaining PLOCK planning, QA, and implementation prep work.

Any future PLOCK task that produces:

must explicitly reference this authority model before proceeding.

User Stories Baseline

Source: ~/ALAI/products/Plock/docs/demo-readiness/01-user-stories-baseline.md


PLOCK — User Stories Baseline

Date: 2026-03-14
Purpose: Establish a first canonical user-story baseline for PLOCK using real repository evidence and authoritative product documents. This is not yet the final polished story set; it is the operational baseline for documentation, QA, and backlog slicing.


1. Scope and Method

This baseline is derived from:

This document intentionally avoids inventing features not supported by either:


2. Story Status Model

Each story is tagged as one of:


3. Receiving / Inbound

US-INB-001 — Receive goods via barcode

Status: exists
Evidence: PRD.md, ReceivingRoutes.kt, ReceivingService.kt, barcode-related backend structure

As a warehouse worker
I want to scan a barcode and identify the purchase order it belongs to
So that I can receive goods correctly without manual lookup

US-INB-002 — View open purchase orders

Status: exists
Evidence: PRD.md, ReceivingRoutes.kt, supplier/receiving route structure

As a warehouse manager
I want to see all open purchase orders and expected arrival dates
So that I can plan staffing and dock capacity

US-INB-003 — Guided putaway after receiving

Status: partial
Evidence: PRD.md, LocationRoutes.kt, PutAwayService.kt

As a warehouse worker
I want to be guided to the correct bin location after receiving
So that I do not need to memorize where products belong

US-INB-004 — Detect receiving discrepancies

Status: exists
Evidence: PRD.md, ReceivingDiscrepancyTest.kt, discrepancy migration/table evidence

As a warehouse manager
I want to be notified immediately when received quantities do not match the purchase order
So that I can resolve supplier issues before inventory is corrupted


4. Inventory Management

US-INV-001 — Real-time inventory visibility

Status: exists
Evidence: PRD.md, InventoryRoutes.kt, InventoryService.kt

As a warehouse manager
I want to see the exact quantity of a SKU by location in real time
So that I can answer operational questions without walking the warehouse

US-INV-002 — Reorder point alerting

Status: partial
Evidence: PRD.md, inventory domain present; implementation maturity unclear

As a warehouse manager
I want to receive an alert when inventory falls below reorder point
So that I can prevent avoidable stockouts

US-INV-003 — Zone-based cycle counts

Status: exists
Evidence: PRD.md, CycleCountRoutes.kt, CycleCountService.kt, tests

As a warehouse manager
I want to run a cycle count for a specific zone without stopping all operations
So that I can maintain inventory accuracy continuously

US-INV-004 — Mobile-assisted physical inventory count

Status: partial
Evidence: PRD.md, V7 mobile support migrations, runbook/mobile references

As a warehouse worker
I want to perform physical inventory counts on a mobile device
So that counting is faster and less error-prone than paper workflows


5. Orders / Outbound

US-OUT-001 — Release urgent orders quickly

Status: exists
Evidence: PRD.md, OrderRoutes.kt, order/picking domain structure

As a warehouse manager
I want to release urgent orders with a single action
So that I can respond quickly to escalations and deadlines

US-OUT-002 — Work from structured picking flow

Status: exists
Evidence: PickingRoutes.kt, PickingService.kt, mfe-picking

As a picker
I want to receive a structured picking workflow
So that I can pick efficiently and consistently

US-OUT-003 — Verify packing with product photo

Status: partial
Evidence: PRD.md, frontend/product/packing intent visible in docs

As a packing worker
I want to see a product photo during packing
So that I can confirm I am sealing the correct item

US-OUT-004 — Unified shipment tracking view

Status: partial
Evidence: PRD.md, ShipmentRoutes.kt, carrier integration structure

As a warehouse manager
I want to see outbound shipment status in one place
So that I can proactively handle delays and customer issues


6. Shipping / Carrier Operations

US-SHP-001 — Print carrier labels directly from Plock

Status: exists
Evidence: PRD.md, PostNord/DHL/Instabee integration code, shipment/carrier routes

As a warehouse worker
I want to print shipping labels directly from Plock
So that I do not need to log into separate carrier portals

US-SHP-002 — Use multiple carriers in one operational flow

Status: exists
Evidence: CarrierRoutes.kt, CarrierIntegrationRoutes.kt, multiple carrier adapters/services

As a warehouse manager
I want to work with PostNord, DHL, and Instabee in one system
So that outbound shipping does not depend on multiple manual carrier workflows

US-SHP-003 — Track carrier sync and integration health

Status: partial
Evidence: integration_sync_log schema, runbook sections for Fortnox/carrier failures

As a system operator
I want to inspect carrier/integration sync behavior
So that I can detect and troubleshoot failures quickly


7. AI / Smart Warehouse Operations

US-AI-001 — Ask warehouse questions in Swedish

Status: partial-to-exists
Evidence: PRD.md, AI-STRATEGY.md, mfe-ai/, product positioning

As a warehouse manager
I want to ask warehouse questions in Swedish and get immediate answers
So that I can make decisions without SQL, exports, or manual searching

US-AI-002 — Execute warehouse commands via AI with confirmation

Status: planned / partial
Evidence: PRD.md, AI-STRATEGY.md

As a warehouse manager
I want to trigger operational actions through natural language with explicit confirmation
So that I can manage exceptions faster than through deep UI navigation

US-AI-003 — Optimize pick routes

Status: partial-to-exists
Evidence: PRD.md, AI-STRATEGY.md, picking domain, runbook references to Smart Picking

As a warehouse manager
I want to use smart pick route optimization
So that workers spend less time walking and more time picking


8. Dashboard / Monitoring

US-DASH-001 — Operational dashboard

Status: exists
Evidence: DashboardRoutes.kt, PRD.md, dashboard domain

As a warehouse manager
I want to see a real-time dashboard with today’s operational KPIs
So that I can spot bottlenecks before they become incidents

US-DASH-002 — Monitor shipment and fulfillment progress

Status: partial
Evidence: dashboard/shipment routes, PRD

As a operations lead
I want to monitor fulfillment progress and pending shipments
So that I can intervene before SLAs are missed


9. Users / Roles / Multi-Tenancy

US-SEC-001 — Manage users and roles

Status: exists
Evidence: UserRoutes.kt, RoleRoutes.kt, RbacService.kt

As an admin
I want to manage users and roles
So that only the right people can perform sensitive warehouse actions

US-SEC-002 — Restrict data by warehouse

Status: exists
Evidence: TenantPlugin.kt, RLS-AUDIT.md, RLS migrations

As a warehouse operator
I want to only see data for my warehouse
So that tenant/customer separation is enforced safely

US-SEC-003 — Keep tenant isolation enforced at the DB layer

Status: exists
Evidence: RLS-AUDIT.md, migration V6__rls_tenant_isolation.sql

As the platform
I want to enforce tenant isolation in PostgreSQL using RLS
So that application bugs do not automatically become cross-tenant data leaks


10. Integrations / Accounting

US-INT-001 — Sync warehouse/accounting data with Fortnox

Status: exists
Evidence: Fortnox integration modules, docs, secrets, runbook

As a Swedish SMB operator
I want to integrate Plock with Fortnox
So that warehouse operations and accounting stay aligned

US-INT-002 — Re-authorize or recover from Fortnox sync failure

Status: partial-to-exists
Evidence: Fortnox OAuth/sync routes, runbook incident section

As a tenant admin
I want to reconnect or recover the Fortnox integration when it fails
So that business operations are not blocked by stale tokens or sync errors


11. 3PL / Client Isolation (Phase-Dependent)

US-3PL-001 — Separate client inventory views

Status: planned
Evidence: PRD.md, GTM-STRATEGY.md, regulatory references

As a 3PL operations lead
I want to see inventory separated by client
So that I can manage a multi-client warehouse safely

US-3PL-002 — Support 3PL billing workflows

Status: planned
Evidence: REGULATORY.md, GTM and pricing logic

As a 3PL operator
I want to support warehousing-service billing workflows
So that customer charging is structured and scalable


12. Business / Sales / Market Layer

US-BIZ-001 — Position as Fortnox-next-step WMS

Status: planned/business
Evidence: GTM-STRATEGY.md

As the business
I want to position Plock as the natural next step after Fortnox Lager
So that market entry is focused and credible

US-BIZ-002 — Support Swedish SMB self-serve onboarding motion

Status: planned/business
Evidence: GTM and product docs

As the product business
I want to enable a low-friction onboarding and trial motion
So that acquisition cost stays low and distribution scales


13. Summary

Strongly supported by current code/docs

Present but maturity unclear

More Phase 2 / strategic than current MVP


14. Working Rule

This user-story baseline is the first canonical operational extraction.

Any future:

must map back to these stories and mark each item as:

Feature Baseline

Source: ~/ALAI/products/Plock/docs/demo-readiness/02-feature-baseline.md


PLOCK — Feature Baseline

Date: 2026-03-14
Purpose: Establish a first canonical feature baseline for PLOCK using real repository evidence and authoritative documentation. This is the operational feature map that future QA, backlog slicing, implementation planning, and demo prep should build on.


1. Method

This baseline is based on:

Every feature is tagged with a maturity label:


2. Feature Groups

  1. Platform / architecture
  2. Backend domain features
  3. Frontend / UX features
  4. Database / tenant isolation
  5. Integrations
  6. AI features
  7. Testing / QA
  8. Ops / deployment / observability
  9. Security
  10. Business / GTM / support
  11. Known contradictions and gaps

3. Platform / Architecture

F-PLAT-001 — Kotlin/Ktor backend platform

Status: exists
Evidence: backend/build.gradle.kts, Application.kt, Ktor plugins and route modules

PLOCK uses a Kotlin/Ktor backend, not an Express/Node backend.

F-PLAT-002 — React micro-frontend frontend platform

Status: exists
Evidence: frontend/, frontend/shell/package.json, MFE folders, Vite setup

PLOCK frontend is a React 19 + TypeScript + Vite Module Federation system with multiple MFEs.

F-PLAT-003 — Monorepo with mixed backend/frontend tooling

Status: exists
Evidence: root package.json, backend/, frontend/, workspaces, Turborepo scripts

PLOCK uses:

F-PLAT-004 — Railway-oriented deployment model

Status: partial-to-exists
Evidence: infrastructure/README.md, Terraform files, Railway env references

The deployment model is strongly Railway-oriented, although production readiness should still be independently verified.


4. Backend Domain Features

F-BE-001 — Authentication

Status: exists
Evidence: AuthRoutes.kt, Authentication.kt, JWT config in application.yaml

F-BE-002 — Warehouse management

Status: exists
Evidence: WarehouseRoutes.kt, warehouse references in API/docs, migrations

F-BE-003 — Location/bin management

Status: exists
Evidence: LocationRoutes.kt, LocationService.kt, locations schema

F-BE-004 — Product management

Status: exists
Evidence: ProductRoutes.kt, products table, DTOs/services

F-BE-005 — Inventory management

Status: exists
Evidence: InventoryRoutes.kt, InventoryService.kt, inventory schema, tests

F-BE-006 — Order management

Status: exists
Evidence: OrderRoutes.kt, OrderService.kt, order schema

F-BE-007 — Picking workflow

Status: exists
Evidence: PickingRoutes.kt, PickingService.kt, mfe-picking, tests

F-BE-008 — Receiving workflow

Status: exists
Evidence: ReceivingRoutes.kt, ReceivingService.kt, receiving tables/migrations, discrepancy test

F-BE-009 — Shipment management

Status: exists
Evidence: ShipmentRoutes.kt, ShipmentService.kt, shipment schema, tests

F-BE-010 — Carrier management

Status: exists
Evidence: CarrierRoutes.kt, CarrierService.kt, carriers schema

F-BE-011 — Carrier integration endpoints

Status: exists
Evidence: CarrierIntegrationRoutes.kt, integration clients and services

F-BE-012 — Cycle counts

Status: exists
Evidence: CycleCountRoutes.kt, CycleCountService.kt, tests, schema

F-BE-013 — Stock movements / audit trail for inventory changes

Status: exists
Evidence: StockMovementRoutes.kt, stock_movements table, schema

F-BE-014 — Returns workflow

Status: exists
Evidence: ReturnRoutes.kt, ReturnService.kt, return schema

F-BE-015 — Supplier management

Status: exists
Evidence: SupplierRoutes.kt, SupplierService.kt, supplier schema

F-BE-016 — Zone management

Status: exists
Evidence: ZoneRoutes.kt, ZoneService.kt, zones schema

F-BE-017 — User and role management

Status: exists
Evidence: UserRoutes.kt, RoleRoutes.kt, RbacService.kt

F-BE-018 — Dashboard endpoints

Status: exists
Evidence: DashboardRoutes.kt

F-BE-019 — Barcode support

Status: exists
Evidence: BarcodeRoutes.kt, BarcodeService.kt, ZXing dependencies

F-BE-020 — Audit endpoints

Status: exists
Evidence: AuditRoutes.kt, AuditService.kt, audit schema

F-BE-021 — SSE / real-time update infrastructure

Status: exists
Evidence: SseRoutes.kt, SseService.kt, Ktor SSE dependency

F-BE-022 — Webhooks

Status: exists
Evidence: WebhookRoutes.kt, WebhookService.kt, webhook tables

F-BE-023 — Offline/mobile sync support

Status: partial
Evidence: OfflineSyncRoutes.kt, OfflineSyncService.kt, V7__mobile_pwa_support.sql

F-BE-024 — Health endpoints

Status: exists
Evidence: HealthRoutes.kt, runbooks


5. Frontend / UX Features

F-FE-001 — Shell application

Status: exists
Evidence: frontend/shell

F-FE-002 — Inventory MFE

Status: exists
Evidence: frontend/mfe-inventory

F-FE-003 — Orders MFE

Status: exists
Evidence: frontend/mfe-orders

F-FE-004 — Picking MFE

Status: exists
Evidence: frontend/mfe-picking

F-FE-005 — Settings MFE

Status: exists
Evidence: frontend/mfe-settings

F-FE-006 — AI MFE

Status: partial-to-exists
Evidence: frontend/mfe-ai, AI strategy docs

F-FE-007 — Shared shell + MFE architecture

Status: exists
Evidence: frontend repo structure, module federation dependency, blueprint/docs


6. Database / Tenant Isolation Features

F-DB-001 — PostgreSQL primary database

Status: exists
Evidence: build config, env docs, migrations, runbooks

F-DB-002 — Flyway-managed schema

Status: exists
Evidence: Flyway dependency, migrations, ADR references

F-DB-003 — RLS tenant isolation by warehouse_id

Status: exists
Evidence: RLS-AUDIT.md, V6 migration, TenantPlugin docs

F-DB-004 — Warehouse-scoped data model

Status: exists
Evidence: RLS docs, warehouse-based route and domain model

F-DB-005 — Encrypted Fortnox token storage

Status: exists
Evidence: FortnoxTokens.kt, CryptoService.kt, docs

F-DB-006 — Mobile/offline support tables

Status: partial
Evidence: V7__mobile_pwa_support.sql


7. Integration Features

F-INT-001 — Fortnox OAuth

Status: exists
Evidence: FortnoxOAuthRoutes.kt, secrets docs

F-INT-002 — Fortnox sync flow

Status: exists
Evidence: FortnoxSyncRoutes.kt, FortnoxSyncService.kt, runbook incident section

F-INT-003 — PostNord integration

Status: exists
Evidence: PostNord client/service files, docs, secrets config

F-INT-004 — DHL integration

Status: exists
Evidence: DHL client/service files, docs, secrets config

F-INT-005 — Instabee integration

Status: exists
Evidence: Instabee client/service files, docs, secrets config

F-INT-006 — Integration sync logging

Status: exists
Evidence: integration_sync_log schema, runbook references


8. AI Features

F-AI-001 — AI Chat positioning and product surface

Status: partial
Evidence: AI-STRATEGY.md, PRD, mfe-ai

F-AI-002 — Smart Picking / route optimization

Status: partial
Evidence: PRD, AI strategy, runbook mentions

F-AI-003 — Natural language warehouse querying

Status: planned-to-partial
Evidence: PRD + AI strategy


9. Testing / QA Features

F-QA-001 — Backend automated tests

Status: exists
Evidence: backend/src/test/kotlin/*

F-QA-002 — E2E tests

Status: exists
Evidence: e2e/app.spec.ts, e2e/inventory.spec.ts

F-QA-003 — Performance testing structure

Status: partial
Evidence: tests/performance/, infrastructure/k6/

F-QA-004 — Regression test structure

Status: partial
Evidence: tests/regression/


10. Ops / Deployment / Observability Features

F-OPS-001 — Local docker-based dev environment

Status: exists
Evidence: docker-compose.yml, runbooks

F-OPS-002 — Deployment scripts / Terraform infra

Status: exists
Evidence: infrastructure/README.md, main.tf, scripts

F-OPS-003 — Runbooks for incident handling

Status: exists
Evidence: RUNBOOK.md, docs/RUNBOOK.md

F-OPS-004 — Sentry-based monitoring

Status: partial-to-exists
Evidence: backend and frontend Sentry references, runbooks, secrets docs


11. Security Features

F-SEC-001 — JWT auth

Status: exists
Evidence: auth plugin, application.yaml, docs

F-SEC-002 — BCrypt password hashing

Status: exists
Evidence: backend dependencies, security docs

F-SEC-003 — AES-256-GCM token encryption

Status: exists
Evidence: CryptoService.kt, Fortnox token docs

F-SEC-004 — PostgreSQL RLS enforcement

Status: exists
Evidence: RLS migration and audit docs

F-SEC-005 — Role-based access control

Status: exists
Evidence: role/user routes and services

F-SEC-006 — Secret management model

Status: exists but needs cleanup
Evidence: docs/SECRETS-MANAGEMENT.md, infra docs


12. Business / GTM / Commercial Features

F-BIZ-001 — Pricing model

Status: exists in docs
Evidence: README.md, PRD.md, GTM-STRATEGY.md

F-BIZ-002 — Fortnox ecosystem GTM strategy

Status: exists in docs
Evidence: GTM-STRATEGY.md

F-BIZ-003 — Swedish SMB WMS positioning

Status: exists in docs
Evidence: README, PRD, GTM

F-BIZ-004 — 3PL commercial direction

Status: planned
Evidence: PRD, GTM, regulatory references

F-BIZ-005 — Regulatory/compliance framing

Status: exists in docs
Evidence: REGULATORY.md


13. Known Contradictions / Risks

RISK-001 — Stale architecture document

docs/ARCHITECTURE.md conflicts with actual repo reality and must not be used as canonical architecture input.

RISK-002 — API spec likely drifted

docs/API-SPEC.md appears to reflect an org-centric model and may not be fully synchronized with current Ktor routing and warehouse-based tenancy.

RISK-003 — Runbook drift

There are conflicting operational instructions around:

RISK-004 — Secrets hygiene problem

infrastructure/README.md contains secret-like Terraform environment variable examples that should be reviewed immediately.

RISK-005 — Missing canonical demo-readiness package

The intended documentation package under docs/demo-readiness/ does not exist yet.


14. Summary by Maturity

Exists

Partial

Planned


15. Working Rule

Future planning and QA work must use this feature baseline together with:

Nothing should be marked “implemented” solely because it appears in a stale document or in an agent-generated summary without artifact proof.

Gaps and Next Steps

Source: ~/ALAI/products/Plock/docs/demo-readiness/03-gaps-and-next-steps.md


PLOCK — Gaps and Next Steps

Date: 2026-03-14
Purpose: Convert the current PLOCK reality into an actionable plan: what is missing, what is conflicting, what is risky, and in which order the remaining work should happen.


1. Goal

The original goal was to get PLOCK into a state where we can:

  1. understand the real product and architecture,
  2. produce deterministic documentation,
  3. QA that documentation,
  4. then generate implementation tasks by feature area,
  5. and move toward demo-readiness / production-readiness in a controlled way.

This document defines what blocks that goal today and what sequence should be followed next.


2. Current State Summary

PLOCK already has:

However, PLOCK is currently blocked by:


3. Gap Categories

3.1 Canonical Documentation Gaps

GAP-DOC-001 — Canonical docs/demo-readiness/ package exists, but is still incomplete

Severity: P0

The canonical demo-readiness package now exists, but it is still only a baseline layer.

Already present:

Still missing or incomplete for the fuller package:

Impact:
Without this package, there is no stable documentation handoff point for QA or implementation backlog generation.

GAP-DOC-002 — No canonical feature catalog

Severity: P0

Features are spread across:

But there is no single authoritative feature catalog that says:

Impact:
Implementation task generation will drift or duplicate work.

GAP-DOC-003 — User stories are present, but not operationalized

Severity: P1

User stories exist mainly in docs/PRD.md, but not yet in a clean, implementation-ready canonical user-story document.

Impact:
Traceability between product vision and implementation work is weaker than it should be.

GAP-DOC-004 — Canonical QA checklist exists, but QA execution is still incomplete

Severity: P0

A trusted QA checklist now exists, but the review process is still immature and must continue with explicit review records and package verdicts.

What now exists:

What still needs strengthening:

Impact:
QA can now start approving or rejecting the documentation layer, but the process still depends on careful manual review.

3.2 Architecture / Source-of-Truth Gaps

GAP-ARCH-001 — Conflicting architecture documents

Severity: P0

docs/ARCHITECTURE.md conflicts with the actual repo and stronger docs.

Examples of stale/conflicting claims:

Impact:
Any agent or human using the wrong document can generate incorrect output.

GAP-ARCH-002 — API spec drift

Severity: P1

docs/API-SPEC.md appears useful, but likely drifted from the actual backend implementation and tenant model.

Impact:
API-facing work may be built or reviewed against incorrect assumptions.

GAP-ARCH-003 — Runbook drift

Severity: P1

Different docs disagree on:

Impact:
Ops/docs/support/demo execution can become inconsistent and brittle.

3.3 Product / Feature Gaps

GAP-FEAT-001 — AI feature maturity unclear

Severity: P1

AI Chat and Smart Picking are core product promises, but actual implementation depth is not yet cleanly verified against code and runtime behavior.

Impact:
Demo promises may exceed current product maturity.

GAP-FEAT-002 — 3PL capability is more strategy than current product

Severity: P1

3PL/client portal/billing appears strongly in docs and GTM, but current implementation evidence suggests this is more Phase 2 than current MVP.

Impact:
Sales/demo scope can overpromise if not constrained.

GAP-FEAT-003 — Sales/marketing/support artifacts not packaged

Severity: P2

The content exists in fragments:

But not yet as:

Impact:
Cross-functional readiness is incomplete.

3.4 Security / Hygiene Gaps

GAP-SEC-001 — Secret-like material in infra docs

Severity: P0/P1

infrastructure/README.md contains environment variable examples that resemble real secrets or secret material.

Impact:
Security hygiene issue. Must be reviewed and cleaned immediately.

GAP-SEC-002 — Secrets/process docs need explicit verification pass

Severity: P1

Secrets strategy exists, but should be validated against:

Impact:
Production readiness risk if docs and reality differ.

3.5 Process / Orchestration Gaps

GAP-PROC-001 — Delegated doc output quality remains unreliable

Severity: P0

Even after improving task gating, agents still often:

Impact:
Important documentation work cannot yet be trusted blindly.

GAP-PROC-002 — Contradictory orchestration logging still exists

Severity: P1

Observed behavior:

Impact:
Operational trust and status reporting are still imperfect.

GAP-PROC-003 — Forge worker pool saturation

Severity: P1

Some tasks are delayed or requeued because:

Impact:
Even correctly defined tasks may not progress quickly.


4. What Must Happen Before Feature-by-Feature Implementation Tasks

Before generating backend/frontend/db/integration/security/sales/marketing task waves, we need:

Required Preconditions

If these are skipped, implementation tasks will be generated against mixed truths.


Phase 1 — Documentation Truth Lock

Priority: P0

Deliverables

  1. Canonical source-of-truth note
  2. User stories baseline
  3. Feature baseline
  4. Gaps and next steps
  5. QA checklist baseline

Outcome:
One trusted planning layer.

Phase 2 — Documentation QA

Priority: P0

QA should validate the documentation set against:

QA must explicitly check:

Outcome:
Trusted doc package.

Phase 3 — Controlled Backlog Generation

Priority: P1

Once the doc package passes QA:

Rules for backlog generation

Every generated task must include:

Outcome:
Deterministic implementation backlog.

Phase 4 — Demo Readiness Pass

Priority: P1

Once the controlled backlog exists:

Outcome:
Real demo package, not vague “prod-ready” claims.

Phase 5 — Production Readiness Pass

Priority: P2

Only after docs + QA + controlled backlog + demo prep:

Outcome:
Production-readiness based on evidence, not optimism.


6. Immediate Next Actions

NOW-001 — Freeze stale architecture usage

NOW-002 — Clean security hygiene issue

NOW-003 — Finalize canonical documentation baseline

NOW-004 — Do not launch broad implementation waves yet

NOW-005 — Generate only narrow, deterministic tasks

Until process reliability improves, every task should be:


7. Success Condition

We are ready to resume the original plan when all of the following are true:


8. Decision

PLOCK should proceed through a documentation-truth-first path, not a broad parallel execution wave.

This is not extra process for its own sake.
It is the minimum needed to ensure the next backlog is based on the real product rather than conflicting documentation or fabricated agent output.

QA Checklist Baseline

Source: ~/ALAI/products/Plock/docs/demo-readiness/04-qa-checklist-baseline.md


PLOCK — QA Checklist Baseline

Date: 2026-03-14
Purpose: Define the deterministic review checklist that must be applied to every PLOCK demo-readiness document before it is treated as usable input for planning, QA, demo prep, or backlog generation.


1. Why This Exists

PLOCK documentation work has already shown two failure modes:

  1. documents can be generated from conflicting or stale sources, and
  2. tasks can claim deliverables were created when the files do not actually exist.

This checklist prevents both.

A document is not considered approved because:

A document is approved only if:


2. Review Scope

Apply this checklist to every document under:

At minimum, this includes:


3. Authority Order

When a demo-readiness document makes a claim, validate it using this precedence:

  1. Actual code and repo structure
  2. Runtime configuration and DB migrations
  3. BUILD-BLUEPRINT.md
  4. README.md
  5. Runbooks / security / ops docs
  6. ADRs
  7. PRD / GTM / Regulatory docs
  8. docs/API-SPEC.md only if verified against code
  9. Never use stale/conflicting docs as canonical truth

Explicit stale-doc rule

docs/ARCHITECTURE.md is currently treated as stale/conflicting and must not be used as a canonical architecture source until rewritten or formally re-approved.


4. Required QA Outcome Labels

Each reviewed document must end in one of these states:

No silent approval is allowed.


5. Pre-Review Checks

Before reading content, verify:

5.1 File existence

5.2 Path correctness

5.3 Index discoverability

5.4 Basic format sanity


6. Artifact Verification Checklist

A document automatically fails if any of the following are true:

Required artifact review questions


7. Content Evidence Checklist

Every substantive claim should be supported by at least one of:

Minimum evidence standard

For each major section, the reviewer should be able to answer:

Preferred evidence style

Use explicit references such as:


8. Contradiction Check

The reviewer must actively search for contradictions between the reviewed document and stronger sources.

Mandatory contradiction checks

Verify the document does not incorrectly describe PLOCK as:

Contradiction rule

If a claim conflicts with code or stronger docs, the document fails unless the conflict is explicitly called out as historical/stale context.


9. User Story and Feature Traceability Check

Every story or feature-oriented document must support traceability.

For user-story documents

Check that stories are:

For feature documents

Check that each major feature maps back to at least one of:

Required traceability rule

A feature that has no code evidence may still appear only if it is clearly labeled planned and anchored to an authoritative product/business doc.


10. Source-of-Truth Compliance Check

The reviewed document must align with 00-canonical-source-of-truth.md.

Reviewer must verify:

Automatic fail if the document:


11. Security Hygiene Check

Every demo-readiness document that touches environments, infra, auth, secrets, integrations, or deployment must be reviewed for security hygiene.

Required checks

Automatic fail examples


12. Canonical Path and Naming Check

The canonical package should remain predictable.

Reviewer should verify:

Naming rule

If a document supersedes another document, the relationship must be explicit. Confusing parallel variants should fail review or be flagged for consolidation.


13. Acceptance Criteria by Document Type

13.1 Canonical source-of-truth docs

Must:

13.2 User-story docs

Must:

13.3 Feature baseline docs

Must:

13.4 Gap / next-step docs

Must:

13.5 QA docs

Must:


14. Reviewer Workflow

Use this exact workflow:

Step 1 — Confirm artifact

Step 2 — Confirm task-fit

Step 3 — Check evidence

Step 4 — Check contradictions

Step 5 — Check traceability

Step 6 — Check security hygiene

Step 7 — Record verdict

Document one of:

Step 8 — Record remediation

If not PASS, specify:


15. Review Record Template

Use this template for every reviewed document:

## QA Review Record
- Document:
- Path:
- Reviewer:
- Date:
- Verdict: PASS | PASS WITH NOTES | FAIL | BLOCKED

### Artifact Check
- Exists:
- Correct path:
- Correct filename:
- Indexed:

### Evidence Check
- Primary sources used:
- Any unsupported claims:

### Contradiction Check
- Conflicts found:
- Stale-doc contamination found:

### Traceability Check
- User-story traceability:
- Feature traceability:

### Security Hygiene Check
- Secret-like material copied: yes/no
- Security posture accurately described: yes/no

### Notes / Remediation
- 

16. Go / No-Go Checklist

A demo-readiness document is GO only if all answers below are yes:

If any answer is no, the outcome is NO-GO.


17. Package-Level Go / No-Go Rule

The full docs/demo-readiness/ package is not ready for downstream backlog generation until:

Package-level blockers

Any of these are automatic package-level NO-GO:


18. Decision

This checklist is the minimum deterministic QA gate for PLOCK demo-readiness documentation.

No document in this package should be treated as approved planning input until it passes this checklist with an explicit recorded verdict.

Initial Package QA Review

Source: ~/ALAI/products/Plock/docs/demo-readiness/05-initial-package-review.md


PLOCK — Initial Package QA Review

Date: 2026-03-14
Reviewer: John
Scope: Manual QA review of the current canonical PLOCK demo-readiness baseline package under ~/ALAI/products/Plock/docs/demo-readiness/.


1. Package Verdict

Document Quality Verdict: PASS WITH NOTES
Downstream Usage Verdict: GO for narrow documentation-truth work; NO-GO for broad implementation fan-out until remaining P0/P1 issues are addressed.

Why

The package now exists on disk, is indexed, and provides a coherent baseline for source-of-truth, user stories, features, gaps, and QA review.

However, it still carries important caveats:


2. Artifact Check

Reviewed files

Result

Artifact verdict: PASS


3. Per-Document Review Records

QA Review Record

Artifact Check

Evidence Check

Contradiction Check

Traceability Check

Security Hygiene Check

Notes / Remediation


QA Review Record

Artifact Check

Evidence Check

Contradiction Check

Traceability Check

Security Hygiene Check

Notes / Remediation


QA Review Record

Artifact Check

Evidence Check

Contradiction Check

Traceability Check

Security Hygiene Check

Notes / Remediation


QA Review Record

Artifact Check

Evidence Check

Contradiction Check

Traceability Check

Security Hygiene Check

Notes / Remediation


QA Review Record

Artifact Check

Evidence Check

Contradiction Check

Traceability Check

Security Hygiene Check

Notes / Remediation


QA Review Record

Artifact Check

Evidence Check

Contradiction Check

Traceability Check

Security Hygiene Check

Notes / Remediation


4. Package-Level Notes

What is now good enough

What still blocks a broad implementation wave


5. Final Go / No-Go

GO

NO-GO


6. Decision

The current PLOCK canonical baseline package passes manual review as a usable planning foundation, but only with explicit caveats. It is good enough to guide the next narrow, deterministic documentation and QA steps. It is not yet a license for broad implementation fan-out or readiness claims.

API Spec Verification Pass

Source: ~/ALAI/products/Plock/docs/demo-readiness/06-api-spec-verification-pass.md


PLOCK — API Spec Verification Pass

Date: 2026-03-14
Reviewer: John
Scope: Narrow manual verification of docs/API-SPEC.md against the real Ktor route surface under backend/src/main/kotlin/no/alai/plock/.


1. Verdict

Canonical verdict: FAIL as a canonical API source
Reference verdict: PASS WITH NOTES as API-intent/reference material

Why

docs/API-SPEC.md contains useful product intent, but it does not currently match the real backend route surface closely enough to be treated as canonical.

The biggest problems are:


2. Verification Sources

Primary sources used for this pass:


3. Real Route Surface Snapshot

Routing.kt mounts these main groups under /api/v1 (plus unauthenticated Fortnox OAuth + health/auth):

This is already enough to show that the live API surface is broader in some places and materially different in others than docs/API-SPEC.md suggests.


4. Sections That Are Roughly Aligned

These areas are directionally aligned, even when path or payload details differ:

4.1 Auth

docs/API-SPEC.md documents auth/login concepts, and real routes do include:

4.2 Warehouses / products / users / dashboard

These domains exist in the real backend and in the API spec at a high level.

4.3 Carrier + shipment integrations

The spec correctly signals that carrier and Fortnox integration domains exist, although the actual route design is different.

4.4 Real-time events

The spec includes SSE/event streaming, and the real backend does expose:


5. Major Drift / Mismatch Areas

5.1 Tenancy model drift

Spec problem: org-centric model
Repo reality: warehouse-centric model

Examples in docs/API-SPEC.md:

Repo reality:

Impact: High. This is not a cosmetic difference; it changes the domain model.


5.2 Auth flow drift

Spec says

Actual routes

Mismatch

Real auth routes do not currently expose documented refresh/logout endpoints, and register/login response shapes differ from the org-centric API spec.

Verdict: partial alignment only


5.3 Warehouses and locations path drift

Spec says

Actual routes

Mismatch

The real backend models zones and locations as first-class route groups, not nested warehouse bin endpoints as described in the spec.


5.4 Inventory route drift

Spec says

Actual routes

Mismatch

The real system exposes different operational endpoints and splits stock adjustment and audit trail differently. Inventory transaction history is represented more directly via /stock-movements, not the spec’s /inventory/transactions route.


5.5 Receiving / inbound drift

Spec says

Actual routes

Mismatch

The real backend has a receiving-order workflow, not the purchase-order route structure described in the spec.


5.6 Orders / outbound drift

Spec says

Actual routes

Mismatch

The domain overlaps, but path structure and supported actions differ materially.


5.7 Picking drift

Spec says

Actual routes

Mismatch

The live system is pick-wave/pick-item oriented, not route-assignment oriented in the way the spec describes.


5.8 Carrier / shipment drift

Spec says

Actual routes include

Mismatch

The spec compresses real shipping/carrier behavior into a simplified label-oriented interface that does not match the current route surface.


5.9 Dashboard / reports drift

Spec says

Actual routes

Mismatch

Only dashboard/stats is clearly aligned. The /reports/* route group is not present in the current Ktor app.


5.10 AI route drift

Spec says

Actual routes

Mismatch

This is major product-intent content, not current API reality.


5.11 Integrations drift

Spec says

Actual routes include

Mismatch

The real Fortnox integration surface is more concrete and warehouse-scoped than the generic integration control plane described in the spec.


5.12 Users / RBAC drift

Spec says

Actual routes include

Mismatch

RBAC is present, but it is organized differently and more explicitly in the real backend than in the spec.


6. Important Real Route Groups Missing from the Spec

These live route groups exist in the backend but are not represented well, or at all, in docs/API-SPEC.md:


7. Practical Conclusion

Use docs/API-SPEC.md only for:

Do not use it for:


Do not rewrite the full API spec yet.

Instead, use this sequence:

  1. keep the current warning on docs/API-SPEC.md
  2. use this verification note as the current interpretation layer
  3. later perform a targeted API-spec correction pass section-by-section, starting with:
    • tenancy/auth
    • inventory
    • receiving/orders/picking
    • carriers/integrations

9. Decision

docs/API-SPEC.md is now a verified non-canonical reference.

Until corrected, the canonical API truth for PLOCK remains: