context-rail 3.3.0__tar.gz → 3.3.1__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 (265) hide show
  1. {context_rail-3.3.0/src/context_rail.egg-info → context_rail-3.3.1}/PKG-INFO +5 -4
  2. {context_rail-3.3.0 → context_rail-3.3.1}/README.md +4 -3
  3. {context_rail-3.3.0 → context_rail-3.3.1}/pyproject.toml +1 -1
  4. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/__init__.py +1 -1
  5. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/cli.py +6 -0
  6. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/context/operating.py +1 -1
  7. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/context/recipes.py +23 -5
  8. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/context/surface.py +1 -1
  9. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/doctor/checks.py +2 -2
  10. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/gateway.py +6 -3
  11. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/actions.py +1 -1
  12. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/adapters.py +1 -1
  13. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/codegraph.py +20 -2
  14. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/cto.py +2 -1
  15. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/dispatch/implementer.py +3 -0
  16. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/dispatch/records.py +2 -1
  17. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/docs.py +2 -2
  18. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/init.py +9 -2
  19. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/maintenance.py +1 -1
  20. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/onboarding.py +78 -18
  21. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/onboarding_pipeline.py +35 -2
  22. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/reports.py +20 -1
  23. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/views.py +8 -2
  24. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/mcp_server.py +2 -0
  25. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/tools.py +8 -1
  26. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/kernel/triage.py +13 -0
  27. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/profiles/cto.md +41 -41
  28. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/profiles/implementer.md +34 -34
  29. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/profiles/reviewer.md +31 -31
  30. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/profiles/cto.md +42 -42
  31. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/profiles/implementer.md +36 -36
  32. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/profiles/reviewer.md +31 -31
  33. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/profiles/cto.md +42 -42
  34. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/profiles/implementer.md +35 -35
  35. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/profiles/reviewer.md +31 -31
  36. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/profiles/cto.md +49 -49
  37. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/profiles/implementer.md +36 -36
  38. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/profiles/reviewer.md +33 -33
  39. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/profiles/cto.md +42 -42
  40. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/profiles/implementer.md +36 -36
  41. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/profiles/reviewer.md +31 -31
  42. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/query.py +28 -16
  43. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/ui/server.py +1 -1
  44. {context_rail-3.3.0 → context_rail-3.3.1/src/context_rail.egg-info}/PKG-INFO +5 -4
  45. {context_rail-3.3.0 → context_rail-3.3.1}/LICENSE +0 -0
  46. {context_rail-3.3.0 → context_rail-3.3.1}/setup.cfg +0 -0
  47. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/__main__.py +0 -0
  48. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/client.py +0 -0
  49. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/context/__init__.py +0 -0
  50. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/context/code_targets.py +0 -0
  51. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/core/__init__.py +0 -0
  52. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/core/defaults.py +0 -0
  53. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/core/locate.py +0 -0
  54. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/core/result.py +0 -0
  55. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/core/slug.py +0 -0
  56. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/core/tool_names.py +0 -0
  57. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/core/util.py +0 -0
  58. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/doctor/__init__.py +0 -0
  59. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/doctor/gitconfig.py +0 -0
  60. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/doctor/stage2.py +0 -0
  61. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/__init__.py +0 -0
  62. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/codegen.py +0 -0
  63. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/confirmation.py +0 -0
  64. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/daemon.py +0 -0
  65. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/execution.py +0 -0
  66. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/__init__.py +0 -0
  67. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/checks.py +0 -0
  68. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/common.py +0 -0
  69. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/daemon.py +0 -0
  70. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/dispatch/__init__.py +0 -0
  71. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/dispatch/budget.py +0 -0
  72. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/dispatch/checkpoint.py +0 -0
  73. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/dispatch/closeout.py +0 -0
  74. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/dispatch/code_area.py +0 -0
  75. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/dispatch/common.py +0 -0
  76. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/dispatch/conflict.py +0 -0
  77. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/dispatch/merge.py +0 -0
  78. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/dispatch/review.py +0 -0
  79. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/dispatch/review_order.py +0 -0
  80. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/dispatch/review_records.py +0 -0
  81. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/doctor.py +0 -0
  82. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/executions.py +0 -0
  83. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/mcp.py +0 -0
  84. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/measure.py +0 -0
  85. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/migrate.py +0 -0
  86. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/packs.py +0 -0
  87. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/reshape.py +0 -0
  88. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/surface.py +0 -0
  89. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/sync.py +0 -0
  90. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/ui.py +0 -0
  91. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/handlers/versions.py +0 -0
  92. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/gateway/mcp_schema.py +0 -0
  93. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/kernel/__init__.py +0 -0
  94. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/kernel/budgets.py +0 -0
  95. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/kernel/gates.py +0 -0
  96. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/kernel/lifecycle.py +0 -0
  97. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/kernel/measurement.py +0 -0
  98. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/kernel/merge.py +0 -0
  99. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/kernel/packs.py +0 -0
  100. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/kernel/relations.py +0 -0
  101. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/kernel/rights.py +0 -0
  102. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/kernel/structure.py +0 -0
  103. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/kernel/timestamps.py +0 -0
  104. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/kernel/triage_patch.py +0 -0
  105. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/model/__init__.py +0 -0
  106. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/model/actions.py +0 -0
  107. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/model/cache.py +0 -0
  108. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/model/codegraph.py +0 -0
  109. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/model/compiler.py +0 -0
  110. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/model/cto.py +0 -0
  111. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/model/errors.py +0 -0
  112. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/model/execution.py +0 -0
  113. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/model/fields.py +0 -0
  114. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/model/manifest.py +0 -0
  115. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/model/metadata.py +0 -0
  116. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/model/operating.py +0 -0
  117. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/model/pack.py +0 -0
  118. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/model/placement.py +0 -0
  119. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/model/policy.py +0 -0
  120. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/model/presentation.py +0 -0
  121. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/model/primitives.py +0 -0
  122. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/adoptable.json +0 -0
  123. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/layout.yaml +0 -0
  124. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/pack.yaml +0 -0
  125. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/skills/review-checklist/SKILL.md +0 -0
  126. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/skills/test-first/SKILL.md +0 -0
  127. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/surface.yaml +0 -0
  128. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/templates/actor.md +0 -0
  129. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/templates/charter.md +0 -0
  130. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/templates/check.md +0 -0
  131. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/templates/code.md +0 -0
  132. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/templates/goal.md +0 -0
  133. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/templates/item.md +0 -0
  134. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/templates/note.md +0 -0
  135. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/templates/policy.md +0 -0
  136. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/templates/record.md +0 -0
  137. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/templates/scope.md +0 -0
  138. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/templates/vision.md +0 -0
  139. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/templates/wont.md +0 -0
  140. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/basic/templates/work-order.md +0 -0
  141. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/layout.yaml +0 -0
  142. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/pack.yaml +0 -0
  143. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/skills/review-checklist/SKILL.md +0 -0
  144. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/skills/test-first/SKILL.md +0 -0
  145. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/surface.yaml +0 -0
  146. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/templates/actor.md +0 -0
  147. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/templates/charter.md +0 -0
  148. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/templates/check.md +0 -0
  149. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/templates/code.md +0 -0
  150. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/templates/goal.md +0 -0
  151. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/templates/item.md +0 -0
  152. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/templates/note.md +0 -0
  153. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/templates/policy.md +0 -0
  154. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/templates/record.md +0 -0
  155. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/templates/scope.md +0 -0
  156. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/templates/vision.md +0 -0
  157. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/templates/wont.md +0 -0
  158. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/flow/templates/work-order.md +0 -0
  159. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/layout.yaml +0 -0
  160. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/pack.yaml +0 -0
  161. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/skills/review-checklist/SKILL.md +0 -0
  162. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/skills/test-first/SKILL.md +0 -0
  163. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/surface.yaml +0 -0
  164. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/templates/actor.md +0 -0
  165. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/templates/charter.md +0 -0
  166. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/templates/check.md +0 -0
  167. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/templates/code.md +0 -0
  168. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/templates/goal.md +0 -0
  169. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/templates/item.md +0 -0
  170. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/templates/note.md +0 -0
  171. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/templates/policy.md +0 -0
  172. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/templates/record.md +0 -0
  173. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/templates/scope.md +0 -0
  174. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/templates/vision.md +0 -0
  175. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/templates/wont.md +0 -0
  176. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/scrum/templates/work-order.md +0 -0
  177. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/layout.yaml +0 -0
  178. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/pack.yaml +0 -0
  179. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/skills/shot-brief/SKILL.md +0 -0
  180. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/skills/take-review/SKILL.md +0 -0
  181. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/surface.yaml +0 -0
  182. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/templates/actor.md +0 -0
  183. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/templates/charter.md +0 -0
  184. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/templates/check.md +0 -0
  185. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/templates/code.md +0 -0
  186. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/templates/goal.md +0 -0
  187. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/templates/item.md +0 -0
  188. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/templates/note.md +0 -0
  189. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/templates/policy.md +0 -0
  190. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/templates/record.md +0 -0
  191. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/templates/scene.md +0 -0
  192. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/templates/scope.md +0 -0
  193. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/templates/shot.md +0 -0
  194. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/templates/vision.md +0 -0
  195. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/templates/wont.md +0 -0
  196. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/video/templates/work-order.md +0 -0
  197. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/layout.yaml +0 -0
  198. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/pack.yaml +0 -0
  199. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/skills/review-checklist/SKILL.md +0 -0
  200. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/skills/test-first/SKILL.md +0 -0
  201. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/surface.yaml +0 -0
  202. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/templates/actor.md +0 -0
  203. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/templates/charter.md +0 -0
  204. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/templates/check.md +0 -0
  205. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/templates/code.md +0 -0
  206. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/templates/deliverable.md +0 -0
  207. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/templates/goal.md +0 -0
  208. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/templates/item.md +0 -0
  209. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/templates/note.md +0 -0
  210. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/templates/policy.md +0 -0
  211. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/templates/record.md +0 -0
  212. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/templates/scope.md +0 -0
  213. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/templates/vision.md +0 -0
  214. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/templates/wont.md +0 -0
  215. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/packs/waterfall/templates/work-order.md +0 -0
  216. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/runner/__init__.py +0 -0
  217. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/runner/body_merge.py +0 -0
  218. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/runner/codegraph/__init__.py +0 -0
  219. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/runner/codegraph/builtin.py +0 -0
  220. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/runner/codegraph/gitnexus.py +0 -0
  221. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/runner/codegraph/graphify.py +0 -0
  222. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/runner/codegraph/probe.py +0 -0
  223. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/runner/codegraph/provider.py +0 -0
  224. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/runner/control.py +0 -0
  225. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/runner/dispatch.py +0 -0
  226. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/runner/droid.py +0 -0
  227. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/runner/git.py +0 -0
  228. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/runner/git_sync.py +0 -0
  229. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/runner/merge.py +0 -0
  230. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/runner/protocol.py +0 -0
  231. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/runner/run.py +0 -0
  232. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/__init__.py +0 -0
  233. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/adapters.py +0 -0
  234. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/approval.py +0 -0
  235. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/codegraph.py +0 -0
  236. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/codemap.py +0 -0
  237. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/doc.py +0 -0
  238. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/frontmatter_edit.py +0 -0
  239. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/git_index.py +0 -0
  240. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/gitattributes.py +0 -0
  241. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/github_sync.py +0 -0
  242. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/index.py +0 -0
  243. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/legacy.py +0 -0
  244. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/location.py +0 -0
  245. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/lock.py +0 -0
  246. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/measure.py +0 -0
  247. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/migration.py +0 -0
  248. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/packs.py +0 -0
  249. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/placement.py +0 -0
  250. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/sync.py +0 -0
  251. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/versions.py +0 -0
  252. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/store/write.py +0 -0
  253. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/ui/__init__.py +0 -0
  254. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/ui/api.py +0 -0
  255. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/ui/readmodels.py +0 -0
  256. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/ui/snapshot.py +0 -0
  257. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/ui/static/assets/index-BdWPYrJo.js +0 -0
  258. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/ui/static/assets/index-C6LhOr0x.css +0 -0
  259. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/ui/static/favicon.svg +0 -0
  260. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail/ui/static/index.html +0 -0
  261. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail.egg-info/SOURCES.txt +0 -0
  262. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail.egg-info/dependency_links.txt +0 -0
  263. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail.egg-info/entry_points.txt +0 -0
  264. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail.egg-info/requires.txt +0 -0
  265. {context_rail-3.3.0 → context_rail-3.3.1}/src/context_rail.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: context-rail
