smd-engine 0.6.3__tar.gz → 0.6.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. {smd_engine-0.6.3 → smd_engine-0.6.4}/CHANGELOG.md +20 -0
  2. {smd_engine-0.6.3 → smd_engine-0.6.4}/PKG-INFO +1 -1
  3. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/spectra_coffee/README.md +2 -2
  4. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/spectra_coffee/bank.story.yaml +3 -1
  5. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/spectra_coffee/buyer.story.yaml +8 -2
  6. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/spectra_coffee/owner.story.yaml +3 -1
  7. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/spectra_coffee/successor-premortem.story.yaml +3 -1
  8. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/README.md +1 -1
  9. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/checks.md +1 -1
  10. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/commands.md +1 -1
  11. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/data-model.md +1 -1
  12. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/method/structural-moves.md +9 -0
  13. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/stages.md +2 -1
  14. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/stories.md +8 -3
  15. {smd_engine-0.6.3 → smd_engine-0.6.4}/procedures/qualification-pass.md +2 -1
  16. {smd_engine-0.6.3 → smd_engine-0.6.4}/procedures/story.md +6 -3
  17. {smd_engine-0.6.3 → smd_engine-0.6.4}/procedures/visionary-tract.md +7 -3
  18. {smd_engine-0.6.3 → smd_engine-0.6.4}/profiles/program-three-boards.yaml +1 -0
  19. {smd_engine-0.6.3 → smd_engine-0.6.4}/pyproject.toml +1 -1
  20. {smd_engine-0.6.3 → smd_engine-0.6.4}/roles/methodologist.md +2 -0
  21. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/markdown.py +1 -0
  22. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/text.py +2 -0
  23. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/schemas/board_set.schema.json +1 -0
  24. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/schemas/story.schema.json +6 -0
  25. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/story/check.py +50 -4
  26. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/story/render.py +17 -2
  27. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/validate/__init__.py +7 -1
  28. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/validate/context.py +1 -0
  29. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/validate/tract.py +25 -3
  30. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_procedure_checks.py +28 -0
  31. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_story_case.py +17 -0
  32. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_story_check.py +113 -13
  33. {smd_engine-0.6.3 → smd_engine-0.6.4}/uv.lock +1 -1
  34. {smd_engine-0.6.3 → smd_engine-0.6.4}/.claude/agents/smd-game-technician.md +0 -0
  35. {smd_engine-0.6.3 → smd_engine-0.6.4}/.claude/agents/smd-methodologist.md +0 -0
  36. {smd_engine-0.6.3 → smd_engine-0.6.4}/.claude/agents/smd-visionary.md +0 -0
  37. {smd_engine-0.6.3 → smd_engine-0.6.4}/.claude/commands/procedure.md +0 -0
  38. {smd_engine-0.6.3 → smd_engine-0.6.4}/.flake8 +0 -0
  39. {smd_engine-0.6.3 → smd_engine-0.6.4}/.github/workflows/ci.yml +0 -0
  40. {smd_engine-0.6.3 → smd_engine-0.6.4}/.github/workflows/release.yml +0 -0
  41. {smd_engine-0.6.3 → smd_engine-0.6.4}/.gitignore +0 -0
  42. {smd_engine-0.6.3 → smd_engine-0.6.4}/.python-version +0 -0
  43. {smd_engine-0.6.3 → smd_engine-0.6.4}/CONTRIBUTING.md +0 -0
  44. {smd_engine-0.6.3 → smd_engine-0.6.4}/LICENSE +0 -0
  45. {smd_engine-0.6.3 → smd_engine-0.6.4}/README.md +0 -0
  46. {smd_engine-0.6.3 → smd_engine-0.6.4}/README_ru.md +0 -0
  47. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/example/bakeries-c1.board.yaml +0 -0
  48. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/example/bakeries-c2.board.yaml +0 -0
  49. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/example/golden/README.md +0 -0
  50. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/example/golden/bakeries-c2-expected.board.yaml +0 -0
  51. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/example/golden/s3_transcript.txt +0 -0
  52. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/example/patches/bakeries-c2-1.patch.yaml +0 -0
  53. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/example/sources.yaml +0 -0
  54. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/example/two-boards-c1.board.yaml +0 -0
  55. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/example_ru/pekarni-c1.board.yaml +0 -0
  56. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/example_ru/pekarni-c2.board.yaml +0 -0
  57. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/example_ru/pekarni-oru-c1.board.yaml +0 -0
  58. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/example_ru/pekarnya-holding-c1.board.yaml +0 -0
  59. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/example_ru/sources.yaml +0 -0
  60. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/spectra_coffee/sources.yaml +0 -0
  61. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/spectra_coffee/spectra-coffee-c1.board.yaml +0 -0
  62. {smd_engine-0.6.3 → smd_engine-0.6.4}/cases/spectra_coffee/taxonomies.yaml +0 -0
  63. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/changelog-0.2-0.5.md +0 -0
  64. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/first-board.md +0 -0
  65. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/glossary.md +0 -0
  66. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/hypotheses.md +0 -0
  67. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/method/README.md +0 -0
  68. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/method/encodable.md +0 -0
  69. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/method/formal-stance.md +0 -0
  70. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/method/odi-problematization.md +0 -0
  71. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/method/reconciliation.md +0 -0
  72. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/method/robustness-rules.md +0 -0
  73. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/method/roles-and-actors.md +0 -0
  74. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/method/smd-classic.md +0 -0
  75. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/method/sources.md +0 -0
  76. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/method/triz-systems.md +0 -0
  77. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/plan.md +0 -0
  78. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/profiles.md +0 -0
  79. {smd_engine-0.6.3 → smd_engine-0.6.4}/docs/red-lines.md +0 -0
  80. {smd_engine-0.6.3 → smd_engine-0.6.4}/lenses/README.md +0 -0
  81. {smd_engine-0.6.3 → smd_engine-0.6.4}/lenses/beer-viable-system.md +0 -0
  82. {smd_engine-0.6.3 → smd_engine-0.6.4}/lenses/design-chain.md +0 -0
  83. {smd_engine-0.6.3 → smd_engine-0.6.4}/lenses/fliamer-diamond.md +0 -0
  84. {smd_engine-0.6.3 → smd_engine-0.6.4}/lenses/khaprov-levels.md +0 -0
  85. {smd_engine-0.6.3 → smd_engine-0.6.4}/lenses/khaprov-ontology.md +0 -0
  86. {smd_engine-0.6.3 → smd_engine-0.6.4}/lenses/scamper-check.md +0 -0
  87. {smd_engine-0.6.3 → smd_engine-0.6.4}/lenses/schukin-boundaries.md +0 -0
  88. {smd_engine-0.6.3 → smd_engine-0.6.4}/lenses/schukin-interface-tax.md +0 -0
  89. {smd_engine-0.6.3 → smd_engine-0.6.4}/lenses/three-positions.md +0 -0
  90. {smd_engine-0.6.3 → smd_engine-0.6.4}/lenses/triz-contradictions.md +0 -0
  91. {smd_engine-0.6.3 → smd_engine-0.6.4}/procedures/README.md +0 -0
  92. {smd_engine-0.6.3 → smd_engine-0.6.4}/procedures/field-result.md +0 -0
  93. {smd_engine-0.6.3 → smd_engine-0.6.4}/procedures/functional-plan.md +0 -0
  94. {smd_engine-0.6.3 → smd_engine-0.6.4}/procedures/ingest-transcript.md +0 -0
  95. {smd_engine-0.6.3 → smd_engine-0.6.4}/procedures/positional-construction.md +0 -0
  96. {smd_engine-0.6.3 → smd_engine-0.6.4}/procedures/problematization.md +0 -0
  97. {smd_engine-0.6.3 → smd_engine-0.6.4}/procedures/reflexive-protocol.md +0 -0
  98. {smd_engine-0.6.3 → smd_engine-0.6.4}/procedures/small-situation.md +0 -0
  99. {smd_engine-0.6.3 → smd_engine-0.6.4}/procedures/solo-session.md +0 -0
  100. {smd_engine-0.6.3 → smd_engine-0.6.4}/procedures/stakeholder-ontology.md +0 -0
  101. {smd_engine-0.6.3 → smd_engine-0.6.4}/procedures/theses-to-board.md +0 -0
  102. {smd_engine-0.6.3 → smd_engine-0.6.4}/profiles/classic-two-boards.yaml +0 -0
  103. {smd_engine-0.6.3 → smd_engine-0.6.4}/profiles/management-four-boards.yaml +0 -0
  104. {smd_engine-0.6.3 → smd_engine-0.6.4}/roles/README.md +0 -0
  105. {smd_engine-0.6.3 → smd_engine-0.6.4}/roles/actors.md +0 -0
  106. {smd_engine-0.6.3 → smd_engine-0.6.4}/roles/game-technician.md +0 -0
  107. {smd_engine-0.6.3 → smd_engine-0.6.4}/roles/researcher.md +0 -0
  108. {smd_engine-0.6.3 → smd_engine-0.6.4}/roles/visionary.md +0 -0
  109. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/__init__.py +0 -0
  110. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/agree.py +0 -0
  111. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/apply.py +0 -0
  112. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/cli.py +0 -0
  113. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/compare.py +0 -0
  114. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/eval.py +0 -0
  115. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/leverage.py +0 -0
  116. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/migrate.py +0 -0
  117. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/nextstep.py +0 -0
  118. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/pack.py +0 -0
  119. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/profile.py +0 -0
  120. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/records.py +0 -0
  121. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/redline.py +0 -0
  122. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/__init__.py +0 -0
  123. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/assets/frames.css +0 -0
  124. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/assets/frames.js +0 -0
  125. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/assets/graph.css +0 -0
  126. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/assets/graph.js +0 -0
  127. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/frames.py +0 -0
  128. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/frames_page.py +0 -0
  129. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/frames_text.py +0 -0
  130. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/graph.py +0 -0
  131. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/graph_ui.py +0 -0
  132. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/html.py +0 -0
  133. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/index.py +0 -0
  134. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/layout.py +0 -0
  135. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/light.py +0 -0
  136. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/mermaid.py +0 -0
  137. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/sessionflow.py +0 -0
  138. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/svg.py +0 -0
  139. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/render/vault.py +0 -0
  140. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/revise.py +0 -0
  141. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/scaffold.py +0 -0
  142. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/schemas/__init__.py +0 -0
  143. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/schemas/board_patch.schema.json +0 -0
  144. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/schemas/source_manifest.schema.json +0 -0
  145. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/schemas/taxonomies.schema.json +0 -0
  146. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/screen.py +0 -0
  147. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/sources.py +0 -0
  148. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/status.py +0 -0
  149. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/story/__init__.py +0 -0
  150. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/story/gaps.py +0 -0
  151. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/story/model.py +0 -0
  152. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/story/numbers.py +0 -0
  153. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/story/paths.py +0 -0
  154. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/validate/ai.py +0 -0
  155. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/validate/graph.py +0 -0
  156. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/validate/hints.py +0 -0
  157. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/validate/hypotheses.py +0 -0
  158. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/validate/management.py +0 -0
  159. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/validate/manifest.py +0 -0
  160. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/validate/ontology.py +0 -0
  161. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/validate/redlines.py +0 -0
  162. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/validate/signoffs.py +0 -0
  163. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/validate/structure.py +0 -0
  164. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/validate/taxonomies.py +0 -0
  165. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/validate/theses.py +0 -0
  166. {smd_engine-0.6.3 → smd_engine-0.6.4}/src/smd_engine/verdict.py +0 -0
  167. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/conftest.py +0 -0
  168. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/story_helpers.py +0 -0
  169. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_action_program.py +0 -0
  170. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_agree.py +0 -0
  171. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_ai_roles.py +0 -0
  172. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_apply.py +0 -0
  173. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_beer_layer.py +0 -0
  174. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_beer_render.py +0 -0
  175. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_compare.py +0 -0
  176. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_eval.py +0 -0
  177. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_export.py +0 -0
  178. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_frames.py +0 -0
  179. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_graph.py +0 -0
  180. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_hypothesis_standard.py +0 -0
  181. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_ingestion.py +0 -0
  182. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_lenses.py +0 -0
  183. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_management.py +0 -0
  184. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_migrate.py +0 -0
  185. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_nextstep.py +0 -0
  186. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_ontology_continuum.py +0 -0
  187. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_procedures.py +0 -0
  188. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_profile.py +0 -0
  189. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_publish.py +0 -0
  190. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_record_boards.py +0 -0
  191. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_red_lines.py +0 -0
  192. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_render_and_cli.py +0 -0
  193. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_render_carries.py +0 -0
  194. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_render_fields.py +0 -0
  195. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_render_ru_pages.py +0 -0
  196. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_render_ru_values.py +0 -0
  197. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_revise.py +0 -0
  198. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_robustness.py +0 -0
  199. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_scaffold.py +0 -0
  200. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_status.py +0 -0
  201. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_story_numbers.py +0 -0
  202. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_story_paths.py +0 -0
  203. {smd_engine-0.6.3 → smd_engine-0.6.4}/tests/test_validate.py +0 -0
