All docs

Check schemes

- 产品规格.md §3.2.2 standards library, §3.2.3 asset library, §3.2.4 check schemes, §4.2.4 compliance

Source docs/en/site/mech-check-scheme.md

Status: Product decision confirmed (2026-08-07, option B); platform main path shipped (storage / admin page / plugin read-only / agent draft write / questionnaire source switch / stock migrate); Q&A injection boundary still in the acceptance list.

Truth: User-visible requirements in docs/产品规格.md §3.2.4 (and §3.2.2 / §3.2.3 / §4.2.4).

Voice: UI and help use “check scheme”, “based on standards”, “published”, and similar user language; table names, APIs, and paths appear only in §7.

Related:


1. Goal

  • Inside a workspace, provide check schemes alongside the standards library and asset library: store machine-readable inspection packs after experts operationalize laws/policies (user language; implementation includes mindlink-compliance-pack and similar).
  • Let compliance questionnaires pick a scheme and generate check items; later this can extend to HR “standard pack” machine content (first phase is compliance-first).
  • Must name which published standards-library entries it is based on; must not treat a check scheme as the legal text itself.

1.1 Non-goals

  • Do not replace the standards library as article source of truth; do not replace Excel/Word originals in the asset library.
  • Do not inject check-scheme bodies into agent Q&A by default as “what the law says”.
  • First phase has no site-wide public “scheme marketplace” (workspace isolation).

2. Split from neighboring capabilities

| | Standards library | Check schemes | Asset library | Knowledge documents | |--|-----------|-------------|-----------|-------------| | In one sentence | What you must follow | How experts suggest you inspect | Originals and blank forms | How to use, FAQ | | Typical content | Law / policy / theory body | Machine inspection pack Markdown | xlsx/docx checklist originals | Wiki | | Effect | Source of truth | Operationalized (must cite the source) | Raw material / apply | Explanation | | Drives check items | No (citation display only) | Yes (questionnaire pick) | No | No | | Q&A injection | Published articles | Default not injected as law | Metadata optional | Yes |

Standards library (what the text says)
    ↑ required citation
Check schemes (how to inspect · machine pack)
    ↑ optional source
Asset library (expert original tables / blank forms)

3. Product decisions (confirmed, 2026-08-07)

#TopicDecision
1User-visible nameCheck schemes (subtitle may be “practice machine packs”)
2IsolationPer workspace; no cross-workspace reads
3Where it livesPlatform workspace capability, not under a plugin’s private folder
4Versus standards librarySplit; a scheme must cite standards (ID + published version, may be several); cannot publish with no citation
5Versus asset libraryOriginals in the asset library; conversion results enter this capability; do not store the machine-pack source of truth in the asset library
6Versus knowledge documentsSplit; do not store machine packs primarily in the knowledge tree
7Publish gateDraft → pending review (optional) → published / repealed; same grade as standards: admin publishes
8Agent writeSystem tools write drafts (user must confirm); no auto-publish; no impersonating a check scheme with a standards-library entry
9Plugin readPlatform read-only API; compliance questionnaires prefer a published check scheme (show cited standards); may also pick a standard that has no scheme yet (coarse split of the body, human review required)
10Store auditWhen generating check items, record scheme ID + version and cited standard ID + version
11Admin entryCollaboration page alongside standards / assets; full-screen admin (suggested route /workspace/check-schemes)
12Stock migratePure practice packs wrongly published as “standards” → move here and fill citations; standards library keeps real articles only
13HR extensionMachine “standard packs” such as competency may join this model in phase 2; first phase does not force migrate

Forbidden:

  • Silently replacing standards-library articles with a check scheme.
  • Publishing a scheme with no human confirm, or writing compliance check items into the business store directly.
  • Questionnaire UI that only says “against the law” without showing cited standards.
  • Writing a check scheme into knowledge documents or standards-library bodies as if it were legal source of truth.

4. User-visible capabilities

4.1 Scheme entries

  • Title, short description
  • Machine body (Markdown; includes compliance machine fences and similar)
  • Domain tags (e.g. compliance)
  • Based on standards (required, may be several: standard ID + version; at publish, targets must still be published and not repealed)
  • Optional source asset (asset-library entry ID + version)
  • Status, version, creator, times