3
- Version: 3.3.0
3
+ Version: 3.3.1
4
4
  Summary: An agentic project workspace: files are the truth, agents work through one write path
5
5
  License-Expression: MIT
6
6
  Project-URL: Repository, https://github.com/nguyenhoanhson797/Context-Rail
@@ -364,8 +364,9 @@ code_graph: builtin # builtin | graphify | gitnexus | none
364
364
  ```
365
365
 
366
366
  or pass `--code-graph graphify` (or `gitnexus`, `builtin`, `none`) to
367
- `rail init`. For an external provider, init probes it once and reports the
368
- readiness line at the end; a missing tool does not fail the init.
367
+ `rail init`. For an external provider, init runs a readiness probe once and
368
+ reports the line at the end; it does not build a snapshot, and a missing tool
369
+ does not fail the init. Run `rail ops codegraph setup` for the first build.
369
370
 
370
371
  `builtin` needs no install. `graphify` (`uv tool install "graphifyy>=0.9.100,<0.10"`,
371
372
  Apache-2.0) and `gitnexus` (`npm install -g gitnexus`, Node 22.18+ or 24.11+,
@@ -404,7 +405,7 @@ writes `.gitnexus`, `.claude` or a GitNexus section into your checkout, and
404
405
  - **Fail closed.** An unknown pack key, manifest schema or policy field is
405
406
  refused, never guessed.
406
407
  - **Agents never read `pack.yaml`.** A compiler turns the pack into one model,
407
- and agents ask `rail next`, `rail show`, `rail why` and `rail model`.
408
+ and agents ask `rail next`, `rail read show`, `rail why` and `rail model`.
408
409
  - **No lost updates, safe retries.** Every write carries the etag it read, and
409
410
  every retry carries an idempotency key that returns the same record.
410
411
  - **Project shape is data.** Six primitives, eight relations and five status
@@ -337,8 +337,9 @@ code_graph: builtin # builtin | graphify | gitnexus | none
337
337
  ```
