From 3a90d00e3b5d0192476bd2b0cc19921408a2f9b1 Mon Sep 17 00:00:00 2001 From: alexruidan <41616537+xLagerFeuer@users.noreply.github.com> Date: Tue, 17 Nov 2026 19:15:38 +0300 Subject: [PATCH] docs(upstream): add architecture-first roadmap route and issue template Introduce a read-only plan-only standardization proposal flow; keep all existing Upgrade and exact publication gates. 116 tests pass on the stacked tree. --- AGENTS.md | 2 + CHANGELOG.md | 2 + PROTOCOL.md | 15 ++++++++ README.md | 6 +++ docs/CAPABILITY_ROADMAP.md | 43 +++++++++++++++++++++ templates/EXTERNAL_ARCHITECTURE_ISSUE.md | 48 ++++++++++++++++++++++++ tests/test_roadmap_route_contract.py | 42 +++++++++++++++++++++ 7 files changed, 158 insertions(+) create mode 100644 docs/CAPABILITY_ROADMAP.md create mode 100644 templates/EXTERNAL_ARCHITECTURE_ISSUE.md create mode 100644 tests/test_roadmap_route_contract.py diff --git a/AGENTS.md b/AGENTS.md index 31fa57d..72dfe5c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,6 +14,8 @@ **Competing-PR coverage is not established by existence or passing tests.** For every VSM-derived/informed Upgrade hypothesis, use [the function-ownership/overlap receipt](PROTOCOL.md#existing-work-functional-overlap-and-vsm-ownership-gate): pin historical assessment plus current original source and competing PR head/diff, identify the decisive VSM decision owner and closure, compare matched native cases, and explicitly assess the remaining user task. An S2 tab router, static limit, or health check is not S3; current-task retry or accumulated helpers is not S4. Evaluate continuation/dependent work before opening a duplicate, but never mutate another author's PR branch or post to an external repo without the separate exact public consent. A partial/uncertain overlap does not close the single-harness search; preserve `EVIDENCE_INSUFFICIENT` where functional proof is absent. +**Architecture-first `upstream roadmap OWNER/REPO` — read-only plan:** Use one named original, current source/issue/PR heads and accepted historical Index assessment separately. Create a [Capability Roadmap Receipt](docs/CAPABILITY_ROADMAP.md), map actual VSM decision owner/closure and competing work before proposing useful composable `C` constructors. Optional `C(P)`/`A(P)` applies only when separately proved for S3/S4/S5; autonomy is never mandated. Offer source-native code, Profile/Skills specification feedback, or a separately permitted domain fork. VSM and cost-saving claims are hypotheses, not proof. No default fork record/Index regrade/public issue/PR. The template is `DRAFT — NOT PUBLISHED` until the owner approves exact third-party destination and text; a code task must follow normal full Upgrade and consent gates. [Route](PROTOCOL.md#architecture-first-upstream-roadmap-ownerrepo-plan-only) · [template](templates/EXTERNAL_ARCHITECTURE_ISSUE.md). + **Capability-first `upstream upgrade` — one original harness, full engineering cycle:** if unspecified, run bounded eligibility/preselection and select **one** source. Lock the whole invocation to that original; after an unsuccessful capability hypothesis, test other source-backed possibilities **in the same harness**, never switch to another original. Do not request routine `continue`. Qualify need/mechanism/counterfactual/scope; when authorized implement on its matching `opensiro-contributions` product branch and independently run baseline/after, negative and native CI. Preserve `.opensiro/` only on `opensiro/meta`. Stage the exact source-template external PR title/body, AI disclosure and code diff **as a review PR inside the same `opensiro-contributions` fork**; show the real fork-local PR URL to the human after obtaining the separate current exact consent to create that public fork PR. Never merge fork PR to fork default branch. If that public stage is not yet approved, provide read-only compare/diff and complete draft, not a fictitious URL. External PR creation/editing requires **separate exact current-conversation consent**. A source-local CLA/maintenance, DORMANT/PAUSE/STOP, **unavailable authority to initialize missing meta**/runner, no valid functional improvement or exhausted safe hypotheses is a valid final blocker **for the selected source**: do not bypass it by changing harness. See [single-harness end-to-end Upgrade](PROTOCOL.md#end-to-end-single-source-upgrade--finish-at-human-pr-approval), [fork-local PR review and AI disclosure](docs/UPGRADE_PR_REVIEW.md). `upstream upgrade batch N` and `upstream batch [N]` remain distinct **chat-scoped multi-source screening** commands with no mandatory PR/public write. **Required `.opensiro/` provisioning for full-cycle Upgrade:** after source-native qualification and an **independent verified effectful fork-write permission**, check the original-matching `opensiro-contributions/*` fork for `opensiro/meta`. If the ref is **confirmed missing**, initialize it from a pinned current fork default HEAD and commit `.opensiro/state.json` plus the **one stable intervention record** on that branch only; do not abandon a qualified, authorized source just because meta is missing. If the ref exists, re-read and reuse it; if unreadable, colliding, paused/stopped, unlicensed or unauthorized, fail closed **inside the selected original harness** and investigate only safe in-source alternatives; never switch harnesses. No implicit `ALLOW/ACTIVE`, owner `RESUME`, historical events, independent test results or original PR statuses. Read back the exact metadata HEAD and contribution and verify the fork with [`scripts/aggregate.py`](scripts/aggregate.py) before claiming `READY_FOR_HUMAN_PR_APPROVAL`. If an external PR is already live, reconcile its verified URL into **one existing/missing record** without creating another PR. This obligation applies to single-source `upstream upgrade`, **not** chat-only batches or read-only scans; never put `.opensiro/` in product branches. [Provisioning procedure](PROTOCOL.md#upgrade-metadata-materialization--missing-opensirometa). diff --git a/CHANGELOG.md b/CHANGELOG.md index 36b27f6..b6fe213 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ **Release status:** a protocol version merged to `main` is **not** automatically a published GitHub Release. Check [published Releases](https://github.com/opensiro/upstream/releases). At the 2026-11-16 review, v0.13.0 was the latest published release, and the [v0.16.0 consolidated candidate](docs/RELEASE_CANDIDATE_v0.16.0.md) awaits final owner approval. Individual v0.14–v0.16 history entries below remain valid intermediate main snapshots, not claims of three separate GitHub Releases. ## Unreleased +**Architecture-first Upstream roadmap (unreleased):** Add a named-source, plan-only contribution route for mapping assessment, native issues/PRs and proposed composable capabilities, with independent options for product code, Profile/Skills feedback and domain-specific forks. VSM-standardization and development-cost benefit remain hypotheses; no automatic assessment regrade, agent autonomy, new fork metadata enum, third-party publication, SemVer bump or Release. + **Autonomy preflight before Upstream Upgrade source ranking (unreleased):** Following the existing license/formalities read-only preflight, check whether a non-core agent-assisted contribution can actually reach a permitted PR: contributor path, issue/design approval, CLA/DCO and human-only attestations, AI disclosure, native test availability and review requirements. Report source-backed direct/conditional/issue-only/unknown paths without inventing permission or a new fork state; prefer viable autonomous PR paths among function-credible candidates before deeper feature/popularity ranking while preserving one-harness lock and exact public-publication consent. **Function-scoped evidence-first Upgrade (unreleased):** Explicit `S1`–`S5` operator qualifiers now narrow bounded read-only source preselection to an independently grounded function-specific user need before the one-harness lock. After selection, research stays in the same original and requested function, with decisive owner, actual decision/feedback rights, enforcement versus ownership and return-to-operation closure checked against the normative Profile. S5 requires legitimate identity/ultimate-policy decision closure, not a static policy, guardrail, browser permission or routine human approval. Existing overlap, material capability-delta, native tests, classification, fork-local review and exact external-publication consent remain independent gates. Clarifying Unreleased contract, without new JSON enums, Index reassessment, version bump or release. diff --git a/PROTOCOL.md b/PROTOCOL.md index fdd76f2..7f48a89 100644 --- a/PROTOCOL.md +++ b/PROTOCOL.md @@ -20,6 +20,21 @@ Read [docs/FORK_METADATA.md](docs/FORK_METADATA.md) for the initial JSON contrac 4. Check native **need, mechanism, counterfactual and scope**. Unsupported claims remain pending. No mandatory six-function S1–S5 scan or per-session batch. 5. Before implementation, apply the [material capability-delta gate](#material-capability-delta-gate-before-implementation). An Index link, a new configuration flag, a passing unit test or an absence in a VSM function vector is not independently a useful Upgrade. +## Architecture-first `upstream roadmap OWNER/REPO` (plan-only) + +**Mission and uncertainty.** OpenSiro Upstream studies whether reusable organizational specifications and evidence-backed engineering can reduce the total cost of designing, integrating and maintaining AI agent harnesses. VSM is our current reference hypothesis, **not** mandatory architecture, a demonstrated cost saving, or a product-quality rating. Validate claims against the simplest original-native alternative and measured engineering effort. + +**Route contract.** `upstream roadmap OWNER/REPO` is a **conversational, named-original, read-only-by-default architecture route**, separate from `upstream upgrade` and both batch commands. It is not a new CLI command, research batch, VSM assessment, implementation mandate, publication approval, or contribution state. A source-backed **plan-only** architecture issue draft may be a complete success with zero code changes and zero published PRs. Follow [Capability Roadmap](docs/CAPABILITY_ROADMAP.md) and [external issue template](templates/EXTERNAL_ARCHITECTURE_ISSUE.md). + +1. **Freeze one source and check rights.** Pin the actual original default HEAD, source boundary/recursion, existing Index assessment file SHA plus historical `review_ref`/`reviewed_at`, Profile/Methodology versions and observed relevant PR/issue refs. An unmerged reassessment is not canonical. Perform the existing read-only license/formalities and autonomy preflights. Verify fork and owner controls before effectful work; unreadable metadata is unknown, not permission. +2. **Map real work and residual outcomes.** Identify shipped behavior, open or merged PR heads/diffs/tests, issues, experiments, and adjacent maintainer governance *separately*. For each relevant S1/S2/S3/S3*/S4/S5 mechanism name a native actor/task, disturbance, decisive owner/right, enforcement, feedback/closure and unserved user outcome. Record current main → competing PR → residual user capability with evidence and alternative; a missing historical grade does not independently justify a feature, a new controller, or a claimed grade. +3. **Design for useful composability before autonomy.** Prioritize a **function-specific** constructor that, when actually shipped and verified, can support `C`, not generic routing/hooks or an unrealized plan. Optional `C(P)` and `A(P)` are separate two-mode capabilities only for S3/S4/S5, under the published Methodology, not a universal grade ladder; `P` alone may be the legitimate final choice. S1/S2/S3* do not publish parent-mode notation. Never imply a stage or future PR changes the Index score or transfers rights to an agent. +4. **Offer three independent choices.** (a) Integration/limited source-native PRs that respect existing work; (b) feedback/PRs to normative [Profile](https://github.com/opensiro/vsm-harness-profile) or separate [Skills](https://github.com/opensiro/vsm-harness-skills) assessment method; (c) legally permitted domain-specific fork experiment with an explicit task/boundary, simple native alternative and no expectation of original-project adoption. None is obligatory for maintainers. +5. **Test the cost hypothesis.** Predeclare comparable native-vs-VSM-informed tasks, functionality and all-in implementation/integration/review/test/maintenance costs. Until independently measured, mark cost claims `NOT_MEASURED`, never "proven cheaper". +6. **Stop at a decision-ready draft.** Produce the [Capability Roadmap Receipt](docs/CAPABILITY_ROADMAP.md#capability-roadmap-receipt) and optionally an original-native external issue draft marked `DRAFT — NOT PUBLISHED`. Do **not** open an Upstream issue, fork-local improvement record, schedule, or second mutable ledger solely for an unimplemented roadmap. For an actual implementation, re-enter the existing full `upstream upgrade` material-delta, native validation, schema-v2 fork-local contribution and five-link handoff rules. External original issue/comment/PR and public fork-local PR still each need separate **exact current-conversation owner approval** of destination, action, full text and diff. + +**Boundary:** roadmap success is a source-linked integration proposal, not delivery of code, confirmed `C`, formal Index reassessment, Profile amendment, implemented autonomy or measured cost savings. `upstream upgrade` and `upstream upgrade batch N` / `upstream batch [N]` remain unchanged. + ## Capability-first `upstream upgrade` (new work, not historical batching) These are **conversational operator routes**, not shell commands, a new scheduler, a frozen-batch producer, or automatic authority to write to forks. Their purpose is to find a **real new user/operator task or decision** that an agent harness cannot currently perform, explain why a VSM mechanism is a useful hypothesis for that need, and then independently test the smallest native improvement. Use the current [fork-local metadata](docs/FORK_METADATA.md) and [read-only aggregator](scripts/aggregate.py); the original repository and Index remain the respective product/assessment sources of truth. diff --git a/README.md b/README.md index 7a91fb1..b03715e 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,12 @@ As of **2026-11-16 12:00 UTC**, the **42 distinct original-repository PRs** link [Full dated statistics, day-by-day counts, coverage and on-demand refresh instructions](docs/ACTIVITY.md). Each square contains **three independently shaded stripes**: **green** published, **blue** merged, **amber** closed without merge; a **purple dot** marks a closed PR with a GitHub `APPROVED` review (currently 0). The SVG uses original event dates rather than metadata backfill commits and is a static, manually refreshable view, **not a live counter**. +## Architecture-first Upstream roadmap + +`upstream roadmap OWNER/REPO` is a **plan-only**, read-only-by-default contribution route. It maps a pinned general assessment against current original code, issues, PR heads and unresolved user tasks, then proposes the smallest useful **composable-first** improvements. It may finish with a draft architecture issue and **no code changes**. OpenSiro tests whether VSM-informed organizational specification (a hypothesis, not a mandate) can lower harness development/integration/maintenance cost versus simpler native alternatives; **no savings are claimed without measurement**. Maintainers may pursue product-native PRs, challenge/improve Profile or Skills, or try an optional domain-scoped fork. + +[Roadmap procedure](docs/CAPABILITY_ROADMAP.md) · [external issue draft](templates/EXTERNAL_ARCHITECTURE_ISSUE.md) · [existing Upgrade](PROTOCOL.md#capability-first-upstream-upgrade-new-work-not-historical-batching). Public third-party communication still needs exact current-conversation approval. + ## Capability-first upstream upgrade `upstream upgrade` is a **one-harness, end-to-end engineering route (FULL CYCLE)**. When no source is specified, run bounded preselection, choose **one** eligible original harness, then lock the entire run to that source. Within that harness, investigate additional real functional hypotheses if early ones fail; **never switch to another original harness in the same invocation**. The goal is real code on a correctly parented `opensiro-contributions` product branch, source-native tests and **a fork-local PR for human review containing the exact prospective external PR**. Creating even that public fork PR requires its own current-conversation approval; without approval, show the exact diff/compare and PR body without claiming a PR exists. An external PR is never posted without separate owner approval. Rights, CLA/DCO, `DORMANT/PAUSE/STOP`, lack of a qualified improvement, and unrun tests remain honest, source-local stop reasons; this is not a background agent or mandatory patch quota. diff --git a/docs/CAPABILITY_ROADMAP.md b/docs/CAPABILITY_ROADMAP.md new file mode 100644 index 0000000..4f41b68 --- /dev/null +++ b/docs/CAPABILITY_ROADMAP.md @@ -0,0 +1,43 @@ +# Capability Roadmap — architecture-first, plan-only + +[Protocol](../PROTOCOL.md#architecture-first-upstream-roadmap-ownerrepo-plan-only) · [issue template](../templates/EXTERNAL_ARCHITECTURE_ISSUE.md) + +## Purpose + +This route tests whether reusable organizational specifications and source-native contributions reduce AI harness engineering effort. **VSM is a working reference hypothesis**, not a required implementation or confirmed cost advantage. The output is a **decision-ready plan**, potentially with zero code and no external publication. + +The normative [Profile](https://github.com/opensiro/vsm-harness-profile/blob/main/PROFILE.md) owns function semantics; [Skills](https://github.com/opensiro/vsm-harness-skills) owns grade/methodology; [Index](https://github.com/opensiro/vsm-harness-index) owns accepted assessments. Upstream does not overwrite their authority. + +## Procedure + +1. **Source and authority pins:** Named original repository; exact current default HEAD; observation time; legal license/contributor/AI policy and autonomy preflight; accepted Index assessment URL *and file blob SHA*, historical review date/ref; explicitly label pending reassessments as unaccepted. Declare system-in-focus and excluded recursion. If a verified fork is relevant read original parent and `opensiro/meta` owner controls before writes. +2. **Native work census:** For relevant S1/S2/S3/S3*/S4/S5, inspect current shipped code; exact original issue and PR state/head/diff and maintainer decision; existing OpenSiro fork work; competing original alternatives. Distinguish `SHIPPED`, `OPEN_PR`, `ISSUE_ONLY`, `EXPERIMENT`, `EXTERNAL_GOVERNANCE` and `UNVERIFIED` as *report labels only*, not stored metadata enums. +3. **Function-specific residual gap:** Name real actor → trigger → decision/action → observable result; actual disturbance; decisive right and owner; enforcement/transport; feedback into subsequent operation. Write `current main → competing proposal → remaining task`, overlap/alternative, uncertainty. No conclusion from a low Index grade or an issue title alone. +4. **Composability-first option:** Favor supported first-party, function-specific constructors where maintainers need them; only a shipped/composable closure can establish `C` in a later Index assessment. `C(P)` and `A(P)` are optional, independently demonstrated modes **only for S3/S4/S5**, not a mandated grade progression. `P` alone is a valid intentional goal; S1/S2/S3* have no published parent mode. Always prefer a simpler native design when appropriate. +5. **Independent maintainer choices:** (a) original-native code/PR work, with existing Upgrade gates and separate independent contribution record per real improvement; (b) normative semantic feedback to Profile or separate Skills method/assessment improvement; (c) permitted experimental domain fork with declared boundary. Neither a spec issue nor a fork creates original maintainer obligations. +6. **Matched cost experiment:** Predeclare equivalent native vs VSM-informed user tasks and measure total implementation, integration, review/test, maintenance/regression effort and output quality. Report `NOT_MEASURED` until data exist. Never claim proven cheaper or performance superiority from a diagram. +7. **Handoff:** Produce [Capability Roadmap Receipt](#capability-roadmap-receipt) and optional [external architecture issue](../templates/EXTERNAL_ARCHITECTURE_ISSUE.md) with exact source links; keep `DRAFT — NOT PUBLISHED` until separate current owner consent for the exact destination/full text/diff. Plan-only ends even with zero code, zero PR, or no qualified improvement. + +## Capability Roadmap Receipt + +A compact, **read-only Markdown report** in chat, or a dated **non-authoritative example**. Do not create another issue/PR queue or a fork-local contribution ID just for a proposal. Required evidence sections: + +| Section | Required contents | +| --- | --- | +| Identity | Original and HEAD SHA/date; boundary/recursion; pinned accepted Index assessment SHA, review date/ref and Profile/Skills refs | +| Permission | License/contributor/CLA/AI policy, allowed paths and any actual fork owner state; no inferred write | +| Existing work | Original and fork issue/PR URLs, true open/merged status and head/diff evidence, shipped/proposed distinction | +| VSM witness | Function, disturbance, real decision/feedback owner/right, enabling first-party primitives and return-to-operation | +| Proposed capability | Actor/output and native alternative, meaningful constructor path, dependencies and small acceptance cases | +| Optional paths | Product-native code, Profile or Skills feedback, permitted domain-specific fork | +| Cost check | Paired native/VSM-informed task, all-in measures and observed values, else `NOT_MEASURED` | +| Delivery | `PLAN_ONLY`, `NEEDS_EVIDENCE` or `NO_USEFUL_CHANGE` as narrative outcomes only; external issue marked `DRAFT — NOT PUBLISHED` | + +**Fail closed:** unknown source/ref/owner/diff stays unverified. An Issue or open PR does not certify shipped capability, a planned `C` is not an Index `C`, and a maintained project policy is not automatic runtime S5. + +## Ownership and stages + +- The roadmap is **not** an Index reassessment, normative Profile patch or second canonical ledger. +- Existing single-harness `upstream upgrade` remains the implementation route, with material capability-delta, native tests, v2 provenance, verified matching fork and separate exact public approvals. +- Fork-local `.opensiro/contributions/.json` remains **one independently implemented improvement**, on the separate `opensiro/meta` branch; a roadmap may link existing records without manufacturing a new case. +- A public original issue, comment or PR is a separate external interaction and needs a complete exact approval in the current conversation. A plan-only route has **no automatic publication**. diff --git a/templates/EXTERNAL_ARCHITECTURE_ISSUE.md b/templates/EXTERNAL_ARCHITECTURE_ISSUE.md new file mode 100644 index 0000000..3fa79c1 --- /dev/null +++ b/templates/EXTERNAL_ARCHITECTURE_ISSUE.md @@ -0,0 +1,48 @@ +# Research proposal: reusable organizational capabilities for [PROJECT] + + + +## Context + +We are developing **OpenSiro**, an open-source effort studying whether reusable organizational specifications and evidence-backed engineering methods make AI agent harnesses easier and less expensive to build, integrate, and maintain. + +Our current reference hypothesis is the **Viable System Model (VSM)**. We are **not** asking this project to adopt VSM, alleging it lacks six subsystems, or claiming proven cost reduction. + +## Evidence from this project + +- **Original repository and pinned revision:** [native commit URL] +- **Current operator/user workflow:** [source links and observed behavior] +- **Relevant issue(s) and PR(s):** [verified URLs, status, current PR head/diff and maintainer decisions] +- **Specific remaining integration question:** [actor → trigger → blocked output/decision] +- **Closest existing project-native solution:** [the simple alternative and any advantages] + +An OpenSiro assessment is a dated evidence snapshot, not today's guaranteed capability grade, product-quality or safety rating. Unmerged PRs are proposals, not shipped features. + +## Optional incremental approach + +1. [Small useful function-specific interface or composition path, backed by actual need] +2. [Matched native acceptance case, negative control and compatibility] +3. [Optional parent-supervised or autonomous mode only where desired and independently supported] + +The first preference is composability, not mandatory autonomy or a required autonomy grade. The maintainers remain responsible for deciding their architecture. + +## Three independent ways to participate + +- **Improve this harness:** help integrate related PRs/issues and contribute focused native improvements if a need is validated. +- **Challenge or improve the open specification:** provide counterexamples or contribute to [VSM Harness Profile](https://github.com/opensiro/vsm-harness-profile) (semantics) or [VSM Harness Skills](https://github.com/opensiro/vsm-harness-skills) (assessment methods). +- **Explore a domain-specific fork:** use a legally permitted experimental fork to test the idea in a particular domain; there is no requirement for the main project to adopt it. + +## How we'll evaluate value + +We propose comparing the same native user task with any VSM-informed option, including engineering/integration time, review/test load, maintenance and functionality. **Cost reduction remains a hypothesis until measured**, not a promise. + +## Feedback requested + +Would this help the project? Which existing work, architecture constraints, or maintainer priorities should guide the proposal? Would a simpler native solution be preferable? + +## Attribution and AI disclosure + +[OpenSiro Upstream](https://github.com/opensiro/upstream) · [Profile](https://github.com/opensiro/vsm-harness-profile) · [Skills](https://github.com/opensiro/vsm-harness-skills) · [Index](https://github.com/opensiro/vsm-harness-index) + +**AI involvement:** This research proposal and its evidence mapping were prepared with AI assistance. No independent human technical review, proven correctness, maintainer endorsement, verified cost advantage or implementation result is claimed. diff --git a/tests/test_roadmap_route_contract.py b/tests/test_roadmap_route_contract.py new file mode 100644 index 0000000..fbc2d4d --- /dev/null +++ b/tests/test_roadmap_route_contract.py @@ -0,0 +1,42 @@ +"""Document contract only, not proof of real VSM functions or engineering savings.""" +from pathlib import Path +import unittest + +ROOT = Path(__file__).resolve().parents[1] + +class RoadmapRouteContractTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.protocol=(ROOT/"PROTOCOL.md").read_text() + cls.route=cls.protocol.split("## Architecture-first `upstream roadmap OWNER/REPO` (plan-only)".replace("`",chr(96)),1)[1].split("\n## ",1)[0] + cls.guide=(ROOT/"docs/CAPABILITY_ROADMAP.md").read_text() + cls.template=(ROOT/"templates/EXTERNAL_ARCHITECTURE_ISSUE.md").read_text() + + def test_separate_plan_only_route(self): + for phrase in ("plan-only", "one source", "zero code", "upstream upgrade", "separate", "read-only", "not a compulsory", "not a mandatory"): + if phrase in ("one source", "not a compulsory", "not a mandatory"): + continue + self.assertIn(phrase.lower(),self.route.lower()) + self.assertIn("## Capability-first `upstream upgrade`".replace("`",chr(96)),self.protocol) + + def test_provenance_and_legal_preflights(self): + for phrase in ("historical", "original default HEAD", "PR heads/diffs/tests", "license/formalities", "autonomy preflights", "Profile", "Skills", "Index"): + self.assertIn(phrase,self.route) + + def test_parent_mode_not_a_ladder(self): + for phrase in ("C(P)", "A(P)", "only for S3/S4/S5", "not a universal grade ladder", "S1/S2/S3*", "P` alone".replace("`",chr(96))): + self.assertIn(phrase,self.route) + + def test_no_false_cost_or_auto_publication(self): + for phrase in ("NOT_MEASURED", "exact current-conversation owner approval", "DRAFT — NOT PUBLISHED", "schema-v2"): + self.assertIn(phrase,self.route) + self.assertIn("no automatic publication",self.guide.lower()) + self.assertIn("Cost reduction remains a hypothesis",self.template) + + def test_three_options_and_source_native_alternative(self): + for phrase in ("Improve this harness", "Challenge or improve the open specification", "Explore a domain-specific fork", "Closest existing project-native solution", "AI involvement"): + self.assertIn(phrase,self.template) + self.assertIn("DRAFT — NOT PUBLISHED",self.template) + +if __name__=="__main__": + unittest.main()