diff --git a/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/CHUNK_MAP.md b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/CHUNK_MAP.md new file mode 100644 index 000000000..e38dedebe --- /dev/null +++ b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/CHUNK_MAP.md @@ -0,0 +1,8 @@ +# Chunk Map + +| Chunk | Purpose | State | +| --- | --- | --- | +| `WS-DOCS-001-01` | Modernize the current v0.1 documentation entry path and archive expired calendar framing | In progress | + +This initiative intentionally uses one documentation-only chunk. Splitting the +entry pages would allow contradictory wording to remain between merges. diff --git a/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/DECISIONS.md b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/DECISIONS.md new file mode 100644 index 000000000..2490a4418 --- /dev/null +++ b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/DECISIONS.md @@ -0,0 +1,19 @@ +# Decisions + +## Capability-Based Status + +Current status uses Implemented, In progress, Planned, and Historical +capability categories. It does not use weeks, days, or completion promises. + +## Preserve History + +Superseded calendar plans and early chunk records remain in place for audit and +design history. Clear notices and a historical index prevent them from being +mistaken for current authority. + +## One Current Entry Path + +`README.md` summarizes the product and v0.1 state, `docs/roadmap_status.md` owns +the detailed capability ledger, `CONTRIBUTING.md` owns the contributor path, +and `AGENTS.md` adds repository-specific agent rules. Other documents link to +these owners instead of duplicating current status. diff --git a/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/DISCOVERY.md b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/DISCOVERY.md new file mode 100644 index 000000000..557ab5f3c --- /dev/null +++ b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/DISCOVERY.md @@ -0,0 +1,26 @@ +# Discovery + +## Findings + +- `README.md` presents expired day/week plans and early chunk specifications as + the active planning package. +- `docs/roadmap_status.md` is an early chronological log, not a reliable view of + current `main`. +- `AGENTS.md` retains a Week 1 implementation rule even though the underlying + backend-contract-first constraint remains valid without a calendar label. +- `CONTRIBUTING.md` correctly uses the simple engineering loop but does not + explain which documents are current authority and which are history. +- Architecture and diagram entry pages use "first 30 days" for the current + v0.1 boundary. +- Historical plans and trial records remain useful evidence and should be + preserved with explicit archive notices. + +## Sources Of Truth + +- Product definition: `README.md`, `docs/glossary.md`. +- Architecture boundary: `docs/architecture_lockdown.md` and accepted ADRs. +- Implemented behavior: code, migrations, tests, and merged commits on `main`. +- Work in progress: open pull requests and their reviewed contracts. +- History: imported files under `docs/reference_specs/` unless explicitly + adopted by a current document, closed initiative records, internal reviews, + and superseded calendar plans. diff --git a/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/INTENT.md b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/INTENT.md new file mode 100644 index 000000000..b2b8c22a6 --- /dev/null +++ b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/INTENT.md @@ -0,0 +1,31 @@ +# WS-DOCS-001: Current v0.1 Documentation + +## Intent + +Make the repository entry path describe Workstream's current v0.1 product, +architecture, implementation state, and contribution workflow without using an +expired calendar as the roadmap. + +## Why Now + +The root README still presents a 30-day plan, week plans, and early chunk +specifications as the primary planning package. `docs/roadmap_status.md` still +describes the authorization foundation as the current phase even though later +authorization, artifact, project-guide, and cross-initiative work has merged. +That makes current capability, historical implementation evidence, and future +work difficult to distinguish. + +## Non-Goals + +- No runtime, API, schema, migration, workflow, or CI behavior changes. +- No deletion or rewriting of immutable reference specifications, internal + review evidence, or initiative history. +- No promise of release dates or completion dates. +- No claim that a planned or draft capability is available. + +## Success + +A new contributor can start with `README.md`, `AGENTS.md`, and +`CONTRIBUTING.md`, understand the v0.1 boundary, locate current status, tell +current guidance from history, and contribute through the simple engineering +loop. diff --git a/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/PLAN.md b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/PLAN.md new file mode 100644 index 000000000..01d0a2e31 --- /dev/null +++ b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/PLAN.md @@ -0,0 +1,13 @@ +# Plan + +1. Replace the README planning package with a current v0.1 entry path and a + capability-based status summary. +2. Rewrite roadmap status around implemented, in-progress, and remaining + capability milestones. +3. Make `AGENTS.md` and `CONTRIBUTING.md` explicitly route contributors to + current authority and preserve the simple engineering loop. +4. Remove calendar framing from current architecture and diagram entry pages. +5. Label superseded calendar plans and early chunk/trial records as historical + without rewriting their evidence. +6. Run stale-wording, link, and documentation consistency checks, followed by + proportionate internal review. diff --git a/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/REVIEW.md b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/REVIEW.md new file mode 100644 index 000000000..7997e0fc2 --- /dev/null +++ b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/REVIEW.md @@ -0,0 +1,26 @@ +# Internal Review + +## Documentation + +Pass. No missing documentation, navigation, historical-labeling, or link +findings. + +## Product and Operations + +Initial findings removed the remaining day-based success metric and corrected +reputation wording so v0.1 preserves authoritative contribution evidence while +runtime reputation projection remains deferred. Re-review passed. + +## Architecture + +Initial low-risk findings removed calendar framing from the product brief and +moved reviewed cross-initiative contracts out of the implemented-capability +list. Re-review passed with no architecture drift. + +## Senior Engineering + +The generated PDF was added explicitly to scope, imported reference inputs were +distinguished from canonical repository specifications, and PDF regeneration +provenance was recorded. Re-review passed. The former schema-v1 +`chunk-scope-json` mechanism was not restored because current repository policy +explicitly retired that runtime and does not require it for pull requests. diff --git a/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/RISKS.md b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/RISKS.md new file mode 100644 index 000000000..6cacae457 --- /dev/null +++ b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/RISKS.md @@ -0,0 +1,8 @@ +# Risks + +| Risk | Mitigation | +| --- | --- | +| Documentation claims planned behavior is implemented | Classify capabilities as implemented, in progress, planned, or historical; require merged-code evidence for implemented claims. | +| Current status becomes another chronological log | Organize by durable capability milestones and update the ledger when capability boundaries change. | +| Historical evidence is lost | Preserve old plans and implementation records behind an explicit historical index. | +| Entry pages contradict canonical contracts | Keep terminology aligned with the glossary, architecture lockdown, accepted ADRs, and stale-contract scanners. | diff --git a/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/STATUS.md b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/STATUS.md new file mode 100644 index 000000000..093594c28 --- /dev/null +++ b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/STATUS.md @@ -0,0 +1,7 @@ +# Status + +`WS-DOCS-001-01` is locally complete and ready for pull-request review. + +The entry-path rewrite is complete locally. Deterministic documentation checks +pass, and all valid internal review findings have been resolved. Merge remains +a human decision after GitHub checks and external review. diff --git a/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/chunks/WS-DOCS-001-01-current-v01-entry-path.md b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/chunks/WS-DOCS-001-01-current-v01-entry-path.md new file mode 100644 index 000000000..7122efc46 --- /dev/null +++ b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/chunks/WS-DOCS-001-01-current-v01-entry-path.md @@ -0,0 +1,59 @@ +# WS-DOCS-001-01: Current v0.1 Entry Path + +## Scope + +Update repository-facing product, contributor, status, architecture-navigation, +and historical-plan documentation so current guidance is capability-based. + +## Allowed Files + +- `README.md` +- `AGENTS.md` +- `CONTRIBUTING.md` +- `docs/roadmap_status.md` +- `docs/historical_planning.md` +- `docs/architecture_brief/workstream_architecture_brief.pdf`, as the generated + companion to its changed Markdown source +- existing calendar-plan, early checker/chunk, architecture, product, reviewer, + and diagram Markdown documents touched only to remove current calendar + framing or add a historical notice +- this initiative directory + +## Not Allowed + +- backend or frontend code +- tests, migrations, workflows, or package configuration +- immutable files below `docs/reference_specs/` or `docs/internal_reviews/` +- product behavior changes + +## Acceptance Criteria + +- Root entry pages contain no Week 1/Week 2/30-day roadmap framing. +- Current status is organized by capability and does not overclaim draft work. +- Historical plans remain accessible but cannot be mistaken for current + sequencing or authority. +- Contribution guidance clearly identifies present sources of truth. +- Markdown links and repository stale-wording checks pass. + +## Risk + +L2 documentation risk: broad discoverability impact, no runtime change. + +## Verification + +- `python3 scripts/check_markdown_links.py` +- `python3 scripts/check_stale_workstream_wording.py` +- `python3 scripts/check_stale_authorization_docs.py` +- `python3 scripts/check_stale_artifact_contracts.py` +- `git diff --check` + +The architecture PDF is regenerated from its changed Markdown source with the +Pandoc/WeasyPrint command documented in +`docs/architecture_brief/render_pdf.sh`. Diagram assets are unchanged. + +## Reviewers + +- documentation +- product/operations +- architecture +- senior engineering diff --git a/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/reviews/WS-DOCS-001-01-external-review-response.md b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/reviews/WS-DOCS-001-01-external-review-response.md new file mode 100644 index 000000000..c08837859 --- /dev/null +++ b/.agent-loop/initiatives/WS-DOCS-001-current-v01-documentation/reviews/WS-DOCS-001-01-external-review-response.md @@ -0,0 +1,38 @@ +# WS-DOCS-001-01 External Review Response + +## Comments Addressed + +1. Aligned the decision record with the capability ledger's exact + `Implemented`, `In progress`, `Planned`, and `Historical` labels. +2. Removed the historical checker trial's claim that it proves current backend + behavior and routed current claims to the capability ledger and merged + evidence. +3. Named the Workstream product lifecycle explicitly in the backend component + diagram text so it cannot be confused with the engineering loop. +4. Routed readers of the historical planning index through `CONTRIBUTING.md`. +5. Clarified that v0.1 preserves contribution evidence for a future reputation + projection; runtime reputation projection remains deferred. +6. Reworded the residual historical-document risk as mitigation rather than an + absolute guarantee that archive notices prevent misuse. + +## Comments Deferred + +None. + +## Human Decisions Needed + +None. + +## Commands Rerun + +- `python3 scripts/check_markdown_links.py` +- `python3 scripts/check_stale_workstream_wording.py` +- `python3 scripts/check_stale_authorization_docs.py` +- `python3 scripts/check_stale_artifact_contracts.py` +- `git diff --check` + +## Remaining Risks + +Historical checker records intentionally retain their original scenario and +result vocabulary. Their archive notice and current-evidence link reduce the +risk that they are used as current implementation authority. diff --git a/AGENTS.md b/AGENTS.md index 4785be572..e05a3a4a3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -35,6 +35,12 @@ Workstream is how Flow measures, certifies, and coordinates useful human-agent w - If updating the roadmap, update both local XLSX and CSV exports. - Do not import XLSX into Google Sheets with "replace spreadsheet"; use a temporary sheet and copy only the roadmap tab. - Prefer evidence-backed docs over vague product claims. +- Treat `docs/roadmap_status.md` as the current capability ledger. Calendar + plans, early chunk specifications, imported files under + `docs/reference_specs/`, and internal reviews are historical evidence unless + a current entry page explicitly adopts them. Canonical repository + specifications remain normative. Do not use dates, weeks, or delivery + windows as implementation authority. - For workflow states, persisted tokens, API enum values, roles, and lifecycle names, prefer subsystem- or actor-specific names over vague labels. If the naming has product or security impact and the user is unavailable, run the required internal reviewer tracks before locking it. - Keep v0.1 focused on project guide -> task -> submission -> checks -> review -> revision -> contribution records -> conditional compensation awards/fulfillment -> reputation signals. - Review decision stored values are only accept, needs_revision, or reject. @@ -42,7 +48,9 @@ Workstream is how Flow measures, certifies, and coordinates useful human-agent w - Backend API is locked as Python with FastAPI. - ORM, migrations, and API schemas are locked as SQLAlchemy 2.x async + Alembic + Pydantic schemas. - Workstream verifies external Flow authentication tokens; do not add Workstream-owned login, signup, password reset, password storage, or primary auth sessions. -- Week 1 implementation is backend-first; do not start frontend work until backend contracts and lifecycle guards are stable. +- v0.1 delivery is backend-contract-first. Do not add frontend behavior until + the backing API contracts and lifecycle guards for that surface are stable + and tested. - Execution is async-first; do not document synchronous-first checkers or jobs. - FastAPI background tasks are acceptable for simple local v0.1 jobs; use Celery or equivalent durable workers when retries, scheduling, isolation, or distributed execution are needed. - Postgres is the record database. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 67c71664e..9b0697186 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,6 +16,27 @@ or higher-risk work, add a short initiative plan and chunk contract under `.agent-loop/initiatives/`. Existing planning artifacts are useful context, not runtime locks. +## Find The Current Contract + +Before implementation, update from current `main` and read: + +1. [README.md](README.md) for the product boundary and current v0.1 summary. +2. [Current v0.1 Status](docs/roadmap_status.md) for implemented, active, and + remaining capabilities. +3. [Architecture Lockdown](docs/architecture_lockdown.md), accepted ADRs, and + the canonical specification for the subsystem being changed. + +Code, migrations, tests, accepted ADRs, and canonical repository specifications +define implemented or required behavior. Open pull requests describe work in +progress. Calendar plans, early chunk specifications, imported files under +`docs/reference_specs/`, internal review records, and closed initiative records +are useful history unless a current document explicitly adopts them; they are +not by themselves current sequencing or proof that behavior is live. + +Roadmaps and status documents must use capability milestones and evidence. Do +not introduce delivery promises such as day plans, numbered weeks, or rolling +time windows as repository authority. + Contributors with GitHub write access may create a branch, implement a bounded change, and open a pull request without a signed start event, administrator dispatch, active-chunk lease, or loop-memory approval. Contributors without diff --git a/README.md b/README.md index 0a91686f1..effe255f9 100644 --- a/README.md +++ b/README.md @@ -61,22 +61,40 @@ Different projects speak different domain languages, but serious task evaluation Workstream turns that operating knowledge into reusable infrastructure. -## Planning Package +## Current v0.1 State + +Workstream is under active v0.1 development. Progress is tracked by proven +capabilities, not by calendar weeks or promised dates. + +Implemented foundations on `main` include external Flow-token verification, +canonical local actors and authorization, project guides and task records, +submission packets, immutable artifact storage, automated checker execution, +and the pre-review gate. Project-guide ingestion now has typed source handling, +bounded extraction, security controls, and persisted sufficiency evidence. + +Active work is connecting those foundations into the remaining production +lifecycle: authoritative guide binding and reads, review and revision, +contribution records, conditional compensation awards and fulfillment, and +reputation projections. Frontend product work follows stable and tested backend +contracts for the surface it consumes. + +The release bar is a verified end-to-end v0.1 lifecycle, not the completion of +an old timeboxed plan. See [Current v0.1 Status](docs/roadmap_status.md) for the +capability ledger and explicit remaining work. + +## Start Here - [Contribution Guide](CONTRIBUTING.md) -- [Codex Agent Loop](.agent-loop/README.md) -- [Repository Engineering Policy](.agent-loop/policies/repository-engineering-policy.md) -- [30-Day Master Plan](docs/roadmap_30_day_master_plan.md) -- [Roadmap Status](docs/roadmap_status.md) -- [Week 1 Backend Plan](docs/roadmap_week1_backend_plan.md) -- [Week 2 Checker Framework Specification](docs/spec_week2_checker_framework.md) -- [Chunk 6 Checker Contract And Records](docs/spec_chunk_6_checker_contract_records.md) -- [Chunk 7 Checker Runner And Registry](docs/spec_chunk_7_checker_runner_registry.md) -- [Chunk 8 Submission Artifact And Policy Checkers](docs/spec_chunk_8_submission_artifact_policy_checkers.md) -- [Chunk 9 Pre-Review Gate](docs/spec_chunk_9_pre_review_gate.md) -- [Chunk 10 Checker Trial](docs/spec_chunk_10_checker_trial.md) -- [Day-by-Day Execution Plan](docs/roadmap_day_by_day_execution_plan.md) -- [Implementation Backlog](docs/roadmap_implementation_backlog.md) +- [Current v0.1 Status](docs/roadmap_status.md) +- [Product Principles](docs/product_principles.md) +- [Product Brief](docs/product_brief.md) +- [Architecture Lockdown](docs/architecture_lockdown.md) +- [System Architecture](docs/architecture_system_architecture.md) +- [Glossary](docs/glossary.md) +- [Historical Planning Index](docs/historical_planning.md) + +## Product And Operations Documentation + - [Product Principles](docs/product_principles.md) - [Product Brief](docs/product_brief.md) - [First User Flows](docs/product_first_user_flows.md) @@ -101,10 +119,13 @@ Workstream turns that operating knowledge into reusable infrastructure. - [Compensation And Reputation](docs/operations_payment_reputation.md) - [Risk Register](docs/risk_register.md) - [Process Pattern Baseline](docs/process_pattern_baseline.md) -- [Architecture Lockdown](docs/architecture_lockdown.md) - [Glossary](docs/glossary.md) -## Review Passes +## Historical Review Records + +These records preserve earlier product, architecture, process, and adversarial +reviews. They are evidence and design history, not current implementation +status. Current changes receive review through [CONTRIBUTING.md](CONTRIBUTING.md). - [Process Baseline Operations Review](docs/review_process_baseline_operations_review.md) - [Final Product Strategy Review](docs/review_final_product_strategy_review.md) diff --git a/docs/architecture_brief/workstream_architecture_brief.md b/docs/architecture_brief/workstream_architecture_brief.md index 9773a141d..62543dc11 100644 --- a/docs/architecture_brief/workstream_architecture_brief.md +++ b/docs/architecture_brief/workstream_architecture_brief.md @@ -12,7 +12,7 @@ records, compensation award and fulfillment state, and reputation signals. Workstream is how Flow measures, certifies, and coordinates useful human-agent work. -

