invos 1.0.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 (346) hide show
  1. package/README.md +39 -0
  2. package/bin/invos.js +78 -0
  3. package/kit/.agents/skills/apple/DESCRIPTION.md +2 -0
  4. package/kit/.agents/skills/apple/apple-notes/SKILL.md +90 -0
  5. package/kit/.agents/skills/apple/apple-reminders/SKILL.md +130 -0
  6. package/kit/.agents/skills/audit/SKILL.md +177 -0
  7. package/kit/.agents/skills/design-marca/SKILL.md +92 -0
  8. package/kit/.agents/skills/humanizer/SKILL.md +476 -0
  9. package/kit/.agents/skills/instagram-carrossel/SKILL.md +79 -0
  10. package/kit/.agents/skills/instagram-carrossel/references/fetch-assets.md +77 -0
  11. package/kit/.agents/skills/instagram-carrossel/references/publish.md +48 -0
  12. package/kit/.agents/skills/instagram-carrossel/references/render-png.md +147 -0
  13. package/kit/.agents/skills/instagram-carrossel/scripts/publish.js +165 -0
  14. package/kit/.agents/skills/llm-wiki/SKILL.md +507 -0
  15. package/kit/.agents/skills/onboard/SKILL.md +152 -0
  16. package/kit/.agents/skills/pd-ikigai/SKILL.md +269 -0
  17. package/kit/.agents/skills/popular-web-designs/SKILL.md +214 -0
  18. package/kit/.agents/skills/popular-web-designs/templates/airbnb.md +259 -0
  19. package/kit/.agents/skills/popular-web-designs/templates/airtable.md +102 -0
  20. package/kit/.agents/skills/popular-web-designs/templates/apple.md +326 -0
  21. package/kit/.agents/skills/popular-web-designs/templates/bmw.md +193 -0
  22. package/kit/.agents/skills/popular-web-designs/templates/cal.md +272 -0
  23. package/kit/.agents/skills/popular-web-designs/templates/claude.md +325 -0
  24. package/kit/.agents/skills/popular-web-designs/templates/clay.md +317 -0
  25. package/kit/.agents/skills/popular-web-designs/templates/clickhouse.md +294 -0
  26. package/kit/.agents/skills/popular-web-designs/templates/cohere.md +279 -0
  27. package/kit/.agents/skills/popular-web-designs/templates/coinbase.md +142 -0
  28. package/kit/.agents/skills/popular-web-designs/templates/composio.md +320 -0
  29. package/kit/.agents/skills/popular-web-designs/templates/cursor.md +322 -0
  30. package/kit/.agents/skills/popular-web-designs/templates/elevenlabs.md +278 -0
  31. package/kit/.agents/skills/popular-web-designs/templates/expo.md +294 -0
  32. package/kit/.agents/skills/popular-web-designs/templates/figma.md +233 -0
  33. package/kit/.agents/skills/popular-web-designs/templates/framer.md +259 -0
  34. package/kit/.agents/skills/popular-web-designs/templates/hashicorp.md +291 -0
  35. package/kit/.agents/skills/popular-web-designs/templates/ibm.md +345 -0
  36. package/kit/.agents/skills/popular-web-designs/templates/intercom.md +159 -0
  37. package/kit/.agents/skills/popular-web-designs/templates/kraken.md +138 -0
  38. package/kit/.agents/skills/popular-web-designs/templates/linear.app.md +380 -0
  39. package/kit/.agents/skills/popular-web-designs/templates/lovable.md +311 -0
  40. package/kit/.agents/skills/popular-web-designs/templates/minimax.md +270 -0
  41. package/kit/.agents/skills/popular-web-designs/templates/mintlify.md +339 -0
  42. package/kit/.agents/skills/popular-web-designs/templates/miro.md +121 -0
  43. package/kit/.agents/skills/popular-web-designs/templates/mistral.ai.md +274 -0
  44. package/kit/.agents/skills/popular-web-designs/templates/mongodb.md +279 -0
  45. package/kit/.agents/skills/popular-web-designs/templates/notion.md +322 -0
  46. package/kit/.agents/skills/popular-web-designs/templates/nvidia.md +306 -0
  47. package/kit/.agents/skills/popular-web-designs/templates/ollama.md +280 -0
  48. package/kit/.agents/skills/popular-web-designs/templates/opencode.ai.md +294 -0
  49. package/kit/.agents/skills/popular-web-designs/templates/pinterest.md +243 -0
  50. package/kit/.agents/skills/popular-web-designs/templates/posthog.md +269 -0
  51. package/kit/.agents/skills/popular-web-designs/templates/raycast.md +281 -0
  52. package/kit/.agents/skills/popular-web-designs/templates/replicate.md +274 -0
  53. package/kit/.agents/skills/popular-web-designs/templates/resend.md +316 -0
  54. package/kit/.agents/skills/popular-web-designs/templates/revolut.md +198 -0
  55. package/kit/.agents/skills/popular-web-designs/templates/runwayml.md +257 -0
  56. package/kit/.agents/skills/popular-web-designs/templates/sanity.md +370 -0
  57. package/kit/.agents/skills/popular-web-designs/templates/sentry.md +275 -0
  58. package/kit/.agents/skills/popular-web-designs/templates/spacex.md +207 -0
  59. package/kit/.agents/skills/popular-web-designs/templates/spotify.md +259 -0
  60. package/kit/.agents/skills/popular-web-designs/templates/stripe.md +335 -0
  61. package/kit/.agents/skills/popular-web-designs/templates/supabase.md +268 -0
  62. package/kit/.agents/skills/popular-web-designs/templates/superhuman.md +265 -0
  63. package/kit/.agents/skills/popular-web-designs/templates/together.ai.md +276 -0
  64. package/kit/.agents/skills/popular-web-designs/templates/uber.md +308 -0
  65. package/kit/.agents/skills/popular-web-designs/templates/vercel.md +323 -0
  66. package/kit/.agents/skills/popular-web-designs/templates/voltagent.md +336 -0
  67. package/kit/.agents/skills/popular-web-designs/templates/warp.md +266 -0
  68. package/kit/.agents/skills/popular-web-designs/templates/webflow.md +105 -0
  69. package/kit/.agents/skills/popular-web-designs/templates/wise.md +186 -0
  70. package/kit/.agents/skills/popular-web-designs/templates/x.ai.md +270 -0
  71. package/kit/.agents/skills/popular-web-designs/templates/zapier.md +341 -0
  72. package/kit/.agents/skills/productivity/DESCRIPTION.md +3 -0
  73. package/kit/.agents/skills/productivity/google-workspace/SKILL.md +335 -0
  74. package/kit/.agents/skills/productivity/google-workspace/references/gmail-search-syntax.md +63 -0
  75. package/kit/.agents/skills/productivity/google-workspace/scripts/_hermes_home.py +42 -0
  76. package/kit/.agents/skills/productivity/google-workspace/scripts/google_api.py +1225 -0
  77. package/kit/.agents/skills/productivity/google-workspace/scripts/gws_bridge.py +111 -0
  78. package/kit/.agents/skills/productivity/google-workspace/scripts/setup.py +481 -0
  79. package/kit/.agents/skills/productivity/nano-pdf/SKILL.md +52 -0
  80. package/kit/.agents/skills/productivity/notion/SKILL.md +448 -0
  81. package/kit/.agents/skills/productivity/notion/references/block-types.md +112 -0
  82. package/kit/.agents/skills/productivity/ocr-and-documents/DESCRIPTION.md +3 -0
  83. package/kit/.agents/skills/productivity/ocr-and-documents/SKILL.md +172 -0
  84. package/kit/.agents/skills/productivity/ocr-and-documents/scripts/extract_marker.py +87 -0
  85. package/kit/.agents/skills/productivity/ocr-and-documents/scripts/extract_pymupdf.py +98 -0
  86. package/kit/.agents/skills/productivity/powerpoint/LICENSE.txt +30 -0
  87. package/kit/.agents/skills/productivity/powerpoint/SKILL.md +237 -0
  88. package/kit/.agents/skills/productivity/powerpoint/editing.md +205 -0
  89. package/kit/.agents/skills/productivity/powerpoint/pptxgenjs.md +420 -0
  90. package/kit/.agents/skills/productivity/powerpoint/scripts/__init__.py +0 -0
  91. package/kit/.agents/skills/productivity/powerpoint/scripts/add_slide.py +195 -0
  92. package/kit/.agents/skills/productivity/powerpoint/scripts/clean.py +286 -0
  93. package/kit/.agents/skills/productivity/powerpoint/scripts/office/helpers/__init__.py +0 -0
  94. package/kit/.agents/skills/productivity/powerpoint/scripts/office/helpers/merge_runs.py +199 -0
  95. package/kit/.agents/skills/productivity/powerpoint/scripts/office/helpers/simplify_redlines.py +197 -0
  96. package/kit/.agents/skills/productivity/powerpoint/scripts/office/pack.py +159 -0
  97. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  98. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  99. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  100. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  101. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  102. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  103. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  104. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  105. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  106. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  107. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  108. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  109. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  110. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  111. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  112. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  113. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  114. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  115. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  116. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  117. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  118. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  119. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  120. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  121. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  122. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  123. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  124. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-contentTypes.xsd +42 -0
  125. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-coreProperties.xsd +50 -0
  126. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-digSig.xsd +49 -0
  127. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/ecma/fourth-edition/opc-relationships.xsd +33 -0
  128. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/mce/mc.xsd +75 -0
  129. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  130. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  131. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  132. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  133. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  134. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  135. package/kit/.agents/skills/productivity/powerpoint/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  136. package/kit/.agents/skills/proposta/SKILL.md +159 -0
  137. package/kit/.agents/skills/proposta/references/proposta-avancada.md +17 -0
  138. package/kit/.agents/skills/proposta/references/proposta.html +187 -0
  139. package/kit/.agents/skills/session-checkpoint/SKILL.md +80 -0
  140. package/kit/.agents/skills/session-end/SKILL.md +166 -0
  141. package/kit/.agents/skills/session-start/SKILL.md +149 -0
  142. package/kit/.agents/skills/social-content/SKILL.md +119 -0
  143. package/kit/.agents/skills/stop-slop/CHANGELOG.md +24 -0
  144. package/kit/.agents/skills/stop-slop/LICENSE +21 -0
  145. package/kit/.agents/skills/stop-slop/README.md +62 -0
  146. package/kit/.agents/skills/stop-slop/SKILL.md +68 -0
  147. package/kit/.agents/skills/stop-slop/references/examples.md +59 -0
  148. package/kit/.agents/skills/stop-slop/references/phrases.md +128 -0
  149. package/kit/.agents/skills/stop-slop/references/structures.md +134 -0
  150. package/kit/.agents/squads/advisory-board/README.md +34 -0
  151. package/kit/.agents/squads/advisory-board/agents/board-chair.md +161 -0
  152. package/kit/.agents/squads/advisory-board/agents/brene-brown.md +296 -0
  153. package/kit/.agents/squads/advisory-board/agents/charlie-munger.md +590 -0
  154. package/kit/.agents/squads/advisory-board/agents/derek-sivers.md +268 -0
  155. package/kit/.agents/squads/advisory-board/agents/naval-ravikant.md +251 -0
  156. package/kit/.agents/squads/advisory-board/agents/patrick-lencioni.md +394 -0
  157. package/kit/.agents/squads/advisory-board/agents/peter-thiel.md +269 -0
  158. package/kit/.agents/squads/advisory-board/agents/ray-dalio.md +587 -0
  159. package/kit/.agents/squads/advisory-board/agents/reid-hoffman.md +278 -0
  160. package/kit/.agents/squads/advisory-board/agents/simon-sinek.md +291 -0
  161. package/kit/.agents/squads/advisory-board/agents/yvon-chouinard.md +275 -0
  162. package/kit/.agents/squads/advisory-board/checklists/output-quality.md +73 -0
  163. package/kit/.agents/squads/advisory-board/config/config.yaml +67 -0
  164. package/kit/.agents/squads/advisory-board/data/mental-models-catalog.yaml +178 -0
  165. package/kit/.agents/squads/advisory-board/data/routing-catalog.yaml +89 -0
  166. package/kit/.agents/squads/advisory-board/squad.yaml +50 -0
  167. package/kit/.agents/squads/advisory-board/tasks/convene-board.md +152 -0
  168. package/kit/.agents/squads/advisory-board/tasks/diagnose.md +138 -0
  169. package/kit/.agents/squads/advisory-board/tasks/evaluate-scaling.md +165 -0
  170. package/kit/.agents/squads/advisory-board/tasks/get-founder-counsel.md +169 -0
  171. package/kit/.agents/squads/advisory-board/tasks/resolve-culture-crisis.md +164 -0
  172. package/kit/.agents/squads/advisory-board/tasks/review.md +133 -0
  173. package/kit/.agents/squads/advisory-board/tasks/seek-investment-counsel.md +161 -0
  174. package/kit/.agents/squads/advisory-board/workflows/wf-board-meeting.yaml +115 -0
  175. package/kit/.agents/squads/advisory-board/workflows/wf-decision-framework.yaml +135 -0
  176. package/kit/.agents/squads/brand/README.md +179 -0
  177. package/kit/.agents/squads/brand/agents/alexandra-watkins.md +1869 -0
  178. package/kit/.agents/squads/brand/agents/april-dunford.md +1781 -0
  179. package/kit/.agents/squads/brand/agents/brand-chief.md +600 -0
  180. package/kit/.agents/squads/brand/agents/emily-heyward.md +1685 -0
  181. package/kit/.agents/squads/brand/agents/marty-neumeier.md +1642 -0
  182. package/kit/.agents/squads/brand/agents/michael-johnson.md +1814 -0
  183. package/kit/.agents/squads/brand/agents/sagi-haviv.md +2025 -0
  184. package/kit/.agents/squads/brand/checklists/brand-book-checklist.md +31 -0
  185. package/kit/.agents/squads/brand/checklists/brand-launch-checklist.md +52 -0
  186. package/kit/.agents/squads/brand/checklists/brand-strategy-checklist.md +45 -0
  187. package/kit/.agents/squads/brand/checklists/naming-checklist.md +48 -0
  188. package/kit/.agents/squads/brand/checklists/positioning-checklist.md +48 -0
  189. package/kit/.agents/squads/brand/checklists/smoke-tests.md +180 -0
  190. package/kit/.agents/squads/brand/checklists/visual-identity-checklist.md +61 -0
  191. package/kit/.agents/squads/brand/config.yaml +135 -0
  192. package/kit/.agents/squads/brand/data/brand-archetypes.md +135 -0
  193. package/kit/.agents/squads/brand/data/brand-audit-methodology.md +99 -0
  194. package/kit/.agents/squads/brand/data/brand-pantheon.md +61 -0
  195. package/kit/.agents/squads/brand/data/brand-voice-matrix.md +92 -0
  196. package/kit/.agents/squads/brand/data/color-psychology.md +125 -0
  197. package/kit/.agents/squads/brand/squad.yaml +123 -0
  198. package/kit/.agents/squads/brand/tasks/brand-audit.md +150 -0
  199. package/kit/.agents/squads/brand/tasks/brand-book-creation.md +136 -0
  200. package/kit/.agents/squads/brand/tasks/brand-diagnosis.md +135 -0
  201. package/kit/.agents/squads/brand/tasks/brand-touchpoint-audit.md +100 -0
  202. package/kit/.agents/squads/brand/tasks/coherence-check.md +132 -0
  203. package/kit/.agents/squads/brand/tasks/logo-evaluation.md +103 -0
  204. package/kit/.agents/squads/brand/tasks/movement-architecture.md +136 -0
  205. package/kit/.agents/squads/brand/tasks/naming-exercise.md +134 -0
  206. package/kit/.agents/squads/brand/tasks/positioning-exercise.md +146 -0
  207. package/kit/.agents/squads/brand/tasks/research-references.md +225 -0
  208. package/kit/.agents/squads/brand/tasks/visual-identity-brief.md +134 -0
  209. package/kit/.agents/squads/brand/templates/brand-book-tmpl.md +148 -0
  210. package/kit/.agents/squads/brand/templates/brand-soul-canvas-tmpl.md +80 -0
  211. package/kit/.agents/squads/brand/templates/naming-brief-tmpl.md +83 -0
  212. package/kit/.agents/squads/brand/templates/positioning-canvas-tmpl.md +60 -0
  213. package/kit/.agents/squads/brand/templates/visual-identity-brief-tmpl.md +109 -0
  214. package/kit/.agents/squads/brand/workflows/wf-brand-audit.yaml +148 -0
  215. package/kit/.agents/squads/brand/workflows/wf-brand-from-zero.yaml +229 -0
  216. package/kit/.agents/squads/brand/workflows/wf-brief-to-references.yaml +141 -0
  217. package/kit/.agents/squads/hormozi-squad/README.md +25 -0
  218. package/kit/.agents/squads/hormozi-squad/agents/hormozi-ads.md +159 -0
  219. package/kit/.agents/squads/hormozi-squad/agents/hormozi-advisor.md +178 -0
  220. package/kit/.agents/squads/hormozi-squad/agents/hormozi-audit.md +178 -0
  221. package/kit/.agents/squads/hormozi-squad/agents/hormozi-chief.md +121 -0
  222. package/kit/.agents/squads/hormozi-squad/agents/hormozi-closer.md +179 -0
  223. package/kit/.agents/squads/hormozi-squad/agents/hormozi-content.md +166 -0
  224. package/kit/.agents/squads/hormozi-squad/agents/hormozi-copy.md +152 -0
  225. package/kit/.agents/squads/hormozi-squad/agents/hormozi-hooks.md +177 -0
  226. package/kit/.agents/squads/hormozi-squad/agents/hormozi-launch.md +160 -0
  227. package/kit/.agents/squads/hormozi-squad/agents/hormozi-leads.md +198 -0
  228. package/kit/.agents/squads/hormozi-squad/agents/hormozi-models.md +191 -0
  229. package/kit/.agents/squads/hormozi-squad/agents/hormozi-offers.md +197 -0
  230. package/kit/.agents/squads/hormozi-squad/agents/hormozi-pricing.md +151 -0
  231. package/kit/.agents/squads/hormozi-squad/agents/hormozi-retention.md +166 -0
  232. package/kit/.agents/squads/hormozi-squad/agents/hormozi-scale.md +175 -0
  233. package/kit/.agents/squads/hormozi-squad/agents/hormozi-workshop.md +160 -0
  234. package/kit/.agents/squads/hormozi-squad/checklists/output-quality.md +71 -0
  235. package/kit/.agents/squads/hormozi-squad/config/config.yaml +183 -0
  236. package/kit/.agents/squads/hormozi-squad/data/hormozi-frameworks.yaml +105 -0
  237. package/kit/.agents/squads/hormozi-squad/data/routing-catalog.yaml +94 -0
  238. package/kit/.agents/squads/hormozi-squad/squad.yaml +60 -0
  239. package/kit/.agents/squads/hormozi-squad/tasks/audit-business.md +186 -0
  240. package/kit/.agents/squads/hormozi-squad/tasks/close-sale.md +179 -0
  241. package/kit/.agents/squads/hormozi-squad/tasks/create-hooks.md +159 -0
  242. package/kit/.agents/squads/hormozi-squad/tasks/create-offer.md +178 -0
  243. package/kit/.agents/squads/hormozi-squad/tasks/design-workshop.md +192 -0
  244. package/kit/.agents/squads/hormozi-squad/tasks/diagnose.md +166 -0
  245. package/kit/.agents/squads/hormozi-squad/tasks/generate-leads.md +187 -0
  246. package/kit/.agents/squads/hormozi-squad/tasks/plan-launch.md +179 -0
  247. package/kit/.agents/squads/hormozi-squad/tasks/review.md +133 -0
  248. package/kit/.agents/squads/hormozi-squad/tasks/set-pricing.md +167 -0
  249. package/kit/.agents/squads/hormozi-squad/workflows/wf-business-turnaround.yaml +104 -0
  250. package/kit/.agents/squads/hormozi-squad/workflows/wf-offer-creation.yaml +105 -0
  251. package/kit/.agents/squads/index.md +14 -0
  252. package/kit/.agents/squads/instagram-carrossel/DEPENDENCIES.md +75 -0
  253. package/kit/.agents/squads/instagram-carrossel/README.md +52 -0
  254. package/kit/.agents/squads/instagram-carrossel/RUN.md +115 -0
  255. package/kit/.agents/squads/instagram-carrossel/_memory/memories.md +16 -0
  256. package/kit/.agents/squads/instagram-carrossel/agents/copywriter/tasks/create-slides.md +96 -0
  257. package/kit/.agents/squads/instagram-carrossel/agents/copywriter/tasks/generate-angles.md +111 -0
  258. package/kit/.agents/squads/instagram-carrossel/agents/copywriter/tasks/optimize-copy.md +81 -0
  259. package/kit/.agents/squads/instagram-carrossel/agents/copywriter.custom.md +73 -0
  260. package/kit/.agents/squads/instagram-carrossel/agents/image-designer/tasks/create-slides.md +132 -0
  261. package/kit/.agents/squads/instagram-carrossel/agents/image-designer/tasks/propose-visual-identities.md +89 -0
  262. package/kit/.agents/squads/instagram-carrossel/agents/image-designer/tasks/render-export.md +100 -0
  263. package/kit/.agents/squads/instagram-carrossel/agents/image-designer.custom.md +47 -0
  264. package/kit/.agents/squads/instagram-carrossel/agents/publisher/tasks/validate-publish.md +50 -0
  265. package/kit/.agents/squads/instagram-carrossel/agents/publisher.custom.md +26 -0
  266. package/kit/.agents/squads/instagram-carrossel/agents/researcher/tasks/find-and-rank-news.md +105 -0
  267. package/kit/.agents/squads/instagram-carrossel/agents/researcher.custom.md +46 -0
  268. package/kit/.agents/squads/instagram-carrossel/agents/reviewer/tasks/generate-feedback.md +91 -0
  269. package/kit/.agents/squads/instagram-carrossel/agents/reviewer/tasks/score-content.md +103 -0
  270. package/kit/.agents/squads/instagram-carrossel/agents/reviewer.custom.md +53 -0
  271. package/kit/.agents/squads/instagram-carrossel/output/.gitkeep +0 -0
  272. package/kit/.agents/squads/instagram-carrossel/output/slides/.gitkeep +0 -0
  273. package/kit/.agents/squads/instagram-carrossel/output/slides/rendered/.gitkeep +0 -0
  274. package/kit/.agents/squads/instagram-carrossel/pipeline/data/anti-patterns.md +125 -0
  275. package/kit/.agents/squads/instagram-carrossel/pipeline/data/domain-framework.md +92 -0
  276. package/kit/.agents/squads/instagram-carrossel/pipeline/data/instagram-feed-best-practices.md +235 -0
  277. package/kit/.agents/squads/instagram-carrossel/pipeline/data/output-examples.md +244 -0
  278. package/kit/.agents/squads/instagram-carrossel/pipeline/data/quality-criteria.md +120 -0
  279. package/kit/.agents/squads/instagram-carrossel/pipeline/data/research-brief.md +135 -0
  280. package/kit/.agents/squads/instagram-carrossel/pipeline/data/tone-of-voice.md +32 -0
  281. package/kit/.agents/squads/instagram-carrossel/pipeline/pipeline.yaml +136 -0
  282. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-01-input-content.md +38 -0
  283. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-02-find-news.md +42 -0
  284. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-03-select-story.md +59 -0
  285. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-04-generate-angles.md +45 -0
  286. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-05-select-angle.md +64 -0
  287. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-06-create-copy.md +51 -0
  288. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-07-approve-copy.md +52 -0
  289. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-08-propose-visuals.md +42 -0
  290. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-09-select-visual.md +61 -0
  291. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-10-create-slides.md +55 -0
  292. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-11-approve-images.md +60 -0
  293. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-12-review.md +55 -0
  294. package/kit/.agents/squads/instagram-carrossel/pipeline/steps/step-13-publish.md +79 -0
  295. package/kit/.agents/squads/instagram-carrossel/squad-party.csv +6 -0
  296. package/kit/.agents/squads/instagram-carrossel/squad.yaml +70 -0
  297. package/kit/AGENTS.md +175 -0
  298. package/kit/CLAUDE.md +1 -0
  299. package/kit/COMECE-AQUI.md +207 -0
  300. package/kit/INVOS.json +37 -0
  301. package/kit/MEMORY.md +31 -0
  302. package/kit/README.md +434 -0
  303. package/kit/SECURITY.md +39 -0
  304. package/kit/clientes/README.md +72 -0
  305. package/kit/clientes/_index.md +32 -0
  306. package/kit/clientes/_template/arquivos/.gitkeep +0 -0
  307. package/kit/clientes/_template/contexto.md +21 -0
  308. package/kit/clientes/_template/entregas.md +20 -0
  309. package/kit/clientes/_template/perfil.md +47 -0
  310. package/kit/clientes/_template/propostas/.gitkeep +0 -0
  311. package/kit/conteudo/README.md +12 -0
  312. package/kit/conteudo/_fila.md +12 -0
  313. package/kit/conteudo/carrosseis/.gitkeep +0 -0
  314. package/kit/conteudo/publicados/.gitkeep +0 -0
  315. package/kit/docs/audit-enxugamento-sieve.md +187 -0
  316. package/kit/docs/cli.md +62 -0
  317. package/kit/docs/hotmart-webhook.md +96 -0
  318. package/kit/docs/lab-user.md +35 -0
  319. package/kit/docs/prd-invos-cli.md +264 -0
  320. package/kit/integracoes/README.md +31 -0
  321. package/kit/integracoes/composio/README.md +128 -0
  322. package/kit/integracoes/composio/marketing-tools.md +61 -0
  323. package/kit/marca/README.md +13 -0
  324. package/kit/marca/assets/.gitkeep +0 -0
  325. package/kit/marca/marca.md +57 -0
  326. package/kit/memoria/ativo.md +18 -0
  327. package/kit/memoria/decisoes.md +26 -0
  328. package/kit/memoria/empresa.md +46 -0
  329. package/kit/memoria/historico/README.md +8 -0
  330. package/kit/memoria/insights.md +11 -0
  331. package/kit/memoria/perfil.md +29 -0
  332. package/kit/memoria/projetos.md +27 -0
  333. package/kit/memoria/regras/_TEMPLATE-exemplo.md +15 -0
  334. package/kit/memoria/regras/task-com-dono.md +18 -0
  335. package/kit/scripts/smoke-estado.sh +32 -0
  336. package/kit/scripts/validar.sh +206 -0
  337. package/package.json +43 -0
  338. package/src/commands/doctor.js +104 -0
  339. package/src/commands/init.js +44 -0
  340. package/src/commands/install.js +41 -0
  341. package/src/commands/update.js +113 -0
  342. package/src/lock.js +47 -0
  343. package/src/manifest.js +10 -0
  344. package/src/resolve-kit.js +33 -0
  345. package/src/symlinks.js +78 -0
  346. package/src/utils.js +113 -0