338
338
 
339
339
  or pass `--code-graph graphify` (or `gitnexus`, `builtin`, `none`) to
340
- `rail init`. For an external provider, init probes it once and reports the
341
- readiness line at the end; a missing tool does not fail the init.
340
+ `rail init`. For an external provider, init runs a readiness probe once and
341
+ reports the line at the end; it does not build a snapshot, and a missing tool
342
+ does not fail the init. Run `rail ops codegraph setup` for the first build.
342
343
 
343
344
  `builtin` needs no install. `graphify` (`uv tool install "graphifyy>=0.9.100,<0.10"`,
344
345
  Apache-2.0) and `gitnexus` (`npm install -g gitnexus`, Node 22.18+ or 24.11+,
@@ -377,7 +378,7 @@ writes `.gitnexus`, `.claude` or a GitNexus section into your checkout, and
377
378
  - **Fail closed.** An unknown pack key, manifest schema or policy field is
378
379
  refused, never guessed.
379
380
  - **Agents never read `pack.yaml`.** A compiler turns the pack into one model,
380
- and agents ask `rail next`, `rail show`, `rail why` and `rail model`.
381
+ and agents ask `rail next`, `rail read show`, `rail why` and `rail model`.
381
382
  - **No lost updates, safe retries.** Every write carries the etag it read, and
382
383
  every retry carries an idempotency key that returns the same record.
383
384
  - **Project shape is data.** Six primitives, eight relations and five status
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "context-rail"
7
- version = "3.3.0"
7
+ version = "3.3.1"
8
8
  description = "An agentic project workspace: files are the truth, agents work through one write path"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -1,3 +1,3 @@
1
1
  """Context Rail v3: an agentic project workspace built on plain files in git."""
2
2
 
3
- __version__ = "3.3.0"
3
+ __version__ = "3.3.1"
@@ -14,6 +14,7 @@ import sys
14
14
  from pathlib import Path
15
15
  from typing import Any
16
16
 
17
+ from context_rail import __version__
17
18
  from context_rail.gateway.tools import (
18
19
  GROUP_SUMMARIES,
19
20
  LEGACY_TO_SURFACE,
@@ -53,6 +54,11 @@ def _parser() -> argparse.ArgumentParser:
53
54
  ),
54
55
  formatter_class=argparse.RawDescriptionHelpFormatter,
55
56
  )
