@rosetears/aili-pi 0.1.0

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 (531) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +109 -0
  3. package/THIRD_PARTY_NOTICES.md +64 -0
  4. package/extensions/index.ts +6 -0
  5. package/install.sh +5 -0
  6. package/manifests/adapter-evidence.json +45 -0
  7. package/manifests/capabilities.json +124 -0
  8. package/manifests/live-verification.json +26 -0
  9. package/manifests/provenance.json +71 -0
  10. package/manifests/roles.json +474 -0
  11. package/manifests/sbom.json +7797 -0
  12. package/manifests/skill-compatibility.json +8100 -0
  13. package/manifests/subagent-provenance.json +37 -0
  14. package/package.json +91 -0
  15. package/prompts/build.md +8 -0
  16. package/prompts/define.md +8 -0
  17. package/prompts/ideate.md +8 -0
  18. package/prompts/local-review.md +8 -0
  19. package/prompts/ship.md +8 -0
  20. package/roles/agent-evaluator.md +47 -0
  21. package/roles/ai-regression-scout.md +47 -0
  22. package/roles/browser-qa-runner.md +47 -0
  23. package/roles/code-reviewer.md +47 -0
  24. package/roles/code-scout.md +47 -0
  25. package/roles/convergence-reviewer.md +55 -0
  26. package/roles/doc-researcher.md +47 -0
  27. package/roles/e2e-artifact-runner.md +47 -0
  28. package/roles/implementer.md +47 -0
  29. package/roles/opensource-sanitizer.md +47 -0
  30. package/roles/plan-auditor.md +47 -0
  31. package/roles/pr-test-analyzer.md +47 -0
  32. package/roles/security-auditor.md +47 -0
  33. package/roles/silent-failure-reviewer.md +47 -0
  34. package/roles/spec-miner.md +47 -0
  35. package/roles/test-coverage-reviewer.md +47 -0
  36. package/roles/test-engineer.md +48 -0
  37. package/roles/web-performance-auditor.md +47 -0
  38. package/roles/web-researcher.md +47 -0
  39. package/scripts/apply-adapter-evidence.ts +73 -0
  40. package/scripts/bootstrap.sh +180 -0
  41. package/scripts/generate-provenance.ts +143 -0
  42. package/scripts/local-package-e2e.ts +51 -0
  43. package/scripts/sync-roles.ts +213 -0
  44. package/scripts/sync-skills.ts +356 -0
  45. package/scripts/validate-runtime.ts +11 -0
  46. package/skills/academic-paper-review/SKILL.md +81 -0
  47. package/skills/agents-md-initialization/SKILL.md +121 -0
  48. package/skills/agents-md-initialization/references/agents-template.md +83 -0
  49. package/skills/agents-md-initialization/references/agents_md.py +215 -0
  50. package/skills/ai-regression-scout/SKILL.md +24 -0
  51. package/skills/aili-delivery-flow/SKILL.md +125 -0
  52. package/skills/aili-delivery-flow/references/artifact-contracts.md +138 -0
  53. package/skills/aili-delivery-flow/references/backend-routing.md +40 -0
  54. package/skills/aili-delivery-flow/references/build-execution-loop.md +113 -0
  55. package/skills/aili-delivery-flow/references/build-goal-mode.md +3 -0
  56. package/skills/aili-delivery-flow/references/direct-vs-delegated-work.md +38 -0
  57. package/skills/aili-delivery-flow/references/implementation-packages.md +54 -0
  58. package/skills/aili-delivery-flow/references/lifecycle.md +127 -0
  59. package/skills/aili-delivery-flow/references/protocols/acceptance-test-plan.md +18 -0
  60. package/skills/aili-delivery-flow/references/protocols/alignment-questionnaire.md +10 -0
  61. package/skills/aili-delivery-flow/references/protocols/closeout-report.md +101 -0
  62. package/skills/aili-delivery-flow/references/protocols/compact-evidence-pack.md +46 -0
  63. package/skills/aili-delivery-flow/references/protocols/idea-brief.md +10 -0
  64. package/skills/aili-delivery-flow/references/protocols/implementation-package.md +53 -0
  65. package/skills/aili-delivery-flow/references/protocols/research-evidence-pack.md +19 -0
  66. package/skills/aili-delivery-flow/references/protocols/review-report.md +7 -0
  67. package/skills/aili-delivery-flow/references/protocols/spec-draft.md +12 -0
  68. package/skills/aili-delivery-flow/references/protocols/subagent-result.md +60 -0
  69. package/skills/aili-delivery-flow/references/protocols/subagent-task-packet.md +29 -0
  70. package/skills/aili-delivery-flow/references/protocols/worktree-context.md +109 -0
  71. package/skills/aili-delivery-flow/references/questionnaire-policy.md +62 -0
  72. package/skills/aili-delivery-flow/references/review-repair-loop.md +16 -0
  73. package/skills/aili-delivery-flow/references/test-document-policy.md +35 -0
  74. package/skills/android-native-dev/SKILL.md +722 -0
  75. package/skills/android-native-dev/references/accessibility.md +209 -0
  76. package/skills/android-native-dev/references/adaptive-screens.md +231 -0
  77. package/skills/android-native-dev/references/design-style-guide.md +365 -0
  78. package/skills/android-native-dev/references/functional-requirements.md +229 -0
  79. package/skills/android-native-dev/references/motion-system.md +203 -0
  80. package/skills/android-native-dev/references/performance-stability.md +223 -0
  81. package/skills/android-native-dev/references/privacy-security.md +244 -0
  82. package/skills/android-native-dev/references/testing.md +554 -0
  83. package/skills/android-native-dev/references/visual-design.md +246 -0
  84. package/skills/api-and-interface-design/SKILL.md +318 -0
  85. package/skills/browser-qa/SKILL.md +32 -0
  86. package/skills/browser-testing-with-devtools/SKILL.md +323 -0
  87. package/skills/build-failure-repair/SKILL.md +49 -0
  88. package/skills/chart-visualization/SKILL.md +73 -0
  89. package/skills/ci-cd-and-automation/SKILL.md +353 -0
  90. package/skills/code-review-and-quality/SKILL.md +375 -0
  91. package/skills/code-review-quality-gates/SKILL.md +132 -0
  92. package/skills/code-simplification/SKILL.md +371 -0
  93. package/skills/comment-accuracy-review/SKILL.md +37 -0
  94. package/skills/consulting-analysis/SKILL.md +69 -0
  95. package/skills/context-engineering/SKILL.md +375 -0
  96. package/skills/coverage-review/SKILL.md +24 -0
  97. package/skills/data-analysis/SKILL.md +74 -0
  98. package/skills/deprecation-and-migration/SKILL.md +222 -0
  99. package/skills/documentation-and-adrs/SKILL.md +330 -0
  100. package/skills/e2e-artifact-handling/SKILL.md +30 -0
  101. package/skills/evidence-scoped-retrospective/SKILL.md +156 -0
  102. package/skills/explain-by-allegory/SKILL.md +99 -0
  103. package/skills/flutter-dev/SKILL.md +162 -0
  104. package/skills/flutter-dev/references/animations.md +497 -0
  105. package/skills/flutter-dev/references/bloc-state.md +281 -0
  106. package/skills/flutter-dev/references/forms.md +656 -0
  107. package/skills/flutter-dev/references/gorouter-navigation.md +257 -0
  108. package/skills/flutter-dev/references/localization.md +510 -0
  109. package/skills/flutter-dev/references/networking.md +566 -0
  110. package/skills/flutter-dev/references/performance.md +305 -0
  111. package/skills/flutter-dev/references/platform-specific.md +417 -0
  112. package/skills/flutter-dev/references/project-structure.md +273 -0
  113. package/skills/flutter-dev/references/riverpod-state.md +232 -0
  114. package/skills/flutter-dev/references/testing.md +364 -0
  115. package/skills/flutter-dev/references/widget-patterns.md +233 -0
  116. package/skills/frontend-dev/SKILL.md +468 -0
  117. package/skills/frontend-dev/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  118. package/skills/frontend-dev/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  119. package/skills/frontend-dev/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  120. package/skills/frontend-dev/canvas-fonts/BigShoulders-OFL.txt +93 -0
  121. package/skills/frontend-dev/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  122. package/skills/frontend-dev/canvas-fonts/Boldonse-OFL.txt +93 -0
  123. package/skills/frontend-dev/canvas-fonts/Boldonse-Regular.ttf +0 -0
  124. package/skills/frontend-dev/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  125. package/skills/frontend-dev/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  126. package/skills/frontend-dev/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  127. package/skills/frontend-dev/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  128. package/skills/frontend-dev/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  129. package/skills/frontend-dev/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  130. package/skills/frontend-dev/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  131. package/skills/frontend-dev/canvas-fonts/DMMono-OFL.txt +93 -0
  132. package/skills/frontend-dev/canvas-fonts/DMMono-Regular.ttf +0 -0
  133. package/skills/frontend-dev/canvas-fonts/EricaOne-OFL.txt +94 -0
  134. package/skills/frontend-dev/canvas-fonts/EricaOne-Regular.ttf +0 -0
  135. package/skills/frontend-dev/canvas-fonts/GeistMono-Bold.ttf +0 -0
  136. package/skills/frontend-dev/canvas-fonts/GeistMono-OFL.txt +93 -0
  137. package/skills/frontend-dev/canvas-fonts/GeistMono-Regular.ttf +0 -0
  138. package/skills/frontend-dev/canvas-fonts/Gloock-OFL.txt +93 -0
  139. package/skills/frontend-dev/canvas-fonts/Gloock-Regular.ttf +0 -0
  140. package/skills/frontend-dev/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  141. package/skills/frontend-dev/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  142. package/skills/frontend-dev/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  143. package/skills/frontend-dev/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  144. package/skills/frontend-dev/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  145. package/skills/frontend-dev/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  146. package/skills/frontend-dev/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  147. package/skills/frontend-dev/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  148. package/skills/frontend-dev/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  149. package/skills/frontend-dev/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  150. package/skills/frontend-dev/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  151. package/skills/frontend-dev/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  152. package/skills/frontend-dev/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  153. package/skills/frontend-dev/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  154. package/skills/frontend-dev/canvas-fonts/Italiana-OFL.txt +93 -0
  155. package/skills/frontend-dev/canvas-fonts/Italiana-Regular.ttf +0 -0
  156. package/skills/frontend-dev/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  157. package/skills/frontend-dev/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  158. package/skills/frontend-dev/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  159. package/skills/frontend-dev/canvas-fonts/Jura-Light.ttf +0 -0
  160. package/skills/frontend-dev/canvas-fonts/Jura-Medium.ttf +0 -0
  161. package/skills/frontend-dev/canvas-fonts/Jura-OFL.txt +93 -0
  162. package/skills/frontend-dev/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  163. package/skills/frontend-dev/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  164. package/skills/frontend-dev/canvas-fonts/Lora-Bold.ttf +0 -0
  165. package/skills/frontend-dev/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  166. package/skills/frontend-dev/canvas-fonts/Lora-Italic.ttf +0 -0
  167. package/skills/frontend-dev/canvas-fonts/Lora-OFL.txt +93 -0
  168. package/skills/frontend-dev/canvas-fonts/Lora-Regular.ttf +0 -0
  169. package/skills/frontend-dev/canvas-fonts/NationalPark-Bold.ttf +0 -0
  170. package/skills/frontend-dev/canvas-fonts/NationalPark-OFL.txt +93 -0
  171. package/skills/frontend-dev/canvas-fonts/NationalPark-Regular.ttf +0 -0
  172. package/skills/frontend-dev/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  173. package/skills/frontend-dev/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  174. package/skills/frontend-dev/canvas-fonts/Outfit-Bold.ttf +0 -0
  175. package/skills/frontend-dev/canvas-fonts/Outfit-OFL.txt +93 -0
  176. package/skills/frontend-dev/canvas-fonts/Outfit-Regular.ttf +0 -0
  177. package/skills/frontend-dev/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  178. package/skills/frontend-dev/canvas-fonts/PixelifySans-OFL.txt +93 -0
  179. package/skills/frontend-dev/canvas-fonts/PoiretOne-OFL.txt +93 -0
  180. package/skills/frontend-dev/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  181. package/skills/frontend-dev/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  182. package/skills/frontend-dev/canvas-fonts/RedHatMono-OFL.txt +93 -0
  183. package/skills/frontend-dev/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  184. package/skills/frontend-dev/canvas-fonts/Silkscreen-OFL.txt +93 -0
  185. package/skills/frontend-dev/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  186. package/skills/frontend-dev/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  187. package/skills/frontend-dev/canvas-fonts/SmoochSans-OFL.txt +93 -0
  188. package/skills/frontend-dev/canvas-fonts/Tektur-Medium.ttf +0 -0
  189. package/skills/frontend-dev/canvas-fonts/Tektur-OFL.txt +93 -0
  190. package/skills/frontend-dev/canvas-fonts/Tektur-Regular.ttf +0 -0
  191. package/skills/frontend-dev/canvas-fonts/WorkSans-Bold.ttf +0 -0
  192. package/skills/frontend-dev/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  193. package/skills/frontend-dev/canvas-fonts/WorkSans-Italic.ttf +0 -0
  194. package/skills/frontend-dev/canvas-fonts/WorkSans-OFL.txt +93 -0
  195. package/skills/frontend-dev/canvas-fonts/WorkSans-Regular.ttf +0 -0
  196. package/skills/frontend-dev/canvas-fonts/YoungSerif-OFL.txt +93 -0
  197. package/skills/frontend-dev/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  198. package/skills/frontend-dev/references/asset-prompt-guide.md +43 -0
  199. package/skills/frontend-dev/references/env-setup.md +33 -0
  200. package/skills/frontend-dev/references/minimax-cli-reference.md +133 -0
  201. package/skills/frontend-dev/references/minimax-image-guide.md +65 -0
  202. package/skills/frontend-dev/references/minimax-music-guide.md +216 -0
  203. package/skills/frontend-dev/references/minimax-tts-guide.md +78 -0
  204. package/skills/frontend-dev/references/minimax-video-guide.md +82 -0
  205. package/skills/frontend-dev/references/minimax-voice-catalog.md +685 -0
  206. package/skills/frontend-dev/references/motion-recipes.md +407 -0
  207. package/skills/frontend-dev/references/troubleshooting.md +85 -0
  208. package/skills/frontend-dev/scripts/minimax_image.py +137 -0
  209. package/skills/frontend-dev/scripts/minimax_music.py +157 -0
  210. package/skills/frontend-dev/scripts/minimax_tts.py +127 -0
  211. package/skills/frontend-dev/scripts/minimax_video.py +187 -0
  212. package/skills/frontend-dev/templates/generator_template.js +223 -0
  213. package/skills/frontend-dev/templates/viewer.html +599 -0
  214. package/skills/frontend-ui-engineering/SKILL.md +367 -0
  215. package/skills/fullstack-dev/SKILL.md +819 -0
  216. package/skills/fullstack-dev/references/api-design.md +444 -0
  217. package/skills/fullstack-dev/references/auth-flow.md +165 -0
  218. package/skills/fullstack-dev/references/db-schema.md +706 -0
  219. package/skills/fullstack-dev/references/django-best-practices.md +466 -0
  220. package/skills/fullstack-dev/references/environment-management.md +78 -0
  221. package/skills/fullstack-dev/references/release-checklist.md +278 -0
  222. package/skills/fullstack-dev/references/technology-selection.md +254 -0
  223. package/skills/fullstack-dev/references/testing-strategy.md +404 -0
  224. package/skills/git-workflow-and-versioning/SKILL.md +446 -0
  225. package/skills/github-evidence-triage/SKILL.md +115 -0
  226. package/skills/harness-evolution/SKILL.md +59 -0
  227. package/skills/harness-evolution/references/activation-matrix.md +13 -0
  228. package/skills/harness-evolution/references/approval-policy.md +20 -0
  229. package/skills/harness-evolution/references/change-report-template.md +33 -0
  230. package/skills/harness-evolution/references/component-taxonomy.md +19 -0
  231. package/skills/harness-evolution/references/verdict-policy.md +13 -0
  232. package/skills/harness-issue-triage/SKILL.md +72 -0
  233. package/skills/harness-issue-triage/references/component-diagnosis.md +25 -0
  234. package/skills/harness-issue-triage/references/triage-report-template.md +34 -0
  235. package/skills/harness-optimization-audit/SKILL.md +125 -0
  236. package/skills/idea-refine/SKILL.md +191 -0
  237. package/skills/idea-refine/references/upstream/addyosmani-agent-skills/6bcfeb9dae52b11eaad23511acc165109746dbc3/LICENSE +21 -0
  238. package/skills/idea-refine/references/upstream/addyosmani-agent-skills/6bcfeb9dae52b11eaad23511acc165109746dbc3/NOTICE.md +9 -0
  239. package/skills/idea-refine/references/upstream/addyosmani-agent-skills/6bcfeb9dae52b11eaad23511acc165109746dbc3/idea-refine/SKILL.upstream.md +178 -0
  240. package/skills/idea-refine/references/upstream/addyosmani-agent-skills/6bcfeb9dae52b11eaad23511acc165109746dbc3/idea-refine/examples.md +238 -0
  241. package/skills/idea-refine/references/upstream/addyosmani-agent-skills/6bcfeb9dae52b11eaad23511acc165109746dbc3/idea-refine/frameworks.md +99 -0
  242. package/skills/idea-refine/references/upstream/addyosmani-agent-skills/6bcfeb9dae52b11eaad23511acc165109746dbc3/idea-refine/refinement-criteria.md +113 -0
  243. package/skills/idea-refine/references/upstream/addyosmani-agent-skills/6bcfeb9dae52b11eaad23511acc165109746dbc3/idea-refine/scripts/idea-refine.upstream.sh +15 -0
  244. package/skills/incremental-implementation/SKILL.md +252 -0
  245. package/skills/ios-application-dev/SKILL.md +212 -0
  246. package/skills/ios-application-dev/references/accessibility.md +259 -0
  247. package/skills/ios-application-dev/references/graphics-animation.md +350 -0
  248. package/skills/ios-application-dev/references/layout-system.md +199 -0
  249. package/skills/ios-application-dev/references/metal-shader.md +178 -0
  250. package/skills/ios-application-dev/references/navigation-patterns.md +175 -0
  251. package/skills/ios-application-dev/references/swift-coding-standards.md +757 -0
  252. package/skills/ios-application-dev/references/swiftui-design-guidelines.md +1167 -0
  253. package/skills/ios-application-dev/references/system-integration.md +401 -0
  254. package/skills/ios-application-dev/references/uikit-components.md +297 -0
  255. package/skills/local-review-gate/SKILL.md +207 -0
  256. package/skills/local-review-gate/references/addyosmani-code-review-rubric.md +33 -0
  257. package/skills/local-review-gate/references/codex-github-compatibility.md +26 -0
  258. package/skills/local-review-gate/references/ecc-code-review-adaptation.md +40 -0
  259. package/skills/local-review-gate/references/graphify-local-review.md +33 -0
  260. package/skills/local-review-gate/references/orchestration-adaptation.md +51 -0
  261. package/skills/local-review-gate/references/review-repair-lane-adaptation.md +46 -0
  262. package/skills/local-review-gate/references/upstream-provenance.md +61 -0
  263. package/skills/mature-project-pattern-research/SKILL.md +155 -0
  264. package/skills/mature-project-pattern-research/references/research-rubric.md +45 -0
  265. package/skills/minimax-docx/LICENSE +21 -0
  266. package/skills/minimax-docx/SKILL.md +273 -0
  267. package/skills/minimax-docx/assets/styles/academic_styles.xml +250 -0
  268. package/skills/minimax-docx/assets/styles/corporate_styles.xml +284 -0
  269. package/skills/minimax-docx/assets/styles/default_styles.xml +449 -0
  270. package/skills/minimax-docx/assets/xsd/aesthetic-rules.xsd +470 -0
  271. package/skills/minimax-docx/assets/xsd/business-rules.xsd +130 -0
  272. package/skills/minimax-docx/assets/xsd/common-types.xsd +159 -0
  273. package/skills/minimax-docx/assets/xsd/wml-subset.xsd +589 -0
  274. package/skills/minimax-docx/references/cjk_typography.md +357 -0
  275. package/skills/minimax-docx/references/cjk_university_template_guide.md +184 -0
  276. package/skills/minimax-docx/references/comments_guide.md +191 -0
  277. package/skills/minimax-docx/references/design_good_bad_examples.md +829 -0
  278. package/skills/minimax-docx/references/design_principles.md +819 -0
  279. package/skills/minimax-docx/references/openxml_element_order.md +308 -0
  280. package/skills/minimax-docx/references/openxml_encyclopedia_part1.md +4061 -0
  281. package/skills/minimax-docx/references/openxml_encyclopedia_part2.md +2820 -0
  282. package/skills/minimax-docx/references/openxml_encyclopedia_part3.md +3381 -0
  283. package/skills/minimax-docx/references/openxml_namespaces.md +82 -0
  284. package/skills/minimax-docx/references/openxml_units.md +72 -0
  285. package/skills/minimax-docx/references/scenario_a_create.md +284 -0
  286. package/skills/minimax-docx/references/scenario_b_edit_content.md +295 -0
  287. package/skills/minimax-docx/references/scenario_c_apply_template.md +456 -0
  288. package/skills/minimax-docx/references/track_changes_guide.md +200 -0
  289. package/skills/minimax-docx/references/troubleshooting.md +506 -0
  290. package/skills/minimax-docx/references/typography_guide.md +294 -0
  291. package/skills/minimax-docx/references/xsd_validation_guide.md +158 -0
  292. package/skills/minimax-docx/scripts/doc_to_docx.sh +40 -0
  293. package/skills/minimax-docx/scripts/docx_preview.sh +37 -0
  294. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Cli/MiniMaxAIDocx.Cli.csproj +19 -0
  295. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Cli/Program.cs +18 -0
  296. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/AnalyzeCommand.cs +147 -0
  297. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/ApplyTemplateCommand.cs +322 -0
  298. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/CreateCommand.cs +324 -0
  299. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/DiffCommand.cs +155 -0
  300. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/EditContentCommand.cs +487 -0
  301. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/FixOrderCommand.cs +108 -0
  302. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/MergeRunsCommand.cs +122 -0
  303. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/ValidateCommand.cs +107 -0
  304. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/MiniMaxAIDocx.Core.csproj +15 -0
  305. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/CommentSynchronizer.cs +169 -0
  306. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/ElementOrder.cs +80 -0
  307. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/NamespaceConstants.cs +42 -0
  308. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/RunMerger.cs +81 -0
  309. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/StyleAnalyzer.cs +81 -0
  310. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/TrackChangesHelper.cs +99 -0
  311. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/UnitConverter.cs +23 -0
  312. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples.cs +1832 -0
  313. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch1.cs +910 -0
  314. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch2.cs +999 -0
  315. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch3.cs +1048 -0
  316. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch4.cs +1038 -0
  317. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/CharacterFormattingSamples.cs +1020 -0
  318. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/DocumentCreationSamples.cs +1121 -0
  319. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/FieldAndTocSamples.cs +624 -0
  320. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/FootnoteAndCommentSamples.cs +675 -0
  321. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/HeaderFooterSamples.cs +838 -0
  322. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ImageSamples.cs +917 -0
  323. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ListAndNumberingSamples.cs +826 -0
  324. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ParagraphFormattingSamples.cs +1199 -0
  325. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/StyleSystemSamples.cs +1487 -0
  326. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/TableSamples.cs +1163 -0
  327. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/TrackChangesSamples.cs +595 -0
  328. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/CjkHelper.cs +39 -0
  329. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/FontDefaults.cs +24 -0
  330. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/PageSizes.cs +20 -0
  331. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/BusinessRuleValidator.cs +224 -0
  332. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/GateCheckValidator.cs +148 -0
  333. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/ValidationResult.cs +23 -0
  334. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/XsdValidator.cs +69 -0
  335. package/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.slnx +4 -0
  336. package/skills/minimax-docx/scripts/env_check.sh +196 -0
  337. package/skills/minimax-docx/scripts/setup.ps1 +274 -0
  338. package/skills/minimax-docx/scripts/setup.sh +504 -0
  339. package/skills/minimax-pdf/README.md +222 -0
  340. package/skills/minimax-pdf/SKILL.md +218 -0
  341. package/skills/minimax-pdf/design/design.md +381 -0
  342. package/skills/minimax-pdf/scripts/cover.py +1579 -0
  343. package/skills/minimax-pdf/scripts/fill_inspect.py +200 -0
  344. package/skills/minimax-pdf/scripts/fill_write.py +242 -0
  345. package/skills/minimax-pdf/scripts/make.sh +491 -0
  346. package/skills/minimax-pdf/scripts/merge.py +112 -0
  347. package/skills/minimax-pdf/scripts/palette.py +521 -0
  348. package/skills/minimax-pdf/scripts/reformat_parse.py +374 -0
  349. package/skills/minimax-pdf/scripts/render_body.py +1052 -0
  350. package/skills/minimax-pdf/scripts/render_cover.js +111 -0
  351. package/skills/minimax-xlsx/SKILL.md +156 -0
  352. package/skills/minimax-xlsx/references/create.md +691 -0
  353. package/skills/minimax-xlsx/references/edit.md +684 -0
  354. package/skills/minimax-xlsx/references/fix.md +37 -0
  355. package/skills/minimax-xlsx/references/format.md +768 -0
  356. package/skills/minimax-xlsx/references/ooxml-cheatsheet.md +231 -0
  357. package/skills/minimax-xlsx/references/read-analyze.md +97 -0
  358. package/skills/minimax-xlsx/references/validate.md +772 -0
  359. package/skills/minimax-xlsx/scripts/formula_check.py +422 -0
  360. package/skills/minimax-xlsx/scripts/libreoffice_recalc.py +248 -0
  361. package/skills/minimax-xlsx/scripts/shared_strings_builder.py +163 -0
  362. package/skills/minimax-xlsx/scripts/style_audit.py +575 -0
  363. package/skills/minimax-xlsx/scripts/xlsx_add_column.py +395 -0
  364. package/skills/minimax-xlsx/scripts/xlsx_insert_row.py +274 -0
  365. package/skills/minimax-xlsx/scripts/xlsx_pack.py +87 -0
  366. package/skills/minimax-xlsx/scripts/xlsx_reader.py +362 -0
  367. package/skills/minimax-xlsx/scripts/xlsx_shift_rows.py +396 -0
  368. package/skills/minimax-xlsx/scripts/xlsx_unpack.py +130 -0
  369. package/skills/minimax-xlsx/templates/minimal_xlsx/[Content_Types].xml +9 -0
  370. package/skills/minimax-xlsx/templates/minimal_xlsx/_rels/.rels +6 -0
  371. package/skills/minimax-xlsx/templates/minimal_xlsx/xl/_rels/workbook.xml.rels +19 -0
  372. package/skills/minimax-xlsx/templates/minimal_xlsx/xl/sharedStrings.xml +33 -0
  373. package/skills/minimax-xlsx/templates/minimal_xlsx/xl/styles.xml +160 -0
  374. package/skills/minimax-xlsx/templates/minimal_xlsx/xl/workbook.xml +30 -0
  375. package/skills/minimax-xlsx/templates/minimal_xlsx/xl/worksheets/sheet1.xml +70 -0
  376. package/skills/newsletter-generation/SKILL.md +71 -0
  377. package/skills/oss-release-readiness/SKILL.md +47 -0
  378. package/skills/parallel-subagent-dispatch/SKILL.md +58 -0
  379. package/skills/performance-optimization/SKILL.md +364 -0
  380. package/skills/planning-and-task-breakdown/SKILL.md +290 -0
  381. package/skills/pptx-generator/SKILL.md +275 -0
  382. package/skills/pptx-generator/references/design-system.md +392 -0
  383. package/skills/pptx-generator/references/editing.md +162 -0
  384. package/skills/pptx-generator/references/pitfalls.md +112 -0
  385. package/skills/pptx-generator/references/pptxgenjs.md +420 -0
  386. package/skills/pptx-generator/references/slide-types.md +413 -0
  387. package/skills/pr-test-analysis/SKILL.md +24 -0
  388. package/skills/react-native-dev/SKILL.md +180 -0
  389. package/skills/react-native-dev/references/animations.md +254 -0
  390. package/skills/react-native-dev/references/components.md +124 -0
  391. package/skills/react-native-dev/references/engineering.md +527 -0
  392. package/skills/react-native-dev/references/forms.md +300 -0
  393. package/skills/react-native-dev/references/native-capabilities.md +163 -0
  394. package/skills/react-native-dev/references/navigation.md +271 -0
  395. package/skills/react-native-dev/references/networking.md +346 -0
  396. package/skills/react-native-dev/references/performance.md +215 -0
  397. package/skills/react-native-dev/references/state-management.md +230 -0
  398. package/skills/react-native-dev/references/styling.md +117 -0
  399. package/skills/react-native-dev/references/testing.md +341 -0
  400. package/skills/requirements-grilling/SKILL.md +447 -0
  401. package/skills/requirements-grilling/references/ADR-FORMAT.md +46 -0
  402. package/skills/requirements-grilling/references/CONTEXT-FORMAT.md +41 -0
  403. package/skills/requirements-grilling/references/INTERVIEW-PACKET-FORMAT.md +62 -0
  404. package/skills/requirements-grilling/references/MIT-LICENSE-MATT-POCOCK.md +25 -0
  405. package/skills/requirements-grilling/references/upstream/addyosmani-agent-skills/6bcfeb9dae52b11eaad23511acc165109746dbc3/LICENSE +21 -0
  406. package/skills/requirements-grilling/references/upstream/addyosmani-agent-skills/6bcfeb9dae52b11eaad23511acc165109746dbc3/NOTICE.md +9 -0
  407. package/skills/requirements-grilling/references/upstream/addyosmani-agent-skills/6bcfeb9dae52b11eaad23511acc165109746dbc3/interview-me/SKILL.upstream.md +225 -0
  408. package/skills/requirements-grilling/references/upstream/mattpocock-skills/9603c1cc8118d08bc1b3bf34cf714f62178dea3b/LICENSE +21 -0
  409. package/skills/requirements-grilling/references/upstream/mattpocock-skills/9603c1cc8118d08bc1b3bf34cf714f62178dea3b/NOTICE.md +12 -0
  410. package/skills/requirements-grilling/references/upstream/mattpocock-skills/9603c1cc8118d08bc1b3bf34cf714f62178dea3b/batch-grill-me/SKILL.upstream.md +15 -0
  411. package/skills/requirements-grilling/references/upstream/mattpocock-skills/9603c1cc8118d08bc1b3bf34cf714f62178dea3b/grill-me/SKILL.upstream.md +7 -0
  412. package/skills/requirements-grilling/references/upstream/mattpocock-skills/9603c1cc8118d08bc1b3bf34cf714f62178dea3b/grilling/SKILL.upstream.md +12 -0
  413. package/skills/review-pipeline/SKILL.md +38 -0
  414. package/skills/rose-memory/SKILL.md +210 -0
  415. package/skills/rose-memory/references/README.md +48 -0
  416. package/skills/rose-memory/references/memory_cli.py +2384 -0
  417. package/skills/rose-memory/references/schema.sql +315 -0
  418. package/skills/security-and-hardening/SKILL.md +369 -0
  419. package/skills/session-handoff/SKILL.md +88 -0
  420. package/skills/session-handoff/references/upstream/mattpocock-skills/391a2701dd948f94f56a39f7533f8eea9a859c87/LICENSE +21 -0
  421. package/skills/session-handoff/references/upstream/mattpocock-skills/391a2701dd948f94f56a39f7533f8eea9a859c87/NOTICE.md +9 -0
  422. package/skills/session-handoff/references/upstream/mattpocock-skills/391a2701dd948f94f56a39f7533f8eea9a859c87/productivity/handoff/SKILL.upstream.md +16 -0
  423. package/skills/session-handoff/scripts/session_handoff.py +764 -0
  424. package/skills/shader-dev/SKILL.md +316 -0
  425. package/skills/shader-dev/reference/ambient-occlusion.md +382 -0
  426. package/skills/shader-dev/reference/analytic-ray-tracing.md +651 -0
  427. package/skills/shader-dev/reference/anti-aliasing.md +71 -0
  428. package/skills/shader-dev/reference/atmospheric-scattering.md +571 -0
  429. package/skills/shader-dev/reference/camera-effects.md +80 -0
  430. package/skills/shader-dev/reference/cellular-automata.md +635 -0
  431. package/skills/shader-dev/reference/color-palette.md +481 -0
  432. package/skills/shader-dev/reference/csg-boolean-operations.md +466 -0
  433. package/skills/shader-dev/reference/domain-repetition.md +436 -0
  434. package/skills/shader-dev/reference/domain-warping.md +419 -0
  435. package/skills/shader-dev/reference/fluid-simulation.md +425 -0
  436. package/skills/shader-dev/reference/fractal-rendering.md +525 -0
  437. package/skills/shader-dev/reference/lighting-model.md +639 -0
  438. package/skills/shader-dev/reference/matrix-transform.md +535 -0
  439. package/skills/shader-dev/reference/multipass-buffer.md +571 -0
  440. package/skills/shader-dev/reference/normal-estimation.md +418 -0
  441. package/skills/shader-dev/reference/particle-system.md +589 -0
  442. package/skills/shader-dev/reference/path-tracing-gi.md +602 -0
  443. package/skills/shader-dev/reference/polar-uv-manipulation.md +521 -0
  444. package/skills/shader-dev/reference/post-processing.md +375 -0
  445. package/skills/shader-dev/reference/procedural-2d-pattern.md +439 -0
  446. package/skills/shader-dev/reference/procedural-noise.md +551 -0
  447. package/skills/shader-dev/reference/ray-marching.md +396 -0
  448. package/skills/shader-dev/reference/sdf-2d.md +724 -0
  449. package/skills/shader-dev/reference/sdf-3d.md +805 -0
  450. package/skills/shader-dev/reference/sdf-tricks.md +63 -0
  451. package/skills/shader-dev/reference/shadow-techniques.md +476 -0
  452. package/skills/shader-dev/reference/simulation-physics.md +644 -0
  453. package/skills/shader-dev/reference/sound-synthesis.md +578 -0
  454. package/skills/shader-dev/reference/terrain-rendering.md +839 -0
  455. package/skills/shader-dev/reference/texture-mapping-advanced.md +87 -0
  456. package/skills/shader-dev/reference/texture-sampling.md +553 -0
  457. package/skills/shader-dev/reference/volumetric-rendering.md +608 -0
  458. package/skills/shader-dev/reference/voronoi-cellular-noise.md +486 -0
  459. package/skills/shader-dev/reference/voxel-rendering.md +701 -0
  460. package/skills/shader-dev/reference/water-ocean.md +445 -0
  461. package/skills/shader-dev/reference/webgl-pitfalls.md +41 -0
  462. package/skills/shader-dev/techniques/ambient-occlusion.md +364 -0
  463. package/skills/shader-dev/techniques/analytic-ray-tracing.md +542 -0
  464. package/skills/shader-dev/techniques/anti-aliasing.md +124 -0
  465. package/skills/shader-dev/techniques/atmospheric-scattering.md +522 -0
  466. package/skills/shader-dev/techniques/camera-effects.md +115 -0
  467. package/skills/shader-dev/techniques/cellular-automata.md +531 -0
  468. package/skills/shader-dev/techniques/color-palette.md +380 -0
  469. package/skills/shader-dev/techniques/csg-boolean-operations.md +491 -0
  470. package/skills/shader-dev/techniques/domain-repetition.md +333 -0
  471. package/skills/shader-dev/techniques/domain-warping.md +414 -0
  472. package/skills/shader-dev/techniques/fluid-simulation.md +1175 -0
  473. package/skills/shader-dev/techniques/fractal-rendering.md +436 -0
  474. package/skills/shader-dev/techniques/lighting-model.md +527 -0
  475. package/skills/shader-dev/techniques/matrix-transform.md +455 -0
  476. package/skills/shader-dev/techniques/multipass-buffer.md +922 -0
  477. package/skills/shader-dev/techniques/normal-estimation.md +318 -0
  478. package/skills/shader-dev/techniques/particle-system.md +1203 -0
  479. package/skills/shader-dev/techniques/path-tracing-gi.md +623 -0
  480. package/skills/shader-dev/techniques/polar-uv-manipulation.md +373 -0
  481. package/skills/shader-dev/techniques/post-processing.md +788 -0
  482. package/skills/shader-dev/techniques/procedural-2d-pattern.md +346 -0
  483. package/skills/shader-dev/techniques/procedural-noise.md +554 -0
  484. package/skills/shader-dev/techniques/ray-marching.md +467 -0
  485. package/skills/shader-dev/techniques/sdf-2d.md +631 -0
  486. package/skills/shader-dev/techniques/sdf-3d.md +589 -0
  487. package/skills/shader-dev/techniques/sdf-tricks.md +100 -0
  488. package/skills/shader-dev/techniques/shadow-techniques.md +776 -0
  489. package/skills/shader-dev/techniques/simulation-physics.md +1542 -0
  490. package/skills/shader-dev/techniques/sound-synthesis.md +490 -0
  491. package/skills/shader-dev/techniques/terrain-rendering.md +408 -0
  492. package/skills/shader-dev/techniques/texture-mapping-advanced.md +121 -0
  493. package/skills/shader-dev/techniques/texture-sampling.md +382 -0
  494. package/skills/shader-dev/techniques/volumetric-rendering.md +375 -0
  495. package/skills/shader-dev/techniques/voronoi-cellular-noise.md +458 -0
  496. package/skills/shader-dev/techniques/voxel-rendering.md +985 -0
  497. package/skills/shader-dev/techniques/water-ocean.md +490 -0
  498. package/skills/shader-dev/techniques/webgl-pitfalls.md +170 -0
  499. package/skills/shipping-and-launch/SKILL.md +334 -0
  500. package/skills/silent-failure-hunting/SKILL.md +24 -0
  501. package/skills/source-driven-development/SKILL.md +223 -0
  502. package/skills/spec-driven-development/SKILL.md +235 -0
  503. package/skills/spec-driven-development/references/upstream/addyosmani-agent-skills/6bcfeb9dae52b11eaad23511acc165109746dbc3/LICENSE +21 -0
  504. package/skills/spec-driven-development/references/upstream/addyosmani-agent-skills/6bcfeb9dae52b11eaad23511acc165109746dbc3/NOTICE.md +9 -0
  505. package/skills/spec-driven-development/references/upstream/addyosmani-agent-skills/6bcfeb9dae52b11eaad23511acc165109746dbc3/spec-driven-development/SKILL.upstream.md +206 -0
  506. package/skills/strategy-stress-test/SKILL.md +185 -0
  507. package/skills/systematic-literature-review/SKILL.md +77 -0
  508. package/skills/test-document-generator/SKILL.md +152 -0
  509. package/skills/test-document-generator/references/test-document-template.md +45 -0
  510. package/skills/test-driven-development/SKILL.md +399 -0
  511. package/skills/write-skills/GLOSSARY.md +113 -0
  512. package/skills/write-skills/SKILL.md +133 -0
  513. package/skills/write-skills/references/upstream/mattpocock-skills/391a2701dd948f94f56a39f7533f8eea9a859c87/LICENSE +21 -0
  514. package/skills/write-skills/references/upstream/mattpocock-skills/391a2701dd948f94f56a39f7533f8eea9a859c87/NOTICE.md +9 -0
  515. package/skills/write-skills/references/upstream/mattpocock-skills/391a2701dd948f94f56a39f7533f8eea9a859c87/productivity/writing-great-skills/GLOSSARY.md +201 -0
  516. package/skills/write-skills/references/upstream/mattpocock-skills/391a2701dd948f94f56a39f7533f8eea9a859c87/productivity/writing-great-skills/SKILL.upstream.md +83 -0
  517. package/src/runtime/child-guard.ts +70 -0
  518. package/src/runtime/conflicts.ts +25 -0
  519. package/src/runtime/contracts.ts +9 -0
  520. package/src/runtime/doctor.ts +134 -0
  521. package/src/runtime/global-resources.ts +152 -0
  522. package/src/runtime/index.ts +23 -0
  523. package/src/runtime/lifecycle.ts +19 -0
  524. package/src/runtime/native-integrations.ts +44 -0
  525. package/src/runtime/path-boundaries.ts +69 -0
  526. package/src/runtime/registry.ts +213 -0
  527. package/src/runtime/roles.ts +64 -0
  528. package/src/runtime/rose-context.ts +24 -0
  529. package/src/runtime/subagents.ts +426 -0
  530. package/templates/APPEND_SYSTEM.md +12 -0
  531. package/upstream/aili-workflows.lock.json +3226 -0
