smd-engine 0.7.2__tar.gz → 0.7.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 (293) hide show
  1. {smd_engine-0.7.2 → smd_engine-0.7.4}/CHANGELOG.md +15 -2
  2. {smd_engine-0.7.2 → smd_engine-0.7.4}/PKG-INFO +1 -1
  3. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/commands.md +1 -1
  4. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/deal-mode.md +2 -2
  5. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/profiles.md +1 -1
  6. {smd_engine-0.7.2 → smd_engine-0.7.4}/procedures/task-diff.md +1 -1
  7. {smd_engine-0.7.2 → smd_engine-0.7.4}/pyproject.toml +1 -1
  8. smd_engine-0.7.4/src/smd_engine/cli.py +361 -0
  9. smd_engine-0.7.4/src/smd_engine/cli_boards.py +477 -0
  10. smd_engine-0.7.4/src/smd_engine/cli_session.py +262 -0
  11. smd_engine-0.7.4/src/smd_engine/cli_story.py +161 -0
  12. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/deal/ledger.py +8 -2
  13. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/deal/verify.py +5 -4
  14. smd_engine-0.7.4/src/smd_engine/deal/verify_diff.py +263 -0
  15. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/deal/verify_extra.py +0 -37
  16. smd_engine-0.7.4/src/smd_engine/profile.py +224 -0
  17. smd_engine-0.7.4/src/smd_engine/profile_model.py +309 -0
  18. smd_engine-0.7.2/src/smd_engine/profile.py → smd_engine-0.7.4/src/smd_engine/profile_parse.py +36 -427
  19. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/deal_labels.py +28 -0
  20. smd_engine-0.7.4/tests/test_deal_verify_diff.py +220 -0
  21. {smd_engine-0.7.2 → smd_engine-0.7.4}/uv.lock +1 -1
  22. smd_engine-0.7.2/src/smd_engine/cli.py +0 -1168
  23. {smd_engine-0.7.2 → smd_engine-0.7.4}/.claude/agents/smd-game-technician.md +0 -0
  24. {smd_engine-0.7.2 → smd_engine-0.7.4}/.claude/agents/smd-methodologist.md +0 -0
  25. {smd_engine-0.7.2 → smd_engine-0.7.4}/.claude/agents/smd-visionary.md +0 -0
  26. {smd_engine-0.7.2 → smd_engine-0.7.4}/.claude/commands/procedure.md +0 -0
  27. {smd_engine-0.7.2 → smd_engine-0.7.4}/.flake8 +0 -0
  28. {smd_engine-0.7.2 → smd_engine-0.7.4}/.github/workflows/ci.yml +0 -0
  29. {smd_engine-0.7.2 → smd_engine-0.7.4}/.github/workflows/release.yml +0 -0
  30. {smd_engine-0.7.2 → smd_engine-0.7.4}/.gitignore +0 -0
  31. {smd_engine-0.7.2 → smd_engine-0.7.4}/.python-version +0 -0
  32. {smd_engine-0.7.2 → smd_engine-0.7.4}/CONTRIBUTING.md +0 -0
  33. {smd_engine-0.7.2 → smd_engine-0.7.4}/LICENSE +0 -0
  34. {smd_engine-0.7.2 → smd_engine-0.7.4}/README.md +0 -0
  35. {smd_engine-0.7.2 → smd_engine-0.7.4}/README_ru.md +0 -0
  36. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/bakeries-c1.board.yaml +0 -0
  37. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/bakeries-c2.board.yaml +0 -0
  38. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/deal/answers_boris.yaml +0 -0
  39. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/deal/answers_gleb.yaml +0 -0
  40. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/deal/answers_vera.yaml +0 -0
  41. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/deal/pack.yaml +0 -0
  42. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/golden/README.md +0 -0
  43. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/golden/bakeries-c2-expected.board.yaml +0 -0
  44. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/golden/s3_transcript.txt +0 -0
  45. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/patches/bakeries-c2-1.patch.yaml +0 -0
  46. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/sources.yaml +0 -0
  47. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/task/answers_ana.yaml +0 -0
  48. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/task/answers_ben.yaml +0 -0
  49. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/task/answers_cy.yaml +0 -0
  50. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/task/pack.yaml +0 -0
  51. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/task/replies_ana.yaml +0 -0
  52. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/task/replies_ben.yaml +0 -0
  53. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/task/transcript_ben.txt +0 -0
  54. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example/two-boards-c1.board.yaml +0 -0
  55. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example_ru/pekarni-c1.board.yaml +0 -0
  56. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example_ru/pekarni-c2.board.yaml +0 -0
  57. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example_ru/pekarni-oru-c1.board.yaml +0 -0
  58. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example_ru/pekarnya-holding-c1.board.yaml +0 -0
  59. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/example_ru/sources.yaml +0 -0
  60. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/spectra_coffee/README.md +0 -0
  61. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/spectra_coffee/bank.story.yaml +0 -0
  62. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/spectra_coffee/buyer.story.yaml +0 -0
  63. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/spectra_coffee/owner.story.yaml +0 -0
  64. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/spectra_coffee/sources.yaml +0 -0
  65. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/spectra_coffee/spectra-coffee-c1.board.yaml +0 -0
  66. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/spectra_coffee/successor-premortem.story.yaml +0 -0
  67. {smd_engine-0.7.2 → smd_engine-0.7.4}/cases/spectra_coffee/taxonomies.yaml +0 -0
  68. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/README.md +0 -0
  69. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/changelog-0.2-0.5.md +0 -0
  70. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/checks.md +0 -0
  71. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/data-model.md +0 -0
  72. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/first-board.md +0 -0
  73. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/glossary.md +0 -0
  74. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/hypotheses.md +0 -0
  75. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/method/README.md +0 -0
  76. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/method/encodable.md +0 -0
  77. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/method/formal-stance.md +0 -0
  78. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/method/odi-problematization.md +0 -0
  79. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/method/reconciliation.md +0 -0
  80. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/method/robustness-rules.md +0 -0
  81. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/method/roles-and-actors.md +0 -0
  82. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/method/smd-classic.md +0 -0
  83. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/method/sources.md +0 -0
  84. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/method/structural-moves.md +0 -0
  85. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/method/triz-systems.md +0 -0
  86. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/plan.md +0 -0
  87. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/red-lines.md +0 -0
  88. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/stages.md +0 -0
  89. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/stories.md +0 -0
  90. {smd_engine-0.7.2 → smd_engine-0.7.4}/docs/task-packs.md +0 -0
  91. {smd_engine-0.7.2 → smd_engine-0.7.4}/lenses/README.md +0 -0
  92. {smd_engine-0.7.2 → smd_engine-0.7.4}/lenses/beer-viable-system.md +0 -0
  93. {smd_engine-0.7.2 → smd_engine-0.7.4}/lenses/design-chain.md +0 -0
  94. {smd_engine-0.7.2 → smd_engine-0.7.4}/lenses/fliamer-diamond.md +0 -0
  95. {smd_engine-0.7.2 → smd_engine-0.7.4}/lenses/khaprov-levels.md +0 -0
  96. {smd_engine-0.7.2 → smd_engine-0.7.4}/lenses/khaprov-ontology.md +0 -0
  97. {smd_engine-0.7.2 → smd_engine-0.7.4}/lenses/scamper-check.md +0 -0
  98. {smd_engine-0.7.2 → smd_engine-0.7.4}/lenses/schukin-boundaries.md +0 -0
  99. {smd_engine-0.7.2 → smd_engine-0.7.4}/lenses/schukin-interface-tax.md +0 -0
  100. {smd_engine-0.7.2 → smd_engine-0.7.4}/lenses/three-positions.md +0 -0
  101. {smd_engine-0.7.2 → smd_engine-0.7.4}/lenses/triz-contradictions.md +0 -0
  102. {smd_engine-0.7.2 → smd_engine-0.7.4}/procedures/README.md +0 -0
  103. {smd_engine-0.7.2 → smd_engine-0.7.4}/procedures/field-result.md +0 -0
  104. {smd_engine-0.7.2 → smd_engine-0.7.4}/procedures/functional-plan.md +0 -0
  105. {smd_engine-0.7.2 → smd_engine-0.7.4}/procedures/ingest-transcript.md +0 -0
  106. {smd_engine-0.7.2 → smd_engine-0.7.4}/procedures/positional-construction.md +0 -0
  107. {smd_engine-0.7.2 → smd_engine-0.7.4}/procedures/problematization.md +0 -0
  108. {smd_engine-0.7.2 → smd_engine-0.7.4}/procedures/qualification-pass.md +0 -0
  109. {smd_engine-0.7.2 → smd_engine-0.7.4}/procedures/reflexive-protocol.md +0 -0
  110. {smd_engine-0.7.2 → smd_engine-0.7.4}/procedures/small-situation.md +0 -0
  111. {smd_engine-0.7.2 → smd_engine-0.7.4}/procedures/solo-session.md +0 -0
  112. {smd_engine-0.7.2 → smd_engine-0.7.4}/procedures/stakeholder-ontology.md +0 -0
  113. {smd_engine-0.7.2 → smd_engine-0.7.4}/procedures/story.md +0 -0
  114. {smd_engine-0.7.2 → smd_engine-0.7.4}/procedures/task-pack.md +0 -0
  115. {smd_engine-0.7.2 → smd_engine-0.7.4}/procedures/theses-to-board.md +0 -0
  116. {smd_engine-0.7.2 → smd_engine-0.7.4}/procedures/visionary-tract.md +0 -0
  117. {smd_engine-0.7.2 → smd_engine-0.7.4}/profiles/classic-two-boards.yaml +0 -0
  118. {smd_engine-0.7.2 → smd_engine-0.7.4}/profiles/management-four-boards.yaml +0 -0
  119. {smd_engine-0.7.2 → smd_engine-0.7.4}/profiles/program-three-boards.yaml +0 -0
  120. {smd_engine-0.7.2 → smd_engine-0.7.4}/roles/README.md +0 -0
  121. {smd_engine-0.7.2 → smd_engine-0.7.4}/roles/actors.md +0 -0
  122. {smd_engine-0.7.2 → smd_engine-0.7.4}/roles/game-technician.md +0 -0
  123. {smd_engine-0.7.2 → smd_engine-0.7.4}/roles/methodologist.md +0 -0
  124. {smd_engine-0.7.2 → smd_engine-0.7.4}/roles/researcher.md +0 -0
  125. {smd_engine-0.7.2 → smd_engine-0.7.4}/roles/visionary.md +0 -0
  126. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/__init__.py +0 -0
  127. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/agree.py +0 -0
  128. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/apply.py +0 -0
  129. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/compare.py +0 -0
  130. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/deal/__init__.py +0 -0
  131. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/deal/agenda_views.py +0 -0
  132. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/deal/cli.py +0 -0
  133. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/deal/consent.py +0 -0
  134. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/deal/overlap.py +0 -0
  135. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/deal/seal_cmd.py +0 -0
  136. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/deal/sealed.py +0 -0
  137. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/deal/signing.py +0 -0
  138. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/deal/verdict.py +0 -0
  139. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/deal/verdict_cmd.py +0 -0
  140. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/deal/verify_cmd.py +0 -0
  141. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/deal/verify_report.py +0 -0
  142. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/deal/views.py +0 -0
  143. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/eval.py +0 -0
  144. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/leverage.py +0 -0
  145. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/migrate.py +0 -0
  146. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/nextstep.py +0 -0
  147. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/pack.py +0 -0
  148. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/records.py +0 -0
  149. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/redline.py +0 -0
  150. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/__init__.py +0 -0
  151. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/assets/frames.css +0 -0
  152. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/assets/frames.js +0 -0
  153. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/assets/graph.css +0 -0
  154. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/assets/graph.js +0 -0
  155. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/frames.py +0 -0
  156. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/frames_page.py +0 -0
  157. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/frames_text.py +0 -0
  158. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/graph.py +0 -0
  159. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/graph_ui.py +0 -0
  160. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/html.py +0 -0
  161. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/index.py +0 -0
  162. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/layout.py +0 -0
  163. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/light.py +0 -0
  164. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/markdown.py +0 -0
  165. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/mermaid.py +0 -0
  166. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/sessionflow.py +0 -0
  167. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/svg.py +0 -0
  168. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/text.py +0 -0
  169. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/render/vault.py +0 -0
  170. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/revise.py +0 -0
  171. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/scaffold.py +0 -0
  172. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/schemas/__init__.py +0 -0
  173. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/schemas/board_patch.schema.json +0 -0
  174. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/schemas/board_set.schema.json +0 -0
  175. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/schemas/source_manifest.schema.json +0 -0
  176. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/schemas/story.schema.json +0 -0
  177. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/schemas/task_acceptance.schema.json +0 -0
  178. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/schemas/task_answers.schema.json +0 -0
  179. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/schemas/task_pack.schema.json +0 -0
  180. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/schemas/task_replies.schema.json +0 -0
  181. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/schemas/task_sealed.schema.json +0 -0
  182. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/schemas/task_verdicts.schema.json +0 -0
  183. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/schemas/taxonomies.schema.json +0 -0
  184. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/screen.py +0 -0
  185. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/sources.py +0 -0
  186. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/status.py +0 -0
  187. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/story/__init__.py +0 -0
  188. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/story/check.py +0 -0
  189. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/story/gaps.py +0 -0
  190. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/story/model.py +0 -0
  191. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/story/numbers.py +0 -0
  192. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/story/paths.py +0 -0
  193. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/story/render.py +0 -0
  194. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/__init__.py +0 -0
  195. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/acceptance.py +0 -0
  196. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/agenda.py +0 -0
  197. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/asking.py +0 -0
  198. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/assets/task.css +0 -0
  199. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/assets/task.js +0 -0
  200. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/bounds.py +0 -0
  201. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/check.py +0 -0
  202. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/cli.py +0 -0
  203. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/deal_check.py +0 -0
  204. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/deal_items.py +0 -0
  205. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/deal_render.py +0 -0
  206. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/deal_web.py +0 -0
  207. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/diff.py +0 -0
  208. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/diff_html.py +0 -0
  209. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/diff_md.py +0 -0
  210. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/labels.py +0 -0
  211. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/model.py +0 -0
  212. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/names.py +0 -0
  213. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/overwrite.py +0 -0
  214. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/pack_html.py +0 -0
  215. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/pack_md.py +0 -0
  216. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/pairs.py +0 -0
  217. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/positions.py +0 -0
  218. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/ranges.py +0 -0
  219. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/refs.py +0 -0
  220. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/svg.py +0 -0
  221. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/task/web.py +0 -0
  222. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/validate/__init__.py +0 -0
  223. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/validate/ai.py +0 -0
  224. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/validate/context.py +0 -0
  225. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/validate/graph.py +0 -0
  226. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/validate/hints.py +0 -0
  227. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/validate/hypotheses.py +0 -0
  228. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/validate/management.py +0 -0
  229. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/validate/manifest.py +0 -0
  230. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/validate/ontology.py +0 -0
  231. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/validate/redlines.py +0 -0
  232. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/validate/signoffs.py +0 -0
  233. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/validate/structure.py +0 -0
  234. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/validate/taxonomies.py +0 -0
  235. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/validate/theses.py +0 -0
  236. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/validate/tract.py +0 -0
  237. {smd_engine-0.7.2 → smd_engine-0.7.4}/src/smd_engine/verdict.py +0 -0
  238. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/conftest.py +0 -0
  239. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/deal_helpers.py +0 -0
  240. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/story_helpers.py +0 -0
  241. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_action_program.py +0 -0
  242. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_agree.py +0 -0
  243. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_ai_roles.py +0 -0
  244. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_apply.py +0 -0
  245. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_beer_layer.py +0 -0
  246. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_beer_render.py +0 -0
  247. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_compare.py +0 -0
  248. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_deal_acceptance.py +0 -0
  249. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_deal_added.py +0 -0
  250. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_deal_agenda_leaks.py +0 -0
  251. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_deal_bindings.py +0 -0
  252. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_deal_golden.py +0 -0
  253. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_deal_items.py +0 -0
  254. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_deal_positions.py +0 -0
  255. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_deal_ranges.py +0 -0
  256. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_deal_sealed.py +0 -0
  257. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_deal_signed.py +0 -0
  258. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_deal_verdict.py +0 -0
  259. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_deal_verify.py +0 -0
  260. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_deal_verify_forged.py +0 -0
  261. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_deal_views.py +0 -0
  262. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_eval.py +0 -0
  263. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_export.py +0 -0
  264. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_frames.py +0 -0
  265. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_graph.py +0 -0
  266. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_hypothesis_standard.py +0 -0
  267. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_ingestion.py +0 -0
  268. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_lenses.py +0 -0
  269. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_management.py +0 -0
  270. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_migrate.py +0 -0
  271. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_nextstep.py +0 -0
  272. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_ontology_continuum.py +0 -0
  273. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_procedure_checks.py +0 -0
  274. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_procedures.py +0 -0
  275. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_profile.py +0 -0
  276. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_publish.py +0 -0
  277. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_record_boards.py +0 -0
  278. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_red_lines.py +0 -0
  279. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_render_and_cli.py +0 -0
  280. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_render_carries.py +0 -0
  281. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_render_fields.py +0 -0
  282. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_render_ru_pages.py +0 -0
  283. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_render_ru_values.py +0 -0
  284. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_revise.py +0 -0
  285. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_robustness.py +0 -0
  286. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_scaffold.py +0 -0
  287. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_status.py +0 -0
  288. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_story_case.py +0 -0
  289. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_story_check.py +0 -0
  290. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_story_numbers.py +0 -0
  291. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_story_paths.py +0 -0
  292. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_task.py +0 -0
  293. {smd_engine-0.7.2 → smd_engine-0.7.4}/tests/test_validate.py +0 -0