4.2 Members and admins

  • Members: browse published schemes; may create/edit their own drafts (or by workspace policy).
  • Admins: review publish, repeal, handle others’ drafts; import / export archives.

4.3 Agents and plugins

  • Agents: after skill conversion, call the write tool to land a draft; then guide the user to “Manage check schemes” to publish.
  • Compliance plugin: list/read published schemes → questionnaire pick → preview generated check items → after human confirm, write the business store.

5. End-to-end flow

Path A (practice table):
Upload expert checklist to the asset library (optional cited standards)
  → Agent parses into a machine pack by skill
  → Human confirm → write a “check scheme” draft (with cited standards)

Path B (coarse split from a standard):
Published standards-library article → workspace_standard_get reads the body
  → Coarse-split a machine pack by clause (must mark human-filled evidence/scoring)
  → Human confirm → write a “check scheme” draft (based_on_standards points at that standard)

Shared next steps:
  → Admin publishes the check scheme
  → Compliance “questionnaire” picks that scheme (shows cited standards)
  → Generate check items (record scheme version + standard version)

Columns such as “review result / finding / remediation / recheck” belong to workflow execution and do not go into the machine pack.


6. Relation to the old decision

  • 2026-08-06 had said: machine packs go into the standards library (same entry or a separate practice entry).
  • 2026-08-07 corrected to option B: machine packs go into check schemes; the standards library keeps article source of truth only.
  • Transition: questionnaires may still fall back to machine entries in the standards library, and prompt migrate into check schemes; product copy and skills follow this page.

7. Implementation mapping (shipped)

ConceptImplementation
Metadata tableworkspace_check_schemes
Citation linksbased_on_standards_json (standard_id + version)
Body on disk{RuntimeDir}/workspaces/{ws}/check-schemes/{id}/draft.md and vN.md
Member API/workspaces/{id}/check-schemes (including content / publish / revoke / reopen / delete); import/export POST …/check-schemes/import, GET …/check-schemes/export (zip)
Plugin read-only/platform-plugins/check-schemes (published only)
Agent toolsworkspace_check_scheme_list / workspace_check_scheme_write (confirm gate); when citing a standard, use workspace_standard_get for the body
Admin page/workspace/check-schemes; collaboration entry “Manage check schemes”
QuestionnaireCheck schemes and standards library both selectable (schemes preferred); standards with no scheme are coarse-split from the body
Stock migrateGET …/migration-candidates, POST …/migrate-from-standard; admin “Migrate from standards library”
Publish permissionOnly workspace owner/admin may publish / revoke / reopen; import/export archive same permission
Archivemanifest.json (kind=mindlink.workspace_check_schemes) + `items/{dir}/item.json\content.md (package internal/checkschemesbundle). Incremental import (default on_conflict=incremental`): match by title; skip if content hash matches; update if matched draft/pending review; do not overwrite published/repealed. Cited standards re-attach in this workspace by document number first, else title (prefer published); unmatched still imports as draft and must be attached before publish. Optional weak link to source assets by title.

Machine-pack field contract remains in ../../sdk/platform-plugin/contracts/API.md §3.3 and compliance mindlink.compliance.check_pack/v1.


8. Acceptance

  • [x] Cannot publish a check scheme with no “based on standards”.
  • [x] Practice entries in the standards library that contain a machine pack can migrate into check schemes (then repeal/delete the original).
  • [ ] Q&A injection does not impersonate articles with check-scheme bodies (system prompt already guides; retrieval injection boundary still to strengthen).
  • [x] Questionnaires prefer a scheme and show cited standards; parsing the body prefers the check scheme.
  • [x] Agent writes drafts only; must confirm; no auto-publish.
  • [x] Stock practice packs migrate from the standards library into check schemes (admin confirms by hand).
  • [x] Admins can import/export check-scheme archives (incremental; published not overwritten).

9. Revision history

DateNote
2026-08-07First draft: option B becomes product decision; split from standards/assets; replaces the old “machine pack in the standards library” path
2026-08-07Platform main path shipped: tables/API/admin/agent tools/questionnaire source; update mapping and acceptance checks
2026-08-07Stock migrate: admin “Migrate from standards library” + migration-candidates / migrate-from-standard
2026-08-18Zip import/export (modeled on standards library; admins; import as draft; cited standards re-attached by title/document number)