57
+ parser.add_argument(
58
+ "--version",
59
+ action="version",
60
+ version=f"context-rail {__version__}",
61
+ )
56
62
  parser.add_argument(
57
63
  "--store", help="store folder (default: the nearest context-rail folder)"
58
64
  )
@@ -400,7 +400,7 @@ def resolve_queue(
400
400
  eligible: list[QueueItem] = []
401
401
  omitted = 0
402
402
  for row in rows:
403
- if row.category in ("done", "dropped"):
403
+ if row.category in ("done", "dropped", "blocked"):
404
404
  continue
405
405
  actions = applicable_actions(ctx, model, row, actor)
406
406
  if model.operating.queue.require == "action":
@@ -410,10 +410,16 @@ def _workflow_lines(
410
410
  """Per-workflow counts plus the next action and proof for the top items."""
411
411
  from context_rail.context import surface
412
412
 
413
+ queue = (
414
+ set(context.model.operating.queue.presets)
415
+ if context.model.operating is not None
416
+ else set()
417
+ )
413
418
  open_items = [
414
419
  item
415
420
  for item in items
416
421
  if item.category not in structure.FINISHED_CATEGORIES
422
+ and (not queue or item.preset in queue)
417
423
  ]
418
424
  groups: dict[str, dict[str, int]] = {}
419
425
  for item in open_items:
@@ -755,14 +761,26 @@ def _memory_rows(ix: Any, limit: int) -> tuple[list[str], int]:
755
761
  )
756
762
  total = ix.conn.execute(f"SELECT COUNT(*) FROM docs d {where}").fetchone()[0]
757
763
  rows = ix.conn.execute(
758
- f"SELECT d.slug, d.title, d.excerpt FROM docs d {where} "
764
+ f"SELECT d.slug, d.title, d.excerpt, d.path FROM docs d {where} "
759
765
  "ORDER BY d.updated DESC, d.slug ASC LIMIT ?",
760
766
  (limit,),
761
767
  ).fetchall()
762
- shown = [
763
- f"{title or slug} — {_clip(excerpt or '', EXCERPT_CHARS)}"
764
- for slug, title, excerpt in rows
765
- ]
768
+ seen: dict[tuple[str, str], int] = {}
769
+ order: list[tuple[str, str]] = []
770
+ for slug, title, excerpt, _path in rows:
771
+ key = (title or slug, excerpt or "")
772
+ if key in seen:
773
+ seen[key] += 1
774
+ continue
775
+ seen[key] = 1
776
+ order.append(key)
777
+ shown = []
778
+ for key in order:
779
+ title, excerpt = key
780
+ line = f"{title} — {_clip(excerpt, EXCERPT_CHARS)}"
781
+ if seen[key] > 1:
782
+ line += f" ({seen[key]} copies)"
783
+ shown.append(line)
766
784
  return shown, max(total - len(rows), 0)
767
785
 
768
786
 
@@ -400,7 +400,7 @@ def _is_container(context: Any, doc: Mapping[str, Any]) -> bool:
400
400
 
401
401
  def _command(slug: str, next_states: Sequence[str]) -> str:
402
402
  if not next_states:
403
- return f"rail show {slug}"
403
+ return f"rail read show {slug}"
404
404
  return f"rail change move {slug} {next_states[0]} --expect <etag>"
405
405
 
406
406
 
@@ -109,7 +109,7 @@ SEVERITIES.update(stage2.SEVERITY)
109
109
  _REPAIR = "rail ops doctor --repair"
110
110
  _APPROVE = (
111
111
  'rail approve charter --confirm "APPROVE charter" --confirmer <you>; '
112
- 'for a pack-only change: rail approve pack:<name> --confirm "APPROVE pack:<name>"'
112
+ 'after a pack change, also rail approve pack:<name> --confirm "APPROVE pack:<name>"'
113
113
  )
114
114
  _RELOCATE = "rail change repath"
115
115
  _TRIAGE = "rail loop triage"
@@ -1374,7 +1374,7 @@ def _execution_issues(
1374
1374
  "execution_failed",
1375
1375
  row.path,
1376
1376
  f"the latest {action!r} run on {row.slug!r} failed",
1377
- "inspect the run in rail show, then re-run it",
1377
+ "inspect the run in rail read show, then re-run it",
1378
1378
  )
1379
1379
  )