Scope: v0.1 first 30 days, with future adapter context for identity, task contracts, settlement, and reputation.

+

Scope: bounded v0.1 delivery, with future adapter context for identity, task contracts, settlement, and reputation.

@@ -26,7 +26,7 @@ evidence packet, every valid human decision an immutable Review and reviewer contribution, and every accepted task an immutable FinalAcceptance before the submitter contribution and conditional compensation. -The first 30 days are focused on proving the internal lifecycle: +v0.1 is focused on proving the internal lifecycle: ```text Project Guide -> Task Queue -> Submission Packet -> Checks -> Review @@ -77,7 +77,10 @@ The context diagram shows Workstream as one system inside the broader Flow ecosy ## C2: v0.1 Container View -The container view shows the first 30-day implementation. It is intentionally small: React + Vite for the planned internal operations UI, FastAPI for the backend, Postgres for records, a storage interface for artifacts, and an async checker/job boundary. +The container view shows the bounded v0.1 implementation. It is intentionally +small: React + Vite for the planned internal operations UI, FastAPI for the +backend, Postgres for records, a storage interface for artifacts, and an async +checker/job boundary.
Workstream v0.1 container diagram @@ -175,7 +178,7 @@ Future ERC-8004, ERC-8183, x402, OmniClaw, and USDC integrations do not replace ## Scope Boundary -### Current v0.1 / First 30 Days +### Current v0.1 Boundary - project guide and versioned policy context - task queue and task records diff --git a/docs/architecture_brief/workstream_architecture_brief.pdf b/docs/architecture_brief/workstream_architecture_brief.pdf index 26811596f..4bab3cb16 100644 Binary files a/docs/architecture_brief/workstream_architecture_brief.pdf and b/docs/architecture_brief/workstream_architecture_brief.pdf differ diff --git a/docs/architecture_system_architecture.md b/docs/architecture_system_architecture.md index da2d4cf80..f1501853e 100644 --- a/docs/architecture_system_architecture.md +++ b/docs/architecture_system_architecture.md @@ -11,7 +11,11 @@ the REV-13 joint release complete. `docs/spec_review_lifecycle.md` is normative. The architecture stays modular enough to support different project types without becoming abstract to the point that no project can use it. -The visual architecture pack lives in [Architecture Diagrams](diagrams/README.md). It separates the 30-day v0.1 implementation from later adapter boundaries such as ERC-8004 agent identity and reputation, ERC-8183 task contract and escrow, x402 payment requests, OmniClaw settlement orchestration, and USDC settlement. +The visual architecture pack lives in +[Architecture Diagrams](diagrams/README.md). It separates the bounded v0.1 +implementation from later adapter boundaries such as ERC-8004 agent identity +and reputation, ERC-8183 task contract and escrow, x402 payment requests, +OmniClaw settlement orchestration, and USDC settlement. ## High-Level Components diff --git a/docs/checker_trial_failure_catalog.md b/docs/checker_trial_failure_catalog.md index dd17bb782..8d1013817 100644 --- a/docs/checker_trial_failure_catalog.md +++ b/docs/checker_trial_failure_catalog.md @@ -1,10 +1,18 @@ # Checker Trial Failure Catalog +> Historical validation record. It preserves early checker evidence and does +> not define current sequencing or capability status. + ## Purpose This catalog records the Chunk 10 checker trial outcomes. It is the audit note for the first real sample submissions run through the Week 2 checker framework. -The trial does not add a lifecycle state, a review decision, or a frontend surface. It proves the current backend contracts for clean submissions, worker-fixable checker failures, internal task setup failures, and trusted checker retry. +The trial does not add a lifecycle state, a review decision, or a frontend +surface. It records early checker-trial evidence for clean submissions, +contributor-fixable checker failures, internal task setup failures, and trusted +checker retry. It does not establish current backend behavior; use +[Current v0.1 Status](roadmap_status.md) and merged code and tests for current +capabilities. ## Trial Results diff --git a/docs/diagrams/README.md b/docs/diagrams/README.md index a58299132..f84a67fdb 100644 --- a/docs/diagrams/README.md +++ b/docs/diagrams/README.md @@ -2,7 +2,7 @@ This diagram pack explains Workstream at two levels: -- the 30-day v0.1 implementation that is being built now +- the bounded v0.1 implementation that is being built now - the broader Workstream ecosystem that can connect later to external origins, agent identity, task contracts, settlement rails, and portable reputation The architecture diagrams use C4-PlantUML source files so they render with real C4 system, container, component, boundary, and external-system boxes. The task lifecycle sequence remains Mermaid because GitHub renders it directly and the sequence is easier to read in that format. @@ -41,4 +41,8 @@ The rendered SVGs are written to `docs/diagrams/rendered/` and are committed so ## Reading Order -Start with the [System Context](workstream_context.md) to explain what Workstream is and what it does not own. Then use the [v0.1 Container View](workstream_v01_container.md) to show what is actually being implemented in the first 30 days. Use the backend component and lifecycle diagrams when the discussion moves from product architecture into implementation design. +Start with the [System Context](workstream_context.md) to explain what +Workstream is and what it does not own. Then use the +[v0.1 Container View](workstream_v01_container.md) to show the bounded v0.1 +implementation. Use the backend component and lifecycle diagrams when the +discussion moves from product architecture into implementation design. diff --git a/docs/diagrams/backend_v01_components.md b/docs/diagrams/backend_v01_components.md index 1a9b6e7d6..d9beed7b3 100644 --- a/docs/diagrams/backend_v01_components.md +++ b/docs/diagrams/backend_v01_components.md @@ -22,7 +22,8 @@ Source: [backend_v01_components.puml](backend_v01_components.puml) ## Current Module Priority -The first 30 days move through the loop in this order: +The v0.1 backend follows the Workstream product lifecycle in this dependency +order: ```text Projects and guides diff --git a/docs/diagrams/workstream_v01_container.md b/docs/diagrams/workstream_v01_container.md index fdcaed459..26b66ee54 100644 --- a/docs/diagrams/workstream_v01_container.md +++ b/docs/diagrams/workstream_v01_container.md @@ -1,6 +1,7 @@ # Workstream v0.1 Container View -This is the 30-day implementation architecture. It shows the deployable containers and internal runtime boundaries for the current build. +This is the v0.1 implementation architecture. It shows the deployable +containers and internal runtime boundaries for the current build. Future external origins, ERC-8004, ERC-8183, x402, OmniClaw, and USDC settlement are not active v0.1 dependencies. They remain later adapters behind the same records and interfaces. diff --git a/docs/historical_planning.md b/docs/historical_planning.md new file mode 100644 index 000000000..458c05055 --- /dev/null +++ b/docs/historical_planning.md @@ -0,0 +1,31 @@ +# Historical Planning Index + +These documents record how Workstream's early implementation was planned and +validated. They are preserved for traceability. They do not define current +priority, implementation status, contribution permission, or a delivery +schedule. + +For current work, start with [CONTRIBUTING.md](../CONTRIBUTING.md) and follow its +engineering loop. Then use [Current v0.1 Status](roadmap_status.md), the code +and tests on `main`, accepted ADRs, and the canonical subsystem specifications. + +## Superseded Calendar Plans + +- [Original 30-Day Master Plan](roadmap_30_day_master_plan.md) +- [Original Day-by-Day Execution Plan](roadmap_day_by_day_execution_plan.md) +- [Original Week 1 Backend Plan](roadmap_week1_backend_plan.md) +- [Original Week 2 Checker Framework Specification](spec_week2_checker_framework.md) +- [Original Implementation Backlog](roadmap_implementation_backlog.md) + +## Early Implementation Records + +- [Submission Packet Foundation](spec_chunk_5_submission_packet_foundation.md) +- [Checker Contract And Records](spec_chunk_6_checker_contract_records.md) +- [Checker Runner And Registry](spec_chunk_7_checker_runner_registry.md) +- [Submission Artifact And Policy Checkers](spec_chunk_8_submission_artifact_policy_checkers.md) +- [Pre-Review Gate](spec_chunk_9_pre_review_gate.md) +- [Checker Trial](spec_chunk_10_checker_trial.md) +- [Checker Trial Failure Catalog](checker_trial_failure_catalog.md) + +Later canonical specifications and initiative records supersede these files +where they describe the same behavior. diff --git a/docs/operations_reviewer_workflow.md b/docs/operations_reviewer_workflow.md index 10259f50d..bde361c6e 100644 --- a/docs/operations_reviewer_workflow.md +++ b/docs/operations_reviewer_workflow.md @@ -214,7 +214,7 @@ create adjudication state, overturn a Review, or mutate immutable history. ## Non-Mutating Quality Sampling -During the first 30 days, audit at least: +For v0.1 operations, audit at least: - 25 percent of accepted submissions - 25 percent of rejected submissions diff --git a/docs/product_brief.md b/docs/product_brief.md index e26f9c571..5eb1ff3f7 100644 --- a/docs/product_brief.md +++ b/docs/product_brief.md @@ -114,7 +114,10 @@ The only v0.1 intake paths are: - manual task creation in the app - import from a controlled markdown or CSV template -External source adapters, origin onboarding, webhook drop notifications, automated routing, owner-agent execution workspace, and on-chain settlement are later work. This keeps the first 30 days focused on proving the lifecycle, not integrating every source. +External source adapters, origin onboarding, webhook drop notifications, +automated routing, owner-agent execution workspace, and on-chain settlement are +later work. This keeps v0.1 focused on proving the internal lifecycle instead +of integrating every possible source or settlement rail. The first version excludes: @@ -144,7 +147,7 @@ Avoid broad gig marketplace positioning until the quality engine is proven. ## Success Metrics -By day 30: +The v0.1 pilot is successful when it demonstrates: - 3 project templates configured - 20 tasks entered diff --git a/docs/roadmap_30_day_master_plan.md b/docs/roadmap_30_day_master_plan.md index 1e8bfeebd..8948f9b9e 100644 --- a/docs/roadmap_30_day_master_plan.md +++ b/docs/roadmap_30_day_master_plan.md @@ -1,5 +1,9 @@ # 30-Day Master Plan +> Historical planning record. This calendar no longer controls current work or +> status. Use [Current v0.1 Status](roadmap_status.md) and the +> [Historical Planning Index](historical_planning.md). + ## Review Lifecycle Status The schedule is planning guidance, not a claim that review/revision routes are diff --git a/docs/roadmap_day_by_day_execution_plan.md b/docs/roadmap_day_by_day_execution_plan.md index 2cd52e78d..be3083b94 100644 --- a/docs/roadmap_day_by_day_execution_plan.md +++ b/docs/roadmap_day_by_day_execution_plan.md @@ -1,5 +1,9 @@ # Day-by-Day Execution Plan +> Historical planning record. This calendar no longer controls current work or +> status. Use [Current v0.1 Status](roadmap_status.md) and the +> [Historical Planning Index](historical_planning.md). + ## Review Lifecycle Status The calendar is sequencing guidance, not implementation status. Review and diff --git a/docs/roadmap_implementation_backlog.md b/docs/roadmap_implementation_backlog.md index 270e729ab..f8c0f0141 100644 --- a/docs/roadmap_implementation_backlog.md +++ b/docs/roadmap_implementation_backlog.md @@ -1,5 +1,9 @@ # Implementation Backlog +> Historical planning record. This backlog no longer controls current priority +> or status. Use [Current v0.1 Status](roadmap_status.md) and the +> [Historical Planning Index](historical_planning.md). + ## Review Lifecycle Status Review/revision entries describe planned, unavailable v0.1 work. They become diff --git a/docs/roadmap_status.md b/docs/roadmap_status.md index 1d94e1ced..715c4834a 100644 --- a/docs/roadmap_status.md +++ b/docs/roadmap_status.md @@ -1,177 +1,127 @@ -# Workstream Roadmap Status - -Current phase: WS-AUTH-001 authorization foundation before further lifecycle -expansion. - -## Completed - -- Root README. -- Product principles and product brief. -- First user flows. -- 30-day master plan. -- Day-by-day execution plan. -- Implementation backlog. -- Pilot plan. -- System architecture. -- Data model. -- Lifecycle state machine. -- Checker framework. -- Operator workflow. -- Queue policy. -- Reviewer workflow. -- Revision replay. -- Roles and permissions. -- Compensation and reputation. -- Workspace and packet convention. -- Risk register. -- Templates for guides, tasks, submissions, reviews, checkers, revision replay, and prior feedback. -- Decision records. -- Independent review passes. -- Review closure record. -- June 3 architecture proposal preserved and reconciled. -- Architecture lockdown note. -- Week 1 backend chunk plan. -- Chunk 1 backend scaffold. -- Chunk 2 external Flow auth actor boundary. -- Chunk 3 project guide foundation with checker, review, and revision policy - context; compensation is superseded by the independent WS-CON contract. -- Chunk 4 task queue, contributor/reviewer profiles, assignment, claim, start, and task audit events. -- Chunk 5 submission packet foundation with evidence items, versioning, server-stamped locked context, and submission finalization. -- Backend API contract drill through `Project -> Guide -> Task -> Screening -> Ready -> Claim -> Start -> Submit -> automatic pre-review gate`. -- Week 2 checker framework scope specification. -- Chunk 6 checker contract and records specification. -- Chunk 7 checker runner, registry, structural checkers, durable checker records, and API tests. -- Chunk 8 evidence, policy, forbidden-file, confidentiality, and generated-artifact checkers. -- Chunk 9 automatic pre-review gate with pre-submit intake blocking, internal `task_setup_blocked`, trusted checker retry, and contributor redaction. -- Chunk 10 checker trial with the expanded real API sample matrix, failure catalog, false-positive notes, missing-checker notes, and internal verifier evidence. -- Week 2 real HTTP API drill through Flow-token auth, project/guide/task/submission lifecycle, pre-submit checks, automatic checker runs, `pre_submission_checker_failed` intake failures, contributor redaction, internal `task_setup_blocked`, and trusted checker retry. -- Chunk 11 actor identity/profile registry for verified Flow actors. -- Chunk 12 project setup-run and project policy visibility APIs for setup runs, sufficiency reports, submission artifact policies, effective policy, and compiled project pre-submit checker policy. -- Chunk 13 task work-context, contributor submission-requirements, and operator-only locked-context APIs. -- Chunk 14 submission finalization, system actor pre-review gate audit semantics, scoped operator visibility, and HTTP-visible Terminal Benchmark proof. -- Chunk 15 agent-derivation hardening after the accepted no-DB Terminal Benchmark drill exposed a required/forbidden self-conflict. -- Chunk 16 Terminal Benchmark live API drill with privacy-scrubbed evidence and - professional PDF report proving the current lifecycle through HTTP-visible - APIs without database inspection. -- WS-POL-002 post-submit checker foundation planning, including project-scoped - `PostSubmitCheckerPolicy` setup, trusted compiler boundaries, deterministic - runtime separation, and implementation chunk contracts. -- WS-AUTH-001 planning and post-merge memory through PRs #91 and #92, including - the adopted external-auth/local-authorization boundary and 16 bounded chunks. - -## Current Priority - -- `WS-AUTH-001-01` adopts ADR 0012, canonical `/api/v1` authorization - documentation, operational ownership, and deterministic stale-doc gates. -- Token roles and typed workflow profiles are not the target product authority; - later chunks introduce canonical actors, links, grants, permissions, - revocation, and authority evidence before resource-family cutover. -- WS-POL-002-03 is handled separately by PR #90. No WS-POL-002-04 or human - review implementation starts automatically while authorization has priority. - -## Review Tracks Closed - -- Product strategy. -- Architecture. -- Systems architecture. -- Operations and review workflow. -- Process-pattern baseline. -- Adversarial quality. -- Chunk 9 pre-review gate internal verifier pass. -- Chunk 10 checker trial internal verifier pass. - -## Preserved For Later Review Work - -- Review queue scope starts only after the required authorization foundation; - it will consume `review_pending` tasks that already passed internal checkers. -- Reviewer access must be object-level and tied to assigned review work; broad reviewer checker-run access is still intentionally deferred. -- Week 3 must keep review decisions canonical: `accept`, `needs_revision`, and `reject`. -- `needs_revision` from human review must carry `outcome_source = human_review` and a review decision id; checker-caused `needs_revision` keeps `outcome_source = auto_checker`. -- Review findings, revision replay, and reviewer-quality metrics remain later - backend contracts after authorization proof. -- `WS-POL-001-15` hardened the agent-derived submission artifact policy - contract after the accepted no-DB Terminal Benchmark drill exposed a - required/forbidden self-conflict; the drill now passes after hardening. -- `WS-POL-001-16` completed a human-visible Terminal Benchmark live API drill - without database inspection as lifecycle proof and merged through PR #84. -- `WS-POL-002` planning and chunks 01/02 are merged. Chunk 03 is handled in PR - #90; chunk 04 remains inactive while authorization has priority. - -## Pending Before Pilot - -- Create the first pilot project guide from the template. -- Create the first 5 pilot task records. -- Confirm who owns product, engineering, review, operations, and compensation - fulfillment reconciliation during the first build cycle. -- Confirm the first v0.1 project guide uses the locked guide fields, task contract fields, evidence IDs, and contribution record flow. - -## Backend API Contract Drill - -Run from the backend directory against local Postgres: - -```bash -WORKSTREAM_DATABASE_URL= .venv/bin/python scripts/api_contract_e2e.py +# Current Workstream v0.1 Status + +This is the capability ledger for current v0.1 development. It records what is +implemented on `main`, what is being integrated, and what remains before the +v0.1 lifecycle is proven. It intentionally contains no delivery calendar. + +Implementation claims must be supported by code, migrations, tests, and merged +history. A plan, contract, draft pull request, or historical specification is +not evidence that behavior is live. + +## v0.1 Release Boundary + +The target remains: + +```text +Project Guide +-> Task +-> Submission Packet +-> Automated Checks +-> Human Review +-> Revision when required +-> Contribution Records +-> Conditional Compensation Award / Fulfillment +-> Contribution Evidence For Future Reputation Projection ``` -The script runs migrations forward and exercises project policy visibility plus task context APIs across the following flow: - -`Project -> Guide -> Task -> Screening -> Ready -> Work context -> Submission requirements -> Locked context -> Claim -> Start -> Submit -> automatic pre-review gate` - -## Week 2 Real API Drill - -Run from the backend directory against local Postgres: - -```bash -WORKSTREAM_DATABASE_URL= .venv/bin/python scripts/week2_api_e2e.py -``` - -The script starts a real local API server, issues local Flow-compatible tokens, -runs migrations forward, and exercises: - -`Project -> Guide -> Task -> Screening -> Ready -> Claim -> Start -> Pre-submit checks -> pre_submission_checker_failed | Submit -> automatic lock -> evaluation_pending -> review_pending | checker_caused_revision -> needs_revision -> fixed_resubmission -> evaluation_pending -> review_pending | internal task_setup_blocked -> trusted checker retry` - -It also proves older submissions remain immutable, non-owning contributor calls create -no task-side effects, malicious internal fields are rejected before persistence, -and checker-caused `needs_revision` creates no human review decision. - -## Deterministic Week 2 Closeout Gate - -The Week 2 closeout gate is deterministic and must fail on contract drift. - -Required invariants: - -- Real API drills run only against local `postgresql+asyncpg://` test databases named `workstream_test` or `test_workstream` unless an explicit write-risk override is supplied. -- Pre-submit checker responses are non-authoritative preflight feedback; submission creation is the authoritative intake gate and must not create submissions, checker runs, or lifecycle transitions when blocking failures exist. -- Missing or unexpected pre-submit checker names fail the drill. -- Missing or unexpected durable checker names fail the drill. -- Submission creation returns `finalized_at`, stamps evidence rows, and the - repair-only finalize endpoint is idempotent. -- Automatic checker-run creation, checker terminal status, and task-status transitions are polled because execution is async-first. -- Checker-run list visibility is checked for project manager, assigned contributor, unassigned contributor, and reviewer denial while broad reviewer checker-run access remains deferred. -- Trusted checker retry proves attempt ordering, supersession, and current-run flags. -- API-visible invariants are checked after the real API flows for locked guide/policy context, evidence finalization, checker results, checker counters, current-run uniqueness, and gate audit events. The legacy Week 2 regression script still includes direct database assertions; the accepted no-DB proof is the API contract drill plus the Terminal Benchmark API drill. - -Week 2 closeout validation is not only this script. The full gate is: - -```bash -.venv/bin/python -m ruff check app tests scripts -WORKSTREAM_DATABASE_URL= .venv/bin/python scripts/api_contract_e2e.py -WORKSTREAM_DATABASE_URL= .venv/bin/python scripts/week2_api_e2e.py -WORKSTREAM_DATABASE_URL= .venv/bin/python -m pytest tests/test_checkers.py tests/test_tasks.py -q -WORKSTREAM_DATABASE_URL= .venv/bin/python -m pytest -q -.venv/bin/docstr-coverage --config .docstr.yaml -``` - -The closeout also requires stale wording scan, Markdown link check, and internal verifier evidence before PR. - -## Operating Rule - -No roadmap item is considered closed until it is represented in one of: - -- product spec -- architecture spec -- operation workflow -- template -- checker rule -- decision record -- review closure +The release bar is one secured, observable, end-to-end lifecycle using the +locked backend and storage architecture. Marketplace expansion, blockchain +settlement, external source adapters, automated routing, and agent workspaces +remain outside v0.1. + +## Implemented On `main` + +### Platform foundation + +- FastAPI backend, SQLAlchemy async persistence, Alembic migrations, and + PostgreSQL record storage. +- Async checker and project-setup execution with Celery and Redis where durable + retries and isolation are required. +- Provider-neutral immutable artifact storage with MinIO protocol proof for + local development and CI, plus bounded private processing scratch. +- External integrations composed through the typed ADR 0014 adapter boundary. + +### Identity and authorization + +- External Flow-token verification with issuer boundaries and request context. +- Canonical actors, identity links, actor lifecycle controls, and human lineage. +- Closed permission/action catalogues, deny-by-default authorization, bootstrap + administrator grants, fixed-service identities, and runtime admission. +- Project-role grants, administrative APIs, authority evidence, idempotency, + and PostgreSQL-backed rate controls. +- Project setup and project mutation/read authorization foundations used by the + current guide integration work. + +### Project, task, submission, and checker foundations + +- Project guides, task queue records, task lifecycle guards, work context, and + contributor submission requirements. +- Versioned submission packets with evidence references, locked context, + finalization, and contributor privacy boundaries. +- Typed checker contracts, registry and runner behavior, durable checker + records, pre-submit checks, and the automatic pre-review gate. +- Trusted retry, supersession, audit evidence, and real API contract drills for + the implemented lifecycle. + +### Guide-source and artifact processing + +- Immutable source snapshots, source-media classification, typed extraction + boundaries, and persisted extraction results. +- PDF, DOCX, and XLSX extraction with bounded input handling and OOXML security + controls. +- Image metadata handling and persisted guide-sufficiency evidence. +- Guide materialization from persisted artifact-processing evidence. + +## Integration In Progress + +The following areas have merged planning, contracts, or partial foundations, +but are not all complete as one production path: + +- authoritative project-guide binding and read activation across ART and AUTH; +- reviewed cross-initiative contracts connecting artifact custody with + authorization-owned project guide reads; +- review-policy persistence and activation across REV and AUTH; +- review queue, reviewer assignment/claim, immutable decisions, and revision + replay on the canonical authorization boundary; +- atomic review-to-contribution and conditional compensation integration. + +Open pull requests are the authoritative view of the exact code currently under +review. Their presence does not change the implemented-on-`main` list above. + +## Remaining v0.1 Capability Milestones + +1. Complete the production guide binding/read path and prove its authorization, + custody, lineage, and stale-generation behavior. +2. Complete review and revision persistence, queueing, access, decisions, + findings, replay, and operational recovery. +3. Create immutable contributor and reviewer contribution records from the + accepted review lifecycle. +4. Complete contribution-policy evaluation, conditional compensation awards, + fulfillment, idempotency, reconciliation, and audit behavior without making + settlement a prerequisite. +5. Preserve authoritative contribution evidence for future reputation + projections; reputation projection remains deferred from the v0.1 runtime. +6. Prove the complete v0.1 lifecycle through real API, database, durable-job, + storage, security, and operational recovery tests. +7. Add the React/Vite/TypeScript product surfaces only against stable and tested + backend contracts. +8. Run a real internal pilot and close findings without weakening lifecycle, + authorization, storage, or evidence guarantees. + +These are dependency-ordered capability milestones, not a schedule. Distinct +initiatives may proceed concurrently when their contracts and integration +boundaries do not conflict. + +## How To Read Repository Status + +- **Implemented:** code and required evidence are merged on `main`. +- **In progress:** a bounded branch or pull request exists; behavior is not yet + part of `main`. +- **Planned:** an accepted specification or initiative describes future work; + behavior is unavailable until implemented and merged. +- **Historical:** the document records prior intent or evidence and does not + control current work. + +Use [CONTRIBUTING.md](../CONTRIBUTING.md) to start work and the +[Historical Planning Index](historical_planning.md) when investigating earlier +decisions. diff --git a/docs/roadmap_week1_backend_plan.md b/docs/roadmap_week1_backend_plan.md index 77fd288fe..e1dd3174f 100644 --- a/docs/roadmap_week1_backend_plan.md +++ b/docs/roadmap_week1_backend_plan.md @@ -1,5 +1,9 @@ # Week 1 Backend Plan +> Historical planning record. This calendar no longer controls current work or +> status. Use [Current v0.1 Status](roadmap_status.md) and the +> [Historical Planning Index](historical_planning.md). + ## Purpose This is the implementation plan for the June 2-5 foundation work. diff --git a/docs/spec_chunk_10_checker_trial.md b/docs/spec_chunk_10_checker_trial.md index 14455f8cd..89a7b65a7 100644 --- a/docs/spec_chunk_10_checker_trial.md +++ b/docs/spec_chunk_10_checker_trial.md @@ -1,5 +1,8 @@ # Chunk 10 Checker Trial +> Historical validation record. It does not define current sequencing or +> status; later canonical specifications and merged behavior take precedence. + ## Purpose Chunk 10 proves the Week 2 checker framework against real sample submission flows. diff --git a/docs/spec_chunk_5_submission_packet_foundation.md b/docs/spec_chunk_5_submission_packet_foundation.md index 7bb07008f..4951bfea0 100644 --- a/docs/spec_chunk_5_submission_packet_foundation.md +++ b/docs/spec_chunk_5_submission_packet_foundation.md @@ -1,5 +1,8 @@ # Chunk 5: Submission Packet Foundation +> Historical implementation record. It does not define current sequencing or +> status; later canonical specifications and merged behavior take precedence. + ## Purpose This chunk adds the backend record for Contributor submission packets. A diff --git a/docs/spec_chunk_6_checker_contract_records.md b/docs/spec_chunk_6_checker_contract_records.md index 84e19b057..da2f1c21e 100644 --- a/docs/spec_chunk_6_checker_contract_records.md +++ b/docs/spec_chunk_6_checker_contract_records.md @@ -1,5 +1,8 @@ # Chunk 6: Checker Contract And Records +> Historical implementation record. It does not define current sequencing or +> status; later canonical specifications and merged behavior take precedence. + ## Purpose Chunk 6 creates the durable checker run and checker result contract for Week 2. diff --git a/docs/spec_chunk_7_checker_runner_registry.md b/docs/spec_chunk_7_checker_runner_registry.md index def207a26..7541b40c5 100644 --- a/docs/spec_chunk_7_checker_runner_registry.md +++ b/docs/spec_chunk_7_checker_runner_registry.md @@ -1,5 +1,8 @@ # Chunk 7: Checker Runner And Registry +> Historical implementation record. It does not define current sequencing or +> status; later canonical specifications and merged behavior take precedence. + ## Purpose Chunk 7 turns the checker contract into a working backend slice. diff --git a/docs/spec_chunk_8_submission_artifact_policy_checkers.md b/docs/spec_chunk_8_submission_artifact_policy_checkers.md index b119f8738..f9b11d344 100644 --- a/docs/spec_chunk_8_submission_artifact_policy_checkers.md +++ b/docs/spec_chunk_8_submission_artifact_policy_checkers.md @@ -1,5 +1,8 @@ # Chunk 8: Submission Artifact And Policy Checkers +> Historical implementation record. It does not define current sequencing or +> status; later canonical specifications and merged behavior take precedence. + ## Purpose Chunk 8 expands the checker registry from the first structural runner into the first policy-aware submission artifact gate. diff --git a/docs/spec_chunk_9_pre_review_gate.md b/docs/spec_chunk_9_pre_review_gate.md index d16c5eb8f..9aa23f36b 100644 --- a/docs/spec_chunk_9_pre_review_gate.md +++ b/docs/spec_chunk_9_pre_review_gate.md @@ -1,5 +1,8 @@ # Chunk 9 Pre-Review Gate +> Historical implementation record. It does not define current sequencing or +> status; later canonical specifications and merged behavior take precedence. + ## Purpose Chunk 9 makes internal post-submit checks automatic. diff --git a/docs/spec_week2_checker_framework.md b/docs/spec_week2_checker_framework.md index f3a9608ff..8bdfac7bf 100644 --- a/docs/spec_week2_checker_framework.md +++ b/docs/spec_week2_checker_framework.md @@ -1,5 +1,9 @@ # Week 2 Checker Framework Specification +> Historical implementation specification. It is preserved as evidence of the +> early checker build, not as current sequencing or status. Use +> [Current v0.1 Status](roadmap_status.md) and canonical subsystem documents. + ## Purpose Week 2 adds the automated checker boundary between locked submissions and human review.