inspan 1.0.0__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 (276) hide show
  1. inspan-1.0.0/LICENSE +21 -0
  2. inspan-1.0.0/MANIFEST.in +8 -0
  3. inspan-1.0.0/PKG-INFO +370 -0
  4. inspan-1.0.0/README.md +355 -0
  5. inspan-1.0.0/adapters/README.md +14 -0
  6. inspan-1.0.0/adapters/common.md +47 -0
  7. inspan-1.0.0/agents/README.md +114 -0
  8. inspan-1.0.0/agents/change-planning.brief.md +68 -0
  9. inspan-1.0.0/agents/change-planning.md +297 -0
  10. inspan-1.0.0/agents/common.brief.md +59 -0
  11. inspan-1.0.0/agents/common.md +971 -0
  12. inspan-1.0.0/agents/implementation.brief.md +71 -0
  13. inspan-1.0.0/agents/implementation.md +518 -0
  14. inspan-1.0.0/agents/interview.brief.md +60 -0
  15. inspan-1.0.0/agents/interview.md +197 -0
  16. inspan-1.0.0/agents/modeling.brief.md +40 -0
  17. inspan-1.0.0/agents/modeling.md +698 -0
  18. inspan-1.0.0/agents/scanner.brief.md +67 -0
  19. inspan-1.0.0/agents/scanner.md +441 -0
  20. inspan-1.0.0/docs/README.md +71 -0
  21. inspan-1.0.0/docs/ai-adapters.md +352 -0
  22. inspan-1.0.0/docs/apply-engine.md +678 -0
  23. inspan-1.0.0/docs/architecture.md +2175 -0
  24. inspan-1.0.0/docs/artifacts.md +412 -0
  25. inspan-1.0.0/docs/bulk-input.md +415 -0
  26. inspan-1.0.0/docs/cli.md +2066 -0
  27. inspan-1.0.0/docs/code-linking.md +722 -0
  28. inspan-1.0.0/docs/content-schemas.md +485 -0
  29. inspan-1.0.0/docs/contracts.md +188 -0
  30. inspan-1.0.0/docs/design-quality.md +116 -0
  31. inspan-1.0.0/docs/evals.md +349 -0
  32. inspan-1.0.0/docs/git-integration.md +245 -0
  33. inspan-1.0.0/docs/gui.md +2120 -0
  34. inspan-1.0.0/docs/history.md +284 -0
  35. inspan-1.0.0/docs/impact-review.md +199 -0
  36. inspan-1.0.0/docs/implementation-workflow.md +148 -0
  37. inspan-1.0.0/docs/intake.md +89 -0
  38. inspan-1.0.0/docs/lite-workflow.md +85 -0
  39. inspan-1.0.0/docs/modeling-protocol.md +181 -0
  40. inspan-1.0.0/docs/node-restructuring-execution.md +177 -0
  41. inspan-1.0.0/docs/node-restructuring.md +178 -0
  42. inspan-1.0.0/docs/open-items.md +794 -0
  43. inspan-1.0.0/docs/operation-approval.md +448 -0
  44. inspan-1.0.0/docs/project-modeling-guidance.md +60 -0
  45. inspan-1.0.0/docs/proposal-compiler.md +397 -0
  46. inspan-1.0.0/docs/repair.md +319 -0
  47. inspan-1.0.0/docs/report.md +94 -0
  48. inspan-1.0.0/docs/rollback.md +141 -0
  49. inspan-1.0.0/docs/scan-workflow.md +166 -0
  50. inspan-1.0.0/docs/scanner.md +228 -0
  51. inspan-1.0.0/docs/view-renderer.md +159 -0
  52. inspan-1.0.0/inspan.egg-info/PKG-INFO +370 -0
  53. inspan-1.0.0/inspan.egg-info/SOURCES.txt +274 -0
  54. inspan-1.0.0/inspan.egg-info/dependency_links.txt +1 -0
  55. inspan-1.0.0/inspan.egg-info/entry_points.txt +2 -0
  56. inspan-1.0.0/inspan.egg-info/requires.txt +2 -0
  57. inspan-1.0.0/inspan.egg-info/top_level.txt +1 -0
  58. inspan-1.0.0/pyproject.toml +39 -0
  59. inspan-1.0.0/schemas/acceptance-criteria.content.schema.json +26 -0
  60. inspan-1.0.0/schemas/answers.schema.json +255 -0
  61. inspan-1.0.0/schemas/apply-result.schema.json +103 -0
  62. inspan-1.0.0/schemas/approval.schema.json +119 -0
  63. inspan-1.0.0/schemas/artifact-observation.schema.json +297 -0
  64. inspan-1.0.0/schemas/artifact.schema.json +194 -0
  65. inspan-1.0.0/schemas/audit-record.schema.json +413 -0
  66. inspan-1.0.0/schemas/bulk-input.schema.json +2127 -0
  67. inspan-1.0.0/schemas/business-rule.content.schema.json +309 -0
  68. inspan-1.0.0/schemas/change-review.schema.json +116 -0
  69. inspan-1.0.0/schemas/changeset.schema.json +1838 -0
  70. inspan-1.0.0/schemas/config.schema.json +432 -0
  71. inspan-1.0.0/schemas/content-registry.json +70 -0
  72. inspan-1.0.0/schemas/decision-ack.schema.json +54 -0
  73. inspan-1.0.0/schemas/description.content.schema.json +16 -0
  74. inspan-1.0.0/schemas/edge.schema.json +86 -0
  75. inspan-1.0.0/schemas/erasure-event.schema.json +121 -0
  76. inspan-1.0.0/schemas/erasure-tombstone.schema.json +13 -0
  77. inspan-1.0.0/schemas/git-link.schema.json +65 -0
  78. inspan-1.0.0/schemas/impact-review.schema.json +680 -0
  79. inspan-1.0.0/schemas/important-kept.schema.json +221 -0
  80. inspan-1.0.0/schemas/intake.schema.json +410 -0
  81. inspan-1.0.0/schemas/node.schema.json +91 -0
  82. inspan-1.0.0/schemas/permission-matrix.content.schema.json +181 -0
  83. inspan-1.0.0/schemas/policy.content.schema.json +146 -0
  84. inspan-1.0.0/schemas/prepared-apply.schema.json +1230 -0
  85. inspan-1.0.0/schemas/prepared-erasure.schema.json +425 -0
  86. inspan-1.0.0/schemas/proposal.schema.json +3710 -0
  87. inspan-1.0.0/schemas/quality-report.schema.json +74 -0
  88. inspan-1.0.0/schemas/restructuring.schema.json +487 -0
  89. inspan-1.0.0/schemas/scan-inventory.schema.json +103 -0
  90. inspan-1.0.0/schemas/state-machine.content.schema.json +64 -0
  91. inspan-1.0.0/schemas/test-run.schema.json +369 -0
  92. inspan-1.0.0/schemas/transaction.schema.json +217 -0
  93. inspan-1.0.0/schemas/trash.schema.json +119 -0
  94. inspan-1.0.0/schemas/type-catalog.json +59 -0
  95. inspan-1.0.0/schemas/validation.schema.json +283 -0
  96. inspan-1.0.0/schemas/view.schema.json +62 -0
  97. inspan-1.0.0/setup.cfg +4 -0
  98. inspan-1.0.0/src/inspan/__init__.py +3 -0
  99. inspan-1.0.0/src/inspan/__main__.py +3 -0
  100. inspan-1.0.0/src/inspan/ai/__init__.py +1 -0
  101. inspan-1.0.0/src/inspan/ai/agent_adapter.py +897 -0
  102. inspan-1.0.0/src/inspan/ai/agent_context.py +63 -0
  103. inspan-1.0.0/src/inspan/ai/claude_hook.py +1226 -0
  104. inspan-1.0.0/src/inspan/cli/__init__.py +1 -0
  105. inspan-1.0.0/src/inspan/cli/answers.py +172 -0
  106. inspan-1.0.0/src/inspan/cli/apply.py +1319 -0
  107. inspan-1.0.0/src/inspan/cli/audit.py +96 -0
  108. inspan-1.0.0/src/inspan/cli/bulk.py +584 -0
  109. inspan-1.0.0/src/inspan/cli/check.py +469 -0
  110. inspan-1.0.0/src/inspan/cli/common.py +642 -0
  111. inspan-1.0.0/src/inspan/cli/finish.py +2493 -0
  112. inspan-1.0.0/src/inspan/cli/fix.py +491 -0
  113. inspan-1.0.0/src/inspan/cli/history.py +784 -0
  114. inspan-1.0.0/src/inspan/cli/intake.py +196 -0
  115. inspan-1.0.0/src/inspan/cli/loop_mode.py +263 -0
  116. inspan-1.0.0/src/inspan/cli/main.py +444 -0
  117. inspan-1.0.0/src/inspan/cli/query.py +758 -0
  118. inspan-1.0.0/src/inspan/cli/render.py +113 -0
  119. inspan-1.0.0/src/inspan/cli/setup.py +271 -0
  120. inspan-1.0.0/src/inspan/code/__init__.py +1 -0
  121. inspan-1.0.0/src/inspan/code/code_targets.py +89 -0
  122. inspan-1.0.0/src/inspan/code/design_lag.py +511 -0
  123. inspan-1.0.0/src/inspan/code/drift.py +401 -0
  124. inspan-1.0.0/src/inspan/code/git_integration.py +201 -0
  125. inspan-1.0.0/src/inspan/code/git_read.py +197 -0
  126. inspan-1.0.0/src/inspan/code/implementation_check.py +1705 -0
  127. inspan-1.0.0/src/inspan/code/merge_guard.py +365 -0
  128. inspan-1.0.0/src/inspan/code/outside_commits.py +110 -0
  129. inspan-1.0.0/src/inspan/code/rule_check.py +634 -0
  130. inspan-1.0.0/src/inspan/code/scanner.py +1052 -0
  131. inspan-1.0.0/src/inspan/code/source_scan.py +1118 -0
  132. inspan-1.0.0/src/inspan/code/test_runs.py +466 -0
  133. inspan-1.0.0/src/inspan/code/text_scan.py +480 -0
  134. inspan-1.0.0/src/inspan/code/unit_scan.py +508 -0
  135. inspan-1.0.0/src/inspan/core/__init__.py +1 -0
  136. inspan-1.0.0/src/inspan/core/ai_decisions.py +693 -0
  137. inspan-1.0.0/src/inspan/core/answers.py +277 -0
  138. inspan-1.0.0/src/inspan/core/apply_engine.py +2016 -0
  139. inspan-1.0.0/src/inspan/core/approval.py +655 -0
  140. inspan-1.0.0/src/inspan/core/artifact_model.py +387 -0
  141. inspan-1.0.0/src/inspan/core/artifact_observation.py +835 -0
  142. inspan-1.0.0/src/inspan/core/bulk_input.py +800 -0
  143. inspan-1.0.0/src/inspan/core/change_review.py +255 -0
  144. inspan-1.0.0/src/inspan/core/conflict_record.py +441 -0
  145. inspan-1.0.0/src/inspan/core/content_shape.py +182 -0
  146. inspan-1.0.0/src/inspan/core/content_validation.py +250 -0
  147. inspan-1.0.0/src/inspan/core/draft_age.py +273 -0
  148. inspan-1.0.0/src/inspan/core/draft_hold.py +155 -0
  149. inspan-1.0.0/src/inspan/core/draft_settle.py +351 -0
  150. inspan-1.0.0/src/inspan/core/erasure.py +745 -0
  151. inspan-1.0.0/src/inspan/core/export.py +167 -0
  152. inspan-1.0.0/src/inspan/core/file_fingerprint.py +146 -0
  153. inspan-1.0.0/src/inspan/core/graph_traversal.py +41 -0
  154. inspan-1.0.0/src/inspan/core/history.py +623 -0
  155. inspan-1.0.0/src/inspan/core/impact.py +27 -0
  156. inspan-1.0.0/src/inspan/core/impact_paths.py +251 -0
  157. inspan-1.0.0/src/inspan/core/impact_review.py +616 -0
  158. inspan-1.0.0/src/inspan/core/important.py +461 -0
  159. inspan-1.0.0/src/inspan/core/important_kept.py +619 -0
  160. inspan-1.0.0/src/inspan/core/inferred_record.py +221 -0
  161. inspan-1.0.0/src/inspan/core/migration.py +170 -0
  162. inspan-1.0.0/src/inspan/core/migration_audit.py +252 -0
  163. inspan-1.0.0/src/inspan/core/model_repair.py +880 -0
  164. inspan-1.0.0/src/inspan/core/model_store.py +541 -0
  165. inspan-1.0.0/src/inspan/core/node_lifecycle.py +63 -0
  166. inspan-1.0.0/src/inspan/core/node_trash.py +185 -0
  167. inspan-1.0.0/src/inspan/core/not_in_code.py +187 -0
  168. inspan-1.0.0/src/inspan/core/prepared_requests.py +266 -0
  169. inspan-1.0.0/src/inspan/core/project.py +378 -0
  170. inspan-1.0.0/src/inspan/core/proposal_compiler.py +1380 -0
  171. inspan-1.0.0/src/inspan/core/proposal_questions.py +20 -0
  172. inspan-1.0.0/src/inspan/core/query.py +994 -0
  173. inspan-1.0.0/src/inspan/core/record_order.py +25 -0
  174. inspan-1.0.0/src/inspan/core/repair_proposal.py +762 -0
  175. inspan-1.0.0/src/inspan/core/repair_restore.py +443 -0
  176. inspan-1.0.0/src/inspan/core/request_summary.py +354 -0
  177. inspan-1.0.0/src/inspan/core/resources.py +66 -0
  178. inspan-1.0.0/src/inspan/core/restructuring.py +241 -0
  179. inspan-1.0.0/src/inspan/core/rollback.py +98 -0
  180. inspan-1.0.0/src/inspan/core/rule_checks.py +249 -0
  181. inspan-1.0.0/src/inspan/core/rule_scope.py +364 -0
  182. inspan-1.0.0/src/inspan/core/scan_refs.py +311 -0
  183. inspan-1.0.0/src/inspan/core/schema_messages.py +112 -0
  184. inspan-1.0.0/src/inspan/core/skeleton.py +575 -0
  185. inspan-1.0.0/src/inspan/core/validate.py +574 -0
  186. inspan-1.0.0/src/inspan/core/validate_proposal.py +1039 -0
  187. inspan-1.0.0/src/inspan/core/validation_report.py +39 -0
  188. inspan-1.0.0/src/inspan/core/view_model.py +63 -0
  189. inspan-1.0.0/src/inspan/gui/__init__.py +0 -0
  190. inspan-1.0.0/src/inspan/gui/api.py +1160 -0
  191. inspan-1.0.0/src/inspan/gui/approve.py +325 -0
  192. inspan-1.0.0/src/inspan/gui/deferred.py +114 -0
  193. inspan-1.0.0/src/inspan/gui/export.py +358 -0
  194. inspan-1.0.0/src/inspan/gui/find.py +809 -0
  195. inspan-1.0.0/src/inspan/gui/focus.py +568 -0
  196. inspan-1.0.0/src/inspan/gui/history.py +367 -0
  197. inspan-1.0.0/src/inspan/gui/lens.py +326 -0
  198. inspan-1.0.0/src/inspan/gui/overview.py +583 -0
  199. inspan-1.0.0/src/inspan/gui/palette.json +45 -0
  200. inspan-1.0.0/src/inspan/gui/pending.py +322 -0
  201. inspan-1.0.0/src/inspan/gui/reach.py +311 -0
  202. inspan-1.0.0/src/inspan/gui/review.py +576 -0
  203. inspan-1.0.0/src/inspan/gui/search.py +431 -0
  204. inspan-1.0.0/src/inspan/gui/server.py +822 -0
  205. inspan-1.0.0/src/inspan/gui/sessions.py +978 -0
  206. inspan-1.0.0/src/inspan/gui/source.py +939 -0
  207. inspan-1.0.0/src/inspan/gui/static/api.mjs +101 -0
  208. inspan-1.0.0/src/inspan/gui/static/app.css +1925 -0
  209. inspan-1.0.0/src/inspan/gui/static/app.mjs +590 -0
  210. inspan-1.0.0/src/inspan/gui/static/broken.mjs +59 -0
  211. inspan-1.0.0/src/inspan/gui/static/bulk.mjs +75 -0
  212. inspan-1.0.0/src/inspan/gui/static/content.mjs +367 -0
  213. inspan-1.0.0/src/inspan/gui/static/detail.mjs +1212 -0
  214. inspan-1.0.0/src/inspan/gui/static/docs.mjs +582 -0
  215. inspan-1.0.0/src/inspan/gui/static/dom.mjs +157 -0
  216. inspan-1.0.0/src/inspan/gui/static/favicon.svg +1 -0
  217. inspan-1.0.0/src/inspan/gui/static/find.mjs +1187 -0
  218. inspan-1.0.0/src/inspan/gui/static/focus-ledger.mjs +272 -0
  219. inspan-1.0.0/src/inspan/gui/static/focus-reach.mjs +113 -0
  220. inspan-1.0.0/src/inspan/gui/static/focus-rules.mjs +266 -0
  221. inspan-1.0.0/src/inspan/gui/static/focus-scope.mjs +101 -0
  222. inspan-1.0.0/src/inspan/gui/static/focus-source.mjs +176 -0
  223. inspan-1.0.0/src/inspan/gui/static/focus.mjs +1444 -0
  224. inspan-1.0.0/src/inspan/gui/static/groups.mjs +117 -0
  225. inspan-1.0.0/src/inspan/gui/static/harness.mjs +174 -0
  226. inspan-1.0.0/src/inspan/gui/static/i18n.mjs +65 -0
  227. inspan-1.0.0/src/inspan/gui/static/index.html +93 -0
  228. inspan-1.0.0/src/inspan/gui/static/open-items.mjs +322 -0
  229. inspan-1.0.0/src/inspan/gui/static/overview.mjs +1067 -0
  230. inspan-1.0.0/src/inspan/gui/static/panels.mjs +371 -0
  231. inspan-1.0.0/src/inspan/gui/static/pending-review.mjs +375 -0
  232. inspan-1.0.0/src/inspan/gui/static/pending.mjs +195 -0
  233. inspan-1.0.0/src/inspan/gui/static/review-batch.mjs +587 -0
  234. inspan-1.0.0/src/inspan/gui/static/review-decisions.mjs +252 -0
  235. inspan-1.0.0/src/inspan/gui/static/review-evidence.mjs +175 -0
  236. inspan-1.0.0/src/inspan/gui/static/review-rules.mjs +329 -0
  237. inspan-1.0.0/src/inspan/gui/static/review-sessions.mjs +219 -0
  238. inspan-1.0.0/src/inspan/gui/static/review-tray.mjs +519 -0
  239. inspan-1.0.0/src/inspan/gui/static/review-writes.mjs +482 -0
  240. inspan-1.0.0/src/inspan/gui/static/review.mjs +1551 -0
  241. inspan-1.0.0/src/inspan/gui/static/search.mjs +751 -0
  242. inspan-1.0.0/src/inspan/gui/static/source.mjs +89 -0
  243. inspan-1.0.0/src/inspan/gui/static/status.mjs +121 -0
  244. inspan-1.0.0/src/inspan/gui/static/steps.mjs +980 -0
  245. inspan-1.0.0/src/inspan/gui/static/strings.en.mjs +1513 -0
  246. inspan-1.0.0/src/inspan/gui/static/strings.ko.mjs +1501 -0
  247. inspan-1.0.0/src/inspan/gui/static/structure.mjs +881 -0
  248. inspan-1.0.0/src/inspan/gui/static/symbol.svg +1 -0
  249. inspan-1.0.0/src/inspan/gui/static/tokens.css +155 -0
  250. inspan-1.0.0/src/inspan/gui/static/wiring.mjs +343 -0
  251. inspan-1.0.0/src/inspan/gui/steps.py +431 -0
  252. inspan-1.0.0/src/inspan/gui/structure.py +624 -0
  253. inspan-1.0.0/src/inspan/intake/__init__.py +1 -0
  254. inspan-1.0.0/src/inspan/intake/intake.py +222 -0
  255. inspan-1.0.0/src/inspan/intake/ledger.py +41 -0
  256. inspan-1.0.0/src/inspan/intake/ledger_core.py +324 -0
  257. inspan-1.0.0/src/inspan/intake/ledger_drift.py +222 -0
  258. inspan-1.0.0/src/inspan/intake/ledger_find.py +357 -0
  259. inspan-1.0.0/src/inspan/intake/ledger_fork.py +341 -0
  260. inspan-1.0.0/src/inspan/intake/ledger_inflight.py +413 -0
  261. inspan-1.0.0/src/inspan/intake/ledger_progress.py +205 -0
  262. inspan-1.0.0/src/inspan/intake/ledger_records.py +735 -0
  263. inspan-1.0.0/src/inspan/intake/ledger_sources.py +678 -0
  264. inspan-1.0.0/src/inspan/intake/source_report.py +211 -0
  265. inspan-1.0.0/src/inspan/report/__init__.py +1 -0
  266. inspan-1.0.0/src/inspan/report/design_overview.py +390 -0
  267. inspan-1.0.0/src/inspan/report/design_quality.py +259 -0
  268. inspan-1.0.0/src/inspan/report/generated_docs.py +338 -0
  269. inspan-1.0.0/src/inspan/report/graph_layout.py +158 -0
  270. inspan-1.0.0/src/inspan/report/open_items.py +2166 -0
  271. inspan-1.0.0/src/inspan/report/renderer.py +896 -0
  272. inspan-1.0.0/src/inspan/report/scope_gate.py +78 -0
  273. inspan-1.0.0/src/inspan/report/session_start.py +552 -0
  274. inspan-1.0.0/src/inspan/report/text.py +236 -0
  275. inspan-1.0.0/src/inspan/report/tokens.py +216 -0
  276. inspan-1.0.0/src/inspan/report/view_renderer.py +888 -0