1380
1380
  return issues
@@ -644,14 +644,17 @@ def _with_command(
644
644
  if details.get("command"):
645
645
  return result
646
646
  if details.get("reason") == "approval_missing":
647
- details["command"] = 'rail approve charter --confirm "APPROVE charter"'
647
+ details["command"] = (
648
+ 'rail approve charter --confirm "APPROVE charter" '
649
+ "--confirmer <you>"
650
+ )
648
651
  error["details"] = details
649
652
  return result
650
653
  canonical = canonical_tool(name) if isinstance(name, str) else ""
651
654
  if canonical == "move" and params.get("slug"):
652
- details["command"] = f"rail show {params['slug']}"
655
+ details["command"] = f"rail read show {params['slug']}"
653
656
  elif canonical in {"dispatch", "merge"} and params.get("item"):
654
- details["command"] = f"rail show {params['item']}"
657
+ details["command"] = f"rail read show {params['item']}"
655
658
  elif canonical == "do":
656
659
  details["command"] = (
657
660
  f"rail explain {params['action']}"
@@ -206,7 +206,7 @@ def _check_requires(ctx: Context, action: Any, item: str) -> None:
206
206
  "action": action.name,
207
207
  "condition": "children",
208
208
  "open": open_children,
209
- "command": f"rail show {open_children[0]}",
209
+ "command": f"rail read show {open_children[0]}",
210
210
  },
211
211
  )
212
212
  if requires.check:
@@ -419,7 +419,7 @@ def _agents_payload(skills: list[_Skill], profiles: list[_Profile]) -> str:
419
419
  "| --- | --- |",
420
420
  "| What kinds of work exist? | `rail types` |",
421
421
  "| What is executable now? | `rail next` |",
422
- "| What is this item's workflow and proof? | `rail show <slug>` |",
422
+ "| What is this item's workflow and proof? | `rail read show <slug>` |",
423
423
  "| What proof is missing, and how do I produce it? | `rail why <slug>` |",
424
424
  "| What does a preset, workflow or action mean? | `rail explain <name>` |",
425
425
  "| What is the operating model? | `rail model` |",
@@ -28,7 +28,7 @@ from context_rail.store.codemap import pins_code_map, semantic_fingerprint
28
28
  if TYPE_CHECKING:
29
29
  from context_rail.gateway.gateway import Context
30
30
 
31
- __all__ = ["adopt", "adopt_fingerprint", "refresh", "resolved", "setup", "status"]
31
+ __all__ = ["adopt", "adopt_fingerprint", "probe_only", "refresh", "resolved", "setup", "status"]
32
32
 
33
33
  _SOURCE_WORDS = {"rail.yaml": "rail.yaml", "pack": "pack default", "default": "default"}
34
34
  _DIFF_LINES = 80
@@ -58,6 +58,21 @@ def status(ctx: Context, args: dict[str, Any], actor: str) -> dict[str, Any]:
58
58
  return _status(ctx)
59
59
 
60
60
 
61
+ def probe_only(ctx: Context, args: dict[str, Any], actor: str) -> dict[str, Any]:
62
+ """Check an external provider and cache readiness, without building a snapshot."""
63
+ from context_rail.runner.codegraph.probe import probe
64
+
65
+ configured, _source = resolved(ctx.manifest, ctx.pack)
66
+ store = Path(ctx.store)
67
+ if configured in ("graphify", "gitnexus"):
68
+ found = worktree_git_dir(store)
69
+ head = head_sha(store)
70
+ if found is None or head is None:
71
+ return _hinted(ctx, _not_git(ctx))
72
+ probe(store, found[1], configured)
73
+ return _hinted(ctx, _status(ctx))
74
+
75
+
61
76
  def setup(ctx: Context, args: dict[str, Any], actor: str) -> dict[str, Any]:
62
77
  """Check the provider, then build the snapshot of the checkout's HEAD."""
63
78
  from context_rail.runner.codegraph.probe import probe
@@ -266,11 +281,14 @@ def _status(ctx: Context) -> dict[str, Any]:
266
281
  state = freshness(store)
267
282
  info = None if state["graph"] is None else snapshot_info(store, state["graph"])
268
283
  ready = readiness(store, configured)
