- CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT13
- CONN-ERPNEXT-AGENT18
- Requirementsall slices in all specs31
- Requirements not donenot VERIFIED11
- Specs not donewhole specs only2
Each spec shows its requirement count. Panel J lists every record.
Requirements (31)
Specs (2)
Each bar shows one state against all records of the same kind.
Percentages count current rows. Done means VERIFIED.
| State | Definition |
|---|---|
| SPECIFIED | The requirement is written. No code for it is on the default branch. |
| LANDED | A commit that carries its ID in a Spec trailer is on the default branch. |
| VERIFIED | It is LANDED and a test bound to its ID exists. |
A spec state is the lowest state of its rows. Done means VERIFIED.
Invalid state: 0
| Spec / title | Req. | Landed | Done | Spec state | Code references |
|---|---|---|---|---|---|
| CONN-ERPNEXT-AGENT-CONNECTOR-CONTENTCONN-ERPNEXT-AGENT-CONNECTOR-CONTENT — The connector serves its packaged content | 13 | 12/13 | 7 | SPECIFIED | erpnext_agent/ontology/lifecycle.ttl implementation: file exists; coverage not verified spec.md documentation: file exists; coverage not verified plan.md documentation: file exists; coverage not verified requirements.md documentation: file exists; coverage not verified test-spec.md documentation: file exists; coverage not verified |
| CONN-ERPNEXT-AGENTCONN-ERPNEXT-AGENT — Connector identity and release metadata | 18 | 14/18 | 13 | SPECIFIED | erpnext_agent/lifecycle.py implementation: file exists; coverage not verified spec.md documentation: file exists; coverage not verified `requirements.md` documentation: file exists; coverage not verified `status.json` implementation: file exists; coverage not verified plan.md documentation: file exists; coverage not verified test-spec.md documentation: file exists; coverage not verified tests/test_access_contracts.py test: file exists; coverage not verified |
Landed counts LANDED and VERIFIED requirements. Done counts VERIFIED requirements only.
The spec state comes from the spec status file only.
Packages group specs by repository and declared component. Unassigned means no component was declared. Code links do not prove coverage. Mermaid source.
Knuckles-Team/erpnext-agent / Unassigned (2)
CONN-ERPNEXT-AGENT: no plan diagram declared.
CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT: no plan diagram declared.
Depends on means a declared prerequisite. Extends and references do not imply prerequisite order. Shared code never creates dependencies. External targets are source declarations, not verified delivery.
Knuckles-Team/erpnext-agent / Unassigned
| Spec | Relationship | Target | Evidence |
|---|---|---|---|
| CONN-ERPNEXT-AGENT | No relationships declared; dependencies unknown | ||
| CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT | No relationships declared; dependencies unknown | ||
Issues
0 open at capture.
Pull Requests
0 open at capture.
The build reads GitHub one time. This page makes no live API requests.
Each status file gives one spec row. Each requirement gives one more row. A record without a valid state shows INVALID. Expand a Definition to read the canonical requirement and verification text.
All documented records (33 rows)
| ID / source | Kind | Parent | State | Commit / test evidence |
|---|---|---|---|---|
| CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT — The connector serves its packaged content | spec | None | SPECIFIED | No recorded commit/test evidence |
| CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT-R001 Default content Definition — CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT / CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT — The connector serves its packaged contentCanonical requirement and verification source**Default content.** `pyproject.toml` declares `erpnext-mcp` as the single `scion_sdk.connector` entry point. The server lists the packaged `skill://` and `ontology://` resources and the packaged prompts with no `content=` argument. Proving test: `tests/test_default_content_surfaces.py`. Caller chain: the erpnext-mcp console script (scion_sdk.cli:serve) loads the scion_sdk.connector entry point erpnext_agent:connector (erpnext_agent/__init__.py:89), and the SDK build_server serves the packaged skills, ontology and prompts as resources and prompts. Shape: Connector in erpnext_agent/__init__.py passes no content= argument; the SDK default content publishes erpnext_agent/skills, erpnext_agent/ontology and erpnext_agent/prompts, and the test follows the documentdb-mcp tests/test_default_content_surfaces.py pattern. | `resources/list` includes `skill://` and `ontology://`; `prompts/list` includes each packaged prompt. Planned test: `tests/test_default_content_surfaces.py::test_default_content_surfaces`. | requirement | CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT | LANDED | 671d58e24af5 |
| CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT-R002 Resolve the manifest ontology classes for supplier, item, purchase order and customer Definition — CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT / CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT — The connector serves its packaged contentCanonical requirement and verification source**Resolve the manifest ontology classes for supplier, item, purchase order and customer.** Subsystem: connector `erpnext-agent`. In `connector_manifest.yml` at the repository root set `ontology_class` of `Supplier`, `Item`, `PurchaseOrder` and `Customer` to the medulla core classes. Regenerate the manifest with the connector manifest generator; never edit it by hand. The consumer is the medulla supply-chain fixture MEDULLA-SUPPLY-VOCAB-R005.6. Caller chain: (planned) the connector manifest generator in the pipelines repo (pipelines_hooks/connector/generate.py) reads erpnext_agent/connector_sources.py and the ontology, and writes connector_manifest.yml at the repo root, which does not exist yet; the manifest is consumed by the connector manifest gate. Shape: the ontology_class values come from erpnext_agent/connector_sources.py (entries today hold None or Person and Incident) and are regenerated, not hand edited; the new test tests/test_manifest_classes.py reads connector_manifest.yml and checks the four class values. | Test (planned): the connector manifest gate passes and `tests/test_manifest_classes.py::test_no_unresolved_for_the_four` (L2) finds no `UNRESOLVED` value for the four classes. | requirement | CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT | SPECIFIED | No recorded commit/test evidence |
| CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT-R003 Proven business workflows ship as served skills Definition — CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT / CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT — The connector serves its packaged contentCanonical requirement and verification source**Proven business workflows ship as served skills.** The package serves the workflow skills `erpnext-order-to-cash`, `erpnext-procure-to-pay`, `erpnext-inventory`, `erpnext-crm-pipeline`, `erpnext-lead-nurturing`, `erpnext-projects`, `erpnext-hr`, `erpnext-hire-to-retire`, `erpnext-leave-approval`, `erpnext-payroll-run`, `erpnext-accounting` and `erpnext-business-onboarding` under erpnext_agent/skills/ as `skill://` resources, and every tool a skill names is a served tool. The onboarding skill ships its input schema at `references/onboarding-spec.yaml`. Caller chain: the erpnext-mcp console script builds the server with scion_sdk._connector_serve.build_server, whose ConnectorContent serves the packaged skills. Shape: one directory per skill under erpnext_agent/skills/ with a SKILL.md (frontmatter name, description, tags) and optional references/; the test reuses `build_server` and the backticked-tool pattern `TOOL_TOKEN` of tests/test_workflow_content.py. | `tests/test_workflow_content.py::test_workflow_skills_are_served_and_name_only_served_tools`, `tests/test_workflow_content.py::test_onboarding_skill_ships_its_input_schema` | requirement | CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT | VERIFIED | 3a5579542084 4af0a6a05c36 tests/test_workflow_content.py:117 tests/test_workflow_content.py:76 |
| CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT-R004 The operator prompt names the served tools and the workflow skills Definition — CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT / CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT — The connector serves its packaged contentCanonical requirement and verification source**The operator prompt names the served tools and the workflow skills.** erpnext_agent/prompts/erp_operator.json lists only served tools and exactly the workflow skills of R003. Caller chain: the `scion_sdk.prompt_providers` entry point serves the prompt; the test reads it beside the served tool list. Shape: erpnext_agent/prompts/erp_operator.json with `identity`, `instructions.core_directive`, `skills` and `tools`; the test reuses `_served` of tests/test_workflow_content.py. | `tests/test_workflow_content.py::test_operator_prompt_names_served_tools_and_shipped_workflow_skills` | requirement | CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT | VERIFIED | 3a5579542084 4af0a6a05c36 tests/test_workflow_content.py:90 |
| CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT-R005 Every ontology class rolls up to medulla core by subclassing Definition — CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT / CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT — The connector serves its packaged contentCanonical requirement and verification source**Every ontology class rolls up to medulla core by subclassing.** Each class declared in erpnext_agent/ontology/*.ttl reaches the core namespace through `rdfs:subClassOf` (scion_sdk.testing.ontology_rollup.orphan_classes), each pack-only class names a core parent directly, core classes reused by IRI are only labelled, and no file uses `owl:imports`. Caller chain: the `scion_sdk.ontology_providers` entry point federates erpnext_agent/ontology/*.ttl into the hub, which reads each class's `rdfs:subClassOf` chain to medulla core. Shape: classes live in erpnext_agent/ontology/erpnext.ttl in the shared `kg#` namespace; the test reuses `scion_sdk.testing.ontology_rollup.orphan_classes` and `parse_triples`. | `tests/test_surface_ontology.py::test_every_class_rolls_up_to_core_by_subclassing_never_import` | requirement | CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT | VERIFIED | 3a5579542084 4af0a6a05c36 tests/test_surface_ontology.py:49 |
| CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT-R006 The ontology records the served surface and its links Definition — CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT / CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT — The connector serves its packaged contentCanonical requirement and verification source**The ontology records the served surface and its links.** erpnext_agent/ontology/surface.ttl declares the `cp:Connector`, one `cp:Feature` per business capability realised by tools, skills and the prompt (`cp:realizedBy`), one `cp:Tool` per served tool with `cp:componentId` and `cp:operatesOn`, and one `cp:Skill` or `cp:Prompt` per shipped skill or prompt with `cp:appliesTo`. The tool set equals the served tool list. Shapes: medulla connector-pack shapes. Caller chain: the ontology provider entry point serves erpnext_agent/ontology/surface.ttl as an `ontology://` resource that medulla loads as connector-pack instances. Shape: instances only (`erpx:` prefix), tool IRIs `erpx:tool-<name>`, skill IRIs `erpx:skill-<name>`, prompt IRIs `erpx:prompt-<name>`; the test reuses `_served_tools` and `parse_triples`. | `tests/test_surface_ontology.py::test_surface_lists_exactly_the_served_tools_skills_and_prompts` | requirement | CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT | VERIFIED | 3a5579542084 4af0a6a05c36 tests/test_surface_ontology.py:77 |
| CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT-R007 The ontology locates each class's data and how medulla federates it Definition — CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT / CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT — The connector serves its packaged contentCanonical requirement and verification source**The ontology locates each class's data and how medulla federates it.** erpnext_agent/ontology/federation.ttl declares one `vg:SourceConnection` (kind `mcp`, the fleet server name, role `live_truth`), one `vg:MetadataContract`, and for each record class one `vg:VirtualMapping` and one `vg:SourceAuthority` (materialisation `virtual`, rank 1 for books, stock and parties, rank 2 with fallback where a dedicated system may own the class). Shapes: medulla virtual-graph shapes. Caller chain: the ontology provider entry point serves erpnext_agent/ontology/federation.ttl, which medulla reads to route each class to the erpnext-mcp source. Shape: one `vg:VirtualMapping`, `vg:PredicateFieldPair` and `vg:SourceAuthority` per class; the contract digest is sha256 over the sorted entity, field and operation lists. | `tests/test_surface_ontology.py::test_every_domain_class_has_a_live_virtual_authority` | requirement | CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT | VERIFIED | 3a5579542084 4af0a6a05c36 tests/test_surface_ontology.py:102 |
| CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT-R008 Each business role has a complete agent-definition prompt Definition — CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT / CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT — The connector serves its packaged contentCanonical requirement and verification source**Each business role has a complete agent-definition prompt.** Beside the operator prompt, erpnext_agent/prompts/ ships `hr_manager`, `sales_rep` and `business_onboarding`. Each prompt's served text (`instructions.core_directive`) states the role and goal, the skills and every tool it uses by name, the data it reads and writes, its guardrails and its expected outputs; its `skills` exist in the package and its `tools` are served. erpnext_agent/ontology/surface.ttl links each prompt to its skills and tools through the features it realises. Caller chain: the `scion_sdk.prompt_providers` entry point serves each prompt (scion_sdk.mcp._content_prompts serves `core_directive`); the test reads each prompt beside the served tool list. Shape: one JSON document per role under erpnext_agent/prompts/ (`identity`, `instructions.core_directive`, `instructions.guardrails`, `instructions.data_locations`, `skills`, `tools`), the same format as erp_operator.json; the test reuses `_served` and the `AGENT_SECTIONS` list of tests/test_workflow_content.py. | `tests/test_workflow_content.py::test_role_prompts_are_complete_agent_definitions` | requirement | CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT | VERIFIED | 3a5579542084 tests/test_workflow_content.py:99 |
| CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT-R009 The document lifecycle machine is described in the ontology Definition — CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT / CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT — The connector serves its packaged contentCanonical requirement and verification source**The document lifecycle machine is described in the ontology.** The ontology states the Draft, Submitted and Cancelled states, the Save, Submit, Cancel and Amend transitions with their guards, and the lifecycle as one machine. Every class extends a medulla core state-machine class by `rdfs:subClassOf`; no file uses `owl:imports`. This rollup closes when R009.1 to R009.3 are bound. Depends on: MEDULLA-ORCH-VOCAB-R811, `CONN-ERPNEXT-AGENT-R011` and SCION-GOVERNED-WRITEBACK-R007. Rule: constitution Article XXXI. Caller chain: the `scion_sdk.ontology_providers` entry point federates erpnext_agent/ontology/*.ttl into the hub. Shape: see R009.1 to R009.3. Sizing: rollup of three five-minute rows. | Closes through its children R009.1 to R009.3. | requirement | CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT | LANDED | c67d33162349 |
| CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT-R009.1 State, transition and machine classes roll up to the core vocabulary Definition — CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT / CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT — The connector serves its packaged contentCanonical requirement and verification source**State, transition and machine classes roll up to the core vocabulary.** `erpnext_agent/ontology/lifecycle.ttl` (new) declares `DocumentLifecycle` as a subclass of the core `StateMachine` class, `DraftState`, `SubmittedState` and `CancelledState` as subclasses of `DocumentLifecycleState`, itself a subclass of the core `State` class, and `SaveTransition`, `SubmitTransition`, `CancelTransition` and `AmendTransition` as subclasses of the core `Transition` class. The event classes `SaveEvent`, `SubmitEvent`, `CancelEvent` and `AmendEvent` extend the core `TransitionEvent` class. The guard classes `SubmittableGuard`, `NoSubmittedLinksGuard` and `FreshModifiedGuard` extend the core `TransitionGuard` class. All of them live in `lifecycle.ttl`. Each transition names its source state, target state, event and guard. Seven reason subclasses of the core `TransitionRefused` class record the codes of `CONN-ERPNEXT-AGENT-R011.1`. Caller chain: the `scion_sdk.ontology_providers` entry point serves erpnext_agent/ontology/lifecycle.ttl with the other ontology files. Shape: classes live in the shared `kg#` namespace; the file is added to the files that `orphan_classes` checks. Sizing: one five-minute row. | `tests/test_lifecycle_ontology.py::test_lifecycle_classes_extend_core_state_machine_classes`, `tests/test_surface_ontology.py::test_every_class_rolls_up_to_core_by_subclassing_never_import` | requirement | CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT | LANDED | c67d33162349 |
| CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT-R009.2 The ontology states equal the code enum and replace the raw docStatus Definition — CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT / CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT — The connector serves its packaged contentCanonical requirement and verification source**The ontology states equal the code enum and replace the raw docStatus.** The datatype property `docStatus` (range integer) in erpnext_agent/ontology/erpnext.ttl is replaced by the object property `documentState`, whose range is `DocumentLifecycle` states. The access contracts in access_contracts.ttl bind `documentState` to the source column `docstatus` for Purchase Order, Sales Invoice, Purchase Invoice and Payment Entry. The set of state classes equals the member set of `DocumentState` in erpnext_agent/lifecycle.py, and the set of transition classes equals the legal-transition table. Caller chain: parse_access_contracts reads access_contracts.ttl; the served `erpnext_list_documents` answers it. Shape: the test parses lifecycle.ttl with `parse_triples` and imports `DocumentState` and the transition table. Sizing: one five-minute row. | `tests/test_lifecycle_ontology.py::test_ontology_states_and_transitions_equal_the_code_machine`, `tests/test_access_contracts.py::test_every_access_contract_names_a_served_tool_and_its_parameters` | requirement | CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT | LANDED | c67d33162349 |
| CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT-R009.3 Surface, skills and prompts name the amend tool and the refusals Definition — CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT / CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT — The connector serves its packaged contentCanonical requirement and verification source**Surface, skills and prompts name the amend tool and the refusals.** erpnext_agent/ontology/surface.ttl adds `erpx:tool-erpnext_amend_document` to the order-to-cash, procure-to-pay and accounting features, and links each lifecycle transition to the tool that fires it. The skills `erpnext-order-to-cash`, `erpnext-procure-to-pay` and `erpnext-accounting` and the prompt `erp_operator` state the legal moves and the seven refusal reasons, and tell the agent to amend a cancelled document and not to recreate it. Every tool they name is served. Caller chain: the ontology provider entry point serves surface.ttl; the SDK serves the skills and the prompt. Shape: edit the three SKILL.md files and erpnext_agent/prompts/erp_operator.json; the tests reuse `_served` and `_served_tools`. Sizing: one five-minute row. | `tests/test_surface_ontology.py::test_surface_lists_exactly_the_served_tools_skills_and_prompts`, `tests/test_workflow_content.py::test_lifecycle_guidance_names_amend_and_every_refusal_reason` | requirement | CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT | LANDED | c67d33162349 |
| CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT-R010 The surface is complete: a tool-use contract per tool, agent-definition prompts and a session skill Definition — CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT / CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT — The connector serves its packaged contentCanonical requirement and verification source**The surface is complete: a tool-use contract per tool, agent-definition prompts and a session skill.** `erpnext_agent/connector_contracts.py` declares one `ToolUseContract` per served tool (87), the `SurfaceLink` from every tool to a skill or prompt, the `DataLocation` of each record class and the `BusinessRole` of each role prompt. The operator prompt `erpnext-mcp-operator` and the four role prompts (`erp_operator`, `hr_manager`, `sales_rep`, `business_onboarding`) carry an `agent` object (kind, tools, skills, data, guardrails, outputs). The skill `erpnext-session` covers `erpnext_login`, `erpnext_logout` and `erpnext_get_logged_user`. `pyproject.toml` requires `scion-sdk>=0.9.1`. `federation.ttl` lists `erpnext_amend_document` and its content digest is recomputed. Caller chain: the connector conformance run (`connector_conformance::surface_complete`) and the connector-standard surface gate read `erpnext_agent.connector_contracts`; the SDK serves the prompts and skills. Shape: drafted with `python -m scion_sdk.surface_contracts complete erpnext_agent --write`, then the single generated administrator role replaced by the four real roles. Sizing: one row of mechanical content. | `tests/test_surface_contracts.py::test_every_served_tool_has_a_tool_use_contract_and_a_prompt_link`, `tests/test_surface_contracts.py::test_every_prompt_is_an_agent_definition_and_session_skill_is_linked` | requirement | CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT | VERIFIED | c67d33162349 tests/test_surface_contracts.py:29 tests/test_surface_contracts.py:39 |
| CONN-ERPNEXT-AGENT CONN-ERPNEXT-AGENT — Connector identity and release metadata | spec | None | SPECIFIED | No recorded commit/test evidence |
| CONN-ERPNEXT-AGENT-R001 Connector reports its released version Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**Connector reports its released version.** `erpnext_agent.__version__` equals the released `pyproject.toml` version and the bump configuration updates both. Caller chain: the erpnext-mcp console script (scion_sdk.cli:serve) loads erpnext_agent:connector, and the version is read at import from erpnext_agent/api_client.py:8 (__version__ = _v("erpnext-agent")) using installed package metadata, while the bump configuration edits pyproject.toml. Shape: __version__ is exported from erpnext_agent/api_client.py via importlib.metadata; the test compares it with the pyproject.toml project version using tomllib; tests/test_version.py does not exist yet. | `tests/test_version.py::test_reported_version_matches_the_released_package` | requirement | CONN-ERPNEXT-AGENT | LANDED | 3a5579542084 cdaa25e14308 |
| CONN-ERPNEXT-AGENT-R002 Supplier and purchase-order access fields match served tool data Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**Supplier and purchase-order access fields match served tool data.** The declared access contracts name the served resource tool and fields. A synthetic provider exercises the tool over MCP and returns each declared field. This proof does not represent a recorded production response. Caller chain: the erpnext-mcp console script loads erpnext_agent:connector (erpnext_agent/__init__.py:89), whose SDK tool surface (scion_sdk.mcp.method_tools.register_method_tools) serves Api.list_documents (erpnext_agent/api/api_client_resource.py) as the typed tool erpnext_list_documents. Shape: erpnext_agent/ontology/access_contracts.ttl declares contracts parsed by scion_sdk.access_contract.parse_access_contracts; the test builds the served server with scion_sdk._connector_serve.build_server and stubs Api.list_documents. | `tests/test_access_contracts.py::test_served_access_contracts_match_synthetic_provider` | requirement | CONN-ERPNEXT-AGENT | VERIFIED | 20a871530773 5a4d1c95947b cdaa25e14308 tests/test_access_contracts.py:25 |
| CONN-ERPNEXT-AGENT-R003 Supplier table recorded response Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**Supplier table recorded response.** Moved from `MEDULLA-CQ-XSRC-R002.7`. A recorded erpnext `list_documents` response for the Supplier doctype is stored as a fixture and the declared supplier access contract reads the same rows from it that the medulla `vg:VirtualMapping` for `kg:Supplier` expects (key `name`, label `supplier_name`). Caller chain: the erpnext-mcp console script loads erpnext_agent:connector (erpnext_agent/__init__.py:89); the declared Supplier contract in erpnext_agent/ontology/access_contracts.ttl is answered by the typed tool erpnext_list_documents calling Api.list_documents (erpnext_agent/api/api_client_resource.py). Shape: add a recorded list_documents response for Supplier under tests/fixtures (the directory does not exist yet) and read it in tests/test_access_contracts.py with parse_access_contracts and a stubbed Api.list_documents, comparing key name and label supplier_name. | `tests/test_access_contracts.py` reads the recorded response through the declared contract and compares the rows. Planned test: `tests/test_access_contracts.py::test_supplier_rows_match_recorded_response`. | requirement | CONN-ERPNEXT-AGENT | SPECIFIED | No recorded commit/test evidence |
| CONN-ERPNEXT-AGENT-R004 Supplier and purchase-order contract fields and recorded fixture Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**Supplier and purchase-order contract fields and recorded fixture.** Add the recorded fixture `supplier_purchase_order.json` in a new `tests/fixtures` directory and pin the Supplier and PurchaseOrder fields in `erpnext_agent/ontology/access_contracts.ttl`. The served tool `erpnext_list_documents` returns exactly those fields for the recorded response. Provider of `SCION-CONNECTOR-CONTROL-R037`. Caller chain: the erpnext-mcp console script loads erpnext_agent:connector (erpnext_agent/__init__.py:89), and the served tool erpnext_list_documents returns the Supplier and PurchaseOrder fields pinned in erpnext_agent/ontology/access_contracts.ttl. Shape: add supplier_purchase_order.json in a new tests/fixtures directory (absent today) and extend tests/test_access_contracts.py, reusing its served-server and parse_access_contracts setup from test_served_access_contracts_match_synthetic_provider with the recorded rows. | Test (planned): `tests/test_access_contracts.py::test_supplier_and_purchase_order_fields_match_recorded_fixture` (L3) through the served MCP tool against the recorded response. | requirement | CONN-ERPNEXT-AGENT | SPECIFIED | No recorded commit/test evidence |
| CONN-ERPNEXT-AGENT-R005 Every Frappe business operation is its own typed tool Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**Every Frappe business operation is its own typed tool.** Beyond document CRUD, list and whitelisted-method calls, the client exposes submit, cancel, count, get value, set value, rename, mapped follow-on document, document method, DocType field metadata, report run, link search and file upload as public methods on `Api` (erpnext_agent/api/api_client_resource.py), each mapped to one documented Frappe REST call, and the SDK serves each as one typed tool with verb-derived annotations. No action-routed tool and no alias tool is served. Caller chain: the erpnext-mcp console script loads erpnext_agent:connector (erpnext_agent/__init__.py), whose SDK tool surface (scion_sdk.mcp.method_tools.register_method_tools) registers one tool per public `Api` method. Shape: public methods of `Api` in erpnext_agent/api/api_client_resource.py return the decoded JSON of one `ApiClientBase.request` call; containers in query parameters go through the private `_json_params` helper and paths through `_doc_path`. | `tests/test_frappe_operations.py::test_submit_reads_the_current_draft_then_submits_it`, `tests/test_frappe_operations.py::test_lifecycle_and_value_operations_map_to_frappe_client`, `tests/test_frappe_operations.py::test_flow_report_and_search_operations`, `tests/test_frappe_operations.py::test_doctype_meta_is_trimmed_to_fields`; aliases absent: `tests/test_api_client.py::test_auth_and_version_methods`. | requirement | CONN-ERPNEXT-AGENT | VERIFIED | 4af0a6a05c36 tests/test_frappe_operations.py:135 tests/test_frappe_operations.py:16 tests/test_frappe_operations.py:30 tests/test_frappe_operations.py:84 |
| CONN-ERPNEXT-AGENT-R006 A refused call returns the server's reason Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**A refused call returns the server's reason.** When Frappe answers 4xx/5xx, `ApiClientBase.request` (erpnext_agent/api/api_client_base.py) raises `ErpNextApiError` whose message carries the status, `exc_type` and the decoded `_server_messages` text with markup removed, so an agent can fix the named field. The server traceback (`exc`) is never copied. Caller chain: every typed tool calls an `Api` method, which calls `ApiClientBase.request`. Shape: `frappe_error(status, body)` in erpnext_agent/api/api_client_base.py builds `ErpNextApiError(status, exc_type, messages)`; markup is removed by `_strip_html`. | `tests/test_frappe_operations.py::test_refusal_carries_the_server_reason_not_the_traceback` | requirement | CONN-ERPNEXT-AGENT | VERIFIED | 4af0a6a05c36 tests/test_frappe_operations.py:162 |
| CONN-ERPNEXT-AGENT-R007 Every access contract names a served tool and only its parameters Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**Every access contract names a served tool and only its parameters.** Each `ac:AccessContract` in erpnext_agent/ontology/access_contracts.ttl names `erpnext_list_documents` and parameters that are properties of its served input schema, for Supplier, Item, Purchase Order, Customer, Sales Invoice, Purchase Invoice, Payment Entry, Lead, Project, Employee, Opportunity, Department, Designation, Holiday List, Attendance and Leave Application. Caller chain: scion_sdk.access_contract.parse_access_contracts reads the file; the served server is built by scion_sdk._connector_serve.build_server. Shape: erpnext_agent/ontology/access_contracts.ttl holds one `ac:AccessContract` and its `ac:PropertyBinding` per class; tests/test_access_contracts.py reuses `parse_access_contracts` and the served input schema of `erpnext_list_documents`. | `tests/test_access_contracts.py::test_every_access_contract_names_a_served_tool_and_its_parameters` | requirement | CONN-ERPNEXT-AGENT | VERIFIED | 3a5579542084 4af0a6a05c36 tests/test_access_contracts.py:67 |
| CONN-ERPNEXT-AGENT-R008 Every HR operation is its own typed tool Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**Every HR operation is its own typed tool.** The client exposes the HR life cycle as public methods of `ApiHr` (erpnext_agent/api/api_client_hr.py), each one Frappe or HR-app operation served as one typed tool: employee create, update, get, list and relieve (status Left, never delete); department and designation create and list; holiday list create (dated holidays plus the server's `get_weekly_off_dates` generator run on the document and saved), get and weekly offs; attendance mark (insert then submit), bulk mark (`hrms...employee_attendance_tool.mark_employee_attendance`) and list; employee check-in; leave type create, leave allocation (submit), leave application (Open), approve or reject (status then submit) and balance (`hrms...leave_application.get_leave_balance_on`); salary component, salary structure (`__newname`, submit) and assignment (submit); payroll entry create, fill employees (`fill_employee_details` run on the document and saved), create salary slips (submit the draft entry, or `create_salary_slips` on a submitted one), submit salary slips (`submit_salary_slips`), salary slip list and get. Caller chain: the erpnext-mcp console script loads erpnext_agent:connector, whose SDK tool surface (scion_sdk.mcp.method_tools.register_method_tools) registers one tool per public method of `Api` (erpnext_agent/api_client.py), which inherits `ApiHr`; each method calls ApiClientBase.request. Shape: class `ApiHr(ResourceApi)` in erpnext_agent/api/api_client_hr.py; documents are built with `compact` and responses unwrapped with `data_of` (erpnext_agent/api/_docs.py); paths reuse `_doc_path`, submits reuse `frappe.client.submit`, document methods reuse `run_document_method` or `run_doc_method` with `docs`. | `tests/test_hr_operations.py::test_employee_master_hire_update_list_and_relieve`, `tests/test_hr_operations.py::test_department_designation_and_holiday_list`, `tests/test_hr_operations.py::test_attendance_mark_bulk_and_list`, `tests/test_hr_operations.py::test_leave_type_allocation_application_and_decision`, `tests/test_hr_operations.py::test_salary_component_structure_and_assignment`, `tests/test_hr_operations.py::test_payroll_entry_fill_create_and_submit_slips`, `tests/test_hr_operations.py::test_employee_checkin` | requirement | CONN-ERPNEXT-AGENT | VERIFIED | 3a5579542084 tests/test_hr_operations.py:105 tests/test_hr_operations.py:151 tests/test_hr_operations.py:179 tests/test_hr_operations.py:227 tests/test_hr_operations.py:254 |
| CONN-ERPNEXT-AGENT-R009 Every CRM operation is its own typed tool Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**Every CRM operation is its own typed tool.** The client exposes ERPNext's built-in CRM as public methods of `ApiCrm` (erpnext_agent/api/api_client_crm.py), each served as one typed tool: lead create, update, qualify (`qualification_status`) and list; opportunity from lead (`erpnext.crm.doctype.lead.lead.make_opportunity` through make_mapped_doc, then saved with company and currency), stage update, lost (`declare_enquiry_lost` with reason rows), lost-reason create and list; customer from lead or opportunity (the `make_customer` mappers, then saved); sales stage and opportunity type create and list; communication log (a Communication record, nothing sent) and follow-up ToDo create, list and close. The separate Frappe CRM app is not targeted: built-in ERPNext CRM is the one owner of leads and opportunities. Caller chain: the erpnext-mcp console script loads erpnext_agent:connector, whose SDK tool surface registers one tool per public method of `Api`, which inherits `ApiCrm`. Shape: class `ApiCrm(ResourceApi)` in erpnext_agent/api/api_client_crm.py; mapped drafts reuse `make_mapped_document` and `message_of`, documents `compact`, lost reasons `run_document_method`. | `tests/test_crm_operations.py::test_lead_capture_update_qualify_and_list`, `tests/test_crm_operations.py::test_opportunity_from_lead_stage_and_lost`, `tests/test_crm_operations.py::test_customer_from_lead_and_from_opportunity`, `tests/test_crm_operations.py::test_pipeline_stages_types_communication_and_follow_up` | requirement | CONN-ERPNEXT-AGENT | VERIFIED | 3a5579542084 tests/test_crm_operations.py:119 tests/test_crm_operations.py:17 tests/test_crm_operations.py:49 tests/test_crm_operations.py:96 |
| CONN-ERPNEXT-AGENT-R010 Business onboarding is validated, dry-run first, idempotent and verified Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**Business onboarding is validated, dry-run first, idempotent and verified.** `ApiOnboarding` (erpnext_agent/api/api_client_onboarding.py) serves the single onboarding records as typed tools (setup status from Installed Application, time zones, chart templates per country, setup wizard `frappe.desk.page.setup_wizard.setup_wizard.setup_complete` only with `confirm`, company with a template chart, fiscal year, address linked to the company, bank, bank account, tax ID) and three onboarding tools over erpnext_agent/onboarding.py: plan validates the spec (required inputs, country, currency, time zone and chart template on the server, abbreviation of an existing company) and lists every record as exists, create or update without writing; apply runs only with `confirm`, creates or updates the pending steps in order (setup wizard only in setup_wizard mode, otherwise company-level records), then verifies; a second apply writes nothing; verify re-plans and lists anything missing. Caller chain: the erpnext-mcp console script loads erpnext_agent:connector, whose SDK tool surface registers `erpnext_plan_business_onboarding`, `erpnext_apply_business_onboarding` and `erpnext_verify_business_onboarding` from `Api`, which inherits `ApiOnboarding`; they call erpnext_agent.onboarding.plan/apply/verify over the typed client. Shape: class `ApiOnboarding(ApiHr, ApiCrm)` in erpnext_agent/api/api_client_onboarding.py over the functions `setup_status`, `validate`, `plan`, `apply` and `verify` of erpnext_agent/onboarding.py, which take the typed client and reuse `list_documents`, `create_document`, `update_document` and `create_holiday_list`; the spec is a plain dict described by the skill's references/onboarding-spec.yaml; tests use the in-memory tests/fake_frappe.py. | `tests/test_business_onboarding.py::test_plan_validates_inputs_against_the_server`, `tests/test_business_onboarding.py::test_dry_run_writes_nothing_and_lists_every_record`, `tests/test_business_onboarding.py::test_apply_creates_once_verifies_and_rerun_is_a_no_op`, `tests/test_business_onboarding.py::test_changed_tax_id_and_unlinked_fiscal_year_are_updates`, `tests/test_business_onboarding.py::test_incomplete_wizard_runs_setup_complete_only_when_planned`, `tests/test_business_onboarding.py::test_setup_wizard_tool_refuses_without_confirm`, `tests/test_crm_operations.py::test_company_books_address_bank_and_tax_id_records` | requirement | CONN-ERPNEXT-AGENT | VERIFIED | 3a5579542084 tests/test_business_onboarding.py:122 tests/test_business_onboarding.py:141 tests/test_business_onboarding.py:160 tests/test_business_onboarding.py:196 tests/test_business_onboarding.py:56 |
| CONN-ERPNEXT-AGENT-R011 Document lifecycle is one explicit state machine Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**Document lifecycle is one explicit state machine.** A Frappe document is in exactly one of three states: Draft, Submitted, Cancelled. Four events move it: Save, Submit, Cancel, Amend. No state is terminal: a Cancelled document stays Cancelled and Amend starts a separate Draft. One transition function decides every move: `erpnext_agent/lifecycle.py::transition`, owned by this repository. The stored state field is the Frappe `docstatus` integer. `documentState` is derived from it. An illegal move is refused with a typed error before any call to the server. This rollup closes when R011.1 to R011.7 are bound. Depends on: SCION-GOVERNED-WRITEBACK-R007, SCION-CONNECTOR-CONTROL-R917 and MEDULLA-ORCH-VOCAB-R811. Rule: constitution Article XXXI. Caller chain: the erpnext-mcp console script loads erpnext_agent:connector, whose SDK tool surface registers `erpnext_submit_document`, `erpnext_cancel_document` and `erpnext_amend_document` from `Api`; each calls the transition function before `ApiClientBase.request`. Shape: see R011.1 to R011.7. Sizing: rollup of seven five-minute rows. | Closes through its children R011.1 to R011.7. | requirement | CONN-ERPNEXT-AGENT | SPECIFIED | No recorded commit/test evidence |
| CONN-ERPNEXT-AGENT-R011.1 Declare the machine and its single transition function Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**Declare the machine and its single transition function.** `erpnext_agent/lifecycle.py` (new) declares `DocumentState` (Draft, Submitted, Cancelled), `DocumentEvent` (Save, Submit, Cancel, Amend) and a closed table of legal transitions: Draft+Submit to Submitted, Submitted+Cancel to Cancelled, Cancelled+Amend to Draft (a new document that carries `amended_from`), Draft+Save to Draft. Draft+Save keeps the Draft state. Every other state and event pair is refused. Function `transition(state, event, guards)` returns the next state or raises `IllegalTransition`. `IllegalTransition` is defined in `erpnext_agent/lifecycle.py`. It carries the fields machine (`DocumentLifecycle`), from-state, event, doctype, name and a reason code. The reason codes are `NotDraft`, `NotSubmittable`, `NotSubmitted`, `HasSubmittedLinks`, `StaleDocument`, `NotCancelled` and `UnknownDocstatus`. `UnknownDocstatus` is raised by `state_of` for a value outside 0, 1, 2. The same closed table builds the descriptor of R011.7. `transition` is the only function that decides legality; no second table exists. Caller chain: `Api.submit_document`, `Api.cancel_document` and `Api.amend_document` (erpnext_agent/api/api_client_resource.py) call `transition`. Shape: pure functions over enums, no I/O; `state_of(doc)` maps the integer `docstatus` 0, 1, 2 to `DocumentState` once, at the edge. A value outside 0, 1, 2 raises `IllegalTransition` with `UnknownDocstatus`. Sizing: one five-minute row. | One parametrised test covers the table, with ids `draft-save`, `draft-submit`, `submitted-cancel` and `cancelled-amend`: `tests/test_document_lifecycle.py::test_every_legal_transition_reaches_its_declared_state[<id>]`. Refusal: `tests/test_document_lifecycle.py::test_every_other_state_event_pair_is_refused_with_a_typed_error`. Fields: `tests/test_document_lifecycle.py::test_illegal_transition_carries_machine_from_state_and_event`. Edge: `tests/test_document_lifecycle.py::test_unknown_docstatus_value_is_refused` | requirement | CONN-ERPNEXT-AGENT | VERIFIED | c67d33162349 tests/test_document_lifecycle.py:117 tests/test_document_lifecycle.py:79 tests/test_document_lifecycle.py:87 tests/test_document_lifecycle.py:99 |
| CONN-ERPNEXT-AGENT-R011.2 Submit needs a Draft of a submittable doctype Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**Submit needs a Draft of a submittable doctype.** `Api.submit_document` (erpnext_agent/api/api_client_resource.py:103) reads the document, derives its state, reads `is_submittable` for the doctype from the DocType meta, and calls `transition(state, Submit, guards)`. A document not in Draft is refused with `NotDraft`. A doctype that is not submittable is refused with `NotSubmittable`, which tells the caller the cause and not a generic server failure. The refusal happens before the POST to `frappe.client.submit`; no write request leaves the client. Caller chain: the served tool `erpnext_submit_document` calls `Api.submit_document`. Shape: reuse the GET of `_doc_path` the method already makes and the DocType meta read of `get_doctype_meta`; the meta result is read once per call. Sizing: one five-minute row. | `tests/test_document_lifecycle.py::test_submit_of_a_submitted_or_cancelled_document_is_refused_before_any_post`, `tests/test_document_lifecycle.py::test_submit_of_a_non_submittable_doctype_is_refused_with_not_submittable`, `tests/test_document_lifecycle.py::test_submit_of_a_draft_posts_once` (transition Draft+Submit) | requirement | CONN-ERPNEXT-AGENT | VERIFIED | c67d33162349 tests/test_document_lifecycle.py:125 tests/test_document_lifecycle.py:137 tests/test_document_lifecycle.py:148 |
| CONN-ERPNEXT-AGENT-R011.3 Cancel needs a Submitted document with no submitted links and a fresh modified stamp Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**Cancel needs a Submitted document with no submitted links and a fresh modified stamp.** `Api.cancel_document` (erpnext_agent/api/api_client_resource.py:117) first reads the document, then lists its submitted linked documents with `frappe.desk.form.linked_with.get_submitted_linked_docs`, then calls `transition(state, Cancel, guards)`. A document not in Submitted is refused with `NotSubmitted`. A document with one or more submitted linked documents is refused with `HasSubmittedLinks`, and the error lists them. The method takes an optional `modified` argument that holds the stamp the caller read; a value that differs from the server stamp is refused with `StaleDocument`. All refusals happen before the POST to `frappe.client.cancel`. Caller chain: the served tool `erpnext_cancel_document` calls `Api.cancel_document`. Shape: add the optional `modified` parameter to the public method so the SDK serves it in the tool schema; the linked-document read is one GET. Sizing: one five-minute row. | `tests/test_document_lifecycle.py::test_cancel_of_a_draft_or_cancelled_document_is_refused_before_any_post`, `tests/test_document_lifecycle.py::test_cancel_with_submitted_links_is_refused_and_lists_them`, `tests/test_document_lifecycle.py::test_cancel_with_a_stale_modified_stamp_is_refused`, `tests/test_document_lifecycle.py::test_cancel_of_a_submitted_unlinked_document_posts_once` (transition Submitted+Cancel) | requirement | CONN-ERPNEXT-AGENT | VERIFIED | c67d33162349 tests/test_document_lifecycle.py:156 tests/test_document_lifecycle.py:168 tests/test_document_lifecycle.py:179 tests/test_document_lifecycle.py:190 |
| CONN-ERPNEXT-AGENT-R011.4 Amend needs a Cancelled document and has its own tool Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**Amend needs a Cancelled document and has its own tool.** `Api.amend_document` (erpnext_agent/api/api_client_resource.py, new) is one public method and so one served tool, `erpnext_amend_document`. It reads the document, calls `transition(state, Amend, guards)`, and then creates a new Draft with `amended_from` set to the cancelled name through the resource insert call. A document not in Cancelled is refused with `NotCancelled`. The new document is a Draft in state terms. Caller chain: the erpnext-mcp console script loads erpnext_agent:connector, whose SDK tool surface registers one tool per public method of `Api`. Shape: copy the fields except `name`, `docstatus`, `modified`, `creation` and `amended_from`, then set `amended_from`; POST /api/resource/<doctype>. Sizing: one five-minute row. | `tests/test_document_lifecycle.py::test_amend_of_a_non_cancelled_document_is_refused_before_any_post`, `tests/test_document_lifecycle.py::test_amend_of_a_cancelled_document_creates_a_draft_with_amended_from` (transition Cancelled+Amend), `tests/test_frappe_operations.py::test_amend_is_served_as_its_own_tool` | requirement | CONN-ERPNEXT-AGENT | VERIFIED | c67d33162349 tests/test_document_lifecycle.py:204 tests/test_document_lifecycle.py:216 tests/test_frappe_operations.py:183 |
| CONN-ERPNEXT-AGENT-R011.5 Lifecycle state is one typed field in the knowledge-graph mirror Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**Lifecycle state is one typed field in the knowledge-graph mirror.** `erpnext_agent/kg_ingest.py:194` writes the node field `documentState`, the name of the `DocumentState` value derived by `state_of`, and no longer writes the raw integer `docStatus`. `documentState` is a derived flag; the stored field stays `docstatus` on the server. `erpnext_agent/connector_sources.py:25,47` still fetches `docstatus` as the source column; the ingest maps it once through `state_of`. No code compares `docstatus` with an integer outside `erpnext_agent/lifecycle.py`. The ontology property that carries the field is stated in `CONN-ERPNEXT-AGENT-CONNECTOR-CONTENT-R009.2`. Caller chain: the served tool `erpnext_ingest` calls the mappers of erpnext_agent/kg_ingest.py. Shape: replace the `docStatus` entry in the node dict of `_order` and the sibling mappers; add a grep test that no other module reads `docstatus`. Sizing: one five-minute row. | `tests/test_document_lifecycle.py::test_ingested_nodes_carry_document_state_not_raw_docstatus`, `tests/test_document_lifecycle.py::test_no_module_outside_lifecycle_compares_docstatus_with_an_integer` | requirement | CONN-ERPNEXT-AGENT | VERIFIED | c67d33162349 tests/test_document_lifecycle.py:228 tests/test_document_lifecycle.py:238 |
| CONN-ERPNEXT-AGENT-R011.6 Wiring and hot-path proof: an illegal move never reaches the server Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**Wiring and hot-path proof: an illegal move never reaches the server.** The wiring is the call of `transition` in `Api.submit_document`, `Api.cancel_document` and `Api.amend_document`. The hot-path proof enters through the served MCP tool, calls `erpnext_submit_document` and `erpnext_cancel_document` against the in-memory `tests/fake_frappe.py` for every state, and asserts that a refused call records zero write requests. The typed refusal reaches the MCP caller as an error that carries the reason code. The refusal fires before the API call. Caller chain: build_server (scion_sdk._connector_serve) serves the tools; the test calls them over MCP. Shape: extend `tests/fake_frappe.py` with `is_submittable`, submitted links and `modified` stamps; the test reuses `_served`. Sizing: one five-minute row. | `tests/test_document_lifecycle.py::test_served_tools_refuse_illegal_moves_with_zero_write_requests` | requirement | CONN-ERPNEXT-AGENT | VERIFIED | c67d33162349 tests/test_document_lifecycle.py:266 tests/test_document_lifecycle.py:293 tests/test_document_lifecycle.py:305 |
| CONN-ERPNEXT-AGENT-R011.7 Declare the descriptor and refuse through the SDK writeback guard Definition — CONN-ERPNEXT-AGENT / CONN-ERPNEXT-AGENT — Connector identity and release metadataCanonical requirement and verification source**Declare the descriptor and refuse through the SDK writeback guard.** `erpnext_agent/lifecycle.py` exports `DOCUMENT_LIFECYCLE`, a `StateMachineDescriptor` (SCION-GOVERNED-WRITEBACK-R007.1) with the states Draft, Submitted and Cancelled, no terminals, the four transitions of R011.1 and the guards `is_submittable`, `no_submitted_links` and `modified_is_current`. The state field is `docstatus`. A governed write proposal for submit, cancel or amend runs through `execute_governed` (SCION-GOVERNED-WRITEBACK-R007.3). An illegal move is refused with `STATE_TRANSITION_REFUSED` and a stale `modified` with `STATE_STALE`, both before the API call. The refusal names the state, the event and the failed guard. Connector readiness comes from SCION-CONNECTOR-CONTROL-R917 and is not duplicated here. Caller chain: `scion_sdk/writeback_sinks/core.py::run_writeback` calls `execute_governed`, which calls `next_state` with `DOCUMENT_LIFECYCLE`. Shape: one module-level constant built from the table of R011.1; the connector adds no guard code. Depends on: `CONN-ERPNEXT-AGENT-R011.1`, SCION-GOVERNED-WRITEBACK-R007.3. Sizing: one five-minute row. | `tests/test_document_lifecycle.py::test_descriptor_matches_the_transition_table`, `tests/test_document_lifecycle.py::test_governed_writeback_refuses_illegal_move_and_stale_modified_with_zero_api_calls` | requirement | CONN-ERPNEXT-AGENT | SPECIFIED | No recorded commit/test evidence |