inspan-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Yi JiHong
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,8 @@
1
+ # Source distributions carry the product and its bundled contracts.
2
+ # Test suites and local experiments belong in the repository, not release archives.
3
+ prune tests
4
+ prune runs
5
+ prune .docs
6
+ exclude TODO.md
7
+ exclude .pypirc
8
+ global-exclude __pycache__ *.py[cod] .DS_Store
inspan-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,370 @@
1
+ Metadata-Version: 2.4
2
+ Name: inspan
3
+ Version: 1.0.0
4
+ Summary: The 7-Layer AI Development Framework: JSON design models and safe changes
5
+ License-Expression: MIT
6
+ Project-URL: Repository, https://github.com/JiHong88/inspan
7
+ Project-URL: Issues, https://github.com/JiHong88/inspan/issues
8
+ Project-URL: Documentation, https://jihong88.github.io/inspan/
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: jsonschema<5,>=4.18
13
+ Requires-Dist: rfc3339-validator>=0.1.4
14
+ Dynamic: license-file
15
+
16
+ <img alt="Inspan" src="https://raw.githubusercontent.com/JiHong88/inspan/main/assets/brand/wordmark.svg" width="320">
17
+
18
+ # Inspan
19
+
20
+ **Keep design decisions connected to code as your app changes.**
21
+
22
+ English · [한국어](https://github.com/JiHong88/inspan/blob/main/README.ko.md)
23
+
24
+ [Repository](https://github.com/JiHong88/inspan) · [Issues](https://github.com/JiHong88/inspan/issues)
25
+
26
+ Inspan helps AI coding tools preserve a project's design intent as it evolves.
27
+ It organizes design decisions into seven layers of JSON data, tracks dependencies,
28
+ and connects change review, approval, application, and validation.
29
+ You choose the project's language, framework, and AI coding tool.
30
+
31
+ Install from [PyPI](https://pypi.org/project/inspan/) with pip or pipx.
32
+ Check the installed package version with `inspan --version`. Stored data uses schema version `0.0.1`, independently of package releases.
33
+ Licensed under the [MIT License](https://github.com/JiHong88/inspan/blob/main/LICENSE).
34
+
35
+ ## A small example
36
+
37
+ Suppose a task app must require a title. That rule affects the form, the API, and the tests.
38
+ Inspan stores the rule once and records which design items depend on it. When the rule changes,
39
+ Inspan identifies items to review. Your AI checks them, edits the code, and records test results.
40
+
41
+ ```mermaid
42
+ flowchart LR
43
+ Person["You explain the change"] -->|request| AI["Your AI proposes a design change"]
44
+ AI -->|Proposal JSON| Core["Inspan checks structure and approval policy"]
45
+ Core -->|apply when permitted| Store[".inspan/: design and history"]
46
+ Store -->|design and impact candidates| Work["AI edits code and runs tests"]
47
+ Work -->|record evidence| Check["Inspan shows remaining work"]
48
+ ```
49
+
50
+ An impact candidate means **review this item**, not that it must change.
51
+ Inspan itself does not call an LLM, edit application code, or run your app's tests.
52
+
53
+ | Concept | Simple meaning | Task-app example |
54
+ | --- | --- | --- |
55
+ | **Node** | One design item with its own content | “A task needs a title” |
56
+ | **Edge** | A relationship between design items | The API depends on the title rule |
57
+ | **View** | A reading order for existing Nodes | A document about creating tasks |
58
+ | **Artifact** | A file registered and linked to Nodes | The API source or test file |
59
+
60
+ **Start reading:** [English guide](https://github.com/JiHong88/inspan/blob/main/guide/en/README.md) · [한국어 가이드](https://github.com/JiHong88/inspan/blob/main/guide/ko/README.md) · [Documentation site](https://JiHong88.github.io/inspan/).
61
+
62
+ Follow [getting started](https://github.com/JiHong88/inspan/blob/main/guide/en/getting-started.md) → [workflows](https://github.com/JiHong88/inspan/blob/main/guide/en/workflows.md) → [Core](https://github.com/JiHong88/inspan/blob/main/guide/en/core.md) → [code linking](https://github.com/JiHong88/inspan/blob/main/guide/en/code-linking.md).
63
+ For an app that already has code, follow [starting from existing code](https://github.com/JiHong88/inspan/blob/main/guide/en/existing-code.md).
64
+ The [documentation index](https://github.com/JiHong88/inspan/blob/main/docs/README.md) holds detailed contracts, mostly in Korean.
65
+
66
+ ## Large and long-running projects
67
+
68
+ In large projects, recording the relationships between requirements, modules, code, and tests
69
+ helps identify what to review when one rule changes.
70
+
71
+ In long-running projects, design intent, change history, review reasons, and test evidence stay
72
+ with the project. A new AI session or a different contributor can read that context and continue the work.
73
+
74
+ Keep the relevant design items, links, and review records up to date alongside code changes.
75
+
76
+ ## Seven layers classify design decisions
77
+
78
+ | Layer | Name | Responsibility |
79
+ | --- | --- | --- |
80
+ | L0 | Foundation | Vision, concept, goals, principles |
81
+ | L1 | Domain | Workflows, roles, concepts, business rules |
82
+ | L2 | Product | Product scope, requirements, responsibilities |
83
+ | L3 | Experience & Design | User flows, UX/UI, design principles |
84
+ | L4 | System Design | System structure, data models, APIs, integrations |
85
+ | L5 | Engineering | Technology choices, environments, coding and testing rules |
86
+ | L6 | Feature Specification | Detailed behavior, exceptions, acceptance criteria |
87
+
88
+ Layers classify design. Dependencies may connect any relevant layers, and a project does not
89
+ need artificial content for every layer. Code and tests are linked as **Implementation Artifacts**.
90
+ See the [data model and relationship rules](https://github.com/JiHong88/inspan/blob/main/docs/contracts.md).
91
+
92
+ ## Quick start
93
+
94
+ Requires **Python 3.10+**. This macOS/Linux example installs Inspan from PyPI.
95
+ Run it from the directory where you want to create `my-project`.
96
+
97
+ ```bash
98
+ python3 -m venv .venv
99
+ source .venv/bin/activate
100
+ python -m pip install inspan
101
+ inspan --version
102
+
103
+ mkdir my-project
104
+ inspan init my-project --name "My Project"
105
+ inspan validate --project my-project
106
+ inspan list --project my-project
107
+ ```
108
+
109
+ The command is `inspan`. For Windows commands, pipx, and source or wheel installation,
110
+ see [Install and update](https://github.com/JiHong88/inspan/blob/main/guide/en/getting-started.md#install-update-and-uninstall). CI checks macOS, Linux, and Windows with Python 3.10 and 3.14.
111
+
112
+ `init` creates an empty design store in an existing application directory. It does not impose
113
+ an application source layout and refuses to overwrite an existing `.inspan` directory.
114
+
115
+ Its `config.json` binds a built-in content schema to every type of the type catalog: L2 and L6 types
116
+ need acceptance criteria, and L1 business rules, calculations, permissions and policies have structured shapes.
117
+ See [content schemas](https://github.com/JiHong88/inspan/blob/main/docs/content-schemas.md#새-프로젝트의-연결).
118
+
119
+ ```text
120
+ my-project/
121
+ ├── ... application source and tests ...
122
+ ├── .inspan.lock
123
+ └── .inspan/
124
+ ├── config.json
125
+ ├── model/{nodes,edges,views,artifacts}/
126
+ ├── inputs/
127
+ ├── changes/
128
+ ├── transactions/
129
+ ├── validations/
130
+ └── cache/
131
+ ```
132
+
133
+ **Core code, schemas, and agent instructions live in the installed Python package.**
134
+ The user's `.inspan` contains project settings, design, inputs, and history. Stores for
135
+ artifact observations, impact reviews, and Git links are created when first used.
136
+ Recovery journals in `transactions/` must be retained; they are not disposable cache files.
137
+
138
+ ## Work with an AI tool
139
+
140
+ ```bash
141
+ inspan agent show interview
142
+ inspan agent show modeling
143
+ inspan agent show change-planning
144
+ inspan agent show implementation
145
+ inspan agent show modeling --brief # what a host AI reads every turn (common + role brief)
146
+ inspan agent show modeling --toc # sections to read only when stuck: --section <id>
147
+
148
+ # Optional connection for Codex projects.
149
+ inspan adapter install codex --project my-project
150
+ inspan adapter status codex --project my-project
151
+ inspan adapter upgrade codex --project my-project # rewrite an unedited block for this version
152
+ inspan adapter remove codex --project my-project # take the block out; your own text stays
153
+ ```
154
+
155
+ `agent show` returns common rules and role instructions; `--brief` is the default load the
156
+ adapter block points at. Your current AI tool reads files,
157
+ asks questions, and makes semantic judgments. Interview clarifies intent from conversation,
158
+ existing files, or both; **Modeling structures that intent and writes a Proposal**.
159
+ Other AI tools can use the same instructions. [Agent roles](https://github.com/JiHong88/inspan/blob/main/agents/README.md) · [Adapter setup](https://github.com/JiHong88/inspan/blob/main/docs/ai-adapters.md)
160
+
161
+ ```text
162
+ Conversation / files → Interview → Modeling → Proposal JSON
163
+ ↓
164
+ compile → ChangeSet
165
+ ↓
166
+ Change Planning → prepare → required approval
167
+ ↓
168
+ apply → structural validation / history
169
+ ↓
170
+ Implementation → code changes / tests / impact reports
171
+ ```
172
+
173
+ `compile` and `prepare` leave the design model unchanged. `apply` performs the JSON changes.
174
+ Application code edits and test execution belong to the host AI's implementation workflow,
175
+ which is separate from the Core's JSON transaction.
176
+ See the [application commands and approval format](https://github.com/JiHong88/inspan/blob/main/docs/cli.md#제안부터-적용까지).
177
+
178
+ The default approval mode is **Balanced**: draft edits and additions that lose no content can proceed automatically
179
+ when no impact or risk review is required; important changes require approval.
180
+ Strict requires explicit approval, while Autonomous applies within configured limits.
181
+ All modes evaluate affected layers, risk rules, and operation-specific approval requirements.
182
+ See the [exact approval rules](https://github.com/JiHong88/inspan/blob/main/docs/apply-engine.md#승인-평가).
183
+
184
+ For a first project, `--preset lite` enables code-link checks with a mostly Balanced policy.
185
+ `greenfield` allows more implementation-layer changes automatically. `loop` adds eligible changes to a review queue
186
+ after applying them. Loop mode and AI decision mode require the person's terminal approval to enable.
187
+
188
+ AI decision mode records reasons and evidence. Its `standard` scope keeps protected decisions with the person;
189
+ explicitly enabling `all` delegates those approvals to the AI too. Read the exact conditions before choosing a mode.
190
+
191
+ <details>
192
+ <summary>Preset details, deferred review, and AI decision mode</summary>
193
+
194
+ `init --mode` picks one mode for every layer. For a new app, `init --preset greenfield` instead starts with
195
+ L0 Strict, L1–L2 Balanced and L3–L6 Autonomous. A change that touches only L3–L6 follows Autonomous, so no Balanced
196
+ review reason applies: creating confirmed Edges, lifecycle transitions, edits to review or approved Nodes, impact
197
+ candidates left to review, Edge updates and View or Artifact changes all apply without approval.
198
+
199
+ Only explicit risks (such as destructive changes, which include rewiring an Edge's endpoints or type) and repairs still need
200
+ approval there. Any later Config change needs explicit approval (L0 is Strict, and weakening approval is
201
+ destructive). Setting the same policy later on a default project takes one approval, which choosing the preset
202
+ at init avoids.
203
+
204
+ Both presets (`greenfield`, `lite`) also start a managed project (`implementation.managed`): every
205
+ code file is registered and bound to the Node it implements or verifies, and `init` and `change` print the next commands.
206
+ Both also append Inspan's runtime entries to `.gitignore`.
207
+
208
+ For an unattended AI loop, `init --preset loop` is greenfield plus deferred review (`approval.deferReview`): a change
209
+ that would wait for approval is applied at once and waits in a review queue the person accepts or rolls back later
210
+ (`inspan change-review`, the GUI pending card); strict layers, Config, split/merge, repairs, a full queue, and
211
+ destructive changes and rule changes (`destructive: block`) still wait.
212
+
213
+ It also issues hashed Node keys, retries a busy
214
+ store for 15 seconds (`ai.writeWait`) and, inside a Git worktree, writes the CI workflow of the merge gate
215
+ (`inspan guard ci`). The person runs it at their own terminal (a shell that is not one is refused), and
216
+ `inspan config loop-mode on|off` turns it on or off with the person's approval at their terminal.
217
+ See [start presets](https://github.com/JiHong88/inspan/blob/main/docs/cli.md#시작-프리셋) and [deferred review](https://github.com/JiHong88/inspan/blob/main/docs/operation-approval.md#사후-검토-loop-모드).
218
+
219
+ `inspan config ai-decides on` enables AI decisions at the person's terminal. The default scope, `standard`, keeps
220
+ protected decisions such as important values, Config, repair and erasure with the person. To delegate those too,
221
+ the person explicitly runs `inspan config ai-decides on --scope all`. Each AI approval records `ai:<name>`, reason,
222
+ evidence and its scope; inspect them with `inspan decisions`.
223
+
224
+ Open-items distinguishes actionable work from unread AI activity.
225
+ Routine notifications are summarized; the full audit trail remains available. The full scope retains integrity checks and explicit
226
+ rejections, and does not let an AI pretend the person acknowledged a decision. See [AI decision mode](https://github.com/JiHong88/inspan/blob/main/docs/operation-approval.md#ai-결정-모드).
227
+
228
+ Values marked important (`content.x-important`) require explicit approval in both scopes. A kept value is recorded
229
+ and remains visible until resolved (`inspan important --unresolved`, open-items `important`).
230
+ See [important values](https://github.com/JiHong88/inspan/blob/main/docs/cli.md#중요-값과-유지-기록-important).
231
+
232
+ </details>
233
+
234
+ ## Your first applied change
235
+
236
+ From the project root, these commands take a ready Proposal (written by Modeling) through
237
+ compile → prepare → approve → apply. The compiler refuses a Proposal with unanswered blocking questions.
238
+
239
+ ```bash
240
+ inspan compile proposal.json --out plan.json
241
+ inspan prepare plan.json --out prepared.json
242
+ inspan approve prepared.json --by "Your name" --out approval.json
243
+ inspan apply prepared.json --approval approval.json
244
+ inspan log --limit 1
245
+ ```
246
+
247
+ `compile` and `prepare` do not modify the JSON model: besides the two output files they only create the
248
+ runtime lock file `.inspan.lock` next to `.inspan`, which stays after the command ends (add it to
249
+ `.gitignore`). `prepared.json` shows the affected Nodes, impact
250
+ candidates and `approvalRequirement`, which says whether approval is required.
251
+
252
+ `approve` writes an approval record bound to the request's `requestHash` after you have read `prepared.json`;
253
+ it is your decision, not an automatic step. In your own terminal, `inspan apply prepared.json --approve` does both in
254
+ one command: it asks your name and `yes <hash8>`, writes `approval.json` next to `prepared.json`, then applies.
255
+
256
+ `apply` performs the JSON change under a recovery journal and
257
+ `log` shows the committed ChangeSet. Rerun `inspan quality` to see which new relationships are still `suggested`.
258
+
259
+ For fewer steps, start with `inspan init --preset lite` (L0 strict, every other layer balanced, implementation-check
260
+ findings as warnings, and the runtime entries appended to `.gitignore`) and run each change in one command:
261
+
262
+ ```bash
263
+ inspan change design/task-list.proposal.json
264
+ ```
265
+
266
+ `change` runs validate-proposal → compile → prepare, keeps `design/task-list.plan.json` and `.prepared.json`, and applies
267
+ when no approval is required. When approval is required it stops with exit code 4 and prints the exact `approve` and
268
+ `apply` commands.
269
+
270
+ When the code already matches the new design, `--observe` records the observations of the related
271
+ files right after the apply. See the [lite workflow](https://github.com/JiHong88/inspan/blob/main/docs/lite-workflow.md) (Korean).
272
+
273
+ ## What you can inspect
274
+
275
+ ```bash
276
+ inspan context
277
+ inspan context --task "Assign work managers per team"
278
+ inspan open-items --summary
279
+ inspan gui
280
+ ```
281
+
282
+ These show the design context, remaining work, and a local view for people. `--task` has the Core pick the Nodes a
283
+ task text is about and print them with their content: the design an AI follows for that task, ahead of repo docs.
284
+
285
+ The GUI can prepare relationship-review batches, decide pending requests, and review deferred changes.
286
+ It does not edit Node content. `--read-only` disables decision and batch writes; document export remains available.
287
+
288
+ <details>
289
+ <summary>Capabilities, limits, and Git commands</summary>
290
+
291
+ | Area | Implemented |
292
+ | --- | --- |
293
+ | Design model | Nodes, Edges, Views, Artifacts, Config; queries, search, references, impact analysis |
294
+ | Safe changes | Proposal compilation, approval policy, revision/hash conflict checks, journals and interruption recovery; optional deferred review (loop mode: apply now, review later) |
295
+ | Broken records | Files broken outside Core: `inspan repair --check` explains each, `inspan repair --all` restores the journaled versions in one ChangeSet approved under the project's policy |
296
+ | Traceability | History, diffs, compensating rollback, trash and selective restore, scoped permanent deletion, split/merge reference reassignment; ticket links (`externalRefs`, `inspan log --ref JIRA-123`) and a JSON Lines feed for a search index or RAG store (`inspan export --since <cursor>`, with delete and erase tombstones) |
297
+ | Validation | Schema and graph checks, built-in Content Schema selection, design quality warnings; recorded contradictions between sources (`x-conflicts`) stay open until a decision is recorded |
298
+ | Implementation links | Artifact file observations and freshness tracking for impact and verification reports; per-line rule checks (`content.checks`, `inspan rules --check`); code-only fixes (`inspan fix`) |
299
+ | Open items | `inspan open-items`: what the project still owes after its changes (open ledger questions, impact reviews, file observations, design lag (identifiers a Node states that the code dropped; only a Proposal clears it), generated documents that are not their View's rendering, implementation checks, the code coverage of a managed project, rule-check hits, open conflicts, suggested Edges, deferred reviews, prepared changes nobody applied), each with its next command and who decides, large categories folded, `--summary` for counts, gate status and a few lines; `--fail-on` as a gate: `loop` (what `finish` checks), `merge` (CI), and `--baseline` so a loop fails only on items it added |
300
+ | Git associations | Local status, existing commit links, immutable records and history evidence rechecks; an opt-in merge guard (`inspan guard install`: Git post-merge and post-commit hooks, the latter for merge commits only) and a CI check (`inspan guard ci`: `inspan validate --fail-on error` and, in a managed project, the merge gate `inspan open-items --fail-on merge --no-ledger`; `init --preset loop` writes it) for Node keys two branches both issued, repaired by an approved rekey |
301
+ | AI workflow | Common rules, five roles, Codex/Claude Code/Cursor/Gemini CLI/Copilot adapters, project guidance queries |
302
+
303
+ Use the [intake CLI](https://github.com/JiHong88/inspan/blob/main/docs/intake.md) to carry files, explicit choices and unresolved questions into Modeling.
304
+
305
+ Export current Views with `inspan render <view-id> --format html --out design.html`
306
+ or the default Markdown format. See the [renderer contract](https://github.com/JiHong88/inspan/blob/main/docs/view-renderer.md). A repository document registered as a View's
307
+ generated document (an Artifact marker, reviewed on approval) is written again by `inspan render --doc PATH`; open-items `docs` lists
308
+ one that is stale or edited by hand.
309
+
310
+ **Graph GUI:** `inspan gui` (Connections, Overview, Structure, business steps, Documents with View documents and the design-status report, the review queue for
311
+ suggested Edges and a card for prepared requests waiting for approval) is implemented. By default the Review tab also prepares the decisions you picked as a batch
312
+ (the server runs compile and prepare only) and records defers under `design/gui/`; `inspan gui --read-only` serves
313
+ without these writes.
314
+
315
+ The batch card gives one terminal line to copy that approves and applies it (the two separate steps are under "Step by step"); a batch is approved and applied in the terminal.
316
+
317
+ A request waiting in `design/` (for example from a host AI's `inspan change`) can be reviewed in the pending card and approved and applied,
318
+ or rejected, by the person in the page (`approvedVia: gui`); erasures and repairs stay in the terminal.
319
+
320
+ The GUI does not edit Nodes. `inspan scan` inventories an existing application for the
321
+ Scanner role ([contract](https://github.com/JiHong88/inspan/blob/main/docs/scanner.md)).
322
+
323
+ Structural validation does not establish semantic correctness or passing application tests.
324
+ Fresh AI session behavior is measured by the [host behavior evals](https://github.com/JiHong88/inspan/blob/main/docs/evals.md). Results and transcripts stay in local output folders;
325
+ claims about host behavior need evidence from the relevant run, not reference replays or unit-test results.
326
+
327
+ In a project that is already a Git working tree (and with Git installed), associate an already applied
328
+ ChangeSet with a local commit. `init` does not create a repository; outside a working tree `git status`
329
+ returns `status: not_available` with `NOT_GIT_WORKTREE` and exit code 0.
330
+
331
+ ```bash
332
+ inspan git status
333
+ inspan git record chg_YOUR_CHANGE_ID --commit HEAD --actor "Your name"
334
+ inspan git links chg_YOUR_CHANGE_ID
335
+ inspan git links --node n_YOUR_NODE_ID
336
+ inspan trace chg_YOUR_CHANGE_ID --git
337
+ ```
338
+
339
+ Replace the placeholder IDs with the IDs returned by `apply` and `list`. A busy project can be awaited with the
340
+ global `--wait SECONDS` option (commands that only read the store wait 10 seconds by default). Git links preserve completed Core history;
341
+ they do not create commits or approve implementation. See the [Git contract](https://github.com/JiHong88/inspan/blob/main/docs/git-integration.md).
342
+
343
+ </details>
344
+
345
+ ## Documentation and contributing
346
+
347
+ Read the overview in [English](https://github.com/JiHong88/inspan/blob/main/guide/en/README.md) or [한국어](https://github.com/JiHong88/inspan/blob/main/guide/ko/README.md), or open a topic directly:
348
+
349
+ | Guide | What it covers |
350
+ | --- | --- |
351
+ | [Getting started](https://github.com/JiHong88/inspan/blob/main/guide/en/getting-started.md) | Installation, AI setup, and a first change |
352
+ | [Choose a workflow](https://github.com/JiHong88/inspan/blob/main/guide/en/workflows.md) | Starting paths, new-app presets, approval, and draft review |
353
+ | [Start from existing code](https://github.com/JiHong88/inspan/blob/main/guide/en/existing-code.md) | Initial scans, batches, design registration, and cautions |
354
+ | [Review scanned design](https://github.com/JiHong88/inspan/blob/main/guide/en/scan-workflow.md) | Skeleton, estimate questions, answers, draft settlement and migration cutover |
355
+ | [Core and architecture](https://github.com/JiHong88/inspan/blob/main/guide/en/core.md) | The model, approval, application, and recovery |
356
+ | [Code linking and completion](https://github.com/JiHong88/inspan/blob/main/guide/en/code-linking.md) | File bindings, observations, one real test run for explicit related changes, and completion gates |
357
+ | [Generated documents](https://github.com/JiHong88/inspan/blob/main/guide/en/generated-docs.md) | Rendering documents from the model and keeping them current |
358
+ | [Local GUI](https://github.com/JiHong88/inspan/blob/main/guide/en/gui.md) | Browsing design and reviewing decisions |
359
+ | [Delegating work](https://github.com/JiHong88/inspan/blob/main/guide/en/delegation.md) | Coordinating AI workers and checking their results |
360
+ | [Development and publishing](https://github.com/JiHong88/inspan/blob/main/guide/en/development.md) | Implementation files, tests, and documentation site maintenance |
361
+
362
+ - [GitHub Pages documentation](https://JiHong88.github.io/inspan/): the same guides with search, contents, diagrams, and language navigation
363
+ - [Documentation site maintenance](https://github.com/JiHong88/inspan/blob/main/guide/en/development.md#documentation-site): local build, checks, and GitHub Actions deployment
364
+
365
+ - [Install and update](https://github.com/JiHong88/inspan/blob/main/guide/en/getting-started.md#install-update-and-uninstall): installing, updating and what an update keeps
366
+ - [Documentation index](https://github.com/JiHong88/inspan/blob/main/docs/README.md): CLI, data and execution contracts, agents
367
+ - [Contributing](https://github.com/JiHong88/inspan/blob/main/CONTRIBUTING.md): setup, source layout, test commands, change expectations
368
+ - [Releases](https://github.com/JiHong88/inspan/releases): release notes, newest release first
369
+
370
+ Detailed contract documents are mostly in Korean; common agent instructions are in English.