@@ -0,0 +1,215 @@
1
+ #!/usr/bin/env python3
2
+ """Create, update, and validate project AGENTS.md files from the bundled AILI template."""
3
+
4
+ from __future__ import annotations
5
+
6
+ import argparse
7
+ import datetime as dt
8
+ import re
9
+ import shutil
10
+ import sys
11
+ from pathlib import Path
12
+
13
+
14
+ VERSION_RE = re.compile(r"<!--\s*AILI_AGENTS_TEMPLATE_VERSION:\s*(\d+)\s*-->")
15
+ SOURCE_MARKER = "<!-- AILI_AGENTS_TEMPLATE_SOURCE: templates/AGENTS.md -->"
16
+ MODE_MARKER = "<!-- AILI_AGENTS_TEMPLATE_MODE: generated-project-local-file -->"
17
+ BLOCK_RE = re.compile(
18
+ r"<!-- AILI_MANAGED_BLOCK_BEGIN: (?P<name>[a-z0-9-]+) -->.*?"
19
+ r"<!-- AILI_MANAGED_BLOCK_END: (?P=name) -->",
20
+ re.DOTALL,
21
+ )
22
+ PLACEHOLDER_RE = re.compile(r"\bTODO\b|<!--\s*Fill\b|<!--\s*Add rules\b", re.IGNORECASE)
23
+
24
+ REQUIRED_SECTIONS = [
25
+ "# AGENTS.md",
26
+ "## Project Overview",
27
+ "## Setup Commands",
28
+ "## Architecture and Project Structure",
29
+ "## Project-Specific Rules",
30
+ "## Project-Specific Testing and Artifact Placement",
31
+ "## Local Overrides",
32
+ ]
33
+
34
+
35
+ def bundle_root() -> Path:
36
+ return Path(__file__).resolve().parent
37
+
38
+
39
+ def template_path() -> Path:
40
+ return bundle_root() / "agents-template.md"
41
+
42
+
43
+ def agents_path(project: Path) -> Path:
44
+ return project.resolve() / "AGENTS.md"
45
+
46
+
47
+ def read_text(path: Path) -> str:
48
+ return path.read_text(encoding="utf-8")
49
+
50
+
51
+ def write_text(path: Path, text: str) -> None:
52
+ path.write_text(text, encoding="utf-8", newline="\n")
53
+
54
+
55
+ def backup(path: Path) -> Path:
56
+ stamp = dt.datetime.now().strftime("%Y%m%d%H%M%S")
57
+ backup_path = path.with_name(f"{path.name}.backup.{stamp}")
58
+ shutil.copy2(path, backup_path)
59
+ return backup_path
60
+
61
+
62
+ def managed_blocks(text: str) -> dict[str, str]:
63
+ return {match.group("name"): match.group(0) for match in BLOCK_RE.finditer(text)}
64
+
65
+
66
+ def template_version(text: str) -> str | None:
67
+ match = VERSION_RE.search(text)
68
+ return match.group(1) if match else None
69
+
70
+
71
+ def replace_managed_blocks(target_text: str, template_text: str) -> tuple[str, list[str]]:
72
+ target_blocks = managed_blocks(target_text)
73
+ template_blocks = managed_blocks(template_text)
74
+ missing = [name for name in template_blocks if name not in target_blocks]
75
+ if missing:
76
+ names = ", ".join(missing)
77
+ raise SystemExit(f"AGENTS.md is missing managed block(s): {names}")
78
+
79
+ updated = target_text
80
+ replaced: list[str] = []
81
+ for name, template_block in template_blocks.items():
82
+ current_block = target_blocks[name]
83
+ if current_block != template_block:
84
+ updated = updated.replace(current_block, template_block)
85
+ replaced.append(name)
86
+ return updated, replaced
87
+
88
+
89
+ def command_init(args: argparse.Namespace) -> int:
90
+ project = Path(args.project)
91
+ destination = agents_path(project)
92
+ template = read_text(template_path())
93
+
94
+ if destination.exists():
95
+ if args.strategy == "abort":
96
+ print(f"AGENTS.md already exists: {destination}", file=sys.stderr)
97
+ print("Use update, or rerun init with --strategy backup-overwrite.", file=sys.stderr)
98
+ return 2
99
+ backup_path = backup(destination)
100
+ print(f"Backed up existing AGENTS.md to {backup_path}")
101
+
102
+ write_text(destination, template)
103
+ print(f"Created {destination} from {template_path()}")
104
+ return 0
105
+
106
+
107
+ def command_update(args: argparse.Namespace) -> int:
108
+ project = Path(args.project)
109
+ destination = agents_path(project)
110
+ if not destination.exists():
111
+ print(f"AGENTS.md does not exist: {destination}", file=sys.stderr)
112
+ print("Run init first.", file=sys.stderr)
113
+ return 2
114
+
115
+ current = read_text(destination)
116
+ template = read_text(template_path())
117
+ updated, replaced = replace_managed_blocks(current, template)
118
+ if updated != current:
119
+ backup_path = backup(destination)
120
+ write_text(destination, updated)
121
+ print(f"Backed up AGENTS.md to {backup_path}")
122
+ print("Updated managed block(s): " + ", ".join(replaced))
123
+ else:
124
+ print("AGENTS.md managed blocks are already current.")
125
+ return 0
126
+
127
+
128
+ def command_check(args: argparse.Namespace) -> int:
129
+ project = Path(args.project)
130
+ destination = agents_path(project)
131
+ errors: list[str] = []
132
+
133
+ if not destination.exists():
134
+ print(f"FAIL: AGENTS.md does not exist: {destination}", file=sys.stderr)
135
+ return 1
136
+
137
+ text = read_text(destination)
138
+ template = read_text(template_path())
139
+ template_blocks = managed_blocks(template)
140
+ target_blocks = managed_blocks(text)
141
+ current_version = template_version(text)
142
+ expected_version = template_version(template)
143
+
144
+ if current_version is None:
145
+ errors.append("missing AILI_AGENTS_TEMPLATE_VERSION marker")
146
+ elif expected_version is None:
147
+ errors.append("template missing AILI_AGENTS_TEMPLATE_VERSION marker")
148
+ elif current_version != expected_version:
149
+ errors.append(f"template version mismatch: AGENTS.md has {current_version}, template has {expected_version}")
150
+ if SOURCE_MARKER not in text:
151
+ errors.append("missing AILI_AGENTS_TEMPLATE_SOURCE marker")
152
+ if MODE_MARKER not in text:
153
+ errors.append("missing AILI_AGENTS_TEMPLATE_MODE marker")
154
+
155
+ for section in REQUIRED_SECTIONS:
156
+ if section not in text:
157
+ errors.append(f"missing required section: {section}")
158
+
159
+ for name, block in template_blocks.items():
160
+ if name not in target_blocks:
161
+ errors.append(f"missing managed block: {name}")
162
+ elif target_blocks[name] != block:
163
+ errors.append(f"managed block differs from template: {name}")
164
+ for name in sorted(target_blocks.keys() - template_blocks.keys()):
165
+ errors.append(f"stale managed block not present in template: {name}")
166
+
167
+ if not args.allow_placeholders and PLACEHOLDER_RE.search(text):
168
+ errors.append("unfilled placeholder remains; replace TODO/fill comments with project facts or 'unknown'")
169
+
170
+ if errors:
171
+ for error in errors:
172
+ print(f"FAIL: {error}", file=sys.stderr)
173
+ return 1
174
+
175
+ print(f"PASS: {destination} follows {template_path()}")
176
+ return 0
177
+
178
+
179
+ def build_parser() -> argparse.ArgumentParser:
180
+ parser = argparse.ArgumentParser(description=__doc__)
181
+ subparsers = parser.add_subparsers(dest="command", required=True)
182
+
183
+ init_parser = subparsers.add_parser("init", help="create AGENTS.md from the bundled AGENTS.md template")
184
+ init_parser.add_argument("--project", default=".", help="project root directory")
185
+ init_parser.add_argument(
186
+ "--strategy",
187
+ choices=["abort", "backup-overwrite"],
188
+ default="abort",
189
+ help="what to do when AGENTS.md already exists",
190
+ )
191
+ init_parser.set_defaults(func=command_init)
192
+
193
+ update_parser = subparsers.add_parser("update", help="update template-managed blocks only")
194
+ update_parser.add_argument("--project", default=".", help="project root directory")
195
+ update_parser.set_defaults(func=command_update)
196
+
197
+ check_parser = subparsers.add_parser("check", help="validate AGENTS.md template markers and managed blocks")
198
+ check_parser.add_argument("--project", default=".", help="project root directory")
199
+ check_parser.add_argument(
200
+ "--allow-placeholders",
201
+ action="store_true",
202
+ help="allow TODO/fill placeholders; intended for template or freshly initialized draft checks only",
203
+ )
204
+ check_parser.set_defaults(func=command_check)
205
+ return parser
206
+
207
+
208
+ def main(argv: list[str] | None = None) -> int:
209
+ parser = build_parser()
210
+ args = parser.parse_args(argv)
211
+ return args.func(args)
212
+
213
+
214
+ if __name__ == "__main__":
215
+ raise SystemExit(main())
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: ai-regression-scout
3
+ description: AI regression scouting routing. Use when agents, prompts, skills, model/tool routing, harness fixtures, or generated-output expectations change and need regression scenarios; do not use for ordinary product-code regressions.
4
+ ---
5
+
6
+ # AI Regression Scout
7
+
8
+ Use this skill to define one bounded AI-workflow regression-scouting need. ROSE may assign it to one fresh `ai-regression-scout` context after the delegation gate; this skill does not dispatch or invoke another process skill.
9
+
10
+ ## Trigger
11
+
12
+ - Agent prompt, skill, routing rule, model/tool policy, fixture, or output contract changed.
13
+ - ROSE needs over-trigger, under-trigger, ownership, permission, or completion-claim regression scenarios.
14
+ - A formal harness change needs smoke cases before acceptance.
15
+
16
+ ## Near Misses
17
+
18
+ - Product-code regression, prompt implementation, or false-success review are different primary intents; return the exact mismatch to ROSE.
19
+
20
+ ## Required Routing
21
+
22
+ - Canonical owner: ROSE/`aili-delivery-flow`.
23
+ - Optional agent: one fresh, terminal `ai-regression-scout` assignment after a new benefit decision.
24
+ - Default evidence mode: read-only; return fixture/check recommendations and stop without editing, retrying, or owning the final verdict.
@@ -0,0 +1,125 @@
1
+ ---
2
+ name: aili-delivery-flow
3
+ description: Run the AILI delivery lifecycle from natural-language IDEATE, DEFINE, BUILD, and SHIP intent or the equivalent slash shortcuts; use for idea shaping, spec/test definition, bounded BUILD package queues, review-repair closeout, or adapter routing without exposing internal stage commands.
4
+ ---
5
+
6
+ # AILI Delivery Flow
7
+
8
+ This is the canonical lifecycle/router authority for IDEATE, DEFINE, BUILD, and SHIP. Equivalent natural-language intent and command shortcuts enter the same state, gates, progress, stop conditions, and verification owner. Natural language is a first-class lifecycle entry, not a request to make the user type a slash command.
9
+
10
+ ## References
11
+
12
+ - Lifecycle states and hard gates: `references/lifecycle.md`
13
+ - Backend adapters: `references/backend-routing.md`
14
+ - Artifact outputs: `references/artifact-contracts.md`
15
+ - Question handling: `references/questionnaire-policy.md`
16
+ - Test document rules: `references/test-document-policy.md`
17
+ - Direct versus delegated work: `references/direct-vs-delegated-work.md`
18
+ - Build package rules: `references/implementation-packages.md`
19
+ - Neutral BUILD execution and loop budgets: `references/build-execution-loop.md`
20
+ - Ship review and repair: `references/review-repair-loop.md`
21
+ - Protocol templates: `references/protocols/`
22
+
23
+ ## Workflow
24
+
25
+ ### Semantic router
26
+
27
+ For each current user intent, ROSE selects:
28
+
29
+ 1. lifecycle intent expressed by natural language or a slash shortcut, with neither form receiving extra authority;
30
+ 2. ordinary or formal/material handling;
31
+ 3. one primary process/domain/artifact loop;
32
+ 4. zero or one auxiliary capability only for a named gap the primary loop cannot cover directly;
33
+ 5. one terminal outcome: `complete`, `need-user`, `need-evidence`, `material-delta`, `blocked`, or `Unverified`.
34
+
35
+ Explicit user intent wins, followed by the narrowest artifact/domain owner, then the lifecycle loop. A skill match is a route into this state, not a second workflow. Skills must not invoke another process skill, recurse, change phase, create another ledger/approval system, or automatically add planning, research, TDD, review, test, security, coverage, or convergence work.
36
+
37
+ Treat unambiguous natural-language requests as first-class lifecycle entries; do not ask the user to restate a slash command. Classify by the requested outcome rather than one keyword. Examples include:
38
+
39
+ - IDEATE: “先帮我想几种方案,暂时不要实现” or “explore options before we build”.
40
+ - DEFINE: “把这个需求定义成可实施方案和测试计划,先不要实现” or “write the implementation-ready contract”.
41
+ - BUILD: “按已经接受的方案和测试计划开始实现” or “implement the accepted change”.
42
+ - SHIP: “把已实现的改动收尾并准备交付” or “close out the implemented change”.
43
+
44
+ Explanation, comparison, translation, or status questions about these mode names remain ordinary near misses. When outcome, target, or current gate is genuinely ambiguous, ask one focused mode/target question rather than requiring command syntax.
45
+
46
+ ### Proactive delegation scan
47
+
48
+ At the start of each non-trivial intent and whenever changed evidence creates a new work split, evaluate the `subagent.dispatch` capability triggers in `references/direct-vs-delegated-work.md`. If a current adapter supplies that capability and a trigger is met, dispatch before doing the same work directly. If multiple independent units are ready, launch them together rather than serializing them. Default concurrency is at most two, but it is not a hard cap; ROSE chooses a larger bounded fan-out only from the number of independent non-overlapping units, concrete wall-clock/context benefit, available specialist roles, and an explicit join plan. Every dispatch context remains fresh, single-use, non-nesting, permission-bounded, and subject to independent benefit evidence.
49
+
50
+ Near misses stay direct: lifecycle words used for explanation/status, code that merely has tests, multi-file work without a planning need, and completion wording without a concrete review or evidence gap do not activate extra skills. An existing official Graphify graph may supply one scoped architecture-orientation result; exact-current symbols, source, call paths, tests, and impact stay with CodeGraph or current files, and no lifecycle phase installs, registers, or runs Graphify automatically.
51
+
52
+ ### Mode decision table
53
+
54
+ | User intent | Mode/loop | Required gate | Stop boundary |
55
+ |---|---|---|---|
56
+ | Explore options without implementation | IDEATE | current request and relevant evidence | options/unknowns produced or material formal trigger found |
57
+ | Create or materially revise a durable change contract | DEFINE | one resolved change identity | coherent artifacts plus final `test-plan.md` acceptance, or exact blocker |
58
+ | Explicitly implement a resolved accepted formal change | BUILD | current acceptance, target, package, permission, and claim-verification path | accepted queue implemented and smallest completion check selected, or blocker/material delta |
59
+ | Explicitly close out implemented work | SHIP | fresh SHIP intent and current implementation evidence | exact closeout claim supported or blocked |
60
+ | Bounded work with no formal/material trigger | ordinary | clear scope and local rules | requested outcome and smallest claim-matched evidence |
61
+
62
+ ### Execution and approval classes
63
+
64
+ - Safe local execution: perform requested in-scope reads, edits, deterministic diagnostics, and non-destructive claim-matched checks without asking for each step.
65
+ - Material decision: ask one focused question only when the answer changes scope, architecture, public contract, dependency, permission, acceptance, verification strategy, product behavior, or target identity.
66
+ - Risky operation: obtain the existing exact approval for destructive, external access/write/directory, dependency/lockfile, schema/migration, auth/permission/secret/security, Git/release, or A33 ADD/REMOVE operations.
67
+
68
+ Every question names the decision or operation, target, why now, risk/trade-off, options, recommendation or uncertainty, and denial effect. One answer/approval never authorizes another operation, target, or risk class.
69
+
70
+ ### Directed hydration
71
+
72
+ Read only evidence needed for the current mode, dependency, event, and claim:
73
+
74
+ | Entry | Required current evidence | Conditional evidence |
75
+ |---|---|---|
76
+ | new DEFINE | change identity and dependencies for the next artifact | interview/context only for a material question or term |
77
+ | DEFINE continuation | changed artifact and direct dependents | progress/drift only for resume, deviation, or conflict |
78
+ | BUILD start/resume | accepted final-test-plan gate, current tasks/package and owning contract sections, target/Git/rules, affected verification | unrelated DEFINE/history only on conflict or material discovery |
79
+ | SHIP | implemented diff/tree, current BUILD evidence, explicit target | only affected/stale risk, integration, packaging, or release evidence |
80
+ | ordinary continuation | current request and directly relevant files | formal artifacts only when formal work is resumed or changed |
81
+
82
+ Re-read every written file once before using it as durable evidence. A relevant user correction, write, hook, content/config/dependency/toolchain/target change, or conflict invalidates only dependent evidence. Phase/time/file presence/`continue` never triggers blanket hydration.
83
+
84
+ ### Mode rules
85
+
86
+ 1. **IDEATE:** run the proactive delegation scan, then explore and compare; do not edit production code. Direct chat is the fallback only when no Task trigger is met or delegation is concretely blocked. A material formal outcome routes to DEFINE, while ordinary brainstorming remains chat/optional approved idea placement.
87
+ 2. **DEFINE:** resolve one change identity; follow current backend dependency order; write only applicable artifacts. `requirements-grilling` owns `interview.md`; `test-document-generator` owns `test-plan.md`. Use the smallest decision-changing question/evidence lookup by default. An explicitly user-invoked Frontier Batch Mode may submit one bounded packet containing the complete current dependency-ready frontier of material product/requirements decisions only after identity, placement, permission, approval, and exact-operation questions are resolved separately; never infer batch mode from blocker count. Final `test-plan.md` acceptance remains the sole lifecycle-level pre-BUILD user gate, separate from material, validation, permission, and exact operation gates.
88
+ 3. **BUILD:** require explicit implementation intent and current formal readiness. Derive a dependency-ordered queue from the accepted contract, implement complete scoped packages, and record lightweight savepoints without package approvals or automatic tests/reviews. `BUILD_MATERIAL_DISCOVERY` stops affected work before a change to scope, architecture, dependency, public contract, permission, acceptance, or verification strategy and returns it to DEFINE. Acceptance alone executes nothing.
89
+ 4. **SHIP:** require fresh explicit closeout intent plus current implementation evidence. Reuse still-covering BUILD evidence; refresh only affected rows. Run the proactive delegation scan; direct inspection is the fallback when no Task trigger is met or delegation is concretely blocked. Review/repair/packaging/release capabilities run only for the exact closeout gap.
90
+
91
+ ### Verification owner
92
+
93
+ The active ordinary-task/lifecycle owner chooses the smallest fresh check supporting the exact claim. Specialized skills may suggest risk-specific evidence but cannot impose per-slice full suites, automatic stress tests, review matrices, repeated rechecks, duplicate approvals, or additional completion authority. Broaden only when the affected integration, packaging, browser, permission, installer, security, or release claim requires it. BUILD permits at most one targeted repair/recheck and does not transition automatically to SHIP.
94
+
95
+ ## Continuation and compound intent
96
+
97
+ - `continue`, `继续`, `go ahead`, and `继续做` resume exactly one active authorized envelope only when target, phase, current gates, and remaining budget are unambiguous. Preserve counters and stop state; never broaden authorization, change phase/target, refresh acceptance, or reset budget. Otherwise ask one decision-shaped question and perform no affected mutation.
98
+ - A continuation carrying a material delta returns to DEFINE and never resumes execution. A no-write/chat-only clause overrides formal writeback, continue+delta, and acceptance+BUILD for that turn and yields only a blocked/`Unverified` preview with zero persistence/execution/mutation/acceptance/budget consumption.
99
+ - Same-turn acceptance+BUILD persists/classifies acceptance in its owning artifact, rereads affected files once, then validates BUILD gates before execution.
100
+ - Combined BUILD+SHIP intent authorizes only current-phase BUILD. Later SHIP requires fresh evidence and new explicit intent.
101
+ - Package savepoints contain `scope`, `files_changed`, `unresolved_items`, `evidence_state`, and `next_package`; they trigger no automatic test, review, commit, or package approval.
102
+ - Commit, push, merge, and release each require exact action-specific approval. CI failure reports the failed target/commit/tree/check and returns control to the user without automatic repair, commit, push, merge, or release.
103
+
104
+ ## Generated OpenSpec adapter boundary
105
+
106
+ AILI guarantees only its four routes. Current generated `.opencode` `/opsx-*`, apply/continue/archive, and `openspec-*` adapters remain directly callable outside AILI. Do not route or recommend users to them, hand-edit/wrap/suppress/prevent them, alter their generator for control, or treat direct output as AILI evidence. Later AILI work must establish its own current contract, acceptance, and verification; integration/control is Phase II.
107
+
108
+ ## Boundaries
109
+
110
+ - Only four top-level delivery commands are valid: `/ideate`, `/define`, `/build`, `/ship`.
111
+ - `/local-review` is a standalone non-delivery local audit command owned by `local-review-gate`; do not route it through this delivery lifecycle skill as a fifth lifecycle mode.
112
+ - Research, questionnaire, test-plan, implementation, debugging, review, repair, and harness evolution are internal stages, not user command entrypoints.
113
+ - Anti-entrypoint blacklist: do not expose or invent top-level `/research`, `/questionnaire`, `/test-plan`, `/implement`, `/debug`, `/review`, `/repair`, `/harness`, or backend-specific lifecycle commands.
114
+ - Do not register `/loop`, `/schedule`, `/goal`, `/proactive`, `/cycle`, `/watch`, `/objective`, or any other public lifecycle alias. Treat those words only as semantic classifier input. AILI does not own, imitate, bind, modify, or control native `/goal`; its successful behavior is Stage II / N/A. Automation scope blocks under the lifecycle reference.
115
+ - Backend-specific task systems store artifacts; they do not weaken lifecycle gates.
116
+ - Explicit acceptance of final `test-plan.md` is the sole mandatory lifecycle-level pre-BUILD user gate. Material-decision, coherence, strict-validation, permission, destructive/high-risk, external-operation, and named-risk gates remain separate and cannot be relabeled lifecycle acceptance.
117
+ - A33 routing starts only from the user-selected Git startup host. AILI does not rank, move, broadly scan for, or auto-select hosts; every lane targets one declared repository, target rules may only narrow, same-level conflicts block, and artifacts stay in the owning target. A30 external-read routing is historical only.
118
+ - A33 text here and in the references is admission/approval policy only. It creates no worktree operation authority: PREPARE has zero add/remove effect, and every real or `driver_fixture` ADD and later non-force REMOVE needs its own fresh exact key/class-bound approval and separate applicable risk gate.
119
+
120
+ ## Verification
121
+
122
+ - Confirm the selected mode/ordinary loop and backend when applicable.
123
+ - Name the artifact(s) created or updated.
124
+ - For BUILD and SHIP, include traceability-backed fresh verification evidence or mark remaining items `Open Question` / `Unverified`.
125
+ - For any blocked gate, return the missing approval, artifact, or evidence as the next action.
@@ -0,0 +1,138 @@
1
+ # Artifact Contracts
2
+
3
+ Use the skill-internal `references/protocols/` templates as the first version of delivery artifacts.
4
+
5
+ ## Shared artifact envelope
6
+
7
+ [KNOWN] All lifecycle artifacts use the same neutral reference fields when they are passed between lanes. A protocol may add fields, but it must not redefine these fields or create a second authority for the artifact:
8
+
9
+ - `artifact_id`: stable identifier within the active change or task;
10
+ - `artifact_kind`: formal contract, sidecar, progress, drift, review, handoff, evidence, or closeout;
11
+ - `path`: canonical repository-local path or an explicitly approved non-OpenSpec placement;
12
+ - `authority_class`: canonical source, generated/installed adapter, upstream reference, historical evidence, or out of scope;
13
+ - `owner`: capability and lane allowed to write the artifact;
14
+ - `lifecycle_phase`: IDEATE, DEFINE, BUILD, SHIP, or ordinary;
15
+ - `source_requirements`: requirement, decision, risk, or task identifiers represented by the artifact;
16
+ - `status` and `freshness`: current state and the evidence time/scope used to establish it;
17
+ - `evidence_anchors`, `blocked`, and `unverified`: proof references and unresolved limits.
18
+
19
+ [KNOWN] An artifact reference is navigation and ownership metadata. It does not replace the artifact's owning source, user approval, current Git/filesystem evidence, or fresh verification.
20
+
21
+ ## Shared delta classification
22
+
23
+ [KNOWN] Every accepted correction, requirement, artifact change, finding, or implementation feedback item receives exactly one classification:
24
+
25
+ - `covered`: already represented by the accepted contract and verification;
26
+ - `material-question`: a decision-changing ambiguity that must be answered before affected work continues;
27
+ - `material-delta`: changes scope, contract, task, acceptance, risk, or implemented behavior and returns to DEFINE writeback/revalidation;
28
+ - `ordinary-steering`: in-scope execution guidance that does not change the accepted contract;
29
+ - `Unverified`: evidence is insufficient to classify safely.
30
+
31
+ [KNOWN] The record carries `delta_id`, `classification`, `evidence`, `affected_artifacts`, `writeback_required`, `acceptance_stale`, and `next_action`. It references existing artifacts rather than creating a delta ledger or competing formal authority.
32
+
33
+ ## Shared convergence link
34
+
35
+ [KNOWN] Each convergence claim uses one link with `requirement_or_decision`, `task_or_package`, `file_or_artifact`, `fresh_verification`, `review_or_security_disposition`, `freshness`, and `status`. Status is `linked`, `missing`, `stale`, `conflicting`, `blocked`, or `Unverified`. A checked task, generated summary, CodeGraph result, or Graphify result is not a substitute for the link.
36
+
37
+ ## Package savepoint and completion-evidence contracts
38
+
39
+ [KNOWN] Each implementation-package progress-ledger savepoint records `package`, `scope`, `files_changed`, `unresolved_items`, `evidence_state`, and `next_package` after the package's complete accepted behavior is implemented. It triggers no automatic test, review, commit, package approval, independent convergence, or readiness verdict. Generic lifecycle sources derive package identities from the active contract; Package 1–12 is history specific to `complete-aili-workflow-orchestration`.
40
+
41
+ [KNOWN] After the accepted queue is implemented, ROSE directly inspects the changed scope/affected links and selects the smallest fresh check supporting the completion claim. Success records `IMPLEMENTED_TARGETED_VERIFIED` and stops BUILD. A full task matrix, convergence review, or review/test/security capability is selected only for a concrete gap or affected SHIP claim; none is mandatory because a package or phase exists. Package 12 is only the historical name for this umbrella's completion inspection.
42
+
43
+ [KNOWN] When a canonical task matrix is actually selected, every current `tasks.md` checklist row appears exactly once with exactly these nine fields: `task_id`; `accepted requirement/decision/risk`; `expected behavior`; `implementation files/artifacts`; `fresh tests/inspection/review evidence`; `status`; `findings`; `disposition`; `freshness`. Status is exactly `Done | Partial | Missing | Blocked | N/A`. `Done` and resolved source-backed `N/A` pass; every other status or unsupported/unresolved state blocks the affected claim. The detailed evidence and mismatch rules remain owned by `agents/convergence-reviewer.md`; optional matrix evidence is not a broad BUILD or release gate.
44
+
45
+ ## Conditional review arbitration artifact
46
+
47
+ [KNOWN] `openspec/changes/<change-id>/review-arbitration.md` exists only for disputed, blocking, cross-session, or materially inconsistent findings. It preserves finding identity, claims, evidence, counter-evidence, proposed dispositions, ROSE disposition/rationale, decision owner, status, required recheck, freshness, and residual `Unverified` items. It is not a vote ledger, confidence aggregation, routine review report, or artifact created in advance of a real qualifying dispute.
48
+
49
+ ## Shared loop envelope
50
+
51
+ [KNOWN] This file is the canonical repository protocol path for neutral loop-envelope references. Delivery continuity requirement `CONT-005` remains the sole normative owner of budget representation and invariants. Every profile references one envelope with `loop_kind`, `trigger`, `trigger_evidence`, `objective`, `accepted_contract`, `change_id`, `success_evidence`, one nested `budgets` object, `human_gate`, `operation_gate`, `allowed_actions`, `writeback_targets`, `stop_reason`, and `outcome`. Protocol-only interval/event definitions additionally reference the canonical `ROUTE-007` identity object and may add only `external_trigger_source`, `event_classifier`, or `cancellation`.
52
+
53
+ [KNOWN] The neutral terminal outcomes are `complete`, `need-user`, `need-evidence`, `material-delta`, `blocked`, `Unverified`, `cancelled`, and `budget-exhausted`. Profiles and packages must reference this envelope; they must not create flat budget fields, a second envelope, a session registry, or a background runtime.
54
+
55
+ | Mode | Primary artifacts | Minimum fields |
56
+ |---|---|---|
57
+ | IDEATE | `references/protocols/idea-brief.md`, optional research evidence pack, optional lightweight idea capsule, optional backend-neutral `ideas/workflow-inbox.md` | goal, options, assumptions, unknowns, next decision, candidate idea notes when preserved, promotion target when selected |
58
+ | DEFINE | spec draft, alignment questionnaire/interview, acceptance test plan, backend-specific `context.md` for formal changes | scope, requirements, questions, requirements/decisions/risks traceability matrix, test cases, approval state, confirmed decisions, rejected options, BUILD readiness |
59
+ | BUILD | implementation package, subagent packet/result when delegated, progress-ledger savepoints, one minimal completion inspection/check, backend-neutral `progress.txt` ledger with backend-specific placement, `drift-log.md` for spec-backed drift notes, legacy `implementation-notes.html` as read-only migration evidence when present | requirement/decision/risk source, task/package, target files/artifacts, acceptance criteria, forbidden scope, expected/actual evidence, canonical `CONT-005` envelope and nested budgets, changed-scope diff and affected links, smallest targeted completion evidence, branch/status dirty-path classification, progress/checkpoint entries, ROSE decision, `Open Question` / `Unverified` items |
60
+ | SHIP | review report, compact evidence pack when evidence is noisy, required repository-local Markdown closeout report | closeout document path, BUILD gate status, release-blocker audit target/status, spec coverage check result, review findings, finding classifications, repair result, fresh evidence, branch/worktree hygiene status and cleanup approvals needed, existing feature impact, release-readiness risks, `Open Question` / `Unverified` items, next steps |
61
+
62
+ ## Output Contract
63
+
64
+ Every mode response includes only applicable fields:
65
+
66
+ - selected mode and backend;
67
+ - artifacts created, updated, or required;
68
+ - gates satisfied, blocked, or unverified;
69
+ - next action.
70
+
71
+ ## SHIP Closeout Document
72
+
73
+ Every SHIP run must create or update a detailed, human-reviewable Markdown closeout document. The CLI response may stay concise, but it must include the document path, write/update status, verdict, spec coverage check status, branch/worktree hygiene status, blocking/important/`Open Question`/`Unverified` summary, and approved next action.
74
+
75
+ - OpenSpec-backed SHIP writes `openspec/changes/<change-id>/ship-closeout.md`.
76
+ - Non-OpenSpec SHIP must ask for a repository-local closeout document path before the final verdict if no approved path exists.
77
+ - The document content should be written in Chinese unless the active contract explicitly requests another language.
78
+ - Do not replace the document with chat-only output; if the document cannot be written, mark the SHIP result blocked or `Unverified` and explain why.
79
+
80
+ ## DEFINE Artifact Set
81
+
82
+ For OpenSpec-backed changes, DEFINE creates or updates only artifacts required by current dependencies under `openspec/changes/<change-id>/`:
83
+
84
+ ```text
85
+ proposal.md
86
+ design.md
87
+ tasks.md
88
+ specs/**/spec.md
89
+ interview.md
90
+ test-plan.md
91
+ context.md
92
+ ```
93
+
94
+ - The listed files are the possible formal set, not a requirement to reread or rewrite all files on each turn.
95
+ - `proposal.md`, `design.md`, `tasks.md`, and `specs/**/spec.md` follow the OpenSpec backend.
96
+ - `interview.md` is generated or updated through `requirements-grilling`.
97
+ - `test-plan.md` is generated or updated through `test-document-generator`.
98
+ - `context.md` records maintained user intent, confirmed decisions, rejected options, unresolved questions, and drift-check anchors for the formal change.
99
+ - Non-OpenSpec artifacts require one placement decision before writing, then the selected locations become part of the active change context.
100
+
101
+ ## Context, Inbox, and Progress Ledgers
102
+
103
+ - IDEATE may preserve candidate ideas in a lightweight idea capsule or append them to `ideas/workflow-inbox.md` without creating a formal proposal by default; DEFINE promotes only selected ideas into a backend-specific change contract.
104
+ - Formal changes use one backend-specific `context.md`; OpenSpec uses `openspec/changes/<change-id>/context.md`, while non-OpenSpec backends use adapter/placement rules.
105
+ - BUILD uses a backend-neutral `progress.txt` contract; OpenSpec uses `openspec/changes/<change-id>/progress.txt`, while non-OpenSpec BUILD asks once for a repository-local placement before writing. Each implementation-package savepoint includes `scope`, `files_changed`, `unresolved_items`, `evidence_state`, and `next_package` and causes no automatic test, commit, or approval.
106
+ - BUILD continuation references exactly one active canonical `CONT-005` envelope in current context/progress state. It does not create another identity, marker contract, flat budget model, or authorization source.
107
+ - Only ROSE writes/appends `progress.txt`. Workers return compact evidence reports for ROSE to reconcile.
108
+ - `progress.txt` entries include objective, worker dispatches, evidence references, current progress, user feedback/corrections, checkpoint ledger, changed/inspected files, verification/review/security status, blockers, ROSE decision, and next action.
109
+ - For approved spec-backed implementation, maintain `drift-log.md` beside the change artifacts only for spec deviations, model drift/self-corrections, temporary decisions, trade-offs, open questions, unverified assumptions, and required DEFINE write-back. It is not a user-feedback log, progress ledger, review report, or formal contract substitute.
110
+ - Legacy `implementation-notes.html` may be read during hydration or convergence as migration evidence, but new drift/self-correction entries go to `drift-log.md` unless the current active contract explicitly requires the legacy HTML format.
111
+ - Apply `lifecycle.md`'s directed read set: no formal hydration for ordinary chat; next dependency plus direct dependents for DEFINE; accepted gate/current package/owning contract/target/affected verification for BUILD; implemented tree/current BUILD evidence/affected closeout owners for SHIP. Re-read each written file once before durable use and invalidate only dependents after a relevant event.
112
+ - Idea capsules/inbox entries are IDEATE candidates and may guide selection; they are not a formal contract. Legacy `implementation-notes.html`, stale chat summaries, old logs, task checkboxes, handoff, and memory are navigation/migration context only and cannot establish acceptance, permission, completion, or fresh evidence.
113
+ - Context pressure or compression thresholds may prompt an ordinary checkpoint but never authorize compression, handoff, persistence, or lifecycle movement. Continuity is provider-neutral and has no DCP dependency.
114
+ - [KNOWN] `context.md`, `progress.txt`, `drift-log.md`, and legacy `implementation-notes.html` do not replace `rose-memory`, task-scoped `handoffs/` history, explicitly selected legacy `handoff.md`, `interview.md`, `test-plan.md`, backend tasks, formal specs/tasks, or final reports.
115
+ - Exclude secrets, raw logs, full transcripts, full file contents, private data, and long dumps from inbox/context/progress/notes artifacts and evaluator input.
116
+
117
+ ## Memory, receipt, and handoff continuity
118
+
119
+ - Legacy/pre-runtime `rose-memory` is additive project-local context. Safe scoped reusable explicit user requirements/preferences/corrections/decisions/acceptance criteria default-write through the existing CLI only, with literal `--db memory/memory.db` from the canonical project root and existing fields only. Ambiguous permission or sensitive content blocks or is safely redacted before invocation; alternate/manual/symlink database paths and schema/storage changes block. Backend file mode, backend symlink handling, and retention remain `Unverified`.
120
+ - Ordinary one-turn/report-only work with no memory use and no formal long-running/resume/context-loss need writes no start/end receipt. Those named continuity events or actual current-task memory use require the applicable scoped checkpoint/completion receipt. A receipt is never contract, permission, Git truth, verification, or completion authority.
121
+ - Formal resume reads only the active package/decision and referenced progress, bounded drift, scoped memory, or fresh verification that can change the next action, then revalidates the canonical startup host. It separately revalidates every declared A33 attachment's exact keys, current target root/Git/HEAD/dirty/file/rule state, owning-repository artifact destinations, and applicable `WT-001` identity evidence. Cross-repository common-dir equality is never required; packet, handoff, memory, and checkpoint text are navigation only.
122
+ - [KNOWN] Versioned handoff history is created only on an explicit user or accepted lifecycle trigger. OpenSpec uses `openspec/changes/<change-id>/handoffs/`; ordinary work uses one previously confirmed repository-local `<task-root>/handoffs/` and asks one placement/identity question rather than scanning when that root is unknown.
123
+ - [KNOWN] CREATE uses immutable finalized UTC-named snapshots plus an atomically replaced regular `LATEST.md` containing exact relative path, snapshot ID, SHA-256, and finalized time. LIST reads filenames and bounded frontmatter only. RESUME prefers one user-supplied exact snapshot, otherwise validates the current task's pointer, and never falls back by fuzzy title or another task history.
124
+ - [KNOWN] Handoff stays model-oriented, lightweight, conditional, reference-first, redacted, and non-authoritative. It never auto-creates, auto-prunes, promotes durable memory, imports/moves/rewrites/deletes legacy `<task-root>/handoff.md`, or grants contract, permission, Git, verification, completion, publication, or destructive authority.
125
+ - [KNOWN] Successful CREATE output ends with exactly one localized fenced `text` prompt naming the exact immutable snapshot and requiring current-state revalidation. For A33 the snapshot conditionally records owning-repository artifact destinations plus preserved rollback worktree/evidence references; RESUME revalidates every target/rule/identity separately, and each ADD or non-force REMOVE still needs a new exact approval.
126
+
127
+ ## Future extension point: `artifact-integrity`
128
+
129
+ `artifact-integrity` is a documentation-only, non-binding name reserved for possible future protocol work. Phase I defines no provider, manifest, schema, digest, nonce, receipt, revision, configuration, storage, runtime behavior, approval semantic, warning, status field, or gate. Its absence has no effect on DEFINE, BUILD, review, SHIP, or any summary.
130
+
131
+ ## BUILD Readiness
132
+
133
+ DEFINE output must report one of:
134
+
135
+ - `READY`: all decision-shaping research is closed, artifacts are coherent/strictly valid, material decisions are resolved, and the final test plan is explicitly accepted.
136
+ - `BLOCKED`: a required artifact, material answer, research conclusion, final test-plan acceptance, or evidence item is missing.
137
+
138
+ A named non-material runtime residual may remain `Unverified` under its separate fail-closed operation gate, but neither a waiver nor accepted-`Unverified` wording is a BUILD-readiness alternative.
@@ -0,0 +1,40 @@
1
+ # Backend Routing
2
+
3
+ Backend adapters organize artifacts. They do not define permission to advance modes.
4
+
5
+ | Backend | Use when | Required handling |
6
+ |---|---|---|
7
+ | OpenSpec | Stage-I formal/material work, or an explicitly resumed change | Resolve one change by accepted scope; read current status/instructions only for the next dependency; write and re-read each applicable artifact once; route `interview.md` to `requirements-grilling` and `test-plan.md` to `test-document-generator`; run strict validation when the formal contract requires it. |
8
+ | Custom files | Repository docs, issues, or bespoke task packets define scope | Cite source files and convert work into artifact contracts before BUILD. |
9
+ | Auto detection | The user did not name a backend | Prefer existing explicit artifacts; ask when multiple plausible backends conflict. |
10
+
11
+ ## Rules
12
+
13
+ - IDEATE may create recommendations for a backend but does not require one.
14
+ - IDEATE may capture backend-neutral candidate ideas in a lightweight idea capsule or `ideas/workflow-inbox.md`; this does not create a formal change by default.
15
+ - DEFINE may create or update backend artifacts and must record open questions; selected IDEATE ideas are promoted here rather than during pure IDEATE.
16
+ - OpenSpec DEFINE uses deterministic artifact placement under `openspec/changes/<change-id>/`, including `proposal.md`, `design.md`, `tasks.md`, `specs/**/spec.md`, `interview.md`, `test-plan.md`, and `context.md`.
17
+ - Formal Stage-I activation creates or reuses one OpenSpec change exactly once. Same accepted scope reuses; distinct established scope may create; multiple plausible changes or evasive identity answers trigger one focused question and zero writes. Never guess identity or ask whether to write each artifact.
18
+ - File presence is not readiness. Re-read a written artifact once and refresh status/instructions only when its dependency changed; require strict validation, coherent material decisions, and explicit final test-plan acceptance before formal BUILD.
19
+ - DEFINE closes only source gaps both unresolved and capable of changing a material decision. Select the one applicable class—local owner evidence, official/current version evidence, or explicitly requested/material prior art—rather than running all classes. A remaining material gap blocks acceptance; named non-material runtime residuals remain under separate fail-closed gates.
20
+ - Non-OpenSpec DEFINE asks once where to place interview and test-plan artifacts, passes those locations to `requirements-grilling` and `test-document-generator`, and records the decision in the active change context instead of asking repeatedly.
21
+ - Non-OpenSpec context/progress/drift-log artifacts require a repository-local placement decision or backend adapter mapping before writing; do not default them to the repository root.
22
+ - BUILD requires approved backend scope plus either an explicit implementation package or enough ready artifact evidence to synthesize a queue from the active accepted contract. Generic routing must not assume this umbrella's Package 1–12 history or a fixed task count.
23
+ - Use `lifecycle.md`'s directed read set. Normal chat performs no formal hydration; DEFINE reads the next dependency; BUILD reads acceptance/current package/owning contract/target/affected verification; SHIP reads the implemented tree/current BUILD evidence/affected closeout owners. Re-read written files once and invalidate dependents only. Idea/inbox, handoff, memory, old logs, stale chat, task checkboxes, and DCP/compression state are not authority.
24
+ - The user selects the A33 host by starting OpenCode in that Git repository; a non-Git startup root blocks. AILI does not rank, move, broadly scan for, or auto-select hosts. OpenSpec BUILD resolves exactly one declared target repository from current backend/`WT-001` context and never treats another repository as a better host. Each lane targets one declared repository/cwd, target rules are re-read at the operation/dispatch boundary, may narrow but never broaden, same-level conflicts block, and artifacts remain in the owning target.
25
+ - Before an A33 attachment is eligible, require exact destination `<session-root>/.worktrees/<repo_key>/<worktree_key>`, exact `/.worktrees/` ignore with no re-inclusion/tracked destination, grammar-valid non-reserved keys, collision-free trusted path/topology, separate current host/source/target identity evidence, and explicit branch/base-ref plus `branch_mode:existing|create` and source `reflog_policy:enabled|disabled`. Never suffix, guess, force, use `-B`, create orphan state, guess a remote, or infer a ref.
26
+ - A33 backend records are references, not operation authority. PREPARE has zero add/remove effect. Each real or `driver_fixture` ADD and later non-force REMOVE needs a distinct fresh exact key/class-bound approval; ADD also needs accepted trusted-code risk, while observed REMOVE uses `trusted_code_risk:not_applicable` only under its separate deletion-inventory/risk gate. Missing, stale, reused, mismatched, wrong-class, or risk-invalid approval has zero effect.
27
+ - Cross-repository backend resolution references one current `WT-001` context at `protocols/worktree-context.md`. Backend artifacts carry only its reference and cannot duplicate or rebind host/source/target Git, key, approval, dirty-state, path, command/cwd, or containment facts. A30/A31 external-read routing and probes are historical only and cannot prove A33 behavior.
28
+ - Backend selection never chooses another process skill. Run the proactive delegation scan and use `subagent.dispatch` for an explicit user request or a concrete specialist/noisy-context/independent-unit gap; direct work is the no-trigger/blocked fallback. At most one auxiliary capability is selected. The current OpenCode adapter mapping is: Default Task concurrency is at most two but is not a hard cap. Larger bounded fan-out requires independent non-overlapping units, concrete benefit, suitable owners, and an explicit join plan.
29
+ - OpenSpec BUILD with exactly one ready change and pending tasks synthesizes a neutral package queue from current `tasks.md`, specs, design, dependencies, and `test-plan.md`, maps requirement/decision/risk sources to package/file/artifact/verification evidence, records progress-ledger savepoints containing `scope`, `files_changed`, `unresolved_items`, `evidence_state`, and `next_package`, then uses one direct changed-scope diff/affected-link inspection and the smallest sufficient completion check. Savepoints trigger no automatic test, commit, or package approval.
30
+ - BUILD may hydrate accepted artifacts, confirm exact implementation locality/contracts, and perform bounded diagnosis only. Open-ended or mature-prior-art research blocks. A discovery changing scope, architecture, dependency, public contract, permissions, acceptance, or verification strategy emits `BUILD_MATERIAL_DISCOVERY`, stops before changed work, and returns to DEFINE writeback/revalidation/reacceptance.
31
+ - Continuation references exactly one active canonical `CONT-005` envelope through current context/progress state. It preserves target, phase, accepted authorization, current gates, consumed budgets, accounting/overshoot state, and stop reason; it creates no second session identity or marker contract.
32
+ - Approved spec-backed BUILD records current progress, user feedback/corrections, checkpoint ledger, traceability evidence, verification/review/security state, blockers, ROSE decisions, and next action in `progress.txt`.
33
+ - Approved spec-backed BUILD maintains `drift-log.md` only for spec deviations, model drift/self-corrections, temporary decisions, trade-offs, open questions, unverified assumptions, and required DEFINE write-back; append to legacy `implementation-notes.html` only when the active contract explicitly requires legacy HTML.
34
+ - Keep sidecars such as `progress.txt`, `drift-log.md`, legacy `implementation-notes.html`, and scoped state markers as AILI-managed files for the MVP. Only create or fork a custom OpenSpec schema later if these sidecars need first-class OpenSpec generation or validation.
35
+ - Only ROSE writes progress ledger entries. Workers must return compact reports and evidence references instead of editing `progress.txt`.
36
+ - BUILD success records `IMPLEMENTED_TARGETED_VERIFIED` and stops. SHIP requires fresh explicit intent, reuses still-covering BUILD evidence, and refreshes only stale or affected claim rows. Unchanged transport does not stale evidence; a changed merge triggers only affected integration checks. CI failure returns to the user with no automatic repair, commit, push, merge, or release. Commit, push, merge, and release retain separate exact approvals.
37
+
38
+ ## Generated/direct OpenSpec surfaces
39
+
40
+ Classify OpenSpec-facing surfaces before edits as canonical AILI source, generated/installed adapter, or upstream runtime/tool. Current `.opencode/commands/opsx-*` and `.opencode/skills/openspec-*` are unchanged direct routes outside AILI guarantees. Do not route or recommend users to them, hand-edit/wrap/suppress/prevent them, alter a generator to control them, or treat their output as AILI evidence. AILI-owned generated output changes only through an explicitly in-scope canonical source/generator. Upstream runtime changes are out of scope.