284
+ provider = None if info is None else info["provider"]
285
+ if provider is None and configured in ("graphify", "gitnexus") and ready.get("ready"):
286
+ provider = configured
269
287
  return {
270
288
  "configured": configured,
271
289
  "source": source,
272
290
  "ready": ready["ready"],
273
- "provider": None if info is None else info["provider"],
291
+ "provider": provider,
274
292
  "commit": state["graph"],
275
293
  "freshness": state,
276
294
  "coverage": None
@@ -25,6 +25,7 @@ from context_rail.gateway.handlers.common import (
25
25
  required,
26
26
  skill_pins,
27
27
  )
28
+ from context_rail.kernel.triage import failure_fingerprint
28
29
  from context_rail.model.cto import (
29
30
  USAGE_KEYS,
30
31
  Profile,
@@ -419,7 +420,7 @@ def _report_payload(ran: Any, *, status: str) -> dict[str, Any]:
419
420
  "observed": bounded(str(observed), SUMMARY_MAX),
420
421
  "impact": "medium",
421
422
  "evidence": [],
422
- "fingerprint": None,
423
+ "fingerprint": failure_fingerprint(str(observed)),
423
424
  }
424
425
 
425
426
 
@@ -421,6 +421,9 @@ def _execute(plan: _Plan, role_file: Path, order_file: Path) -> dict[str, Any]:
421
421
  if stderr:
422
422
  failures.append("stderr: " + bounded(stderr, 800))
423
423
  summary = bounded("\n".join(failures), SUMMARY_MAX)
424
+ if "invalid model" in "\n".join([*reasons, stderr]).lower():
425
+ # A bad model cannot improve on a retry; stop after one launch.
426
+ break
424
427
  else:
425
428
  last_report = block
426
429
  summary = ""
@@ -6,6 +6,7 @@ from __future__ import annotations
6
6
  from typing import Any, TYPE_CHECKING
7
7
 
8
8
  from context_rail.gateway.handlers.common import bounded
9
+ from context_rail.kernel.triage import failure_fingerprint
9
10
  from context_rail.model.cto import Profile
10
11
  from context_rail.runner import dispatch as local_dispatch
11
12
  from context_rail.store.write import commit
@@ -74,7 +75,7 @@ def _failure_report(
74
75
  "observed": bounded(observed, SUMMARY_MAX),
75
76
  "impact": "medium",
76
77
  "evidence": verdicts[:20],
77
- "fingerprint": None,
78
+ "fingerprint": failure_fingerprint(observed),
78
79
  }
79
80
 
80
81
 
@@ -869,7 +869,7 @@ def _gate_command(slug: str, missing: list[str]) -> str:
869
869
  """The one command that produces the proof a gate named as missing."""
870
870
  if missing:
871
871
  return (
872
- f"rail check {missing[0]} --target {slug} "
872
+ f"rail check declare {missing[0]} --target {slug} "
873
873
  f"--spec-file <file> --expect absent"
874
874
  )
875
- return f"rail verify {slug}"
875
+ return f"rail check run {slug}"
@@ -11,7 +11,7 @@ from context_rail.core.defaults import DEFAULT_PACK
11
11
  from context_rail.core.util import load_yaml
12
12
  from context_rail.model.codegraph import CONFIG_CHOICES, effective_code_graph
13
13
  from context_rail.model.manifest import Manifest, initial_manifest, load_manifest
14
- from context_rail.model.pack import canonical_pack_name, load_pack
14
+ from context_rail.model.pack import Pack, canonical_pack_name, load_pack, pack_source
15
15
  from context_rail.store.location import confine
16
16
  from context_rail.store.write import ABSENT, Op, WriteRefused, commit, replay
17
17
 
@@ -22,6 +22,13 @@ BASE_FOLDERS = ("packs", "templates", "workspace/skills")
22
22
  GITIGNORE = b".rail-local/\n"
23
23
 
24
24
 
25
+ def load_pack_or_not_found(name: str, store: Path) -> Pack:
26
+ """Load a pack, reporting an unknown name as NOT_FOUND rather than invalid."""
27
+ if pack_source(name, store) is None:
28
+ raise WriteRefused("NOT_FOUND", f"unknown pack {name!r}", {"pack": name})
29
+ return load_pack(name, store)
30
+
31
+
25
32
  def pinned_folders(manifest: Manifest) -> tuple[str, ...]:
26
33
  """The static primitive-placement folders a fresh store should create empty."""
27
34
  found = set(BASE_FOLDERS)
@@ -103,7 +110,7 @@ def skeleton(
103
110
  )
104
111
  stored = _stored_pack(store) if (store / "rail.yaml").exists() else None
105
112
  pack_name = requested or stored or DEFAULT_PACK
106
- pack = load_pack(pack_name, store)
113
+ pack = load_pack_or_not_found(pack_name, store)
107
114
  code_graph = requested_code_graph(args)
108
115
  saved = replay(store, args.get("key"))
109
116
  if saved is not None:
@@ -43,7 +43,7 @@ def ci(ctx: Context, args: dict[str, Any], actor: str) -> dict[str, Any]:
43
43
  if failed:
44
44
  raise WriteRefused(
45
45
  "BUSINESS_RULE_VIOLATED",
46
- f"ci found {counts['error']} error(s) and {counts['warning']} warning(s)",
46
+ f"gate found {counts['error']} error(s) and {counts['warning']} warning(s)",
47
47
  {"counts": counts, "issues": issues, "gates": gates},
48
48
  )
49
49
  return {"passed": True, "issues": issues, "counts": counts, "gates": gates}
@@ -31,6 +31,7 @@ from context_rail.gateway.handlers.init import (
31
31
  GITIGNORE,
32
32
  _check_code_graph,
33
33
  _stored_pack,
34
+ load_pack_or_not_found,
34
35
  pinned_folders,
35
36
  requested_code_graph,
36
37
  scaffold,
@@ -166,22 +167,81 @@ def init(_ctx: Context | None, args: dict[str, Any], actor: str) -> dict[str, An
166
167
  answers = read_answers(Path(args["answers_file"]))
167
168
  else:
168
169
  answers = _interview(pack_name, project_root)
169
- return _after_code_graph(
170
- _materialise(
171
- store,
172
- project_root,
173
- answers,
174
- pack_name=pack_name,
175
- key=args["key"],
176
- actor=actor,
177
- draft=draft,
178
- solo=bool(args.get("solo")),
179
- code_graph=code_graph,
180
- ),
181
- args,
182
- actor,
170
+ value = _materialise(
171
+ store,
172
+ project_root,
173
+ answers,
174
+ pack_name=pack_name,
175
+ key=args["key"],
176
+ actor=actor,
177
+ draft=draft,
178
+ solo=bool(args.get("solo")),
179
+ code_graph=code_graph,
180
+ )
181
+ if mode == "answers":
182
+ value = _finish_picture_init(value, args, actor, project_root)
183
+ return _after_code_graph(value, args, actor)
184
+
185
+
186
+ def _finish_picture_init(
187
+ value: dict[str, Any],
188
+ args: dict[str, Any],
189
+ actor: str,
190
+ project_root: Path,
191
+ ) -> dict[str, Any]:
192
+ """Run the stages the direct picture path still owes after its commit."""
193
+ from context_rail.gateway.execution import ACTOR_NAMED
194
+ from context_rail.gateway.gateway import Context
195
+ from context_rail.gateway.handlers.onboarding_pipeline import (
196
+ _next_steps,
197
+ agents_stage,
198
+ approval_stage,
199
+ git_drivers_stage,
183
200
  )
184
201
 
202
+ store = Path(value["store"])
203
+ manifest = load_manifest(store)
204
+ pack = load_pack(manifest.pack, store)
205
+ context = Context(store=store, manifest=manifest, pack=pack, actor=actor)
206
+ try:
207
+ written = list(value.get("written") or [])
208
+ skeleton = [path for path in written if path in ("rail.yaml", ".gitignore")]
209
+ workspace = [path for path in written if path.startswith("workspace/")]
210
+ picture = [
211
+ path for path in written if path not in skeleton and path not in workspace
212
+ ]
213
+ stages = {
214
+ "skeleton": {
215
+ "state": "written" if skeleton else "unchanged",
216
+ "written": skeleton,
217
+ },
218
+ "workspace": {
219
+ "state": "written" if workspace else "unchanged",
220
+ "written": workspace,
221
+ },
222
+ "picture": {"state": "written", "written": picture},
223
+ "approval": approval_stage(
224
+ context,
225
+ actor=actor,
226
+ actor_named=ACTOR_NAMED.get(),
227
+ args=args,
228
+ allow_prompt=False,
229
+ ),
230
+ }
231
+ stages["agents"] = agents_stage(context, args)
232
+ stages["git_drivers"] = git_drivers_stage(context, project_root, args)
233
+ solo = getattr(context.policy, "mode", None) == "solo"
234
+ approved = stages["approval"].get("state") == "approved"
235
+ value = dict(value)
236
+ value["stages"] = stages
237
+ value["approval"] = (
238
+ "skipped" if solo else ("approved" if approved else "missing")
239
+ )
240
+ value["next"] = _next_steps(approved or solo, stages)
241
+ return value
242
+ finally:
243
+ context.close()
244
+
185
245
 
186
246
  def _after_code_graph(
187
247
  value: dict[str, Any], args: dict[str, Any], actor: str
@@ -195,7 +255,7 @@ def _after_code_graph(
195
255
  return value
196
256
  try:
197
257
  from context_rail.gateway.gateway import Context
198
- from context_rail.gateway.handlers.codegraph import setup
258
+ from context_rail.gateway.handlers.codegraph import probe_only
199
259
  from context_rail.model.manifest import load_manifest
200
260
  from context_rail.model.pack import load_pack
201
261
 
@@ -204,7 +264,7 @@ def _after_code_graph(
204
264
  pack = load_pack(manifest.pack, path)
205
265
  context = Context(store=path, manifest=manifest, pack=pack, actor=actor)
206
266
  result = dict(value)
207
- result["code_graph"] = setup(context, {}, actor)
267
+ result["code_graph"] = probe_only(context, {}, actor)
208
268
  return result
209
269
  except Exception as exc: # noqa: BLE001 - readiness is advisory; init has already committed
210
270
  result = dict(value)
@@ -689,7 +749,7 @@ def _materialise(
689
749
  "written": result["written"],
690
750
  "picture": info["picture"],
691
751
  "charter": info["charter"],
692
- "approval": "missing",
752
+ "approval": "skipped" if parsed["charter"].mode == "solo" else "missing",
693
753
  }
694
754
 
695
755
 
@@ -756,7 +816,7 @@ def _store_shape(
756
816
  pack = load_pack(manifest.pack, store)
757
817
  _check_code_graph(manifest, pack, code_graph)
758
818
  return manifest, pack, True, None
759
- pack = load_pack(pack_name, store)
819
+ pack = load_pack_or_not_found(pack_name, store)
760
820
  manifest, data = initial_manifest(pack.name, store, code_graph=code_graph)
761
821
  return manifest, pack, False, data
762
822
 
@@ -173,6 +173,7 @@ def approval_stage(
173
173
  actor: str,
174
174
  actor_named: bool,
175
175
  args: dict[str, Any],
176
+ allow_prompt: bool = True,
176
177
  ) -> dict[str, Any]:
177
178
  """Offer the fresh approval phrase when the picture is waiting for one."""
178
179
  from context_rail.gateway.handlers.onboarding import _is_tty, approve
@@ -212,6 +213,37 @@ def approval_stage(
212
213
  "reason": "actor_not_named",
213
214
  "command": _APPROVE_COMMAND,
214
215
  }
216
+ if args.get("confirmer") and args.get("confirm"):
217
+ try:
218
+ result = approve(
219
+ context,
220
+ {
221
+ "target": "charter",
222
+ "confirm": args["confirm"],
223
+ "confirmer": args["confirmer"],
224
+ "expect": None,
225
+ "key": None,
226
+ },
227
+ actor,
228
+ )
229
+ except (ModelError, WriteRefused) as exc:
230
+ return {
231
+ "state": "refused",
232
+ "reason": getattr(exc, "code", "VALIDATION_FAILED"),
233
+ "message": str(exc),
234
+ "command": _APPROVE_COMMAND,
235
+ }
236
+ return {
237
+ "state": "approved",
238
+ "approval": result.get("approval"),
239
+ "target": result.get("target"),
240
+ }
241
+ if not allow_prompt:
242
+ return {
243
+ "state": "skipped",
244
+ "reason": "no_confirmer",
245
+ "command": _APPROVE_COMMAND,
246
+ }
215
247
  if not _is_tty():
216
248
  return {
217
249
  "state": "skipped",
@@ -458,13 +490,14 @@ def _receipt(
458
490
  stages.get("approval", {}).get("state") == "approved"
459
491
  or state == "approved"
460
492
  )
493
+ solo = getattr(context.policy, "mode", None) == "solo"
461
494
  return {
462
495
  "store": str(store),
463
496
  "pack": context.pack.name,
464
497
  "stages": stages,
465
498
  "status": status,
466
- "approval": "approved" if approved else "missing",
467
- "next": _next_steps(approved, stages),
499
+ "approval": "skipped" if solo else ("approved" if approved else "missing"),
500
+ "next": _next_steps(approved or solo, stages),
468
501
  "dry_run": False,
469
502
  }
470
503
 
@@ -13,6 +13,7 @@ import hashlib
13
13
  import json
14
14
  import re
15
15
  from collections.abc import Sequence
16
+ from dataclasses import replace
16
17
  from pathlib import Path
17
18
  from typing import TYPE_CHECKING, Any
18
19
 
@@ -119,6 +120,13 @@ def triage(ctx: Context, args: dict[str, Any], actor: str) -> dict[str, Any]:
119
120
  store = ctx.store
120
121
  key = args["key"]
121
122
  thresholds = _thresholds(ctx)
123
+ acknowledge = bool(args.get("acknowledge"))
124
+ if acknowledge and not args.get("report"):
125
+ raise WriteRefused(
126
+ "VALIDATION_FAILED",
127
+ "--acknowledge needs --report",
128
+ {"param": "report"},
129
+ )
122
130
  value: dict[str, list[str]] = {
123
131
  "triaged": [],
124
132
  "deferred": [],
@@ -156,7 +164,18 @@ def triage(ctx: Context, args: dict[str, Any], actor: str) -> dict[str, Any]:
156
164
  )
157
165
  for decision in cluster_reports(facts, runs, thresholds):
158
166
  cluster_rows = members[decision.fingerprint]
159
- action = _routed_action(ctx, decision, cluster_rows)
167
+ if acknowledge:
168
+ action = "acknowledged"
169
+ decision = replace(
170
+ decision,
171
+ action=action,
172
+ reason=(
173
+ f"report {decision.reports[0]!r} was acknowledged"
174
+ " below the cluster threshold"
175
+ ),
176
+ )
177
+ else:
178
+ action = _routed_action(ctx, decision, cluster_rows)
160
179
  if action == "deferred":
161
180
  value["deferred"].extend(decision.reports)
162
181
  continue
@@ -50,9 +50,15 @@ def show(ctx: Context, args: dict[str, Any], actor: str) -> dict[str, Any]:
50
50
 
51
51
  if code_targets.looks_like_code_target(slug):
52
52
  return code_targets.code_view(ctx, slug)
53
- resolve_unique(index, args["slug"])
53
+ if not args.get("path"):
54
+ resolve_unique(index, args["slug"])
54
55
  try:
55
- shown = query.show(index, args["slug"], body_chars=args["body_chars"])
56
+ shown = query.show(
57
+ index,
58
+ args["slug"],
59
+ path=args.get("path"),
60
+ body_chars=args["body_chars"],
61
+ )
56
62
  except FileNotFoundError:
57
63
  # A document can vanish between the index sync and the body read.
58
64
  raise LookupError("not_found") from None
@@ -11,6 +11,7 @@ from mcp.server import Server
11
11
  from mcp.server.stdio import stdio_server
12
12
  from mcp.shared.exceptions import MCPError
13
13
 
14
+ from context_rail import __version__
14
15
  from context_rail.gateway.execution import (
15
16
  EXPLICIT_ACTOR,
16
17
  resolve_server_actor,
@@ -78,6 +79,7 @@ def build_server(*, store: Path | None, actor: str | None) -> Server:
78
79
 
79
80
  return Server(
80
81
  "context-rail",
82
+ version=__version__,
81
83
  on_list_tools=on_list_tools,
82
84
  on_call_tool=on_call_tool,
83
85
  )