@@ -2,11 +2,24 @@
2
2
 
3
3
  Dates are those of the tag. All tags v0.2.1 to v0.3.5 were made on 2026-10-29. The version in `pyproject.toml` stayed at 0.2.0 through v0.2.4 and at 0.3.0 from v0.3.0 to v0.3.5; 0.3.6 is the first release whose package version equals its tag.
4
4
 
5
- ## Unreleased
5
+ ## 0.7.4 - 2026-11-03
6
+
7
+ `smd deal verify --diff` no longer trusts the diff's own list of answers files when a counted run follows its head, and `cli.py` and `profile.py` are split (release go dz03#l=31). Schema 0.1 stays; no file format changes, and every 0.7.3 pack, answers file, ledger and diff still loads.
8
+
9
+ - Code layout, no change in behaviour (the case owner, dz03#l=7): `cli.py` (1168 lines) keeps the parser and `main`; the commands moved to `cli_boards.py`, `cli_session.py` and `cli_story.py`. `profile.py` (941 lines) keeps loading; the constants and classes moved to `profile_model.py` and the parsing to `profile_parse.py`. Every name stays importable from `smd_engine.profile`, and `smd = smd_engine.cli:main` is unchanged.
10
+ - `smd deal verify --diff` no longer trusts the diff's own `answers_files` when the ledger has a counted run after the diff's head (two findings of the automated security review of 0.7.3: a holder could point the head before the run and drop or make up a committer's answers sha, and the point read `ok`). Such a run fails the diff unless a file given with `--answers`, signed by the party, shows the diff read other answers than the run (`diff_later_run`); for a committer whose files are given, the file the diff names must be one of them (`diff_answers_file`). A party who checks an older diff gives the answers files it names. Tests: `tests/test_deal_verify_diff.py`.
11
+
12
+ ## 0.7.3 - 2026-11-03
13
+
14
+ `smd deal verify --diff` now catches a holder who hides a logged verdict from the parties' diff (the case owner, dz02#l=79; release go dz03#l=7). Schema 0.1 stays; no file format changes, and every 0.7.2 pack, answers file, ledger and diff still loads.
15
+
16
+ - Changelog: the 0.7.2 entry cites the case owner's go as dz02#l=71 (it said #l=69, a line that is the heading of that message).
17
+ - `smd deal verify --diff` checks a sealed point shown `not_tested` against the ledger (the case owner, dz02#l=79). Before, a point shown `not_tested` with any `changed_since_run` passed, so a holder could hide a logged verdict from the parties' diff. Now, over a counted run, each member named in `changed_since_run` must commit a side of the topic, the answers file the diff read for him (`answers_files`) must not be the one the run recorded, and, when that file is given with `--answers`, its commitment must differ from the one the run used; without the file the line is `skipped`, and with that member's files given but none of them the one the diff names it fails. A counted run logged after the diff's head (or at all, with no head) on the very answers files the diff read fails the diff, so an old or removed head cannot hide a verdict either. A view must name a position of the pack. Every bound item the diff (or view) should show must be there as one sealed point of its topic and side, and the sealed points must name one ledger head or none. New check codes `diff_missing`, `diff_not_bound`, `diff_point_shape`, `diff_head_mixed`, `diff_changed_who`, `diff_changed_same`, `diff_changed_nofile`, `diff_changed_ok`, `diff_changed_file`, `diff_stale`, `diff_view`, `diff_view_bad` (labels in English and Russian); `ledger.last_run`. The diff checks moved to `src/smd_engine/deal/verify_diff.py`. Tests: `tests/test_deal_verify_diff.py`.
18
+ - `procedures/task-diff.md`: the example model-pass line names `task-diff 0.2.1`, the procedure's version.
6
19
 
7
20
  ## 0.7.2 - 2026-11-02
8
21
 
9
- The sealed floor audited and bound to the pack text (the case owner, dz02#l=69). Schema 0.1 stays; every new field is optional, and 0.7.0 and 0.7.1 packs, answers, consent files and ledgers still load (old entries are reported `unbound`). Packs without positions give the same bytes as before.
22
+ The sealed floor audited and bound to the pack text (the case owner, dz02#l=71). Schema 0.1 stays; every new field is optional, and 0.7.0 and 0.7.1 packs, answers, consent files and ledgers still load (old entries are reported `unbound`). Packs without positions give the same bytes as before.
10
23
 
11
24
  - `smd deal verify pack.yaml --ledger verdicts.yaml [--answers ...] [--sealed dir] [--diff diff.yaml] [--json]`: an audit of the ledger any party can run (`src/smd_engine/deal/verify.py`, `verify_extra.py`, `verify_report.py`, `verify_cmd.py`). It checks the chain and head; each consent entry (signature over its stored text with the member's key, hash, bindings to the deal, topic, run, buyer, core sha256 and key list); each counted verdict (the consents it names are earlier, valid, current, for the same topic, run and buyer, with its commitments; seller, and buyer for a second run; run number and cap of two; answers sha256 against the files given, their signatures and commitments); with `--sealed` the outcome recomputed from the sealed files (signatures checked, no number printed); with `--diff` its head and verdicts. Lines are `ok`, `FAIL` or `unbound (old entry)` (labels in English and Russian, `VERIFY_LABELS` in `deal_labels.py`); exit 1 on a `FAIL` or an `unbound` entry (fail closed; `--allow-unbound` for a ledger known to be old); the last line says "all checks passed" only when nothing is `unbound` (else "no check failed, but not fully verified"), and `--json` has `complete`. A counted verdict whose `consents` list is empty is a `FAIL` (the consents it needs are not among them). A counted verdict whose `answers` lack the floor or the ceiling party, or name a non-member, is a `FAIL`. Entries from before 0.7.2 are `unbound`; after the first 0.7.2 entry a later one without the new fields is `FAIL`. `consent.binding_code` is new (the codes behind `binding_problem`). Tests: `tests/test_deal_verify.py`, `tests/test_deal_verify_forged.py` (an empty `consents` list, replaced or replayed inputs, `--allow-unbound`).
12
25
  - Bindings of the sealed floor (packs with `deal.sealed_floor: true`; schema 0.1, new fields optional). The `task_consent` file names `pack.sha256` (the core sha256) and `keys` (`key_list_sha` in `signing.py`: sha256 of the sorted `<member> <key>` lines); `smd deal consent` and `smd deal verdict` refuse a consent whose values differ from the pack, and a 0.7.1 consent without them (re-sign; it stays readable in an old ledger and a verdict does not count it). The answers files of members with an `ssh_key` are signed (`answers_<member>.yaml.sig`, namespace `smd-deal`); `smd deal verdict` refuses an unsigned or badly signed one, `smd task diff` only warns. The verdict entry records `answers: {member: sha256}` and, when counted, `consents: [entry sha256, ...]` (schema `task_verdicts`; the chain covers them, older entries without them still verify). A swapped-back older answers file is caught by the signed consents (`commitment_changed`) and its sha256 is on record. Packs without positions give the same bytes as before. Tests: `tests/test_deal_bindings.py`.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: smd-engine
3
- Version: 0.7.2
3
+ Version: 0.7.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
@@ -38,7 +38,7 @@ uv run smd deal views cases/example/deal/pack.yaml out/diff/diff.yaml -o out/vie
38
38
  uv run smd deal seal cases/example/deal/pack.yaml price-floor -o ~/sealed # deal pack: seal a number for a bound item on your own machine; asks for the number unseen (or --value), writes sealed_<member>_<item>.yaml (private, outside every repo) and prints the commitment to put in your answers file; the number and the salt are never printed; with `--key <private key>` it also signs the file with ssh-keygen (`<file>.sig`), else it prints the command to run; docs/task-packs.md
39
39
  uv run smd deal verdict cases/example/deal/pack.yaml price --answers answers_vera.yaml answers_boris.yaml --floor sealed_vera_price-floor.yaml --ceiling sealed_boris_price-ceiling.yaml --ledger verdicts.yaml # the holder (--new for the first entry of a ledger when no consent started it): compare a sealed floor and ceiling (holder.method, local-v1) and append met, not_met or not_tested to the hash-chained ledger; prints the verdict in the pack language and never a number; every run needs the seller's consent naming the buyer, a second also the buyer's, two runs at most; with deal.sealed_floor it verifies the signatures of the counted consents (bound to the pack's core sha256 and key list), of the answers files of key holders (`<file>.sig`) and of the sealed files (`--floor-sig`, `--ceiling-sig`) and refuses the run if one is missing or bad, and the entry records `answers` and `consents`; docs/task-packs.md
40
40
  uv run smd deal consent cases/example/deal/pack.yaml price --member vera --evidence consent_vera.yaml --ledger verdicts.yaml --new # log one party consent to the next run: his task_consent file (this deal, topic, run, member, buyer and the two commitments); the seller's for every run (the first consent of a deal takes --new), the buyer's too for a second run; with deal.sealed_floor the file needs his SSH signature (`--signature`, default `<evidence>.sig`), kept in the entry
41
- uv run smd deal verify cases/example/deal/pack.yaml --ledger verdicts.yaml --answers answers_vera.yaml answers_boris.yaml answers_gleb.yaml --sealed safe/ --diff out/diff.yaml # audit a ledger (any party; exit 1 on a FAIL, else 0): chain and head; each consent's signature, hash, bindings (this deal, topic, run, buyer, core sha256, key list); each counted verdict's consents (earlier, valid, current, seller and for a second run buyer), run number and cap, recorded answers sha256 against the files given; with --sealed (the holder's folder of sealed files and .sig) the outcome is recomputed, no number printed; with --diff its head and verdicts; entries from before 0.7.2 read unbound (the last line then says not fully verified, and the exit is 1 unless --allow-unbound); a counted verdict that names no consents (consents: []) is a FAIL; --json for a report; docs/deal-mode.md
41
+ uv run smd deal verify cases/example/deal/pack.yaml --ledger verdicts.yaml --answers answers_vera.yaml answers_boris.yaml answers_gleb.yaml --sealed safe/ --diff out/diff.yaml # audit a ledger (any party; exit 1 on a FAIL, else 0): chain and head; each consent's signature, hash, bindings (this deal, topic, run, buyer, core sha256, key list); each counted verdict's consents (earlier, valid, current, seller and for a second run buyer), run number and cap, recorded answers sha256 against the files given; with --sealed (the holder's folder of sealed files and .sig) the outcome is recomputed, no number printed; with --diff its head and verdicts, every sealed point present, and a not_tested point over a counted run only when the answers show the commitment changed; entries from before 0.7.2 read unbound (the last line then says not fully verified, and the exit is 1 unless --allow-unbound); a counted verdict that names no consents (consents: []) is a FAIL; --json for a report; docs/deal-mode.md
42
42
  uv run smd sources cases/example/sources.yaml --clean-room --deny-lineage earlier-concept
43
43
  uv run smd sources path/to/sources.yaml --folder /local/folder
44
44
  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
@@ -137,10 +137,10 @@ Still open:
137
137
  - **Each consent entry.** The signed text hashes to `evidence`; its signature is the member's, made with the key the pack lists, namespace `smd-deal`; the text names this deal, pack id, topic, run, member and buyer, and the commitments of the entry; its `pack.sha256` and `keys` are the pack's. The member is a party to the topic, the buyer is the one who commits the ceiling, and the seller alone consents to the first run.
138
138
  - **Each counted verdict entry.** The run is the next counted run of the topic and at most two (a `not_tested` entry is not counted). The consents it names (`consents`) are consent entries earlier in the chain, valid by the rule above, for the same topic, run and buyer, with the commitments the verdict recorded, each the latest of its member before the verdict; the seller consented, and for a second run the buyer too (a verdict that names no consents, `consents: []`, is `FAIL` for the same reason: the consents it needs are not among them). The answers sha256 it recorded (`answers`) is matched to the files given with `--answers`: each file is for this text of the pack and signed by its member, and the commitment in it is the one the run used. A recorded file that is not among those given is `FAIL` only for the latest run that read that member's answers, since an earlier run may have read a version nobody passed; for the rest it is `skipped`.
139
139
  - **`--sealed`, the holder's check.** The folder holds the sealed files and their `.sig`. Each is found by its commitment, checked against the pack (deal, pack core sha256, member, item, side, unit) and its signature, and the comparison of the method the entry names is run again in memory; a result other than the logged one is `FAIL`. A run whose sealed file is not in the folder is `skipped`. No number, salt or gap is ever printed; the report says only `met` or `not_met`. Without `--sealed` the step is skipped and the report says so.
140
- - **`--diff`.** The diff is for this text of the pack; its `ledger_head` is an entry of the ledger, and each sealed point's `verdict` is the one the ledger had at that entry (`not_tested` is also right when the point carries `changed_since_run`). A diff made earlier, before more entries were added, still passes.
140
+ - **`--diff`.** The diff (or a position's view of it) is for this text of the pack. Every bound item it should show (all of them, or for a view those of the position's audience) is there as one sealed point of the item's topic and side; a point left out, shown twice or stripped of its `sealed` block is `FAIL`. Its sealed points name one `ledger_head`, an entry of the ledger, or none (a diff made without the ledger: `not_tested` points are `skipped`, any other verdict is `FAIL`); a mix is `FAIL`. Each sealed point's `verdict` is the one the ledger had at that entry. A point shown `not_tested` over a counted run must carry `changed_since_run`, and the claim is checked: each member it names commits a side of the topic; the answers file the diff read for him (`answers_files`) is not the one the run recorded; and when that file is given with `--answers`, its commitment differs from the one the run used. Without the file the line is `skipped`, not `ok`: give the answers files the diff names to check it; files of that member given, none of them the one the diff names, is `FAIL`. For a committer whose answers files are given, the file the diff names must be one of them (the diff's `answers_files` is the holder's word; the files are signed by the parties). A counted run logged after the diff's head (or at all, for a diff with no head) that read the same answers files of both committers as the diff is `FAIL`: the diff does not show a verdict on its own answers. Any other later counted run is `FAIL` as well unless a file given with `--answers` shows that the diff read other answers than the run did; so an old or removed head cannot hide a verdict, and a party who checks an older diff gives the answers files it names (with the later ones). A view must name a position of the pack, and the report says which. Otherwise a diff made earlier, before more entries were added, still passes. (0.7.3 and 0.7.4; before them a holder could show a logged verdict as `not_tested` with any `changed_since_run`, point the head before the run, or leave a sealed point out, and `--diff` passed.)
141
141
  - **Entries from before 0.7.2** (an unsigned or unbound consent, a verdict that names no consents or answers) cannot be checked in full and are `unbound`; for a verdict the engine still looks for the earlier consent entries it needed. Once any entry has the 0.7.2 fields, a later entry without them is `FAIL`: the engine always writes them, so such an entry was written by hand. (A 0.7.1 holder program that keeps adding to a ledger a 0.7.2 program has begun is therefore also `FAIL`.)
142
142
 
143
- What it cannot show: an operator who writes a whole ledger of the old kind, with no signed bound consent in it, or who rewrites the entries before the first 0.7.2 entry into the old kind, gets those lines `unbound`, the summary "not fully verified" and exit 1; only `--allow-unbound`, which a party gives for a ledger he knows to be old, turns that into exit 0. The comparison of two numbers is verified only by someone with the sealed files. A ledger that is a consistent forgery from its first entry is caught only by a party who kept a diff or the head. Code: `src/smd_engine/deal/verify.py`, `verify_extra.py`, `verify_report.py`, `verify_cmd.py`; tests: `tests/test_deal_verify.py`.
143
+ What it cannot show: an operator who writes a whole ledger of the old kind, with no signed bound consent in it, or who rewrites the entries before the first 0.7.2 entry into the old kind, gets those lines `unbound`, the summary "not fully verified" and exit 1; only `--allow-unbound`, which a party gives for a ledger he knows to be old, turns that into exit 0. The comparison of two numbers is verified only by someone with the sealed files. A ledger that is a consistent forgery from its first entry is caught only by a party who kept a diff or the head. Code: `src/smd_engine/deal/verify.py`, `verify_extra.py`, `verify_diff.py`, `verify_report.py`, `verify_cmd.py`; tests: `tests/test_deal_verify.py`, `tests/test_deal_verify_forged.py`, `tests/test_deal_verify_diff.py`.
144
144
 
145
145
  ## Holder and model consent
146
146
 
@@ -1,6 +1,6 @@
1
1
  # Profiles: boards, kinds and the screen as data
2
2
 
3
- A profile is one YAML file that sets what a record may hold and how the engine draws it: the boards and where they stand on the screen, the kinds of elements, the relation kinds, the hints, the groups `smd compare` matches, the reading order of `smd frames` and the SessionFlow picks. `src/smd_engine/profile.py` loads it. What a record does with its profile (the `profile` key, the two shipped profiles, the fixed ids) is in `docs/data-model.md`, section Profiles.
3
+ A profile is one YAML file that sets what a record may hold and how the engine draws it: the boards and where they stand on the screen, the kinds of elements, the relation kinds, the hints, the groups `smd compare` matches, the reading order of `smd frames` and the SessionFlow picks. `src/smd_engine/profile.py` loads it (`profile_parse.py` checks it, `profile_model.py` holds the classes). What a record does with its profile (the `profile` key, the two shipped profiles, the fixed ids) is in `docs/data-model.md`, section Profiles.
4
4
 
5
5
  ## Where profile files live
6
6
 
@@ -92,7 +92,7 @@ Set `route` from the table; `smd task agenda` reads it.
92
92
  Edit `diff.yaml` in place. For each point you changed: `class`, `subtype` where it applies, `route`, `class_by: model`, and `rationale`. Add at the top level:
93
93
 
94
94
  ```yaml
95
- model_pass: {voice: ai, status: AI draft, procedure: task-diff 0.2.0, model: <model name>, date: <date>}
95
+ model_pass: {voice: ai, status: AI draft, procedure: task-diff 0.2.1, model: <model name>, date: <date>}
96
96
  ```
97
97
 
98
98
  Do not change `answers`, `silent`, `sets`, `alpha`, `labels` or `pack`. Then render again; the replies refer to the sha256 of this file:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "smd-engine"
3
- version = "0.7.2"
3
+ version = "0.7.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"
@@ -0,0 +1,361 @@
1
+ """Command line: smd new | validate | migrate | render | frames | graph | index | publish
2
+ | vault | sources | compare | eval | agree | pack | revise | apply | status | next
3
+ | story paths | story check | story render | task check | task render | task diff
4
+ | task agenda | deal views."""
5
+
6
+ from __future__ import annotations
7
+
8
+ import argparse
9
+ import sys
10
+ from pathlib import Path
11
+
12
+ from smd_engine.agree import FIELDS
13
+ from smd_engine.cli_boards import (
14
+ RENDERERS,
15
+ cmd_apply,
16
+ cmd_compare,
17
+ cmd_eval,
18
+ cmd_frames,
19
+ cmd_graph,
20
+ cmd_index,
21
+ cmd_migrate,
22
+ cmd_render,
23
+ cmd_sources,
24
+ cmd_validate,
25
+ )
26
+ from smd_engine.cli_session import (
27
+ cmd_agree,
28
+ cmd_new,
29
+ cmd_next,
30
+ cmd_pack,
31
+ cmd_publish,
32
+ cmd_revise,
33
+ cmd_status,
34
+ cmd_vault,
35
+ )
36
+ from smd_engine.cli_story import (
37
+ _story_sources,
38
+ cmd_story_check,
39
+ cmd_story_paths,
40
+ cmd_story_render,
41
+ )
42
+ from smd_engine.deal.cli import add_deal_parser
43
+ from smd_engine.profile import DEFAULT_PROFILE
44
+ from smd_engine.records import RecordError
45
+ from smd_engine.task.cli import add_task_parser
46
+
47
+
48
+ def build_parser() -> argparse.ArgumentParser:
49
+ parser = argparse.ArgumentParser(prog="smd", description=__doc__)
50
+ sub = parser.add_subparsers(dest="command", required=True)
51
+
52
+ nw = sub.add_parser(
53
+ "new", help="scaffold a case folder: a first record, a manifest and a README"
54
+ )
55
+ nw.add_argument("folder", help="the case folder (made if missing)")
56
+ nw.add_argument(
57
+ "--profile", default=DEFAULT_PROFILE, help="profile id (default: %(default)s)"
58
+ )
59
+ nw.add_argument("--lang", choices=["ru", "en"], default="ru")
60
+ nw.add_argument("--case", help="case id (default: made from the folder name)")
61
+ nw.add_argument("--title", help="title of the first record")
62
+ nw.set_defaults(func=cmd_new)
63
+
64
+ v = sub.add_parser("validate", help="check records (files or directories)")
65
+ v.add_argument("paths", nargs="+")
66
+ v.add_argument("--sources", type=Path, help="source manifest for citation checks")
67
+ v.add_argument("--hints", action="store_true", help="show methodological hints")
68
+ v.add_argument("--strict", action="store_true", help="fail on warnings")
69
+ v.add_argument(
70
+ "--taxonomies",
71
+ type=Path,
72
+ help="taxonomy file for the checks of tags and bound detail columns",
73
+ )
74
+ v.set_defaults(func=cmd_validate)
75
+
76
+ mg = sub.add_parser(
77
+ "migrate", help="rewrite records to the current schema (files or directories)"
78
+ )
79
+ mg.add_argument("paths", nargs="+")
80
+ mg.add_argument(
81
+ "--write", action="store_true", help="write the files; otherwise only report"
82
+ )
83
+ mg.set_defaults(func=cmd_migrate)
84
+
85
+ r = sub.add_parser("render", help="draw a board set")
86
+ r.add_argument("file")
87
+ r.add_argument("--format", choices=sorted(RENDERERS), default="svg")
88
+ r.add_argument("--lang", choices=["ru", "en"], default="ru")
89
+ r.add_argument(
90
+ "--light",
91
+ action="store_true",
92
+ help="lighter screen: facts, signals, notes, candidate moves and refers links off",
93
+ )
94
+ r.add_argument("-o", "--output")
95
+ r.set_defaults(func=cmd_render)
96
+
97
+ fr = sub.add_parser(
98
+ "frames", help="step-by-step frames of a screen, as one HTML page"
99
+ )
100
+ fr.add_argument("files", nargs="+", help="one record, or a chain for --by cycle")
101
+ fr.add_argument("--by", choices=["reading", "cycle"], default="reading")
102
+ fr.add_argument("--lang", choices=["ru", "en"], default="ru")
103
+ fr.add_argument(
104
+ "--light",
105
+ action="store_true",
106
+ help="lighter screen: facts, signals, notes, candidate moves and refers links off",
107
+ )
108
+ fr.add_argument(
109
+ "--zoom",
110
+ action="store_true",
111
+ help="each reading step cut to its board; transitions, K, the full screen "
112
+ "and cycles folded to their skeleton with counters",
113
+ )
114
+ fr.add_argument("--notes", help="Markdown texts per frame (## <frame id> sections)")
115
+ fr.add_argument(
116
+ "--write-notes",
117
+ action="store_true",
118
+ help="write the notes file: texts kept from it, the rest drafted",
119
+ )
120
+ fr.add_argument("-o", "--output")
121
+ fr.set_defaults(func=cmd_frames)
122
+
123
+ s = sub.add_parser(
124
+ "sources", help="list a source manifest, check files, clean-room split"
125
+ )
126
+ s.add_argument("manifest")
127
+ s.add_argument(
128
+ "--folder", help="local folder holding the files; checks presence and sha256"
129
+ )
130
+ s.add_argument(
131
+ "--refresh",
132
+ nargs="*",
133
+ metavar="ID",
134
+ help="with --folder: recompute sha256 of the named sources (default: every "
135
+ "decision_log) and rewrite the manifest",
136
+ )
137
+ s.add_argument("--clean-room", action="store_true")
138
+ s.add_argument(
139
+ "--deny-lineage", nargs="*", default=[], help="lineage tags to exclude"
140
+ )
141
+ s.set_defaults(func=cmd_sources)
142
+
143
+ c = sub.add_parser(
144
+ "compare", help="compare two board sets element by element; propose a merge"
145
+ )
146
+ c.add_argument("a", help="board set A, e.g. the clean-room version")
147
+ c.add_argument("b", help="board set B, the base of a merge")
148
+ c.add_argument("-o", "--output", help="write the Markdown report here")
149
+ c.add_argument(
150
+ "--merge", help="write a merge proposal (a new cycle on top of B) here"
151
+ )
152
+ c.set_defaults(func=cmd_compare)
153
+
154
+ ev = sub.add_parser(
155
+ "eval", help="compare a procedure run with an expected record; exit 1 on a miss"
156
+ )
157
+ ev.add_argument("run", help="the board set a procedure run produced")
158
+ ev.add_argument("expected", help="the board set the run should have produced")
159
+ ev.add_argument("--min-agreement", type=int, help="fail below this many agreements")
160
+ ev.add_argument(
161
+ "--max-only-expected",
162
+ type=int,
163
+ help="fail above this many elements only the expected record has",
164
+ )
165
+ ev.set_defaults(func=cmd_eval)
166
+
167
+ ag = sub.add_parser(
168
+ "agree", help="how stable are the labels across N runs of one procedure"
169
+ )
170
+ ag.add_argument("records", nargs="+", help="N board sets, runs of one procedure")
171
+ ag.add_argument(
172
+ "--fields",
173
+ help=f"comma-separated label fields (default: all of {', '.join(FIELDS)})",
174
+ )
175
+ ag.add_argument("--json", action="store_true", help="print JSON, not text")
176
+ ag.set_defaults(func=cmd_agree)
177
+
178
+ pk = sub.add_parser(
179
+ "pack", help="one Markdown file with a procedure and its context, for any model"
180
+ )
181
+ pk.add_argument("procedure", help="procedure id, e.g. solo-session")
182
+ pk.add_argument("records", nargs="*", help="record files to include as data")
183
+ pk.add_argument("--sources", help="the case's source manifest, included as data")
184
+ pk.add_argument("--taxonomies", help="the case's taxonomy file, included as data")
185
+ pk.add_argument("-o", "--output")
186
+ pk.set_defaults(func=cmd_pack)
187
+
188
+ rv = sub.add_parser(
189
+ "revise", help="open the next cycle of a board set and apply sign-offs"
190
+ )
191
+ rv.add_argument("previous", help="the board set this cycle revises")
192
+ rv.add_argument("--id", help="id of the new cycle (default: trailing number + 1)")
193
+ rv.add_argument("--date", help="date of the new cycle (default: today)")
194
+ rv.add_argument(
195
+ "--decisions",
196
+ help="YAML with signoffs, reflected_from and difficulty to apply",
197
+ )
198
+ rv.add_argument("-o", "--output")
199
+ rv.set_defaults(func=cmd_revise)
200
+
201
+ ap = sub.add_parser(
202
+ "apply", help="apply a board patch: the next sub-version of the same cycle"
203
+ )
204
+ ap.add_argument("board", help="the board set the patch applies to")
205
+ ap.add_argument("patch", help="the board_patch record")
206
+ ap.add_argument("-o", "--output", required=True, help="the new board set")
207
+ ap.add_argument(
208
+ "--sources", type=Path, help="source manifest: added sources and cites checked"
209
+ )
210
+ ap.add_argument(
211
+ "--force", action="store_true", help="write the result even when it has errors"
212
+ )
213
+ ap.add_argument("--taxonomies", type=Path, help="taxonomy file, as in validate")
214
+ ap.set_defaults(func=cmd_apply)
215
+
216
+ g = sub.add_parser(
217
+ "graph", help="the board set as a 3D graph: one self-contained HTML page"
218
+ )
219
+ g.add_argument("file")
220
+ g.add_argument("--lang", choices=["ru", "en"], default="ru")
221
+ g.add_argument("--sources", help="source manifest: titles for the source layer")
222
+ g.add_argument("-o", "--output")
223
+ g.set_defaults(func=cmd_graph)
224
+
225
+ ix = sub.add_parser(
226
+ "index",
227
+ help="every K, thesis, hypothesis, O, sign-off and element with its YAML line",
228
+ )
229
+ ix.add_argument("file")
230
+ ix.add_argument("--lang", choices=["ru", "en"], default="ru")
231
+ ix.add_argument("--sources", help="source manifest: titles of the cited sources")
232
+ ix.add_argument(
233
+ "--archive",
234
+ help="folder holding the source files: cites link to a file found there",
235
+ )
236
+ ix.add_argument("-o", "--output")
237
+ ix.set_defaults(func=cmd_index)
238
+
239
+ pb = sub.add_parser(
240
+ "publish",
241
+ help="validate, then write everything a board sends out: frames, cycle "
242
+ "frames, index, graph, page",
243
+ )
244
+ pb.add_argument("board")
245
+ pb.add_argument("--out", required=True, help="folder for the bundle")
246
+ pb.add_argument("--sources", help="source manifest")
247
+ pb.add_argument("--lang", choices=["ru", "en"], default="ru")
248
+ pb.add_argument("--light", action="store_true", help="as in frames and render")
249
+ pb.add_argument("--zoom", action="store_true", help="as in frames")
250
+ pb.add_argument("--notes", help="Markdown texts per frame, as in frames")
251
+ pb.add_argument("--archive", help="folder with source files, as in index")
252
+ pb.add_argument(
253
+ "--strict",
254
+ action="store_true",
255
+ help="fail on warnings of the record; those of earlier cycles are reported",
256
+ )
257
+ pb.add_argument("--taxonomies", type=Path, help="taxonomy file, as in validate")
258
+ pb.set_defaults(func=cmd_publish)
259
+
260
+ vt = sub.add_parser(
261
+ "vault",
262
+ help="the board set as an Obsidian vault (notes, canvas, graph colours)",
263
+ )
264
+ vt.add_argument("file")
265
+ vt.add_argument("out", help="vault folder (created if missing)")
266
+ vt.add_argument("--lang", choices=["ru", "en"], default="ru")
267
+ vt.add_argument("--sources", help="source manifest: titles and links for sources")
268
+ vt.set_defaults(func=cmd_vault)
269
+
270
+ st = sub.add_parser(
271
+ "status",
272
+ help="the core view of a board set on one page: open K, hypotheses, "
273
+ "waiting sign-offs, transitions, counts",
274
+ )
275
+ st.add_argument("file")
276
+ st.add_argument("--lang", choices=["ru", "en"], default="ru")
277
+ st.add_argument("-o", "--output", help="write the Markdown here")
278
+ st.set_defaults(func=cmd_status)
279
+
280
+ nx = sub.add_parser(
281
+ "next", help="the procedure to run next on a board set, by a rule table"
282
+ )
283
+ nx.add_argument("file")
284
+ nx.set_defaults(func=cmd_next)
285
+
286
+ sy = sub.add_parser(
287
+ "story",
288
+ help="stories as a checked view over boards: walks (paths) and rules (check)",
289
+ )
290
+ sysub = sy.add_subparsers(dest="story_command", required=True)
291
+ sp = sysub.add_parser(
292
+ "paths",
293
+ help="walks from a protagonist through a conflict to a resolution, "
294
+ "typed links only; --gaps lists where none exists",
295
+ )
296
+ sp.add_argument("boards", nargs="+", help="board sets of one case")
297
+ sp.add_argument("--audience", action="append", required=True, metavar="ID")
298
+ sp.add_argument(
299
+ "--protagonist",
300
+ action="append",
301
+ metavar="ID",
302
+ help="one for each --audience (default: the audience itself)",
303
+ )
304
+ sp.add_argument(
305
+ "--form", choices=["scqa", "premortem", "scenarios"], default="scqa"
306
+ )
307
+ sp.add_argument(
308
+ "--allow-refers",
309
+ action="store_true",
310
+ help="also walk weak (refers) links, marked ~",
311
+ )
312
+ _story_sources(sp)
313
+ sp.add_argument("--limit", type=int, default=5, help="walks shown (default 5)")
314
+ sp.add_argument(
315
+ "--gaps",
316
+ action="store_true",
317
+ help="where no typed walk exists and the links that would make one",
318
+ )
319
+ sp.add_argument(
320
+ "--yaml", action="store_true", help="story skeletons (or gap reports) as YAML"
321
+ )
322
+ sp.set_defaults(func=cmd_story_paths)
323
+ sc = sysub.add_parser(
324
+ "check", help="hold a story file to rules G1-G7 against its boards"
325
+ )
326
+ sc.add_argument("story")
327
+ sc.add_argument("--boards", nargs="+", required=True, help="board sets it reads")
328
+ _story_sources(sc)
329
+ sc.set_defaults(func=cmd_story_check)
330
+ sr = sysub.add_parser(
331
+ "render", help="a story as readable Markdown: sentences with their board ids"
332
+ )
333
+ sr.add_argument("story")
334
+ sr.add_argument("--md", action="store_true", required=True, help="Markdown")
335
+ sr.add_argument(
336
+ "--boards",
337
+ nargs="+",
338
+ default=[],
339
+ help="board sets it reads: the open questions then show what they assume",
340
+ )
341
+ _story_sources(sr)
342
+ sr.add_argument("--lang", choices=["ru", "en"], default="ru")
343
+ sr.add_argument("-o", "--output")
344
+ sr.set_defaults(func=cmd_story_render)
345
+ add_task_parser(sub)
346
+ add_deal_parser(sub)
347
+ return parser
348
+
349
+
350
+ def main(argv: list[str] | None = None) -> int:
351
+ args = build_parser().parse_args(argv)
352
+ try:
353
+ code: int = args.func(args)
354
+ except RecordError as exc:
355
+ print(exc, file=sys.stderr)
356
+ return 2
357
+ return code
358
+
359
+
360
+ if __name__ == "__main__": # pragma: no cover
361
+ sys.exit(main())