@@ -0,0 +1,206 @@
1
+ #!/bin/bash
2
+ # Valida se o starter kit está configurado corretamente
3
+ #
4
+ # Modos:
5
+ # bash scripts/validar.sh → só estrutura (1–4). OK pro template de ship.
6
+ # bash scripts/validar.sh --pos-onboard → estrutura + FAIL se placeholders restarem
7
+ # (use depois do onboard / na máquina do comprador).
8
+
9
+ set -euo pipefail
10
+
11
+ POS_ONBOARD=0
12
+ for arg in "$@"; do
13
+ case "$arg" in
14
+ --pos-onboard) POS_ONBOARD=1 ;;
15
+ -h|--help)
16
+ echo "Uso: bash scripts/validar.sh [--pos-onboard]"
17
+ echo " (default) estrutura do kit — template de ship deve passar"
18
+ echo " --pos-onboard estrutura + sem placeholders em memoria/"
19
+ exit 0
20
+ ;;
21
+ esac
22
+ done
23
+
24
+ ERROS=0
25
+ echo "=== Validando INVOS Starter Kit ==="
26
+ if [ "$POS_ONBOARD" -eq 1 ]; then
27
+ echo "Modo: estrutura + pós-onboard (sem placeholders)"
28
+ else
29
+ echo "Modo: estrutura apenas (template de ship OK com placeholders)"
30
+ fi
31
+ echo ""
32
+
33
+ # 1. Arquivos essenciais
34
+ echo "1/5 — Arquivos essenciais:"
35
+ for f in AGENTS.md MEMORY.md README.md SECURITY.md .env.example COMECE-AQUI.md; do
36
+ if [ -f "$f" ]; then
37
+ echo " ✅ $f"
38
+ else
39
+ echo " ❌ $f — FALTA"
40
+ ERROS=$((ERROS+1))
41
+ fi
42
+ done
43
+
44
+ # 2. .gitignore bloqueia .env
45
+ echo ""
46
+ echo "2/5 — Segurança:"
47
+ if grep -q "^\.env$" .gitignore 2>/dev/null; then
48
+ echo " ✅ .gitignore bloqueia .env"
49
+ else
50
+ echo " ❌ .gitignore NÃO bloqueia .env"
51
+ ERROS=$((ERROS+1))
52
+ fi
53
+ if grep -q "^\.env\.\*" .gitignore 2>/dev/null; then
54
+ echo " ✅ .gitignore bloqueia .env.*"
55
+ else
56
+ echo " ❌ .gitignore NÃO bloqueia .env.*"
57
+ ERROS=$((ERROS+1))
58
+ fi
59
+
60
+ # 3. Memoria completa
61
+ echo ""
62
+ echo "3/5 — Sistema de memória:"
63
+ for f in memoria/perfil.md memoria/empresa.md memoria/projetos.md memoria/decisoes.md memoria/insights.md memoria/ativo.md clientes/_index.md marca/marca.md; do
64
+ if [ -f "$f" ]; then
65
+ echo " ✅ $f"
66
+ else
67
+ echo " ❌ $f — FALTA"
68
+ ERROS=$((ERROS+1))
69
+ fi
70
+ done
71
+ if [ -d "clientes/_template" ] && [ -f "clientes/_template/perfil.md" ]; then
72
+ echo " ✅ clientes/_template/"
73
+ else
74
+ echo " ❌ clientes/_template/ — FALTA"
75
+ ERROS=$((ERROS+1))
76
+ fi
77
+ if [ -d "marca/assets" ]; then
78
+ echo " ✅ marca/assets/"
79
+ else
80
+ echo " ❌ marca/assets/ — FALTA"
81
+ ERROS=$((ERROS+1))
82
+ fi
83
+
84
+ # 4. Skills
85
+ echo ""
86
+ echo "4/5 — Skills:"
87
+ for f in session-start session-end session-checkpoint onboard proposta design-marca social-content instagram-carrossel; do
88
+ if [ -f ".agents/skills/$f/SKILL.md" ]; then
89
+ echo " ✅ $f"
90
+ else
91
+ echo " ❌ $f — FALTA"
92
+ ERROS=$((ERROS+1))
93
+ fi
94
+ done
95
+ if [ -f "integracoes/composio/README.md" ]; then
96
+ echo " ✅ integracoes/composio/"
97
+ else
98
+ echo " ❌ integracoes/composio/ — FALTA"
99
+ ERROS=$((ERROS+1))
100
+ fi
101
+ if [ -f ".agents/squads/instagram-carrossel/RUN.md" ] && [ -f ".agents/squads/instagram-carrossel/squad.yaml" ]; then
102
+ echo " ✅ squad instagram-carrossel"
103
+ else
104
+ echo " ❌ squad instagram-carrossel — FALTA"
105
+ ERROS=$((ERROS+1))
106
+ fi
107
+ # Pacote único: skill instagram-carrossel + references (render/fetch/publish)
108
+ if [ -f ".agents/skills/instagram-carrossel/SKILL.md" ] \
109
+ && [ -f ".agents/skills/instagram-carrossel/references/render-png.md" ] \
110
+ && [ -f ".agents/skills/instagram-carrossel/references/fetch-assets.md" ] \
111
+ && [ -f ".agents/skills/instagram-carrossel/references/publish.md" ] \
112
+ && [ -f ".agents/skills/instagram-carrossel/scripts/publish.js" ]; then
113
+ echo " ✅ skill instagram-carrossel (pacote + references + publish.js)"
114
+ else
115
+ echo " ❌ skill instagram-carrossel incompleta (SKILL + references/ + scripts/publish.js)"
116
+ ERROS=$((ERROS+1))
117
+ fi
118
+ # Skills antigas separadas não devem existir (foram fundidas)
119
+ for f in image-creator image-fetcher instagram-publisher; do
120
+ if [ -d ".agents/skills/$f" ]; then
121
+ echo " ❌ skill $f ainda existe — deve viver em instagram-carrossel/references/"
122
+ ERROS=$((ERROS+1))
123
+ fi
124
+ done
125
+ # Paths legados OpenSquad (sem prefixo INVOS .agents/)
126
+ if rg -n "_opensquad/_memory|_opensquad/core|(^|[^./])skills/image-creator|(^|[^./])skills/instagram-publisher" .agents/squads/instagram-carrossel --glob '!DEPENDENCIES.md' --glob '!RUN.md' 2>/dev/null | rg -v '\.agents/skills/' | head -1 | grep -q .; then
127
+ echo " ❌ paths OpenSquad quebrados ainda no squad"
128
+ ERROS=$((ERROS+1))
129
+ else
130
+ echo " ✅ squad paths INVOS (sem deps OpenSquad quebradas)"
131
+ fi
132
+
133
+ echo ""
134
+ echo "4b — Clientes (prestador):"
135
+ if [ -f "clientes/README.md" ] && [ -f "clientes/_template/perfil.md" ]; then
136
+ echo " ✅ clientes/_template + README"
137
+ else
138
+ echo " ❌ clientes/ incompleto"
139
+ ERROS=$((ERROS+1))
140
+ fi
141
+
142
+ # 5. Placeholders
143
+ echo ""
144
+ if [ "$POS_ONBOARD" -eq 1 ]; then
145
+ echo "5/5 — Placeholders (pós-onboard — FAIL se restar template):"
146
+ PH=0
147
+
148
+ if [ -f memoria/empresa.md ]; then
149
+ if grep -qE '\[seu nome\]|\[o que|PREENCHA' memoria/empresa.md 2>/dev/null; then
150
+ echo " ❌ memoria/empresa.md ainda tem placeholder ([seu nome] / [o que / PREENCHA)"
151
+ PH=$((PH+1))
152
+ else
153
+ echo " ✅ memoria/empresa.md sem placeholders bloqueantes"
154
+ fi
155
+ fi
156
+
157
+ if [ -f memoria/projetos.md ]; then
158
+ if grep -qE 'PREENCHA|\[descrição' memoria/projetos.md 2>/dev/null; then
159
+ echo " ❌ memoria/projetos.md ainda tem placeholder (PREENCHA / [descrição)"
160
+ PH=$((PH+1))
161
+ else
162
+ echo " ✅ memoria/projetos.md sem placeholders bloqueantes"
163
+ fi
164
+ fi
165
+
166
+ if [ -f memoria/perfil.md ]; then
167
+ if grep -qE '\[Seu Nome\]|PREENCHA|\[Escreva aqui' memoria/perfil.md 2>/dev/null; then
168
+ echo " ❌ memoria/perfil.md ainda tem placeholder ([Seu Nome] / PREENCHA / [Escreva aqui)"
169
+ PH=$((PH+1))
170
+ else
171
+ echo " ✅ memoria/perfil.md sem placeholders bloqueantes"
172
+ fi
173
+ fi
174
+
175
+ if [ -f memoria/ativo.md ]; then
176
+ if grep -q 'primeira sessão' memoria/ativo.md 2>/dev/null || grep -qF '$(date' memoria/ativo.md 2>/dev/null; then
177
+ echo " ❌ memoria/ativo.md ainda marca first-run (\"primeira sessão\") ou tem literal \$(date"
178
+ PH=$((PH+1))
179
+ else
180
+ echo " ✅ memoria/ativo.md sem first-run / literal date"
181
+ fi
182
+ fi
183
+
184
+ if [ "$PH" -gt 0 ]; then
185
+ ERROS=$((ERROS+PH))
186
+ echo " → Rode o onboard e revalide com --pos-onboard"
187
+ fi
188
+ else
189
+ echo "5/5 — Primeiro uso? (informativo — não falha no modo estrutura)"
190
+ if grep -qE '\[o que|\[seu nome\]|PREENCHA' memoria/empresa.md 2>/dev/null \
191
+ || grep -q 'primeira sessão' memoria/ativo.md 2>/dev/null; then
192
+ echo " 🔄 AINDA É TEMPLATE — primeiro uso vai disparar onboard"
193
+ echo " ℹ️ Pra validar memória preenchida: bash scripts/validar.sh --pos-onboard"
194
+ else
195
+ echo " ✅ Já configurado (sem placeholders óbvios em empresa/ativo)"
196
+ fi
197
+ fi
198
+
199
+ echo ""
200
+ if [ $ERROS -eq 0 ]; then
201
+ echo "=== ✅ Kit válido! Pronto pra usar. ==="
202
+ exit 0
203
+ else
204
+ echo "=== ❌ $ERROS erro(s) encontrado(s) ==="
205
+ exit 1
206
+ fi
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "invos",
3
+ "version": "1.0.0",
4
+ "description": "INVOS — cérebro do negócio em arquivos para agentes de IA. CLI: init, install, update, doctor.",
5
+ "type": "module",
6
+ "bin": {
7
+ "invos": "bin/invos.js"
8
+ },
9
+ "engines": {
10
+ "node": ">=18"
11
+ },
12
+ "scripts": {
13
+ "bundle-kit": "node scripts/bundle-kit.mjs",
14
+ "prepublishOnly": "node scripts/bundle-kit.mjs"
15
+ },
16
+ "files": [
17
+ "bin/",
18
+ "src/",
19
+ "kit/",
20
+ "README.md"
21
+ ],
22
+ "keywords": [
23
+ "invos",
24
+ "ai-agents",
25
+ "memory",
26
+ "claude",
27
+ "cursor",
28
+ "business-os",
29
+ "markdown"
30
+ ],
31
+ "author": "Felipe Natanael",
32
+ "license": "MIT",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/felipenalves/invos.git",
36
+ "directory": "packages/cli"
37
+ },
38
+ "homepage": "https://inovadigitalid.com/invos",
39
+ "bugs": {
40
+ "url": "https://github.com/felipenalves/invos/issues"
41
+ },
42
+ "dependencies": {}
43
+ }
@@ -0,0 +1,104 @@
1
+ import { existsSync, readdirSync } from 'node:fs';
2
+ import { resolve } from 'node:path';
3
+ import { loadManifest } from '../manifest.js';
4
+ import { readLock } from '../lock.js';
5
+ import { checkClaudeSymlinks } from '../symlinks.js';
6
+
7
+ const ESSENTIAL_FILES = [
8
+ 'AGENTS.md', 'MEMORY.md', 'SECURITY.md', '.env.example', 'COMECE-AQUI.md',
9
+ 'INVOS.json',
10
+ ];
11
+
12
+ const ESSENTIAL_DIRS = [
13
+ 'memoria', 'marca', 'clientes', 'conteudo', 'scripts',
14
+ '.agents/skills', '.agents/squads',
15
+ ];
16
+
17
+ export async function doctor(kit, kitRoot, targetDir, args) {
18
+ const fix = args.includes('--fix');
19
+ let allOk = true;
20
+ const report = [];
21
+
22
+ report.push('INVOS Doctor — ' + targetDir);
23
+
24
+ // 1. Essential files
25
+ let filesOk = 0;
26
+ for (const f of ESSENTIAL_FILES) {
27
+ const p = resolve(targetDir, f);
28
+ if (existsSync(p)) {
29
+ filesOk++;
30
+ } else {
31
+ report.push(' ✗ ' + f + ' — missing');
32
+ allOk = false;
33
+ }
34
+ }
35
+ report.push(' Files: ' + filesOk + '/' + ESSENTIAL_FILES.length);
36
+
37
+ // 2. Essential dirs
38
+ let dirsOk = 0;
39
+ for (const d of ESSENTIAL_DIRS) {
40
+ const p = resolve(targetDir, d);
41
+ if (existsSync(p)) {
42
+ dirsOk++;
43
+ } else {
44
+ report.push(' ✗ ' + d + '/ — missing');
45
+ allOk = false;
46
+ }
47
+ }
48
+ report.push(' Dirs: ' + dirsOk + '/' + ESSENTIAL_DIRS.length);
49
+
50
+ // 3. Skills vs manifest
51
+ const man = loadManifest(resolve(targetDir, 'INVOS.json'));
52
+ const agentsSkillsDir = resolve(targetDir, '.agents', 'skills');
53
+ const manifestSkills = man?.seed?.skills || [];
54
+
55
+ if (existsSync(agentsSkillsDir)) {
56
+ const present = readdirSync(agentsSkillsDir).filter(e => {
57
+ return existsSync(resolve(agentsSkillsDir, e, 'SKILL.md'));
58
+ });
59
+ const missing = manifestSkills.filter(s => {
60
+ if (s === 'notion') {
61
+ return !existsSync(resolve(targetDir, '.claude', 'skills', 'notion'));
62
+ }
63
+ return !present.includes(s);
64
+ });
65
+ if (missing.length > 0) {
66
+ report.push(' Skills missing: ' + missing.join(', '));
67
+ allOk = false;
68
+ } else {
69
+ report.push(' Skills: all ' + manifestSkills.length + ' present');
70
+ }
71
+ }
72
+
73
+ // 4. Lock file
74
+ const lock = readLock(targetDir);
75
+ if (lock) {
76
+ report.push(' Lock: ✓ (' + lock.version + ', installed ' + (lock.installedAt ? lock.installedAt.substring(0, 10) : '?') + ')');
77
+ } else {
78
+ report.push(' Lock: ✗ INVOS-LOCK.json missing');
79
+ allOk = false;
80
+ }
81
+
82
+ // 5. Claude symlinks
83
+ const symCheck = checkClaudeSymlinks(targetDir);
84
+ if (symCheck.ok) {
85
+ report.push(' Symlinks: ✓');
86
+ } else {
87
+ report.push(' Symlinks: ✗ ' + symCheck.errors.join('; '));
88
+ allOk = false;
89
+ }
90
+
91
+ // 6. Version
92
+ report.push(' Kit version: ' + (man?.version || 'unknown'));
93
+
94
+ console.log(report.join('\n'));
95
+
96
+ if (!allOk) {
97
+ console.log(' Status: ⚠️ issues found');
98
+ if (fix) console.log(' Run: invos install');
99
+ else console.log(' Run: invos doctor --fix');
100
+ return;
101
+ }
102
+
103
+ console.log(' Status: ✓ all checks passed');
104
+ }
@@ -0,0 +1,44 @@
1
+ import { existsSync, mkdirSync } from 'node:fs';
2
+ import { resolve } from 'node:path';
3
+ import { collectFiles, copyFileWithDirs, ensureDir } from '../utils.js';
4
+ import { buildLock, writeLock } from '../lock.js';
5
+ import { syncClaudeSymlinks } from '../symlinks.js';
6
+
7
+ export async function init(kit, kitRoot, args) {
8
+ const idx = args.indexOf('--dir');
9
+ let targetDir;
10
+ if (idx !== -1 && args[idx + 1]) {
11
+ targetDir = resolve(process.cwd(), args[idx + 1]);
12
+ } else {
13
+ targetDir = resolve(process.cwd(), args[0] || '.');
14
+ }
15
+
16
+ if (targetDir === '.' || !args[0]) {
17
+ targetDir = process.cwd();
18
+ }
19
+
20
+ if (existsSync(targetDir) && targetDir !== process.cwd()) {
21
+ console.error(`Directory ${targetDir} already exists. Use install for existing projects.`);
22
+ process.exit(1);
23
+ }
24
+
25
+ ensureDir(targetDir);
26
+ const files = collectFiles(kitRoot, '', true);
27
+
28
+ let count = 0;
29
+ for (const f of files) {
30
+ const dest = resolve(targetDir, f.relPath);
31
+ copyFileWithDirs(f.fullPath, dest);
32
+ count++;
33
+ }
34
+
35
+ // Generate lock
36
+ const lock = buildLock(kitRoot, targetDir);
37
+ writeLock(targetDir, lock);
38
+
39
+ // Symlinks
40
+ syncClaudeSymlinks(kitRoot, targetDir);
41
+
42
+ console.log(`✓ invos init complete — ${count} files in ${targetDir}`);
43
+ console.log(' Run: cd ' + targetDir + ' && npx invos doctor');
44
+ }
@@ -0,0 +1,41 @@
1
+ import { existsSync } from 'node:fs';
2
+ import { resolve } from 'node:path';
3
+ import { collectFiles, copyFileWithDirs, shouldCopyOnInstall, ensureDir, isDevPath } from '../utils.js';
4
+ import { buildLock, readLock, writeLock } from '../lock.js';
5
+ import { syncClaudeSymlinks } from '../symlinks.js';
6
+
7
+ export async function install(kit, kitRoot, targetDir, args) {
8
+ // Collect ALL kit files (skip user-data denylist) then filter out dev infra
9
+ const allFiles = collectFiles(kitRoot, '', true);
10
+ const files = allFiles.filter(f => !isDevPath(f.relPath));
11
+ let copied = 0;
12
+ let skipped = 0;
13
+
14
+ for (const f of files) {
15
+ const dest = resolve(targetDir, f.relPath);
16
+ if (shouldCopyOnInstall(dest)) {
17
+ if (!existsSync(dest)) {
18
+ ensureDir(dest.substring(0, dest.lastIndexOf('/')) || dest);
19
+ }
20
+ copyFileWithDirs(f.fullPath, dest);
21
+ copied++;
22
+ } else {
23
+ skipped++;
24
+ }
25
+ }
26
+
27
+ // Lock file (merge with existing)
28
+ const existingLock = readLock(targetDir);
29
+ const lock = buildLock(kitRoot, targetDir, existingLock?.custom || {});
30
+ if (existingLock) {
31
+ lock.installedAt = existingLock.installedAt;
32
+ lock.custom = existingLock.custom || {};
33
+ }
34
+ writeLock(targetDir, lock);
35
+
36
+ // Symlinks
37
+ syncClaudeSymlinks(kitRoot, targetDir);
38
+
39
+ console.log(`✓ invos install — ${copied} files copied, ${skipped} skipped (kept user data)`);
40
+ console.log(' Run: npx invos doctor');
41
+ }
@@ -0,0 +1,113 @@
1
+ import { existsSync, readFileSync, writeFileSync, renameSync } from 'node:fs';
2
+ import { resolve } from 'node:path';
3
+ import { collectFiles, copyFileWithDirs, shouldOverwriteOnUpdate, sha256File, isDenylisted, isTemplatePlaceholder } from '../utils.js';
4
+ import { readLock, updateLockShipped, writeLock } from '../lock.js';
5
+ import { syncClaudeSymlinks } from '../symlinks.js';
6
+
7
+ export async function update(kit, kitRoot, targetDir, args) {
8
+ const dryRun = args.includes('--dry-run');
9
+ const lock = readLock(targetDir);
10
+
11
+ if (!lock) {
12
+ console.error('INVOS-LOCK.json not found. Run install first.');
13
+ process.exit(1);
14
+ }
15
+
16
+ const files = collectFiles(kitRoot, '');
17
+ let updated = 0;
18
+ let skipped = 0;
19
+ let agentsBackedUp = false;
20
+
21
+ for (const f of files) {
22
+ const dest = resolve(targetDir, f.relPath);
23
+ const rel = f.relPath;
24
+
25
+ // USER denylist check
26
+ if (isDenylisted(rel)) {
27
+ skipped++;
28
+ continue;
29
+ }
30
+
31
+ // Special: AGENTS.md custom handling
32
+ if (rel === 'AGENTS.md' && existsSync(dest)) {
33
+ const shippedSha = sha256File(f.fullPath);
34
+ const localSha = sha256File(dest);
35
+ const customDecision = lock.custom?.['AGENTS.md'];
36
+
37
+ if (localSha !== shippedSha) {
38
+ if (customDecision === 'skip') {
39
+ if (!dryRun) {
40
+ const bakPath = resolve(targetDir, 'AGENTS.md.shipped.bak');
41
+ writeFileSync(bakPath, readFileSync(f.fullPath));
42
+ console.warn('⚠️ AGENTS.md custom — backup em AGENTS.md.shipped.bak (respecting skip lock)');
43
+ agentsBackedUp = true;
44
+ }
45
+ skipped++;
46
+ continue;
47
+ }
48
+ if (customDecision === 'replace' || !existsSync(dest)) {
49
+ // Replace: just overwrite (handled below)
50
+ if (!dryRun) {
51
+ const bakPath = resolve(targetDir, 'AGENTS.md.shipped.bak');
52
+ writeFileSync(bakPath, readFileSync(dest));
53
+ console.warn('⚠️ AGENTS.md custom — backup em AGENTS.md.shipped.bak (replacing)');
54
+ agentsBackedUp = true;
55
+ }
56
+ } else {
57
+ // First time seeing divergence — warn and skip
58
+ if (!dryRun) {
59
+ const bakPath = resolve(targetDir, 'AGENTS.md.shipped.bak');
60
+ writeFileSync(bakPath, readFileSync(f.fullPath));
61
+ console.warn('⚠️ AGENTS.md custom — backup em AGENTS.md.shipped.bak');
62
+ console.warn(' Next update will respect lock. Run again with --dry-run after setting:');
63
+ console.warn(' "invos update" → replace | "invos update --skip-agents" → skip');
64
+
65
+ // Write to lock: ask user decision
66
+ lock.custom = lock.custom || {};
67
+ lock.custom['AGENTS.md'] = 'skip'; // default skip after first backup
68
+ }
69
+ skipped++;
70
+ continue;
71
+ }
72
+ }
73
+ }
74
+
75
+ // Skip if template placeholder only (for SEED files on UPDATE — e.g., marca/marca.md)
76
+ if (existsSync(dest) && shouldSkipSeedPlaceholder(rel, dest)) {
77
+ skipped++;
78
+ continue;
79
+ }
80
+
81
+ // Overwrite PRODUCT files
82
+ if (!existsSync(dest) || shouldOverwriteOnUpdate(rel, dest, lock)) {
83
+ if (!dryRun) {
84
+ copyFileWithDirs(f.fullPath, dest);
85
+ }
86
+ updated++;
87
+ } else {
88
+ skipped++;
89
+ }
90
+ }
91
+
92
+ // Update lock
93
+ if (!dryRun) {
94
+ updateLockShipped(kitRoot, lock);
95
+ writeLock(targetDir, lock);
96
+ syncClaudeSymlinks(kitRoot, targetDir);
97
+ }
98
+
99
+ console.log(`✓ invos update${dryRun ? ' (dry-run)' : ''} — ${updated} files updated, ${skipped} skipped`);
100
+ if (agentsBackedUp) console.log(' AGENTS.md backup created');
101
+ if (dryRun) console.log(' Run without --dry-run to apply');
102
+ }
103
+
104
+ function shouldSkipSeedPlaceholder(rel, destPath) {
105
+ // Only skip template files that are STILL placeholders
106
+ const templateFiles = ['marca/marca.md', 'memoria/perfil.md', 'memoria/empresa.md'];
107
+ if (!templateFiles.includes(rel)) return false;
108
+
109
+ const content = readFileSync(destPath, 'utf-8');
110
+ const templateMarkers = ['[o que', '[seu nome]', 'PREENCHA', 'primeira sessão'];
111
+ const lower = content.toLowerCase();
112
+ return !templateMarkers.some(m => lower.includes(m));
113
+ }
package/src/lock.js ADDED
@@ -0,0 +1,47 @@
1
+ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
2
+ import { resolve } from 'node:path';
3
+ import { sha256File, collectFiles, isDenylisted } from './utils.js';
4
+ import { loadManifest } from './manifest.js';
5
+
6
+ export function readLock(targetDir) {
7
+ const path = resolve(targetDir, 'INVOS-LOCK.json');
8
+ if (!existsSync(path)) return null;
9
+ try {
10
+ return JSON.parse(readFileSync(path, 'utf-8'));
11
+ } catch {
12
+ return null;
13
+ }
14
+ }
15
+
16
+ export function writeLock(targetDir, data) {
17
+ const path = resolve(targetDir, 'INVOS-LOCK.json');
18
+ writeFileSync(path, JSON.stringify(data, null, 2) + '\n');
19
+ }
20
+
21
+ export function computeShippedSha(kitRoot) {
22
+ const files = collectFiles(kitRoot, '', true);
23
+ const shipped = {};
24
+ // INVOS.json itself
25
+ shipped['INVOS.json'] = sha256File(resolve(kitRoot, 'INVOS.json'));
26
+ for (const f of files) {
27
+ shipped[f.relPath] = sha256File(f.fullPath);
28
+ }
29
+ return shipped;
30
+ }
31
+
32
+ export function buildLock(kitRoot, targetDir, custom = {}) {
33
+ const now = new Date().toISOString();
34
+ return {
35
+ version: '1.0.0',
36
+ shippedSha: computeShippedSha(kitRoot),
37
+ custom,
38
+ installedAt: now,
39
+ updatedAt: now,
40
+ };
41
+ }
42
+
43
+ export function updateLockShipped(kitRoot, lock) {
44
+ lock.shippedSha = computeShippedSha(kitRoot);
45
+ lock.updatedAt = new Date().toISOString();
46
+ return lock;
47
+ }
@@ -0,0 +1,10 @@
1
+ import { existsSync, readFileSync } from 'node:fs';
2
+
3
+ export function loadManifest(path) {
4
+ if (!existsSync(path)) return null;
5
+ try {
6
+ return JSON.parse(readFileSync(path, 'utf-8'));
7
+ } catch {
8
+ return null;
9
+ }
10
+ }
@@ -0,0 +1,33 @@
1
+ import { existsSync } from 'node:fs';
2
+ import { dirname, resolve } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+
5
+ const __dirname = dirname(fileURLToPath(import.meta.url));
6
+
7
+ /**
8
+ * Kit source resolution (first hit wins):
9
+ * 1. INVOS_KIT_PATH env
10
+ * 2. Bundled kit next to package (npm install / npx)
11
+ * 3. Monorepo layout: packages/cli → invos root
12
+ */
13
+ export function resolveKitRoot() {
14
+ if (process.env.INVOS_KIT_PATH) {
15
+ const p = resolve(process.env.INVOS_KIT_PATH);
16
+ if (existsSync(resolve(p, 'INVOS.json'))) return p;
17
+ console.error('INVOS_KIT_PATH set but INVOS.json missing:', p);
18
+ process.exit(1);
19
+ }
20
+
21
+ const bundled = resolve(__dirname, '../kit');
22
+ if (existsSync(resolve(bundled, 'INVOS.json'))) return bundled;
23
+
24
+ const monorepo = resolve(__dirname, '../../..');
25
+ if (existsSync(resolve(monorepo, 'INVOS.json'))) return monorepo;
26
+
27
+ console.error(`
28
+ INVOS kit not found.
29
+ - Reinstall: npm i -g invos@latest (or npx invos@latest)
30
+ - Or set: export INVOS_KIT_PATH=/path/to/invos-kit
31
+ `);
32
+ process.exit(1);
33
+ }