@@ -4,6 +4,26 @@ Dates are those of the tag. All tags v0.2.1 to v0.3.5 were made on 2026-10-29. T
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.6.4 - 2026-11-02
8
+
9
+ Two method changes asked for by the case owner on 2 November 2026 (dz02#l=11) and one fix (dz02#l=15). Schema 0.3 stays; the new field is optional and old records stay valid. The MIPT case's five boards validate as before (0 errors, 150 warnings); hints go from 143 to 156, the 13 new ones being `move-return` on adjoin elements.
10
+
11
+ - Move field `return` (board-set schema, `$defs.move`): the way back, what the move changes in the terms it started from (a decision, a prediction, a test) and what is lost on the way back. New hint `move-return` (→ visionary-tract.md §7, `program-three-boards` only, like `move-via`): an element whose `move` is an `adjoin`, with status `candidate` or `accepted` or none, and no `return`. A `rejected` adjoin, other ops and the moves on theses are not read. The Markdown digest shows `return` after `via` ("way back" / "путь назад"). The board patch schema does not restate move fields and is unchanged.
12
+ - Docs: `docs/data-model.md` (Moves), `docs/method/structural-moves.md` (new subsection "Way back": the requirement, three examples, pending in the paper's `PENDING_UPDATES.md` as an owner decision), `docs/stages.md`, `docs/checks.md`. `visionary-tract` 0.2.4: each adjoin candidate states its way back; the example carries one.
13
+ - `qualification-pass` 0.4.2: new classic-checks row "Computability" (A. Moitra quoting K. Jain: "If my laptop can't find it, then neither can the market"): a position, explanation or plan that needs an actor to solve what the actor cannot compute with the information and time it has is weak or unworkable, e.g. assuming a Nash equilibrium. A line in `roles/methodologist.md`. No code.
14
+ - Test: `test_move_return_asked_of_an_adjoin` in `tests/test_procedure_checks.py`.
15
+ - Fix (dz02#l=15): the hint `move-via` read a move's `status` directly, so a move without `status` (the schema does not require it) crashed `smd validate --hints` with a KeyError. A move with no status is now read as a candidate, as `signoffs` reads it; the `move-via` test covers it.
16
+
17
+ Gate ИСТ1 (the case owner, 1 November 2026, dz01#l=31): the story view is strict. Schema 0.1 stays; the new field is optional.
18
+
19
+ - `smd story check` rule S5: every id a sentence cites lies on the story's walk (the `path`, and the ids of `conflict` and `resolution` that lie on it) or is listed in the new optional story field `context`. A cited id that is neither is an error. An id in `context` is still held to the allow-list (G4) and to G1-G3; `context` ids must exist (S1). A story file written before this change can now fail S5: list the off-path ids it cites in `context`.
20
+ - S5 counts no `open` hypothesis as on the walk: a sentence that cites one lists it in `context` (dz01#l=35). The four Spectra Coffee stories list the hypotheses they cite.
21
+ - `story.schema.json`: optional `context`, unique ids. Schema version 0.1 is unchanged, as old files stay valid.
22
+ - `smd story render --md` lists the context ids apart, under a heading of their own (with `--boards`, each with its label).
23
+ - `docs/stories.md` and `procedures/story.md` (0.2.0) describe the rule and the field. The four Spectra Coffee stories list their off-path ids in `context`; the buyer story has the August gap again (`sig-august`, `nb-qual`).
24
+ - Review fixes to S5 (same gate, dz01#l=31: strict, with an explicit `context` list for anything off the path). A `context` id must be in `allow` (G4, an error): `smd story render` prints context ids with their labels, so `context` must not reach a fact the audience may not see. A `context` id that no sentence cites is a warning (S5). Narrower walk: a sentence cites without a `context` entry only ids on the path, the `conflict` and `resolution` ids that are on the path, and the `open` hypotheses; a `conflict` or `resolution` id off the path now needs a `context` entry. The docstring of `story/check.py`, `docs/stories.md` and `procedures/story.md` say the same.
25
+ - The four Spectra Coffee stories needed no change to their ids under the narrower walk. They were edited by hand on 2026-11-01 after the procedure run (version 0.2.0 adds `context`); the story schema has no field for that, so each file carries a comment saying so, and its `run` stamp still names the procedure run.
26
+
7
27
  ## 0.6.3 - 2026-11-01
8
28
 
9
29
  Gates Ж1 Б and Ж2 Б (the case owner, 1 November 2026): the engine's formal stance and its six robustness rules. Schema 0.3 stays; every new field is optional and old records stay valid. The MIPT case's five boards validate as before (0 errors, 150 warnings, 143 hints) and so do the eight example records.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: smd-engine
3
- Version: 0.6.3
3
+ Version: 0.6.4
4
4
  Summary: Records, checks and renderings for SMD-style thinking sessions (three boards, cycles, qualifications)
5
5
  Project-URL: Homepage, https://github.com/viberesearch/smd-engine
6
6
  Project-URL: Repository, https://github.com/viberesearch/smd-engine
@@ -11,7 +11,7 @@ The case is a sample of what a map of one business needs before a story can be t
11
11
  | `spectra-coffee-c1.board.yaml` | the board set (default profile, Russian labels): 39 elements, 52 relations, 5 hypotheses, 2 K, 1 ontology record |
12
12
  | `sources.yaml`, `taxonomies.yaml` | the invented sources; the six values of the `tier` tag |
13
13
  | `owner.story.yaml` | SCQA for the founder: red line broken in August 2026 while the founder was away |
14
- | `buyer.story.yaml` | SCQA for the buyer, a regional roaster chain: the trial month without the founder inside the series of handover events; the walk goes from the buyer through the journal and the training to the trial month and the cooperation of the transfer |
14
+ | `buyer.story.yaml` | SCQA for the buyer, a regional roaster chain: the trial month without the founder inside the series of handover events, and the August gap (`sig-august`, `nb-qual`, listed in `context`); the walk goes from the buyer through the journal and the training to the trial month and the cooperation of the transfer |
15
15
  | `bank.story.yaml` | SCQA for the buyer's bank: the coverage red line (not below 1.3) and the 92 days between two measurements |
16
16
  | `successor-premortem.story.yaml` | premortem for the future manager: a series of linked events that stops, with the causes and an early sign for each |
17
17
 
@@ -49,6 +49,6 @@ Tiers 1 and 3 are where the specification is silent. A real business map has the
49
49
  ## How the stories were made, and how they stay checked
50
50
 
51
51
  1. `smd story paths` listed the walks from each protagonist (`procedures/story.md`, section 1). The four walks used are among its default top five (`tests/test_story_paths.py` keeps it so), and each story's `conflict` and `resolution` come from the walk.
52
- 2. The sentences were written for each audience, each on board ids; the allow-lists were cut by hand (the buyer and the bank do not see the founder's private estimate of his own share of mornings).
52
+ 2. The sentences were written for each audience, each on board ids; the allow-lists were cut by hand (the buyer and the bank do not see the founder's private estimate of his own share of mornings). Ids that a sentence uses but the path does not reach (a fact about the place, the August signal) are listed in each story's `context` (rule S5).
53
53
  3. Each story is stamped with the board version and the sha256 of the board file. `tests/test_story_case.py` runs `smd story check` on all four in CI. If the board changes in any way, the stories fail rule G7 until they are written again: that is the rule, not a defect.
54
54
  4. The stories are a view. They are not signed, and a correction goes to the board.
@@ -1,4 +1,5 @@
1
1
  # ВЫМЫШЛЕННЫЙ ПРИМЕР, черновик ИИ. История для банка; не подписывается.
2
+ # Правлено вручную 2026-11-01 после смены процедуры story на 0.2.0 (список context, правило S5); штамп run ниже относится к прогону процедуры, а не к этим правкам.
2
3
  record: story
3
4
  schema_version: "0.1"
4
5
  id: spectra-bank-scqa
@@ -13,6 +14,7 @@ path: [place-bank, fn-books, rl-cover, fn-tranche, place-buyer, coop-transfer]
13
14
  conflict: [rl-cover]
14
15
  resolution: [coop-transfer]
15
16
  open: [H3]
17
+ context: [s-small, fact-revenue, fact-price, H3]
16
18
  sentences:
17
19
  - part: situation
18
20
  level: hypothesis
@@ -47,4 +49,4 @@ sentences:
47
49
  ids: [fn-tranche, fn-books, rl-cover]
48
50
  text: "Предлагается поэтапное финансирование: транши открываются под линию покрытия, а отчётность кафе идёт банку каждый квартал."
49
51
  voice: ai
50
- run: {procedure: story, version: "0.1.0", model: claude-sonnet-5-5, date: "2026-11-01"}
52
+ run: {procedure: story, version: "0.2.0", model: claude-sonnet-5-5, date: "2026-11-01"}
@@ -1,5 +1,6 @@
1
1
  # ВЫМЫШЛЕННЫЙ ПРИМЕР, черновик ИИ. История для покупателя; не подписывается.
2
2
  # Список allow короче, чем у основателя: частные оценки основателя в него не входят.
3
+ # Правлено вручную 2026-11-01 после смены процедуры story на 0.2.0 (список context, правило S5); штамп run ниже относится к прогону процедуры, а не к этим правкам.
3
4
  record: story
4
5
  schema_version: "0.1"
5
6
  id: spectra-buyer-scqa
@@ -10,11 +11,12 @@ audience: place-buyer
10
11
  protagonist: place-buyer
11
12
  form: scqa
12
13
  allow: [place-buyer, s-small, fact-spec, H4, fact-revenue, fact-trademark, fact-lease,
13
- H1, H2, fn-train, fn-journal, coop-transfer, ev-trial, gl-handover]
14
+ H1, H2, fn-train, fn-journal, coop-transfer, ev-trial, gl-handover, nb-qual, sig-august]
14
15
  path: [place-buyer, fn-journal, fn-train, ev-trial, gl-handover, coop-transfer]
15
16
  conflict: [ev-trial, gl-handover]
16
17
  resolution: [coop-transfer]
17
18
  open: [H1, H2]
19
+ context: [s-small, fact-spec, H4, fact-revenue, fact-trademark, fact-lease, nb-qual, sig-august, H1, H2]
18
20
  sentences:
19
21
  - part: situation
20
22
  level: hypothesis
@@ -32,6 +34,10 @@ sentences:
32
34
  level: stated
33
35
  ids: [fact-trademark, fact-lease]
34
36
  text: "Товарный знак записан на основателя лично, а аренда флагманского кафе требует согласия арендодателя при смене владельца."
37
+ - part: complication
38
+ level: hypothesis
39
+ ids: [nb-qual, sig-august]
40
+ text: "Возможно, норма «смена работает без основателя» не выполняется: в августе 2026 запись настройки помола отсутствовала 14 дней подряд, пока основатель был в отъезде."
35
41
  - part: complication
36
42
  level: hypothesis
37
43
  ids: [gl-handover, ev-trial]
@@ -45,4 +51,4 @@ sentences:
45
51
  ids: [fn-train, ev-trial, fn-journal, coop-transfer]
46
52
  text: "Предлагается пробный месяц на 28 дней: основатель обучает управляющего, а журнал настройки виден вам до сделки и входит в кооперацию передачи."
47
53
  voice: ai
48
- run: {procedure: story, version: "0.1.0", model: claude-sonnet-5-5, date: "2026-11-01"}
54
+ run: {procedure: story, version: "0.2.0", model: claude-sonnet-5-5, date: "2026-11-01"}
@@ -1,5 +1,6 @@
1
1
  # ВЫМЫШЛЕННЫЙ ПРИМЕР, черновик ИИ. История для основателя; не подписывается.
2
2
  # Исправления вносятся в карту (spectra-coffee-c1.board.yaml), потом текст пишется заново.
3
+ # Правлено вручную 2026-11-01 после смены процедуры story на 0.2.0 (список context, правило S5); штамп run ниже относится к прогону процедуры, а не к этим правкам.
3
4
  record: story
4
5
  schema_version: "0.1"
5
6
  id: spectra-owner-scqa
@@ -15,6 +16,7 @@ path: [p-founder, fn-dialin, rl-dialin, fn-journal, coop-transfer]
15
16
  conflict: [rl-dialin]
16
17
  resolution: [coop-transfer]
17
18
  open: [H1, H2, H5]
19
+ context: [goal-handover, s-small, fact-staff, fact-spec, fact-dialin-share, nb-qual, sig-august, H1]
18
20
  sentences:
19
21
  - part: situation
20
22
  level: stated
@@ -53,4 +55,4 @@ sentences:
53
55
  ids: [fn-journal, coop-transfer, goal-handover]
54
56
  text: "Предлагается связать журнал с передачей: он виден управляющему и покупателю, а кооперация передачи ведёт к вашей цели."
55
57
  voice: ai
56
- run: {procedure: story, version: "0.1.0", model: claude-sonnet-5-5, date: "2026-11-01"}
58
+ run: {procedure: story, version: "0.2.0", model: claude-sonnet-5-5, date: "2026-11-01"}
@@ -1,5 +1,6 @@
1
1
  # ВЫМЫШЛЕННЫЙ ПРИМЕР, черновик ИИ. Премортем для преемника: от провала назад к причинам.
2
2
  # Форма premortem: число 3 (годы взгляда назад) входит в саму форму.
3
+ # Правлено вручную 2026-11-01 после смены процедуры story на 0.2.0 (список context, правило S5); штамп run ниже относится к прогону процедуры, а не к этим правкам.
3
4
  record: story
4
5
  schema_version: "0.1"
5
6
  id: spectra-successor-premortem
@@ -14,6 +15,7 @@ path: [place-successor, fn-journal, fn-train, ev-trial, gl-handover, coop-transf
14
15
  conflict: [ev-trial, gl-handover]
15
16
  resolution: [coop-transfer]
16
17
  open: [H1, H5]
18
+ context: [goal-handover, sig-august, rl-dialin, K1, H1, H5]
17
19
  sentences:
18
20
  - part: failure
19
21
  level: hypothesis
@@ -44,4 +46,4 @@ sentences:
44
46
  ids: [H1, fn-journal, coop-transfer]
45
47
  text: "Чтобы проверить это первым, надо смотреть журнал настройки, который виден всем участникам передачи."
46
48
  voice: ai
47
- run: {procedure: story, version: "0.1.0", model: claude-sonnet-5-5, date: "2026-11-01"}
49
+ run: {procedure: story, version: "0.2.0", model: claude-sonnet-5-5, date: "2026-11-01"}
@@ -11,7 +11,7 @@ Start with `README.md` in the repository root. This folder holds the reference d
11
11
  | `data-model.md` | the record format: board sets, source manifests, taxonomies, patches, the `profile` key, migration |
12
12
  | `checks.md` | the checks the validator runs: errors, warnings and hints, and the profile and source of each hint |
13
13
  | `hypotheses.md` | hypothesis fields: `type`, `rule`, `observed`, `rivals`, the verdict and its robustness fields |
14
- | `stories.md` | stories as a checked view over the boards: `smd story paths` and `smd story check`, the story file, rules G1-G7 |
14
+ | `stories.md` | stories as a checked view over the boards: `smd story paths` and `smd story check`, the story file, rules G1-G7 and S1-S5 |
15
15
  | `red-lines.md` | red lines: `red_line`, the structured value `line`, `observed` values and the breach rule |
16
16
  | `profiles.md` | the profile format: boards and their regions, kinds, the screen layout, the ids every profile defines, the checks of a profile file |
17
17
  | `commands.md` | the commands of `smd` with examples, and the exit codes |
@@ -26,7 +26,7 @@ The checks are in `src/smd_engine/validate/`, one module per subject, run in the
26
26
  - **Errors (red line values, gate КЛ1 В; `validate/redlines.py`, `docs/red-lines.md`):** `line` on an element that is neither `red_line: true` nor an `algedonic_channel`; a `line` with both a corridor (`min`, `max`) and `expect`, or with neither; `min` not below `max`; `until` not after `since` (or after the record's `date` when there is no `since`); `line.recovery_days` and the channel's `recovery_time` both set and different; `observed` on an element with no `line`; an observed value of the wrong type (a boolean for a yes/no line, a number for a corridor); with a manifest, an unknown `observed` source. The schema refuses a `line` without `until`, and an observation without `value`, `date` or `source`. The schema also refuses `expect` without `metric`. **Warnings:** with a manifest, an observation whose source is not of kind `field_artefact`; observations dated before the line takes force (`since`, else the record's `date`), which are not read; two observations with the same date ("one observation per date").
27
27
  - **Hints (red line values):** `red-line-breach` (field-result.md §5): the breaches of a line by its observations, each with its dates, by the rule of `src/smd_engine/redline.py` (observations from the line's start to `until`, sorted by date; a run of outside values spans from its first date to the next inside value, or, still open, to the later of the last observation and the record's `date`, never past `until`; it is a breach when longer than `line.recovery_days`, else `recovery_time`; any run when neither is set). `red-line-expired` (field-result.md §5): observations dated after `until`, or a record dated after it ("the line ended on <until>: renew or drop"). `red-line-outlives-pace` (functional-plan.md §4): a line in force (`until` minus `since`, or minus the record's `date`) more years than the `pace` of an element it is linked to (as above, itself included), the analogue of `ontology-outlives-pace`: a line is in force for a term matched to the pace of its tier (the case owner 26.10; the MIPT case's H24).
28
28
  - **Hints (typical errors of a group screen, qualification-pass.md §3.2; `program-three-boards`):** positions, other than the reflexive one, with no `shift` or `flow` to another position, place or cooperation (`positions-unlinked`, E2); object-board content, gaps and notes aside, linked by no relation, transition, `in`, `performed_by` or move, however indirectly, to an element of another board (`object-isolated`, E3; an ontology's `cooperation` counts as linked to its `valid_for` positions; `seen_from` does not count, since E3 asks for a link besides it); facts with no relation, transition, `in`, `feeds` or `about` (`isolated-facts`, E6, E11); the starting position of a `shift`, other than the reflexive one, with nothing seen from it on a board with halves while a new frame is drawn (`jump-to-frame`, E12; the engine's reading: the order of the transitions is not read); a transition with no end that is a position, a place for others or seen from a position (`transition-unanchored`, E14). E1, E7 and the rest of E14 are the hints on halves, entry and `seen_from` above; the other rows need reading.
29
- - **Hints (self-checks of the procedures):** an AI-drafted `cooperation` that no K targets (`ai-cooperation`, positional-construction.md §5); an ontology whose `valid_for` positions have no `flow` to or from its `cooperation` (`cooperation-flows`); a `detail` table with a column «что теряется» or "what is lost" whose cell is empty or says none (`нет`, `none`, `-`, `—`, `n/a`) in a row (`translation-loss`, stakeholder-ontology.md §5); on `program-three-boards`, a `garland` with fewer than two `belongs` relations into it, or whose events all cite one source ("one witness") (`garland`, visionary-tract.md §3); a bridge, a `situation` on the big half with a `respecify` move, whose move is not from a `model` and a `garland` (`bridge-from`, §5); a candidate move of the tract (`glue` on a model, `respecify` or `rescale` on a situation, `adjoin` on a goal) with no `via`; a move the group made in its talk needs none (`move-via`, §1). Not checked: that a stakeholder ontology names exactly one position (no field marks a record as one; several positions with no cooperation get the `ontology` hint), "one witness" by actor (signals carry no actor field), and three cycles in a row without a new scheme (the validator compares a record with its previous one only).
29
+ - **Hints (self-checks of the procedures):** an AI-drafted `cooperation` that no K targets (`ai-cooperation`, positional-construction.md §5); an ontology whose `valid_for` positions have no `flow` to or from its `cooperation` (`cooperation-flows`); a `detail` table with a column «что теряется» or "what is lost" whose cell is empty or says none (`нет`, `none`, `-`, `—`, `n/a`) in a row (`translation-loss`, stakeholder-ontology.md §5); on `program-three-boards`, a `garland` with fewer than two `belongs` relations into it, or whose events all cite one source ("one witness") (`garland`, visionary-tract.md §3); a bridge, a `situation` on the big half with a `respecify` move, whose move is not from a `model` and a `garland` (`bridge-from`, §5); a candidate move of the tract (`glue` on a model, `respecify` or `rescale` on a situation, `adjoin` on a goal) with no `via`; a move the group made in its talk needs none (`move-via`, §1); an `adjoin` element, a candidate, accepted or with no status, with no `return` (the way back: what it changes in the old terms and what is lost; `move-return`, visionary-tract.md §7; dz02#l=11; thesis moves are not read). Not checked: that a stakeholder ontology names exactly one position (no field marks a record as one; several positions with no cooperation get the `ontology` hint), "one witness" by actor (signals carry no actor field), and three cycles in a row without a new scheme (the validator compares a record with its previous one only).
30
30
  - **Errors (hypothesis standard, gates М1 В and Ф В; `validate/hypotheses.py`):** `observed` with k greater than n; the schema refuses an unknown `type`, a `rule` without `metric`, `op` or `threshold` or with another `op`, an `n_min` below 1, and an `observed` without `k`, `n` or `artefact`. `observed.artefact` is checked against the manifest like `artefacts`. The schema refuses `==` as an `op`: equality is no refutation condition.
31
31
  - **Warnings (hypothesis standard):** a recorded `confirmed` while the whole Wilson interval of `observed` lies on the refuting side of the rule's threshold, or `refuted` while it lies on the holding side; with a manifest, an `observed.artefact` whose source is not of kind `field_artefact`.
32
32
  - **Hints (hypothesis standard, `procedures/field-result.md` §0):** an untyped hypothesis whose `raised_in` cycle has typed hypotheses (`hypothesis-type`; records with none typed, like the MIPT case's, get none); a `claim` or `estimate` with neither `rule` nor `revise_if` (`hypothesis-rule`; such a hypothesis gets no `revise-if` hint, nor does a `core`, `design` or `probe`, and a `rule` stands in for `revise_if`); a `rule` with no `basis` (`rule-basis`); an `estimate` whose `rule` has no `n_min` (`rule-n-min`); a `probe` confirmed or refuted, or a `core` or `design` not `untested` (`type-status`); for each `testing` hypothesis with `observed`, the verdict its rule proposes (an `untested` one with `observed` gets the hint "observed data recorded but status is untested: set testing" instead), by the 95% Wilson score interval of k/n when the threshold is a share strictly between 0 and 1 (`verdict`, field-result.md §3: too few, refuted, confirmed, or inconclusive and stays testing; the group signs `accept_result`).
@@ -29,7 +29,7 @@ uv run smd publish cases/example/bakeries-c2.board.yaml --sources cases/example/
29
29
  uv run smd vault cases/example/bakeries-c2.board.yaml out/vault --sources cases/example/sources.yaml # Obsidian vault: a note per element, thesis, hypothesis, K and source; links as typed properties; the screen as a canvas
30
30
  uv run smd pack solo-session cases/example/bakeries-c2.board.yaml --sources cases/example/sources.yaml -o out/pack.md # attach to any model; --sources carries the manifest, --taxonomies the taxonomy file; with board sets, the skeleton of the latest cycle as "Cells to fill"; prints `pack sha256: <hex>` to stderr, the hash of what it wrote, for `run.pack_sha256`
31
31
  uv run smd story paths cases/spectra_coffee/spectra-coffee-c1.board.yaml --audience place-bank # walks of 4-9 items over typed links from the protagonist through a conflict to a resolution, best first; --allow-refers, --limit, --yaml (story skeletons), --gaps (where no typed walk exists and the links that would make one); docs/stories.md
32
- uv run smd story check cases/spectra_coffee/bank.story.yaml --boards cases/spectra_coffee/spectra-coffee-c1.board.yaml # a story file against rules G1-G7: ids, levels, numbers, allow-list, dropped oppositions, board stamp; exit 1 on an error; `smd story render story.yaml --md` prints a story as Markdown; paths, check and render take --sources and --taxonomies
32
+ uv run smd story check cases/spectra_coffee/bank.story.yaml --boards cases/spectra_coffee/spectra-coffee-c1.board.yaml # a story file against rules G1-G7 and S1-S5: ids, levels, numbers, allow-list, dropped oppositions, board stamp, ids off the walk that `context` does not list; exit 1 on an error; `smd story render story.yaml --md` prints a story as Markdown; paths, check and render take --sources and --taxonomies
33
33
  uv run smd sources cases/example/sources.yaml --clean-room --deny-lineage earlier-concept
34
34
  uv run smd sources path/to/sources.yaml --folder /local/folder
35
35
  uv run smd sources path/to/sources.yaml --folder /local/folder --refresh [ids] # recompute sha256 of the named sources (default: every decision_log); a source that already carries `lines` gets its count rewritten, one that does not is not given one; edit only those lines of the manifest
@@ -109,7 +109,7 @@ A thesis can carry a move too; there `from` may name theses as well as elements.
109
109
  | `respecify` | re-topologize or re-specify (τ) | переопределить связи (τ) | change admissible links, or identify two elements kept apart |
110
110
  | `glue` | glue across domains (γ) | склеить с другой областью (γ) | build on a shared substructure with another domain |
111
111
 
112
- `status` is `candidate`, `accepted` or `rejected`. Candidates are listed as hints until the group decides.
112
+ `via` says what the move works through (the added axis, the new grain, the changed link, the shared substructure). `return` is the way back: what the move changes in the terms it started from (a decision, a prediction, a test) and what is lost on the way back. An `adjoin` is asked for one (hint `move-return`, dz02#l=11; `docs/method/structural-moves.md`, "Way back"). `status` is `candidate`, `accepted` or `rejected`. Candidates are listed as hints until the group decides.
113
113
 
114
114
  ### Relations, transitions, qualifications, state
115
115
 
@@ -74,3 +74,12 @@ The compatibility predicate is a finite check: unique ownership, no dangling imp
74
74
  - The validator gates the form of a candidate before the group sees it; deciding which candidate is meaningful stays with the participants.
75
75
  - Any ranking by S is shown as a hint, with its weights logged.
76
76
  - The paper is about representations in science and ontology, not group talk in the Shchedrovitsky tradition. Reading a position as a representation is the engine's interpretation, to be checked with methodologists.
77
+
78
+ ### Way back
79
+
80
+ Owner's request, 2 November 2026 (dz02#l=11). Adjoining dimensions makes a hard problem easy only when a map leads back to the original terms with a known loss. Three cases in mathematics and physics:
81
+ - semidefinite relaxation: solve the lifted problem, then round the solution back to the original one, with a known bound on the loss;
82
+ - Koopman embeddings: a nonlinear system is lifted to a linear one in more dimensions, and the result is read back on the original state;
83
+ - the paper's own Newtonian-limit case: a candidate structure is kept only if it recovers the Newtonian limit, which is the map back to the old terms.
84
+
85
+ On a board the requirement is: an `adjoin` helps only if it yields a different decision, prediction or test in the old terms. Example: adding a time axis to a sale (a sale seen as an event in the life of a business) is worth keeping if it changes what the group would do or measure about the sale itself. The move field `return` states that change and what is lost on the way back; the hint `move-return` asks for it on every `adjoin` that is a candidate, accepted, or has no status. The paper does not state this requirement. It is pending in the paper's `PENDING_UPDATES.md` as an owner decision, so it is the engine's rule until the owner decides.
@@ -52,6 +52,7 @@ Plan approved 2026-10-25 (`docs/plan.md`). Each step is a branch and a PR. The s
52
52
  | Ж1, Ж2 | Formal stance and robustness rules R1-R6 (`docs/method/robustness-rules.md`) | done in v0.6.3 |
53
53
  | ИСТ1 | Story view: `smd story paths`, `check`, `render`; record `story`; the invented case `cases/spectra_coffee/` | done in v0.6.3 |
54
54
  | Патчи | `set` on a relation by `from`, `to`, `kind`; `carries` shown in the renders | done in v0.6.3 |
55
+ | Путь назад | Way back on adjoin moves: `move.return`, hint `move-return`; computability check in the qualification pass (dz02#l=11) | done in v0.6.4 |
55
56
 
56
57
  ## Structural moves (Invention as a Structural Operation)
57
58
 
@@ -68,7 +69,7 @@ In the engine the moves generate and classify. They do not replace the SMD proce
68
69
  | 3 | Visionary tract, step "model from another reality": gamma. Choose a domain whose structure shares a substructure with the garland, and glue. Examples: medicine and healthy longevity; double entry, then national accounting standards, then professions | the AI visionary proposes 2-4 candidates per move; the validator rejects malformed ones before the group sees them |
69
70
  | 3 | Bridge into the big situation: re-specify. Change which links are admissible, e.g. a sale as an operation inside the life of a business instead of its end | same |
70
71
  | 3 | View of oneself: rescale. Object, ecosystem and market scales (Khaprov): one deal, a flow of deals, rules of the field | same |
71
- | 3 | Goals and positional construction: adjoin. Add the axis the current picture holds fixed, such as time, the observer or the scale | same |
72
+ | 3 | Goals and positional construction: adjoin. Add the axis the current picture holds fixed, such as time, the observer or the scale. Each adjoin names its way back (`return`): what it changes in the old terms and what is lost (dz02#l=11; `docs/method/structural-moves.md`, "Way back") | same, plus the hint `move-return` |
72
73
  | 5 | Comparing the clean-room version with the earlier concept as two authors' module sets. Each shared element is classified as agreement, conflict, cross-refinement or cross-import (the negotiator in the paper's demo). Merge options are lock, fork, rebase, merge | `compare.py`: agreement, refinement, conflict, only in one set. Cross-import is not detected from wording alone; a qualification pass marks it |
73
74
 
74
75
  Limits taken from the paper:
@@ -10,7 +10,7 @@ Next to a broker's work a story is an attachment, not a rival to the information
10
10
 
11
11
  ## The story file
12
12
 
13
- `*.story.yaml`, `record: story`, schema 0.1 (`src/smd_engine/schemas/story.schema.json`). `smd validate` reads it by the schema; `smd story check` tests it against the rules below.
13
+ `*.story.yaml`, `record: story`, schema 0.1 (`src/smd_engine/schemas/story.schema.json`; the optional field `context` was added without a new schema version, as old files stay valid). `smd validate` reads it by the schema; `smd story check` tests it against the rules below.
14
14
 
15
15
  | Field | Meaning |
16
16
  |---|---|
@@ -23,6 +23,7 @@ Next to a broker's work a story is an attachment, not a rival to the information
23
23
  | `conflict` | the conflict objects: ends of an `opposes`, normality boundaries, a series of linked events with its events, red lines in breach |
24
24
  | `resolution` | the cooperation, goal or function chain the walk reaches; empty when the board has none, and a sentence says so |
25
25
  | `open` | hypotheses the story ends on |
26
+ | `context` | optional: ids a sentence may cite that lie off the path (rule S5); each must be in `allow` (G4, an error otherwise), is held to G1-G3, and should be cited by a sentence (a warning if not) |
26
27
  | `sentences` | `{text, ids, level, part}`: `level` is `hypothesis`, `unverified`, `stated` or `checked`; `part` is free (situation, complication, question, answer) |
27
28
  | `voice`, `run` | `ai`; `{procedure, version, model, date}` as on a board set |
28
29
 
@@ -65,8 +66,12 @@ Exit 0 without errors, 1 with errors, 2 when a file cannot be read.
65
66
  | G5 | no `opposes` that touches the path is left out of `conflict` | error |
66
67
  | G6 | a comparative or superlative in a sentence with no number («уже» only before «чем», with or without a comma) | hint |
67
68
  | G7 | `voice` is ai; the version and sha256 of each board match the stamp | error: regenerate |
69
+ | S5 | each id a sentence cites is on the path, is a `conflict` or `resolution` id that is on the path, or is in `context` | error |
70
+ | G4 | (context) each id of `context` is in `allow`; an id of `context` that no sentence cites is a warning | error / warning |
68
71
 
69
- Structure: `S1` ids exist (and `open` lists hypotheses), `S2` neighbours on the path are joined by a link (an error when none, a warning when only a `refers`), `S3` the conflict lies on the path or is opposed to it and the resolution lies on it (an empty resolution is a warning), `S4` the path has 4 to 9 items, a conflict object lies on it, and no resolution object comes before the first one.
72
+ Structure: `S1` ids exist (`context` too; `open` lists hypotheses), `S2` neighbours on the path are joined by a link (an error when none, a warning when only a `refers`), `S3` the conflict lies on the path or is opposed to it and the resolution lies on it (an empty resolution is a warning), `S4` the path has 4 to 9 items, a conflict object lies on it, and no resolution object comes before the first one, `S5` a sentence stays on the walk (a `context` id that no sentence cites is a warning).
73
+
74
+ **S5, the strict rule (dz01#l=31).** A sentence may cite without a `context` entry only: the ids on the `path`, and the ids of `conflict` and `resolution` that are on the path. Anything else is listed in `context`: a fact about the place, a signal beside the path, the audience when it is off the path, a `conflict` or `resolution` id that is off the path, and an `open` hypothesis a sentence cites (a hypothesis never lies on a path; dz01#l=35). Listing is a decision by a person: an id in `context` must also be in `allow` (G4 is an error otherwise, because `smd story render` prints context ids with their labels) and its figures and dates are held to G1-G3, so `context` widens the walk and never the allow-list. A context id that no sentence cites is a warning. A cited id that is neither on the walk nor in `context` is an error. The rule makes a reader of the story see at once which sentences rest on the walk and which on its surroundings; `smd story render` lists the context ids apart.
70
75
 
71
76
  **G2, the levels.** The level of an id: an element has its `epistemic`, `stated` when it has none; a hypothesis is `checked` when `confirmed` or `refuted` and `hypothesis` when `untested` or `testing`; a thesis is `stated` when `voiced` or `refined` and `hypothesis` otherwise; a K is `stated` when closed, else `hypothesis`; an ontology record has the level of its `test`. The code compares levels only. Whether the wording matches the level is for a person: the hint lists the modal words (если, возможно, предлагается, проверим, if, may) and the weak sentences that have none.
72
77
 
@@ -80,7 +85,7 @@ Structure: `S1` ids exist (and `open` lists hypotheses), `S2` neighbours on the
80
85
  uv run smd story render owner.story.yaml --md [--boards a.board.yaml] [--lang ru|en] [-o owner.md]
81
86
  ```
82
87
 
83
- A story as readable Markdown: the title, the audience and form, the sentences by part with the board ids each rests on in brackets, the open questions (with `--boards`, each shows what its hypothesis assumes) and the stamp (boards, versions, sha256, voice, run). It checks nothing; run `smd story check` first. An invented story keeps its marking in the title, so the first line of the page says so.
88
+ A story as readable Markdown: the title, the audience and form, the sentences by part with the board ids each rests on in brackets, the context ids apart under their own heading (with `--boards`, each with its label), the open questions (with `--boards`, each shows what its hypothesis assumes) and the stamp (boards, versions, sha256, voice, run). It checks nothing; run `smd story check` first. An invented story keeps its marking in the title, so the first line of the page says so.
84
89
 
85
90
  ## Reading a result
86
91
 
@@ -2,7 +2,7 @@
2
2
  id: qualification-pass
3
3
  title: Qualification pass over a board set
4
4
  step: 3
5
- version: 0.4.1
5
+ version: 0.4.2
6
6
  role: методолог
7
7
  profile: program-three-boards
8
8
  inputs:
@@ -135,6 +135,7 @@ Each row states the rule in one line, so that this file can be used without read
135
135
  | Representation fits the place | the object representation must fit the place the position has taken: a начальник in a ready place who keeps the org structure as his object has a representation "не соответствующее его позиции" (GP-Guide11 ¶33-34; GP-Guide10 ¶7, ¶19; politics as a fourth level, GP-T5 pp. 242-243) | ask: does this representation fit the place the position has taken (организатор, руководитель, управляющий, политик, функционер)? Read `acts_as` and the position's `represents` targets; the hint `position-without-object` lists the positions with `acts_as` and no representation | К as a question to the group; the fit is asked, not graded true or false |
136
136
  | Role, not actor | the boards hold roles; a positioner is the carrier who occupies a place (GP-OP, GP1981; `docs/method/roles-and-actors.md`) | a `position`, `place_for_others` or `performed_by` that names an organisation or person type instead of what is done; an actor that sits beside the role it fills | label fix by whoever wrote the record (actor to `fillers`); К if the role itself is not named |
137
137
  | Board separation | subject-object talk is allowed on the org-activity board, not on the ontology board (GP-SMD) | subject-object talk ("we must", "our task") sits on `od`, not on `oo` | К for each such label still on `oo` after validation |
138
+ | Computability | a position, explanation or plan that requires an actor to solve a problem the actor cannot compute with the information and time it has is a weak explanation or an unworkable plan: "if my laptop can't find it, then neither can the market" (A. Moitra quoting K. Jain; dz02#l=11; not a classic-method rule). Example: assuming that participants reach a Nash equilibrium | for each position, explanation or plan on the boards, ask what the actor must work out (a best response to all others, an optimum over a large space) and whether the actor has the information and time for it. Read `label`, `action` and the theses' `grounds` | К as a question to the group: what does the actor really compute, and with what; a simpler rule the actor can follow is offered as an alternative. Not a verdict on the position |
138
139
  | Realizability | a methodological product is checked for realizability in activity, not for truth (GP1981) | an `ontology` entry has a `test` that is a hypothesis; a multi-position object has a `cooperation` | К asking for the test or the cooperation |
139
140
 
140
141
  Degeneration (GP1987), counted over the record's theses:
@@ -2,7 +2,7 @@
2
2
  id: story
3
3
  title: A checked story over a business map, for one audience
4
4
  step: 3
5
- version: 0.1.0
5
+ version: 0.2.0
6
6
  role: игротехник
7
7
  profile: any
8
8
  inputs:
@@ -11,7 +11,7 @@ inputs:
11
11
  - the shareable part of the protagonist's ontology, a cited file, when the protagonist has one
12
12
  - the audience's language (Russian for a Russian group or broker)
13
13
  outputs:
14
- - a story file (`*.story.yaml`, `record: story`) with sentences {text, ids, level, part}, voice ai, the run stamp
14
+ - a story file (`*.story.yaml`, `record: story`) with sentences {text, ids, level, part}, a `context` list for the ids off the path, voice ai, the run stamp
15
15
  - the result of `smd story check` on it, 0 errors
16
16
  - a list of the places where the board has no typed link, for the group
17
17
  next: qualification-pass
@@ -49,8 +49,10 @@ The engine lists; a person picks. Take the walk that tells the audience's own si
49
49
 
50
50
  ## 3. Write the sentences
51
51
 
52
+ **Stay on the walk (S5).** A sentence cites ids on the path, or ids of `conflict` and `resolution` that are on the path. Any other id it needs (a fact about the place, a signal beside the path, a conflict or resolution id off the path, an `open` hypothesis it cites) goes into the story's `context` list, by decision: add only what a sentence uses and the audience may see, and keep each in `allow` too (a context id not in `allow` is an error, and one no sentence cites is a warning). `context` never widens the allow-list. Do not move an id into `context` to silence the check when the sentence is about something the walk does not reach; if the story needs it, the walk may be the wrong one (section 1).
53
+
52
54
  Each sentence is `{text, ids, level, part}`.
53
- - `ids`: the board ids the sentence rests on, at least one, all in `allow`. Elements, hypotheses, theses, K and ontology records may be cited.
55
+ - `ids`: the board ids the sentence rests on, at least one, all in `allow` and each on the walk or in `context`. Elements, hypotheses, theses, K and ontology records may be cited.
54
56
  - `level`: the strength the sentence claims, `hypothesis`, `unverified`, `stated` or `checked`. It is never above the weakest of its ids: an untested or testing hypothesis, a thesis below `voiced` or `refined`, and an open K count as `hypothesis`. Word the sentence to match: a `hypothesis` sentence says "возможно", "предлагается", "проверим"; a `checked` sentence does not.
55
57
  - Numbers: every number in a sentence, digits or words («три», «вдвое», «половина»), is in the text of one of its ids. Copy the number as the board writes it. Do not round, add or compute. The premortem form has its own constant 3 (years back), scenarios 2.
56
58
  - No comparative or superlative without a number («лучше», «самый», «more»). Say what is compared, with the figure.
@@ -75,6 +77,7 @@ The result must have 0 errors. Read the hints by eye: G2 lists modal words and s
75
77
  ## 5. Hand over
76
78
 
77
79
  Reply with the story, the check result, and:
80
+ - the ids in `context`, with the sentence that needs each, so the group sees what the story leans on beside the walk;
78
81
  - the places where the walk used a weak link (`~refers~`) or where no walk existed, as questions for the group (they are claims the group has to make, not typing of existing links);
79
82
  - the hypotheses the story ends on, as the questions for the audience;
80
83
  - the sentence "черновик ИИ: поправки вносятся в карту, текст пишется заново".
@@ -2,7 +2,7 @@
2
2
  id: visionary-tract
3
3
  title: Visionary tract with structural-move candidates
4
4
  step: 3
5
- version: 0.2.3
5
+ version: 0.2.4
6
6
  role: визионер
7
7
  profile: program-three-boards
8
8
  inputs:
@@ -62,7 +62,8 @@ Steps 1-4 are the program's "four procedures"; steps 5 and 6 are its continuatio
62
62
  - `board`, `half` (for `s`) and `kind` as in the table above;
63
63
  - `label` in one sentence, in plain words, in the language of the human's materials;
64
64
  - `cites` the source address of every fact you take from a source; an element with no source states that it is your wording;
65
- - from step 3 on, `move: {op, from, via, status: candidate}` (docs/data-model.md, "Moves"). `from` lists the earlier accepted elements the move was applied to. In proposal mode it may also cite candidates, each named as the working assumption of its step. `via` is required in this procedure for every op and names the shared substructure, the changed links, the scale or the added axis, as each step says; the hint `move-via` names a candidate move of the tract's steps without one.
65
+ - from step 3 on, `move: {op, from, via, status: candidate}` (docs/data-model.md, "Moves"). `from` lists the earlier accepted elements the move was applied to. In proposal mode it may also cite candidates, each named as the working assumption of its step. `via` is required in this procedure for every op and names the shared substructure, the changed links, the scale or the added axis, as each step says; the hint `move-via` names a candidate move of the tract's steps without one;
66
+ - an `adjoin` also takes `return`, its way back: what the move changes in the terms it started from (a decision, a prediction, a test) and what is lost on the way back (step 6, dz02#l=11). The hint `move-return` names an adjoin without one.
66
67
 
67
68
  Use only the fields of `docs/data-model.md`. Elements have no status field of their own: the move status and `voice: ai` are the marks that the wording is yours and awaits the human.
68
69
 
@@ -174,6 +175,8 @@ These are Khaprov's. They are not the program's seven levels of management compl
174
175
  **Element:** `kind: goal`, `board: od`, `label` in the form of a goal with its position.
175
176
  **Move:** adjoin makes a latent degree of freedom an explicit, independent axis. `{op: adjoin, from: [<view of oneself>, <position>], via: "axis: <the added axis>", status: candidate}`. If the goal answers an open `gap` (with `of` set), add `{from: <goal>, to: <gap>, kind: refers}`: a gap is a problem, and goals are what problematization produces from it (GP-PP). A goal for which a method is already known is a task, and you say so.
176
177
 
178
+ **Way back.** Each adjoin candidate states `return`: what the added axis changes in the old terms, as a decision, a prediction or a test the group could not make before, and what is lost on the way back. Example: a time axis on a sale is worth proposing if it changes a decision about the sale itself. An axis that changes nothing in the old terms is not a candidate; say so and drop it. Mathematics adjoins dimensions only where a map leads back with a known loss (semidefinite relaxation then rounding; Koopman embeddings; `docs/method/structural-moves.md`, "Way back").
179
+
177
180
  **Transition.** `{n: <next>, from: <view>, to: <goal>}` when accepted.
178
181
 
179
182
  **Earlier moves made impossible.** List in the reply the goals and moves already on the boards that the accepted picture rules out, each with the reason. The human decides what to drop. You do not delete anything. The data model has no field for this (see the hand-over).
@@ -191,7 +194,7 @@ These are taken from the paper and apply to every candidate in this procedure (d
191
194
 
192
195
  ## 9. Self-check before handing over
193
196
 
194
- - Every candidate has voice ai, a position in `seen_from`, and (steps 3-6) a move with `status: candidate` and a `via`.
197
+ - Every candidate has voice ai, a position in `seen_from`, and (steps 3-6) a move with `status: candidate` and a `via`; every adjoin also has a `return`.
195
198
  - No candidate came from an invented fact.
196
199
  - No sign-off, accepted move or raised status was written by you (in proposal mode this includes `reject_move`).
197
200
  - In proposal mode: every step has one named working assumption, and every AI item is labelled AI.
@@ -241,6 +244,7 @@ elements:
241
244
  label: "organiser: sign the first five shops before the plant is leased",
242
245
  seen_from: p-organiser,
243
246
  move: {op: adjoin, from: [vs-eco, p-organiser], via: "axis: order of commitments (shops before the lease)",
247
+ return: "a different decision in the old terms: sign shops before leasing; lost: the saving of a bulk lease price",
244
248
  status: candidate}}
245
249
  relations:
246
250
  - {from: vs-eco, to: s-small, kind: refers}
@@ -107,6 +107,7 @@ hints:
107
107
  - garland
108
108
  - bridge-from
109
109
  - move-via
110
+ - move-return
110
111
  - ai-cooperation
111
112
  - cooperation-flows
112
113
  - translation-loss
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "smd-engine"
3
- version = "0.6.3"
3
+ version = "0.6.4"
4
4
  description = "Records, checks and renderings for SMD-style thinking sessions (three boards, cycles, qualifications)"
5
5
  readme = "README.md"
6
6
  license = "MIT AND CC-BY-4.0"
@@ -39,6 +39,8 @@ Typical errors to look for (Girenko day 4, from the review of seven groups; stat
39
39
  14. no anchor in a position, leaving empty and fictive places;
40
40
  15. "the same activity, not a new industry" claimed too easily.
41
41
 
42
+ Also check computability (not in the program's list; the owner's addition, dz02#l=11; A. Moitra quoting K. Jain, "If my laptop can't find it, then neither can the market"): a position, explanation or plan that needs an actor to solve a problem the actor cannot compute with the information and time it has is a weak explanation or an unworkable plan. Example: assuming that participants reach a Nash equilibrium. Raise it as a К in the form of a question to the group (`qualification-pass`, section 3.3).
43
+
42
44
  Many of these correspond to validator hints (empty boards, no places for others, new frame without functions, open gaps). Run the validator first and use its output as evidence, not as the whole pass. Errors and warnings of the record go back to whoever wrote it; in a solo AI run they go into the record as K and into the reply.
43
45
 
44
46
  ### 2. Problematization (GP-PP)
@@ -50,6 +50,7 @@ def _line(el: dict[str, Any], lang: str, profile: Profile) -> str:
50
50
  f"{w['move']}: {MOVE_NAMES[lang][m['op']]} {w['from']} "
51
51
  f"{', '.join(m['from'])}"
52
52
  + (f" {w['via']} {m['via']}" if m.get("via") else "")
53
+ + (f"; {w['return']}: {m['return']}" if m.get("return") else "")
53
54
  + (
54
55
  f" ({value_word('move_status', m['status'], lang)})"
55
56
  if m.get("status")
@@ -145,6 +145,7 @@ LABELS: dict[str, dict[str, Any]] = {
145
145
  "move": "ход",
146
146
  "from": "из",
147
147
  "via": "через",
148
+ "return": "путь назад",
148
149
  },
149
150
  # other words of the Markdown digest; record fields (`action`,
150
151
  # `cooperation`, `test`, ...) take their labels from "fields"
@@ -387,6 +388,7 @@ LABELS: dict[str, dict[str, Any]] = {
387
388
  "move": "move",
388
389
  "from": "from",
389
390
  "via": "via",
391
+ "return": "way back",
390
392
  },
391
393
  # the English digest names `action` and `test` by the field names, as
392
394
  # it always has; the page labels them "test" and "tested by hypothesis"
@@ -202,6 +202,7 @@
202
202
  "description": "elements (or, for a thesis, theses) the move was applied to"
203
203
  },
204
204
  "via": {"type": "string", "description": "what the move works through: the added axis, the new grain, the changed link, or for glue the shared substructure or other domain"},
205
+ "return": {"type": "string", "description": "the way back: what the move changes in the terms it started from (a decision, a prediction, a test) and what is lost on the way back; the hint move-return asks for it on an adjoin (dz02#l=11)"},
205
206
  "status": {"enum": ["candidate", "accepted", "rejected"]},
206
207
  "note": {"type": "string"}
207
208
  }
@@ -38,6 +38,12 @@
38
38
  "conflict": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/id"}, "description": "the conflict objects: opposes pairs, normality boundaries, a series of linked events, red lines in breach"},
39
39
  "resolution": {"type": "array", "items": {"$ref": "#/$defs/id"}, "description": "the cooperation, function chain or goal the path reaches; empty when the board has none, and the story says so"},
40
40
  "open": {"type": "array", "items": {"$ref": "#/$defs/id"}, "description": "hypotheses the story ends on, as questions"},
41
+ "context": {
42
+ "type": "array",
43
+ "uniqueItems": true,
44
+ "items": {"$ref": "#/$defs/id"},
45
+ "description": "ids a sentence may cite that lie off the path (S5); each is still subject to the allow-list (G4) and to G1-G3; optional, empty when absent"
46
+ },
41
47
  "sentences": {
42
48
  "type": "array",
43
49
  "minItems": 1,
@@ -12,7 +12,11 @@
12
12
 
13
13
  S1-S4 check the structure the rules lean on: ids exist, neighbours on the path
14
14
  are joined by a link, conflict and resolution lie on the path, the path has 4 to 9
15
- items and meets a conflict object before a resolution object."""
15
+ items and meets a conflict object before a resolution object. S5 keeps a sentence
16
+ on the walk: each id it cites is on the path, is a conflict or resolution id that
17
+ is on the path, is an `open` hypothesis, or is listed in the story's `context`.
18
+ A conflict or resolution id off the path needs a `context` entry. A `context` id
19
+ is held to `allow` (G4) and should be cited by a sentence (warning)."""
16
20
 
17
21
  from __future__ import annotations
18
22
 
@@ -128,13 +132,16 @@ def _structure(story: dict[str, Any], boards: Boards) -> list[Finding]:
128
132
  for field in ("audience", "protagonist"):
129
133
  if story[field] not in elements:
130
134
  out.append(_err("S1", field, f"unknown element '{story[field]}'"))
131
- for field in ("path", "conflict", "resolution", "allow", "open"):
132
- for item in story[field]:
135
+ for field in ("path", "conflict", "resolution", "allow", "open", "context"):
136
+ for item in story.get(field, []):
133
137
  known = (
134
- item in boards.items if field in ("allow", "open") else item in elements
138
+ item in boards.items
139
+ if field in ("allow", "open", "context")
140
+ else item in elements
135
141
  )
136
142
  if not known:
137
143
  out.append(_err("S1", field, f"unknown id '{item}'"))
144
+ out += _context(story, boards)
138
145
  for item in story["open"]:
139
146
  family = boards.items.get(item, ("", {}))[0]
140
147
  if family and family != "hypothesis":
@@ -186,6 +193,21 @@ def _structure(story: dict[str, Any], boards: Boards) -> list[Finding]:
186
193
  return out + _s4(story)
187
194
 
188
195
 
196
+ def _context(story: dict[str, Any], boards: Boards) -> list[Finding]:
197
+ """A context id is held to `allow` (render prints it with its label, so it
198
+ must not widen what the audience may see); one no sentence cites is noise."""
199
+ cited = {i for s in story["sentences"] for i in s["ids"]}
200
+ out: list[Finding] = []
201
+ for item in story.get("context", []):
202
+ if item in boards.items and item not in story["allow"]:
203
+ out.append(_err("G4", "context", f"'{item}' is not in allow"))
204
+ if item not in cited:
205
+ out.append(
206
+ Finding("warning", "S5 context", f"'{item}' is cited by no sentence")
207
+ )
208
+ return out
209
+
210
+
189
211
  def _s4(story: dict[str, Any]) -> list[Finding]:
190
212
  """S4: a path of 4 to 9 items, with a conflict object on it and no
191
213
  resolution object before the first one."""
@@ -247,6 +269,17 @@ def _sentence(
247
269
  for i in known
248
270
  if i not in story["allow"]
249
271
  ]
272
+ on_walk = _on_walk(story)
273
+ out += [
274
+ _err(
275
+ "S5",
276
+ where,
277
+ f"'{i}' is neither on the walk nor in context: put it on the path "
278
+ f"or list it in context",
279
+ )
280
+ for i in known
281
+ if i not in on_walk
282
+ ]
250
283
  if known:
251
284
  out += _g2(boards, where, sentence, known)
252
285
  out += _g3(boards, story["form"], where, text, known)
@@ -254,6 +287,19 @@ def _sentence(
254
287
  return out
255
288
 
256
289
 
290
+ def _on_walk(story: dict[str, Any]) -> set[str]:
291
+ """S5: the ids a sentence may cite: the ids on the path, the ids of
292
+ `conflict` and `resolution` that are on the path, and the `context` list.
293
+ Anything else, including an `open` hypothesis (a hypothesis never lies on
294
+ a path) and a conflict or resolution id off the path, needs a `context`
295
+ entry (dz01#l=31, #l=35)."""
296
+ path = set(story["path"])
297
+ out = set(path)
298
+ for field in ("conflict", "resolution"):
299
+ out |= set(story.get(field, [])) & path
300
+ return out | set(story.get("context", []))
301
+
302
+
257
303
  def _g2(
258
304
  boards: Boards, where: str, sentence: dict[str, Any], ids: list[str]
259
305
  ) -> list[Finding]: