@invictus-group-ai/orchestra 0.5.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 (466) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSING.md +49 -0
  3. package/README.md +507 -0
  4. package/assets/settings-template.json +99 -0
  5. package/bin/invi.js +6 -0
  6. package/content-dist/LICENSE +95 -0
  7. package/content-dist/PIPELINE.md +823 -0
  8. package/content-dist/README.md +128 -0
  9. package/content-dist/agents/README.md +135 -0
  10. package/content-dist/agents/mapping.json +476 -0
  11. package/content-dist/agents/stacks/backend-django.md +66 -0
  12. package/content-dist/agents/stacks/backend-dotnet.md +72 -0
  13. package/content-dist/agents/stacks/backend-fastapi.md +66 -0
  14. package/content-dist/agents/stacks/backend-laravel.md +66 -0
  15. package/content-dist/agents/stacks/backend-node.md +66 -0
  16. package/content-dist/agents/stacks/backend-spring.md +66 -0
  17. package/content-dist/agents/stacks/desktop-delphi.md +73 -0
  18. package/content-dist/agents/stacks/frontend-angular.md +65 -0
  19. package/content-dist/agents/stacks/frontend-react.md +67 -0
  20. package/content-dist/agents/stacks/frontend-svelte.md +67 -0
  21. package/content-dist/agents/stacks/frontend-vue.md +66 -0
  22. package/content-dist/agents/stacks/mobile-flutter.md +68 -0
  23. package/content-dist/agents/stacks/wordpress.md +66 -0
  24. package/content-dist/agents/universal/invi-qa.md +57 -0
  25. package/content-dist/agents/universal/invi-reviewer.md +61 -0
  26. package/content-dist/agents/universal/invi-security.md +55 -0
  27. package/content-dist/agents/universal/invi-tester.md +55 -0
  28. package/content-dist/agents/universal/invi-ui.md +85 -0
  29. package/content-dist/fragments/base.md +37 -0
  30. package/content-dist/fragments/domain/api-publica-rate-limiting.md +83 -0
  31. package/content-dist/fragments/domain/autenticacao-enterprise.md +86 -0
  32. package/content-dist/fragments/domain/busca-elasticsearch.md +86 -0
  33. package/content-dist/fragments/domain/dashboard-admin-rbac.md +80 -0
  34. package/content-dist/fragments/domain/design-system.md +71 -0
  35. package/content-dist/fragments/domain/ecommerce-completo.md +86 -0
  36. package/content-dist/fragments/domain/filas-jobs.md +80 -0
  37. package/content-dist/fragments/domain/integracao-crm-erp.md +82 -0
  38. package/content-dist/fragments/domain/lgpd.md +84 -0
  39. package/content-dist/fragments/domain/multi-tenancy.md +79 -0
  40. package/content-dist/fragments/domain/notificacoes-multicanal.md +81 -0
  41. package/content-dist/fragments/domain/pagamentos-brasil.md +85 -0
  42. package/content-dist/fragments/domain/plataforma-conteudo.md +77 -0
  43. package/content-dist/fragments/domain/realtime-websockets.md +92 -0
  44. package/content-dist/fragments/domain/relatorios-analytics.md +80 -0
  45. package/content-dist/fragments/domain/saas-stripe-billing.md +79 -0
  46. package/content-dist/fragments/domain/sistema-pagamentos.md +81 -0
  47. package/content-dist/fragments/domain/upload-midia.md +81 -0
  48. package/content-dist/fragments/domain/whatsapp-business.md +82 -0
  49. package/content-dist/fragments/index.json +1670 -0
  50. package/content-dist/fragments/references/angular-ngrx/app-config-and-testing.md +81 -0
  51. package/content-dist/fragments/references/angular-ngrx/store-pattern.md +155 -0
  52. package/content-dist/fragments/references/ansible-server-setup/layout-and-config.md +143 -0
  53. package/content-dist/fragments/references/ansible-server-setup/roles.md +238 -0
  54. package/content-dist/fragments/references/api-publica-rate-limiting/patterns.md +68 -0
  55. package/content-dist/fragments/references/astro-static/content-and-islands.md +117 -0
  56. package/content-dist/fragments/references/autenticacao-enterprise/pitfalls.md +70 -0
  57. package/content-dist/fragments/references/busca-elasticsearch/patterns.md +100 -0
  58. package/content-dist/fragments/references/chrome-extension-mv3/messaging-and-storage.md +109 -0
  59. package/content-dist/fragments/references/cli-typescript-commander/commands-and-config.md +136 -0
  60. package/content-dist/fragments/references/cloud-run-gcp/build-and-deploy.md +127 -0
  61. package/content-dist/fragments/references/cloud-run-gcp/iam-secrets-networking.md +65 -0
  62. package/content-dist/fragments/references/computer-vision-yolo/serving-and-export.md +182 -0
  63. package/content-dist/fragments/references/computer-vision-yolo/training-and-validation.md +131 -0
  64. package/content-dist/fragments/references/convex-react/functions.md +117 -0
  65. package/content-dist/fragments/references/convex-react/react-and-storage.md +109 -0
  66. package/content-dist/fragments/references/dashboard-admin-rbac/patterns.md +73 -0
  67. package/content-dist/fragments/references/data-pipeline-airflow/dag-patterns.md +149 -0
  68. package/content-dist/fragments/references/data-pipeline-airflow/operations.md +74 -0
  69. package/content-dist/fragments/references/delphi-object-pascal/legacy-extraction.md +175 -0
  70. package/content-dist/fragments/references/django-drf-celery/celery-tasks.md +47 -0
  71. package/content-dist/fragments/references/django-drf-celery/viewsets-and-serializers.md +92 -0
  72. package/content-dist/fragments/references/docker-compose-dev/compose-files.md +146 -0
  73. package/content-dist/fragments/references/docker-compose-dev/dockerfile-and-proxy.md +108 -0
  74. package/content-dist/fragments/references/dotnet-aspnet/data-and-di.md +90 -0
  75. package/content-dist/fragments/references/dotnet-aspnet/web-layer.md +88 -0
  76. package/content-dist/fragments/references/ecommerce-completo/patterns.md +76 -0
  77. package/content-dist/fragments/references/electron-app/ipc-bridge.md +123 -0
  78. package/content-dist/fragments/references/electron-app/security-and-packaging.md +134 -0
  79. package/content-dist/fragments/references/elixir-phoenix/context-and-web.md +112 -0
  80. package/content-dist/fragments/references/elixir-phoenix/processes.md +65 -0
  81. package/content-dist/fragments/references/filas-jobs/patterns.md +116 -0
  82. package/content-dist/fragments/references/fine-tuning-huggingface/data-and-export.md +114 -0
  83. package/content-dist/fragments/references/fine-tuning-huggingface/training-and-lora.md +123 -0
  84. package/content-dist/fragments/references/flutter/platform-channels-and-goldens.md +68 -0
  85. package/content-dist/fragments/references/flutter/state-and-widgets.md +95 -0
  86. package/content-dist/fragments/references/github-actions-cicd/workflows.md +235 -0
  87. package/content-dist/fragments/references/go-chi-gorm/http-layer.md +87 -0
  88. package/content-dist/fragments/references/go-chi-gorm/service-layer.md +58 -0
  89. package/content-dist/fragments/references/graphql-apollo/resolvers-and-loaders.md +128 -0
  90. package/content-dist/fragments/references/hono-bun/patterns.md +144 -0
  91. package/content-dist/fragments/references/integracao-crm-erp/patterns.md +100 -0
  92. package/content-dist/fragments/references/kubernetes-helm/chart-templates.md +162 -0
  93. package/content-dist/fragments/references/kubernetes-helm/secrets-storage-deploy.md +78 -0
  94. package/content-dist/fragments/references/langchain-python-agent/agent-and-cost.md +120 -0
  95. package/content-dist/fragments/references/langchain-python-agent/memory-and-resilience.md +76 -0
  96. package/content-dist/fragments/references/laravel/eloquent-and-queues.md +126 -0
  97. package/content-dist/fragments/references/laravel/http-layer.md +110 -0
  98. package/content-dist/fragments/references/lgpd/patterns.md +110 -0
  99. package/content-dist/fragments/references/llm-ops-production/routing-and-budget.md +118 -0
  100. package/content-dist/fragments/references/llm-ops-production/tracing-eval-ab.md +102 -0
  101. package/content-dist/fragments/references/microservices-docker/compose-and-gateway.md +93 -0
  102. package/content-dist/fragments/references/microservices-docker/events-and-correlation.md +88 -0
  103. package/content-dist/fragments/references/ml-fastapi-serving/metrics-drift-docker.md +97 -0
  104. package/content-dist/fragments/references/ml-fastapi-serving/serving-core.md +155 -0
  105. package/content-dist/fragments/references/ml-training-pipeline/dvc-pipeline.md +102 -0
  106. package/content-dist/fragments/references/ml-training-pipeline/mlflow-registry-ci.md +139 -0
  107. package/content-dist/fragments/references/monitoring-observability/alerts-and-config.md +169 -0
  108. package/content-dist/fragments/references/monitoring-observability/instrumentation-node.md +139 -0
  109. package/content-dist/fragments/references/multi-tenancy/patterns.md +85 -0
  110. package/content-dist/fragments/references/nestjs-typescript/guards-and-decorators.md +103 -0
  111. package/content-dist/fragments/references/nestjs-typescript/modules-dtos-setup.md +106 -0
  112. package/content-dist/fragments/references/nextjs-app-router/patterns.md +177 -0
  113. package/content-dist/fragments/references/nextjs-prisma-postgres/billing.md +167 -0
  114. package/content-dist/fragments/references/nextjs-trpc-drizzle/data-and-auth.md +121 -0
  115. package/content-dist/fragments/references/nextjs-trpc-drizzle/trpc-setup.md +62 -0
  116. package/content-dist/fragments/references/nodejs-express-typescript/config-and-tokens.md +48 -0
  117. package/content-dist/fragments/references/nodejs-express-typescript/middleware.md +108 -0
  118. package/content-dist/fragments/references/notificacoes-multicanal/patterns.md +78 -0
  119. package/content-dist/fragments/references/nuxt3-tailwind/server-routes.md +79 -0
  120. package/content-dist/fragments/references/nuxt3-tailwind/state-and-fetching.md +129 -0
  121. package/content-dist/fragments/references/openai-api-integration/calls.md +210 -0
  122. package/content-dist/fragments/references/openai-api-integration/client-and-cost.md +71 -0
  123. package/content-dist/fragments/references/pagamentos-brasil/gateways-reconciliation.md +92 -0
  124. package/content-dist/fragments/references/pagamentos-brasil/pix-boleto.md +115 -0
  125. package/content-dist/fragments/references/plataforma-conteudo/patterns.md +74 -0
  126. package/content-dist/fragments/references/python-fastapi/dependency-injection.md +99 -0
  127. package/content-dist/fragments/references/python-fastapi/settings-and-tasks.md +47 -0
  128. package/content-dist/fragments/references/rag-pipeline/ingestion.md +92 -0
  129. package/content-dist/fragments/references/rag-pipeline/retrieval-and-eval.md +148 -0
  130. package/content-dist/fragments/references/react-express-monolith/auth-and-client.md +110 -0
  131. package/content-dist/fragments/references/react-express-monolith/monorepo.md +71 -0
  132. package/content-dist/fragments/references/react-native-expo/native-patterns.md +103 -0
  133. package/content-dist/fragments/references/react-native-expo/navigation-and-auth.md +55 -0
  134. package/content-dist/fragments/references/react-ts-zustand-query/store-and-query.md +152 -0
  135. package/content-dist/fragments/references/react-typescript/feature-module.md +64 -0
  136. package/content-dist/fragments/references/react-typescript/forms-and-state.md +69 -0
  137. package/content-dist/fragments/references/react-typescript/recipes.md +37 -0
  138. package/content-dist/fragments/references/react-typescript/testing.md +40 -0
  139. package/content-dist/fragments/references/realtime-websockets/patterns.md +92 -0
  140. package/content-dist/fragments/references/relatorios-analytics/patterns.md +81 -0
  141. package/content-dist/fragments/references/remix-express-full/auth-and-uploads.md +88 -0
  142. package/content-dist/fragments/references/remix-express-full/express-server.md +54 -0
  143. package/content-dist/fragments/references/remix-typescript/auth-and-db.md +68 -0
  144. package/content-dist/fragments/references/remix-typescript/loaders-and-actions.md +98 -0
  145. package/content-dist/fragments/references/rust-axum/error-and-state.md +99 -0
  146. package/content-dist/fragments/references/rust-axum/handlers.md +87 -0
  147. package/content-dist/fragments/references/saas-stripe-billing/patterns.md +86 -0
  148. package/content-dist/fragments/references/serverless-lambda/handler-patterns.md +107 -0
  149. package/content-dist/fragments/references/sistema-pagamentos/pitfalls.md +54 -0
  150. package/content-dist/fragments/references/spring-boot/service-and-data.md +96 -0
  151. package/content-dist/fragments/references/spring-boot/web-layer.md +100 -0
  152. package/content-dist/fragments/references/supabase-nextjs/clients-and-middleware.md +102 -0
  153. package/content-dist/fragments/references/supabase-nextjs/rls-and-storage.md +86 -0
  154. package/content-dist/fragments/references/svelte-sveltekit/hooks-and-state.md +67 -0
  155. package/content-dist/fragments/references/svelte-sveltekit/load-and-actions.md +80 -0
  156. package/content-dist/fragments/references/t3-stack/routers-and-callers.md +75 -0
  157. package/content-dist/fragments/references/t3-stack/trpc-setup.md +60 -0
  158. package/content-dist/fragments/references/terraform-aws/modules-and-ci.md +114 -0
  159. package/content-dist/fragments/references/terraform-aws/state-and-workspaces.md +66 -0
  160. package/content-dist/fragments/references/turborepo-monorepo/pipeline-and-packages.md +84 -0
  161. package/content-dist/fragments/references/upload-midia/patterns.md +80 -0
  162. package/content-dist/fragments/references/vector-search-pinecone/client-and-upsert.md +98 -0
  163. package/content-dist/fragments/references/vector-search-pinecone/query-and-hybrid.md +81 -0
  164. package/content-dist/fragments/references/vps-deploy-producao/compose-prod.md +97 -0
  165. package/content-dist/fragments/references/vps-deploy-producao/proxy-and-operations.md +118 -0
  166. package/content-dist/fragments/references/vscode-extension/activation-and-tree.md +98 -0
  167. package/content-dist/fragments/references/vscode-extension/webview-csp.md +57 -0
  168. package/content-dist/fragments/references/vue3-pinia-vite/components-and-stores.md +73 -0
  169. package/content-dist/fragments/references/vue3-pinia-vite/queries-forms-testing.md +100 -0
  170. package/content-dist/fragments/references/whatsapp-business/patterns.md +107 -0
  171. package/content-dist/fragments/references/wordpress/hooks-and-security.md +92 -0
  172. package/content-dist/fragments/references/wordpress/wp-cli-gates.md +64 -0
  173. package/content-dist/fragments/stack/angular-ngrx.md +75 -0
  174. package/content-dist/fragments/stack/ansible-server-setup.md +69 -0
  175. package/content-dist/fragments/stack/astro-static.md +72 -0
  176. package/content-dist/fragments/stack/chrome-extension-mv3.md +66 -0
  177. package/content-dist/fragments/stack/cli-typescript-commander.md +66 -0
  178. package/content-dist/fragments/stack/cloud-run-gcp.md +63 -0
  179. package/content-dist/fragments/stack/computer-vision-yolo.md +62 -0
  180. package/content-dist/fragments/stack/convex-react.md +65 -0
  181. package/content-dist/fragments/stack/data-pipeline-airflow.md +64 -0
  182. package/content-dist/fragments/stack/delphi-object-pascal.md +63 -0
  183. package/content-dist/fragments/stack/django-drf-celery.md +63 -0
  184. package/content-dist/fragments/stack/docker-compose-dev.md +69 -0
  185. package/content-dist/fragments/stack/dotnet-aspnet.md +62 -0
  186. package/content-dist/fragments/stack/electron-app.md +70 -0
  187. package/content-dist/fragments/stack/elixir-phoenix.md +65 -0
  188. package/content-dist/fragments/stack/fine-tuning-huggingface.md +69 -0
  189. package/content-dist/fragments/stack/flutter.md +61 -0
  190. package/content-dist/fragments/stack/github-actions-cicd.md +73 -0
  191. package/content-dist/fragments/stack/go-chi-gorm.md +73 -0
  192. package/content-dist/fragments/stack/graphql-apollo.md +70 -0
  193. package/content-dist/fragments/stack/hono-bun.md +62 -0
  194. package/content-dist/fragments/stack/kubernetes-helm.md +67 -0
  195. package/content-dist/fragments/stack/langchain-python-agent.md +64 -0
  196. package/content-dist/fragments/stack/laravel.md +64 -0
  197. package/content-dist/fragments/stack/llm-ops-production.md +63 -0
  198. package/content-dist/fragments/stack/microservices-docker.md +70 -0
  199. package/content-dist/fragments/stack/ml-fastapi-serving.md +64 -0
  200. package/content-dist/fragments/stack/ml-training-pipeline.md +67 -0
  201. package/content-dist/fragments/stack/monitoring-observability.md +68 -0
  202. package/content-dist/fragments/stack/nestjs-typescript.md +68 -0
  203. package/content-dist/fragments/stack/nextjs-app-router.md +65 -0
  204. package/content-dist/fragments/stack/nextjs-prisma-postgres.md +61 -0
  205. package/content-dist/fragments/stack/nextjs-trpc-drizzle.md +63 -0
  206. package/content-dist/fragments/stack/nodejs-express-typescript.md +60 -0
  207. package/content-dist/fragments/stack/nuxt3-tailwind.md +62 -0
  208. package/content-dist/fragments/stack/openai-api-integration.md +58 -0
  209. package/content-dist/fragments/stack/python-fastapi.md +64 -0
  210. package/content-dist/fragments/stack/rag-pipeline.md +62 -0
  211. package/content-dist/fragments/stack/react-express-monolith.md +61 -0
  212. package/content-dist/fragments/stack/react-native-expo.md +68 -0
  213. package/content-dist/fragments/stack/react-ts-zustand-query.md +64 -0
  214. package/content-dist/fragments/stack/react-typescript.md +73 -0
  215. package/content-dist/fragments/stack/remix-express-full.md +63 -0
  216. package/content-dist/fragments/stack/remix-typescript.md +66 -0
  217. package/content-dist/fragments/stack/rust-axum.md +63 -0
  218. package/content-dist/fragments/stack/serverless-lambda.md +65 -0
  219. package/content-dist/fragments/stack/spring-boot.md +63 -0
  220. package/content-dist/fragments/stack/supabase-nextjs.md +64 -0
  221. package/content-dist/fragments/stack/svelte-sveltekit.md +67 -0
  222. package/content-dist/fragments/stack/t3-stack.md +63 -0
  223. package/content-dist/fragments/stack/terraform-aws.md +65 -0
  224. package/content-dist/fragments/stack/turborepo-monorepo.md +61 -0
  225. package/content-dist/fragments/stack/vector-search-pinecone.md +63 -0
  226. package/content-dist/fragments/stack/vps-deploy-producao.md +64 -0
  227. package/content-dist/fragments/stack/vscode-extension.md +64 -0
  228. package/content-dist/fragments/stack/vue3-pinia-vite.md +65 -0
  229. package/content-dist/fragments/stack/wordpress.md +63 -0
  230. package/content-dist/skills/invi-commit/SKILL.md +85 -0
  231. package/content-dist/skills/invi-journal/SKILL.md +67 -0
  232. package/content-dist/skills/invi-map/SKILL.md +118 -0
  233. package/content-dist/skills/invi-mode/SKILL.md +176 -0
  234. package/content-dist/skills/invi-pr/SKILL.md +142 -0
  235. package/content-dist/skills/invi-qa/SKILL.md +75 -0
  236. package/content-dist/skills/invi-refactor-legacy/SKILL.md +90 -0
  237. package/content-dist/skills/invi-review/SKILL.md +83 -0
  238. package/content-dist/skills/invi-security/SKILL.md +89 -0
  239. package/content-dist/skills/invi-status/SKILL.md +72 -0
  240. package/content-dist/skills/invi-task/SKILL.md +143 -0
  241. package/content-dist/skills/invi-test/SKILL.md +97 -0
  242. package/content-dist/skills/po-handoff/SKILL.md +130 -0
  243. package/content-dist/skills/po-intake/SKILL.md +115 -0
  244. package/content-dist/skills/po-lint/SKILL.md +82 -0
  245. package/content-dist/skills/po-spec/SKILL.md +138 -0
  246. package/content-dist/skills/po-status/SKILL.md +130 -0
  247. package/content-dist/skills/po-verify/SKILL.md +124 -0
  248. package/content-dist/templates/requirements/REQ-TEMPLATE.md +110 -0
  249. package/content-dist/templates/requirements/constitution-TEMPLATE.md +77 -0
  250. package/dist/baseline.d.ts +21 -0
  251. package/dist/baseline.d.ts.map +1 -0
  252. package/dist/baseline.js +43 -0
  253. package/dist/baseline.js.map +1 -0
  254. package/dist/cli.d.ts +15 -0
  255. package/dist/cli.d.ts.map +1 -0
  256. package/dist/cli.js +345 -0
  257. package/dist/cli.js.map +1 -0
  258. package/dist/commands/doctor.d.ts +31 -0
  259. package/dist/commands/doctor.d.ts.map +1 -0
  260. package/dist/commands/doctor.js +173 -0
  261. package/dist/commands/doctor.js.map +1 -0
  262. package/dist/commands/export.d.ts +49 -0
  263. package/dist/commands/export.d.ts.map +1 -0
  264. package/dist/commands/export.js +95 -0
  265. package/dist/commands/export.js.map +1 -0
  266. package/dist/commands/gate.d.ts +42 -0
  267. package/dist/commands/gate.d.ts.map +1 -0
  268. package/dist/commands/gate.js +97 -0
  269. package/dist/commands/gate.js.map +1 -0
  270. package/dist/commands/init.d.ts +88 -0
  271. package/dist/commands/init.d.ts.map +1 -0
  272. package/dist/commands/init.js +540 -0
  273. package/dist/commands/init.js.map +1 -0
  274. package/dist/commands/journalCmd.d.ts +47 -0
  275. package/dist/commands/journalCmd.d.ts.map +1 -0
  276. package/dist/commands/journalCmd.js +89 -0
  277. package/dist/commands/journalCmd.js.map +1 -0
  278. package/dist/commands/keys.d.ts +68 -0
  279. package/dist/commands/keys.d.ts.map +1 -0
  280. package/dist/commands/keys.js +240 -0
  281. package/dist/commands/keys.js.map +1 -0
  282. package/dist/commands/map.d.ts +123 -0
  283. package/dist/commands/map.d.ts.map +1 -0
  284. package/dist/commands/map.js +383 -0
  285. package/dist/commands/map.js.map +1 -0
  286. package/dist/commands/plan.d.ts +28 -0
  287. package/dist/commands/plan.d.ts.map +1 -0
  288. package/dist/commands/plan.js +64 -0
  289. package/dist/commands/plan.js.map +1 -0
  290. package/dist/commands/req.d.ts +92 -0
  291. package/dist/commands/req.d.ts.map +1 -0
  292. package/dist/commands/req.js +270 -0
  293. package/dist/commands/req.js.map +1 -0
  294. package/dist/commands/review.d.ts +40 -0
  295. package/dist/commands/review.d.ts.map +1 -0
  296. package/dist/commands/review.js +101 -0
  297. package/dist/commands/review.js.map +1 -0
  298. package/dist/commands/run.d.ts +33 -0
  299. package/dist/commands/run.d.ts.map +1 -0
  300. package/dist/commands/run.js +151 -0
  301. package/dist/commands/run.js.map +1 -0
  302. package/dist/commands/ship.d.ts +45 -0
  303. package/dist/commands/ship.d.ts.map +1 -0
  304. package/dist/commands/ship.js +252 -0
  305. package/dist/commands/ship.js.map +1 -0
  306. package/dist/commands/status.d.ts +36 -0
  307. package/dist/commands/status.d.ts.map +1 -0
  308. package/dist/commands/status.js +152 -0
  309. package/dist/commands/status.js.map +1 -0
  310. package/dist/commands/sync.d.ts +91 -0
  311. package/dist/commands/sync.d.ts.map +1 -0
  312. package/dist/commands/sync.js +331 -0
  313. package/dist/commands/sync.js.map +1 -0
  314. package/dist/commands/syncCommits.d.ts +56 -0
  315. package/dist/commands/syncCommits.d.ts.map +1 -0
  316. package/dist/commands/syncCommits.js +97 -0
  317. package/dist/commands/syncCommits.js.map +1 -0
  318. package/dist/commands/task.d.ts +108 -0
  319. package/dist/commands/task.d.ts.map +1 -0
  320. package/dist/commands/task.js +217 -0
  321. package/dist/commands/task.js.map +1 -0
  322. package/dist/commands/update.d.ts +92 -0
  323. package/dist/commands/update.d.ts.map +1 -0
  324. package/dist/commands/update.js +541 -0
  325. package/dist/commands/update.js.map +1 -0
  326. package/dist/commands/verifyTask.d.ts +50 -0
  327. package/dist/commands/verifyTask.d.ts.map +1 -0
  328. package/dist/commands/verifyTask.js +172 -0
  329. package/dist/commands/verifyTask.js.map +1 -0
  330. package/dist/content.d.ts +128 -0
  331. package/dist/content.d.ts.map +1 -0
  332. package/dist/content.js +177 -0
  333. package/dist/content.js.map +1 -0
  334. package/dist/detect.d.ts +122 -0
  335. package/dist/detect.d.ts.map +1 -0
  336. package/dist/detect.js +594 -0
  337. package/dist/detect.js.map +1 -0
  338. package/dist/events.d.ts +36 -0
  339. package/dist/events.d.ts.map +1 -0
  340. package/dist/events.js +76 -0
  341. package/dist/events.js.map +1 -0
  342. package/dist/frontmatter.d.ts +15 -0
  343. package/dist/frontmatter.d.ts.map +1 -0
  344. package/dist/frontmatter.js +74 -0
  345. package/dist/frontmatter.js.map +1 -0
  346. package/dist/i18n/en.d.ts +421 -0
  347. package/dist/i18n/en.d.ts.map +1 -0
  348. package/dist/i18n/en.js +443 -0
  349. package/dist/i18n/en.js.map +1 -0
  350. package/dist/i18n/index.d.ts +40 -0
  351. package/dist/i18n/index.d.ts.map +1 -0
  352. package/dist/i18n/index.js +66 -0
  353. package/dist/i18n/index.js.map +1 -0
  354. package/dist/i18n/pt-BR.d.ts +11 -0
  355. package/dist/i18n/pt-BR.d.ts.map +1 -0
  356. package/dist/i18n/pt-BR.js +435 -0
  357. package/dist/i18n/pt-BR.js.map +1 -0
  358. package/dist/identity.d.ts +78 -0
  359. package/dist/identity.d.ts.map +1 -0
  360. package/dist/identity.js +152 -0
  361. package/dist/identity.js.map +1 -0
  362. package/dist/index.d.ts +79 -0
  363. package/dist/index.d.ts.map +1 -0
  364. package/dist/index.js +48 -0
  365. package/dist/index.js.map +1 -0
  366. package/dist/insights.d.ts +86 -0
  367. package/dist/insights.d.ts.map +1 -0
  368. package/dist/insights.js +199 -0
  369. package/dist/insights.js.map +1 -0
  370. package/dist/interview.d.ts +81 -0
  371. package/dist/interview.d.ts.map +1 -0
  372. package/dist/interview.js +283 -0
  373. package/dist/interview.js.map +1 -0
  374. package/dist/inventory.d.ts +79 -0
  375. package/dist/inventory.d.ts.map +1 -0
  376. package/dist/inventory.js +86 -0
  377. package/dist/inventory.js.map +1 -0
  378. package/dist/journal.d.ts +22 -0
  379. package/dist/journal.d.ts.map +1 -0
  380. package/dist/journal.js +88 -0
  381. package/dist/journal.js.map +1 -0
  382. package/dist/migrations/legacyNames.d.ts +45 -0
  383. package/dist/migrations/legacyNames.d.ts.map +1 -0
  384. package/dist/migrations/legacyNames.js +118 -0
  385. package/dist/migrations/legacyNames.js.map +1 -0
  386. package/dist/plan.d.ts +42 -0
  387. package/dist/plan.d.ts.map +1 -0
  388. package/dist/plan.js +126 -0
  389. package/dist/plan.js.map +1 -0
  390. package/dist/render/agents.d.ts +327 -0
  391. package/dist/render/agents.d.ts.map +1 -0
  392. package/dist/render/agents.js +356 -0
  393. package/dist/render/agents.js.map +1 -0
  394. package/dist/render/claudeMd.d.ts +29 -0
  395. package/dist/render/claudeMd.d.ts.map +1 -0
  396. package/dist/render/claudeMd.js +110 -0
  397. package/dist/render/claudeMd.js.map +1 -0
  398. package/dist/render/githooks.d.ts +41 -0
  399. package/dist/render/githooks.d.ts.map +1 -0
  400. package/dist/render/githooks.js +168 -0
  401. package/dist/render/githooks.js.map +1 -0
  402. package/dist/render/markers.d.ts +13 -0
  403. package/dist/render/markers.d.ts.map +1 -0
  404. package/dist/render/markers.js +35 -0
  405. package/dist/render/markers.js.map +1 -0
  406. package/dist/render/requirements.d.ts +56 -0
  407. package/dist/render/requirements.d.ts.map +1 -0
  408. package/dist/render/requirements.js +86 -0
  409. package/dist/render/requirements.js.map +1 -0
  410. package/dist/render/settings.d.ts +43 -0
  411. package/dist/render/settings.d.ts.map +1 -0
  412. package/dist/render/settings.js +94 -0
  413. package/dist/render/settings.js.map +1 -0
  414. package/dist/render/transparency.d.ts +7 -0
  415. package/dist/render/transparency.d.ts.map +1 -0
  416. package/dist/render/transparency.js +164 -0
  417. package/dist/render/transparency.js.map +1 -0
  418. package/dist/requirements.d.ts +84 -0
  419. package/dist/requirements.d.ts.map +1 -0
  420. package/dist/requirements.js +229 -0
  421. package/dist/requirements.js.map +1 -0
  422. package/dist/sizing.d.ts +63 -0
  423. package/dist/sizing.d.ts.map +1 -0
  424. package/dist/sizing.js +104 -0
  425. package/dist/sizing.js.map +1 -0
  426. package/dist/tasks.d.ts +199 -0
  427. package/dist/tasks.d.ts.map +1 -0
  428. package/dist/tasks.js +320 -0
  429. package/dist/tasks.js.map +1 -0
  430. package/dist/util/diff3.d.ts +26 -0
  431. package/dist/util/diff3.d.ts.map +1 -0
  432. package/dist/util/diff3.js +112 -0
  433. package/dist/util/diff3.js.map +1 -0
  434. package/dist/util/fsx.d.ts +33 -0
  435. package/dist/util/fsx.d.ts.map +1 -0
  436. package/dist/util/fsx.js +153 -0
  437. package/dist/util/fsx.js.map +1 -0
  438. package/dist/util/git.d.ts +58 -0
  439. package/dist/util/git.d.ts.map +1 -0
  440. package/dist/util/git.js +171 -0
  441. package/dist/util/git.js.map +1 -0
  442. package/dist/util/merge.d.ts +27 -0
  443. package/dist/util/merge.d.ts.map +1 -0
  444. package/dist/util/merge.js +78 -0
  445. package/dist/util/merge.js.map +1 -0
  446. package/dist/util/out.d.ts +18 -0
  447. package/dist/util/out.d.ts.map +1 -0
  448. package/dist/util/out.js +23 -0
  449. package/dist/util/out.js.map +1 -0
  450. package/dist/util/proc.d.ts +12 -0
  451. package/dist/util/proc.d.ts.map +1 -0
  452. package/dist/util/proc.js +45 -0
  453. package/dist/util/proc.js.map +1 -0
  454. package/dist/util/registry.d.ts +58 -0
  455. package/dist/util/registry.d.ts.map +1 -0
  456. package/dist/util/registry.js +240 -0
  457. package/dist/util/registry.js.map +1 -0
  458. package/dist/verify.d.ts +52 -0
  459. package/dist/verify.d.ts.map +1 -0
  460. package/dist/verify.js +205 -0
  461. package/dist/verify.js.map +1 -0
  462. package/dist/version.d.ts +5 -0
  463. package/dist/version.d.ts.map +1 -0
  464. package/dist/version.js +18 -0
  465. package/dist/version.js.map +1 -0
  466. package/package.json +63 -0
@@ -0,0 +1,130 @@
1
+ ---
2
+ name: po-handoff
3
+ description: Hand an approved requirement to the dev pipeline — records the PO's explicit approval, converts the REQ into canonical task JSON (acceptance_criteria mapped from the ACs with their ids, req field set), sets the REQ to in_progress, and points at /invi-task or /invi-mode. Use when a REQ passed lint and the PO wants it built ("aprovar e mandar para desenvolvimento", "handoff REQ-104").
4
+ ---
5
+
6
+ # po-handoff — approved REQ → canonical task(s)
7
+
8
+ Bridge the PO layer to the pipeline: one approved requirement becomes one or more canonical tasks
9
+ (`content/PIPELINE.md` §1) that `invi-task`/`invi-mode` run unchanged — and whose commits will carry
10
+ the REQ ids in the observability trailer.
11
+
12
+ ## Standing rules
13
+
14
+ - Communicate with the user in the language configured in `.invictus/manifest.json` (`language.render`,
15
+ default pt-BR), in business language with the PO. Machine artifacts — task.json fields, block keys,
16
+ event payloads — stay EN; criterion text keeps its original language.
17
+ - Config from the manifest: `project.ticketPattern`, `project.catastrophicRisk`. Manifest missing → stop,
18
+ point to `invi init`.
19
+ - **Approval is ALWAYS human.** No lint verdict, no orchestration flag ever substitutes for the PO's
20
+ explicit "approved". Headless with an unapproved REQ → stop with the missing approval named.
21
+ - **One task = one branch = one goal** still rules: a REQ that spans several coherent goals becomes
22
+ several tasks, and the union of the tasks' criteria must cover every AC.
23
+
24
+ ## Input
25
+
26
+ A REQ id (`/po-handoff REQ-104`). The REQ must exist under `.invictus/requirements/`.
27
+
28
+ ## Procedure
29
+
30
+ ### 1. Gate: lint + approval
31
+
32
+ - Require a current `PASS` from `/po-lint` (run it now if the file changed since the last lint).
33
+ - `status: draft` + lint PASS → read the criteria back to the PO in business language and ask for
34
+ explicit approval. On "approved": record it with the deterministic verb —
35
+
36
+ ```bash
37
+ invi req approve <REQ id> --confirmed
38
+ ```
39
+
40
+ (rung 1, PIPELINE.md §7.3: re-runs the mechanical checks, refuses while open questions remain, flips
41
+ `status: approved` in the file, and appends the `req.event`). `--confirmed` is the record that a HUMAN
42
+ approved — pass it ONLY after the PO's explicit "approved", never on your own judgment. CLI
43
+ unavailable → set front-matter `status: approved` by hand and append the `req.event`
44
+ (`event: "approved"`, rung-2 snippet below) — and say so. On anything else: stop; the REQ stays draft.
45
+ - Open questions unresolved → no approval possible; report them and stop.
46
+
47
+ ### 2. Derive the task(s)
48
+
49
+ - **Task id:** the PO has a tracker ticket for this? Use it (must match `ticketPattern`). Otherwise mint
50
+ `adhoc-<yyyymmdd>-<n>` per PIPELINE.md §1 and declare `ID_SOURCE: generated` — loudly, never silently.
51
+ - **Split:** default is one REQ → one task. Split only along coherent goals (e.g. one behavior cluster
52
+ per task); record which ACs each task carries. Never split one AC across tasks.
53
+ - **task.json** per PIPELINE.md §1, minted with the deterministic verb — build the JSON below and pipe it
54
+ to `invi task create --stdin` (it validates the shape, writes `.invictus/tasks/<id>/task.json` +
55
+ `state.json`, logs the `task.event`, and refuses duplicates; only when the CLI is unavailable write the
56
+ file directly per §1 and say so):
57
+ - `type`: usually `feat` (the REQ describes behavior); `fix` for a reopened-defect handoff.
58
+ - `title`: the REQ title (original language).
59
+ - `description`: the user story + the pointer `Requirement: .invictus/requirements/REQ-104.md` + this
60
+ standing instruction to the implementers: *"Reference REQ-104 in every commit body (`refs REQ-104`) —
61
+ the commit trailer carries the REQ ids; that is how the platform attributes this work's cost to the
62
+ requirement."*
63
+ - `acceptance_criteria[]`: **one entry per AC of this task, verbatim, prefixed with its id** —
64
+ `"[AC-104.1] When <trigger>, the <system> shall <response>."` The prefix is the traceability key
65
+ `invi-qa` and `po-verify` join on; never paraphrase the criterion text.
66
+ - `req`: `["REQ-104"]` — the PO-layer extension field (PIPELINE.md §7.4); round-trips through
67
+ normalization per §1.
68
+ - `source`: `"generated"`; `module`: infer or `-`; `status`: `"open"`.
69
+ - The catastrophic-risk criterion rule stays with `invi-task` (it re-checks `RISK_CRITERION` on
70
+ normalization) — but if the REQ already carries the risk AC (constitution Article I), it maps like any
71
+ other criterion.
72
+
73
+ ### 3. Update the REQ + log the events
74
+
75
+ - Log one `req.event` per task minted with the deterministic verb (rung 1, PIPELINE.md §7.3) — it also
76
+ performs the §7.2 status transition on the REQ file (`approved → in_progress` on the first handoff;
77
+ a reopened-defect handoff uses `--event reopened` from `delivered`):
78
+
79
+ ```bash
80
+ invi req event <REQ id> --event handoff --task <task id>
81
+ ```
82
+
83
+ - CLI unavailable → set front-matter `status: in_progress` by hand and append one `req.event` per
84
+ transition via `@invictus-group-ai/core.appendEvent` — same pattern as the fixture-tested gate-event snippet
85
+ (PIPELINE.md §4 rung 2), payload contract in §7.3 — and say so:
86
+
87
+ ```bash
88
+ REQ_EVENT='{"req":"REQ-104","event":"handoff","task":"tk4242"}' \
89
+ node --input-type=module -e '
90
+ import { appendEvent, defaultLogDir, readManifest, hashGitEmail } from "@invictus-group-ai/core";
91
+ import { execFileSync } from "node:child_process";
92
+ const root = process.cwd();
93
+ const m = readManifest(root);
94
+ const email = execFileSync("git", ["config", "user.email"], { cwd: root }).toString().trim();
95
+ const dev = m.devs.find((d) => d.gitEmailHash === hashGitEmail(email)) ?? m.devs[0];
96
+ if (!dev) { console.error("no dev identity in manifest — run invi init first"); process.exit(1); }
97
+ const e = appendEvent(defaultLogDir(root), dev.id, {
98
+ sid: process.env.CLAUDE_SESSION_ID ?? "po-layer",
99
+ type: "req.event",
100
+ data: JSON.parse(process.env.REQ_EVENT),
101
+ });
102
+ console.log(e.h);
103
+ '
104
+ ```
105
+
106
+ For the approval in step 1 the rung-2 payload is `{"req":"REQ-104","event":"approved"}`. Degradation
107
+ ladder per PIPELINE.md §7.3: verb → snippet → journal note
108
+ (`invi journal note -m "req.event req=REQ-104 event=<e>"`) → state plainly that req events were NOT
109
+ logged. Telemetry failure never blocks the handoff — and is never silently swallowed.
110
+
111
+ ### 4. Hand off
112
+
113
+ Recommend `/invi-mode <task id>` (full pipeline) or `/invi-task <task id>` (manual, gate by gate).
114
+ The pipeline takes it from here; the PO returns at `/po-verify` when the work lands.
115
+
116
+ ## Output block
117
+
118
+ End with (grammar: `content/PIPELINE.md` §5; `PO-*` block specs: §7):
119
+
120
+ ```INVICTUS-RESULT
121
+ BLOCK: PO-HANDOFF
122
+ REQ: <REQ id>
123
+ STATUS: in_progress
124
+ TASKS: <task id list>
125
+ TASK_JSON: <.invictus/tasks/<id>/task.json list>
126
+ AC_COVERAGE: <n>/<n>
127
+ ID_SOURCE: provided | generated
128
+ EVENTS_LOGGED: <n or none (<reason>)>
129
+ NEXT: /invi-mode <task id>
130
+ ```
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: po-intake
3
+ description: Socratic PO interview in business language — adaptively questions a product owner or stakeholder about a need until ambiguity is low (actors, trigger, outcome, failure paths, scope, thresholds, success measure), then writes a structured brief under .invictus/requirements/briefs/ ready for /po-spec. Use when a PO describes a need, feature idea, or problem in business terms, or asks to "capture a requirement".
4
+ ---
5
+
6
+ # po-intake — PO interview (need → brief)
7
+
8
+ Turn a business need into a brief precise enough to specify. You interview; the PO answers. No tech
9
+ vocabulary, no schemas, no solutioneering — the PO's job here is the WHAT and the WHY, never the HOW.
10
+
11
+ ## Standing rules
12
+
13
+ - Communicate with the user in the language configured in `.invictus/manifest.json` (`language.render`,
14
+ default pt-BR) — and in **business language**: no dev jargon with the PO, ever. Machine artifacts
15
+ (output-block keys, file names, enum values) stay EN.
16
+ - Manifest missing → stop and point to `invi init`.
17
+ - **One question at a time.** A wall of questions gets a wall of half-answers.
18
+ - **Never invent answers.** What the PO doesn't know becomes an open question in the brief — loudly, not
19
+ silently filled in.
20
+
21
+ ## Procedure
22
+
23
+ ### 1. Load context before asking anything
24
+
25
+ - `.invictus/requirements/constitution.md` — never ask what the constitution already fixes.
26
+ - Front-matter of existing `.invictus/requirements/REQ-*.md` — if the need overlaps an existing REQ,
27
+ say so and propose extending it instead of duplicating.
28
+ - `.invictus/requirements/briefs/` — an earlier brief on the same topic is the starting point, not a
29
+ restart.
30
+
31
+ ### 2. Interview — adaptive, until ambiguity is low
32
+
33
+ Track seven dimensions; each starts `high` and must reach `low` (or become an explicit open question):
34
+
35
+ | Dimension | The question behind it |
36
+ |---|---|
37
+ | `actor` | Who uses or triggers this? Which roles are excluded? |
38
+ | `trigger` | What starts the behavior — an action, an event, a schedule, a state? |
39
+ | `outcome` | What observable result equals success — what will the actor see/have? |
40
+ | `failure` | What must NOT happen? What should the user experience when it goes wrong? |
41
+ | `scope` | What is explicitly out? What stays exactly as it is today? |
42
+ | `thresholds` | Every "fast/many/large" turned into a number — how fast, how many, by when? |
43
+ | `measure` | How will the PO check it works — what would they do to accept it? |
44
+
45
+ Rules of the loop:
46
+
47
+ - Ask about the **highest-ambiguity dimension first**; skip dimensions the PO's opening statement already
48
+ answered (adaptive — never a fixed questionnaire).
49
+ - Chase vague adjectives on the spot: "rápido" → "quanto tempo é aceitável, no pior caso?". The interview
50
+ is where adverbs die; `po-lint` only catches the survivors.
51
+ - **Failure paths get their own pass** — POs describe sunny days; ask "e quando isso falhar/o dado não
52
+ existir/a pessoa cancelar no meio?" for each trigger surfaced.
53
+ - Bounded: at most **3 rounds** of follow-ups per dimension; still ambiguous after that → record it as an
54
+ open question and move on. Never spin on a PO who doesn't know yet.
55
+ - The PO can stop early ("chega, registra assim") — remaining dimensions become open questions.
56
+
57
+ ### 3. Write the brief
58
+
59
+ `.invictus/requirements/briefs/<yyyymmdd>-<slug>.md` (slug: topic, lowercased, ASCII, hyphenated, ≤5
60
+ words), in the render language:
61
+
62
+ ```markdown
63
+ # Brief — <topic> (<date>)
64
+
65
+ ## Need
66
+ <one sentence: who needs what, for which business outcome>
67
+
68
+ ## Actors
69
+ - <role — and what they may/may not do here>
70
+
71
+ ## Desired behavior
72
+ - <bullet per behavior, trigger → outcome, with thresholds>
73
+
74
+ ## Failure and unwanted behavior
75
+ - <bullet per failure path: condition → what the actor must experience>
76
+
77
+ ## Out of scope
78
+ - <what this explicitly does not change>
79
+
80
+ ## Constraints and thresholds
81
+ - <numbers captured; constitution articles that visibly apply>
82
+
83
+ ## Success measure
84
+ - <what the PO will do to accept the delivery>
85
+
86
+ ## Open questions
87
+ - [ ] <question> — <who answers>
88
+
89
+ ## Ambiguity assessment
90
+ actor=<low|medium|high> trigger=… outcome=… failure=… scope=… thresholds=… measure=…
91
+
92
+ ## Overlap
93
+ - <existing REQ ids this touches, or none>
94
+ ```
95
+
96
+ ### 4. Route forward
97
+
98
+ Read the brief back to the PO in two or three sentences and confirm it captures the need. Next step is
99
+ `/po-spec` — with a warning when ambiguity is still `medium`+ anywhere: specifying on top of ambiguity
100
+ produces confident nonsense.
101
+
102
+ ## Output block
103
+
104
+ End with (grammar: `content/PIPELINE.md` §5; `PO-*` block specs: §7):
105
+
106
+ ```INVICTUS-RESULT
107
+ BLOCK: PO-INTAKE
108
+ BRIEF: .invictus/requirements/briefs/<yyyymmdd>-<slug>.md
109
+ TOPIC: <one line>
110
+ AMBIGUITY: actor=<low|medium|high> trigger=<…> outcome=<…> failure=<…> scope=<…> thresholds=<…> measure=<…>
111
+ OPEN_QUESTIONS: <n>
112
+ ROUNDS: <n>
113
+ EXISTING_REQ: <overlapping REQ ids or ->
114
+ NEXT: /po-spec <brief path>
115
+ ```
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: po-lint
3
+ description: Mechanical EARS conformance check of a requirement file — flags vague adverbs (fast/friendly/robust, rápido/amigável/robusto), event-driven criteria without their If-Then failure twin, compound sentences, untestable criteria, undefined glossary terms, and structural gaps; emits a PO-LINT block with a per-AC verdict. Use before approving a REQ, after /po-spec, or when asked to lint/check a requirement.
4
+ ---
5
+
6
+ # po-lint — EARS conformance gate
7
+
8
+ Mechanical check of `.invictus/requirements/REQ-###.md`. This is the quality gate that makes downstream
9
+ agent execution reliable — every finding here is a bug the dev pipeline would otherwise ship. Lint checks;
10
+ it never rewrites (fixes are `po-spec`'s job, with the PO).
11
+
12
+ ## Standing rules
13
+
14
+ - Communicate with the user in the language configured in `.invictus/manifest.json` (`language.render`,
15
+ default pt-BR). Finding codes, verdicts, and block keys stay EN.
16
+ - **Mechanical means mechanical:** every finding cites the AC id, the offending text, and the rule code.
17
+ No stylistic opinions, no rewriting-by-suggestion beyond a one-line fix hint per finding.
18
+ - Criteria may be written in EN or pt-BR — lint both keyword sets equally; mixed languages within one REQ
19
+ is itself a finding (warning).
20
+ - Bounded: under orchestration, max 2 lint→fix cycles (fixes via `/po-spec`), then report and stop.
21
+
22
+ ## Input
23
+
24
+ A REQ id or path (`/po-lint REQ-104`). No argument → lint every `status: draft` REQ and report per file.
25
+
26
+ ## Checks
27
+
28
+ ### Structure (per file, codes S1–S6)
29
+
30
+ | Code | Rule |
31
+ |---|---|
32
+ | `s1` | Front-matter complete and valid: `id` (matches file name), `status` ∈ draft\|approved\|in_progress\|delivered, `owner`, `epic`, `priority` ∈ critical\|high\|medium\|low, `created` (YYYY-MM-DD), `non_goals[]` present (may be empty only with a non-empty Out of scope) |
33
+ | `s2` | User story present with the three parts (As a/I want/so that — Como/quero/para) |
34
+ | `s3` | ≥1 acceptance criterion; AC ids `AC-<req>.<n>` sequential, no duplicates, req number matches the file |
35
+ | `s4` | Out of scope section present and non-empty, or `non_goals[]` non-empty |
36
+ | `s5` | Open questions all resolved when `status` ≠ draft (open questions block approval) — warning while draft |
37
+ | `s6` | No conflict with the constitution (`.invictus/requirements/constitution.md`); restating a constitution article verbatim is a warning (`constitution-dup`), contradicting one is a failure (`constitution-conflict`) |
38
+
39
+ ### Per criterion (worst finding wins the AC's verdict)
40
+
41
+ | Code | Rule |
42
+ |---|---|
43
+ | `not-ears` | The sentence matches no EARS pattern: no shall/deve response, or no recognizable Ubiquitous / When\|Quando / While\|Enquanto / If…then\|Se…então / Where\|Onde structure |
44
+ | `vague-adverb` | Contains a banned vague word **without a measurable threshold in the same criterion**. EN: fast, quickly, easy, easily, simple, friendly, user-friendly, intuitive, robust, seamless, efficient, performant, scalable, reliable, appropriate, adequate, reasonable, better, improved, modern. pt-BR: rápido, rapidamente, fácil, facilmente, simples, amigável, intuitivo, robusto, eficiente, performático, escalável, confiável, adequado, razoável, melhor, aprimorado, moderno. The fix is always the same: replace the adverb with the number |
45
+ | `no-failure-twin` | Event-driven criterion (When/Quando) with no unwanted-behavior criterion (If…then/Se…então) covering the failure path of the same trigger, and no explicit `(no failure mode: <reason>)` marker |
46
+ | `compound` | More than one behavior in one criterion: two+ shall/deve, or a response chain joined by "and"/"e" describing distinct behaviors. Compound *conditions* (While…when…, Complex pattern) are fine; compound *responses* are not |
47
+ | `untestable` | Cannot be converted 1:1 into a UAT scenario "When X → observe Y": the response names no observable system behavior (e.g. "shall be careful", "deve considerar") |
48
+ | `undefined-term` | A domain term used in the criterion is defined neither in the constitution Glossary nor in this REQ's user story. Match domain-specific nouns (quoted terms, Capitalized Terms, project vocabulary) — not everyday words |
49
+
50
+ ## Procedure
51
+
52
+ 1. Read the REQ file(s) + the constitution (glossary for `undefined-term`, articles for `s6`). Constitution
53
+ missing → run the term check against the REQ alone and report `constitution: missing` as a warning.
54
+ 2. Run the structure checks, then every per-criterion check on every AC. Collect findings as
55
+ `<AC id> · <code> · <offending text> · <one-line fix hint>`.
56
+ 3. Verdict per AC: `pass` or the worst finding's code (severity order as listed above, `not-ears` worst).
57
+ Verdict per file: `PASS` when every AC passes and no structural failure (warnings allowed, listed);
58
+ otherwise `FAIL`.
59
+ 4. Report findings grouped by AC, in the render language, offending text quoted verbatim. If everything
60
+ passes, say exactly that — never invent a finding to look thorough.
61
+
62
+ A REQ may only move to `approved` (in `/po-handoff`) on a current `PASS`.
63
+
64
+ ## Output block
65
+
66
+ End with (grammar: `content/PIPELINE.md` §5; `PO-*` block specs: §7):
67
+
68
+ ```INVICTUS-RESULT
69
+ BLOCK: PO-LINT
70
+ REQ: <REQ id>
71
+ FILE: .invictus/requirements/<REQ id>.md
72
+ VERDICT: PASS | FAIL
73
+ CRITERIA: <n>
74
+ AC_VERDICTS: <map ac-104.1=pass ac-104.2=vague-adverb ac-104.3=no-failure-twin>
75
+ STRUCTURE: <ok or list of failing codes>
76
+ WARNINGS: <n>
77
+ OPEN_QUESTIONS: <n>
78
+ NEXT: <one line — on PASS: PO approval + /po-handoff; on FAIL: /po-spec with the findings>
79
+ ```
80
+
81
+ (Linting several REQs: one block per REQ is wrong — emit the block for the REQ named in the argument, or
82
+ for the worst-verdict REQ when running over all drafts, and list the others in prose above the block.)
@@ -0,0 +1,138 @@
1
+ ---
2
+ name: po-spec
3
+ description: Convert an intake brief into requirement file(s) — splits one goal per REQ, writes EARS acceptance criteria (one behavior per criterion, every When with its If-Then failure twin), assigns stable REQ/AC ids, links the constitution instead of restating it, and leaves the REQ in status draft for /po-lint. Use after /po-intake, or when the user asks to formalize/specify a requirement from a brief or a clear description.
4
+ ---
5
+
6
+ # po-spec — brief → REQ file(s)
7
+
8
+ Turn a brief into requirement files a dev pipeline can execute and a linter can check. The format is
9
+ binding: `content/templates/requirements/REQ-TEMPLATE.md` — use the installed copy under
10
+ `.invictus/templates/requirements/` (init installs it there, and `invi update` refreshes it);
11
+ on an older install that predates it, the compact skeleton in step 2 and the EARS rules in step 3
12
+ are the same contract.
13
+
14
+ ## Standing rules
15
+
16
+ - Communicate with the user in the language configured in `.invictus/manifest.json` (`language.render`,
17
+ default pt-BR). Machine artifacts — front-matter keys, status values, REQ/AC ids, block keys — stay EN.
18
+ **Criteria prose may be EN or pt-BR** (the client's choice; don't mix within one REQ) — the EARS
19
+ structure is what's mandatory.
20
+ - Manifest missing → stop and point to `invi init`.
21
+ - **One goal per REQ** — the PO-layer mirror of "one task = one branch = one goal". A brief that mixes
22
+ goals becomes multiple REQs.
23
+ - **Never invent requirements.** Everything in a criterion traces to the brief or to an answer the PO gave
24
+ here; gaps become open questions, not fabrications.
25
+
26
+ ## Input
27
+
28
+ In order of precedence: a brief path (`.invictus/requirements/briefs/…`, from `/po-intake`), pasted brief
29
+ text, or a direct description. If the input is thin (no failure paths, no thresholds), say so and either
30
+ recommend `/po-intake` or ask the missing questions inline (max 3 — this is not the interview).
31
+
32
+ ## Procedure
33
+
34
+ ### 1. Load the standing context
35
+
36
+ - `.invictus/requirements/constitution.md` — binding articles + glossary. Missing? Create it from the
37
+ installed template (`.invictus/templates/requirements/constitution-TEMPLATE.md`; canonical source:
38
+ `content/templates/requirements/constitution-TEMPLATE.md`) — or, when no template is installed, seed
39
+ the minimum: Article I (catastrophic risk, verbatim from `manifest.project.catastrophicRisk`) + an
40
+ empty Glossary table — and tell the user the remaining articles need the PO's pass.
41
+ - Existing `REQ-*.md` — next free number = highest existing + 1 (zero-padded to 3 digits). Never reuse or
42
+ renumber; overlap with an existing REQ → propose extending that REQ (new ACs under its id) instead.
43
+
44
+ ### 2. Split and draft
45
+
46
+ - One REQ per goal in the brief. Name each REQ by outcome, not by solution.
47
+ - Per REQ, write to `.invictus/requirements/REQ-<number>.md` (file name = id) with this skeleton:
48
+
49
+ ```markdown
50
+ ---
51
+ id: REQ-104
52
+ status: draft
53
+ owner: "<the PO>"
54
+ epic: <slug or ->
55
+ priority: critical | high | medium | low
56
+ created: <YYYY-MM-DD>
57
+ non_goals:
58
+ - "<one-line exclusion>"
59
+ ---
60
+
61
+ # REQ-104 — <outcome title>
62
+
63
+ ## User story
64
+ As a <role>, I want <capability>, so that <business outcome>.
65
+
66
+ ## Acceptance criteria (EARS)
67
+ - **AC-104.1** — When <trigger>, the <system> shall <response>.
68
+ - **AC-104.2** — If <error condition>, then the <system> shall <response>.
69
+
70
+ ## Out of scope
71
+ - <…>
72
+
73
+ ## Open questions
74
+ - [ ] <question> — <who answers>
75
+
76
+ ## References
77
+ - Constitution: `.invictus/requirements/constitution.md` (binding, not restated here)
78
+ - Brief: <path or ->
79
+ ```
80
+
81
+ ### 3. Write the criteria (the craft)
82
+
83
+ - **One behavior per criterion**, ids `AC-<req>.<n>` sequential. Compound responses split; compound
84
+ conditions may stay (While…when… complex pattern).
85
+ - **Every When/Quando gets its If…Then/Se…Então failure twin** for the same trigger — the brief's
86
+ "failure and unwanted behavior" section feeds these; a trigger with genuinely no failure mode carries
87
+ `(no failure mode: <reason>)` explicitly.
88
+ - **Thresholds from the brief replace adverbs.** No number available → open question, not "rápido".
89
+ - **Catastrophic risk (constitution Article I):** if any behavior plausibly touches it, add an
90
+ unwanted-behavior AC exercising it — same rule the dev pipeline applies downstream (`invi-task`
91
+ `RISK_CRITERION`).
92
+ - **Glossary discipline:** domain terms used in criteria must exist in the constitution glossary; new
93
+ terms → propose the glossary addition to the PO and add it on consent (that's a constitution edit —
94
+ the PO decides).
95
+ - The five EARS patterns (+ combinations), EN and pt-BR keywords mapping 1:1:
96
+ Ubiquitous "The <system> shall <response>" / "O <sistema> deve <resposta>" ·
97
+ Event-driven **When**/**Quando** · State-driven **While**/**Enquanto** ·
98
+ Unwanted behavior **If…then**/**Se…então** · Optional feature **Where**/**Onde**.
99
+
100
+ ### 4. Non-goals and open questions
101
+
102
+ - `non_goals[]` (front-matter, one-liners) + Out of scope section from the brief's scope answers — an
103
+ empty out-of-scope on a non-trivial REQ is a smell; ask.
104
+ - Open questions carried over from the brief stay open in the REQ — they block `approved`, and that is
105
+ the point.
106
+
107
+ ### 5. Validate mechanically, then route forward
108
+
109
+ Run the machine floor on every file written (PIPELINE.md §8.1) — in-place validation of id format,
110
+ status enum, AC ids, EARS keyword shape, and the failure-twin heuristic:
111
+
112
+ ```bash
113
+ invi req create --file .invictus/requirements/REQ-<number>.md
114
+ ```
115
+
116
+ Errors are YOUR drafting bugs — fix the file now, never hand a mechanically broken REQ to the linter.
117
+ Warnings are the linter's food (semantic judgment stays with `/po-lint`). CLI unavailable → say the
118
+ mechanical check was not run.
119
+
120
+ Read the criteria back to the PO in business language (not the EARS text — what it means). Then hand to
121
+ the linter; status stays `draft` until lint passes AND the PO approves (in `/po-handoff`, recorded via
122
+ `invi req approve --confirmed`).
123
+
124
+ ## Output block
125
+
126
+ End with (grammar: `content/PIPELINE.md` §5; `PO-*` block specs: §7):
127
+
128
+ ```INVICTUS-RESULT
129
+ BLOCK: PO-SPEC
130
+ BRIEF: <source brief path or ->
131
+ REQS: <REQ-104, REQ-105 or single id>
132
+ FILES: <.invictus/requirements/REQ-104.md, …>
133
+ CRITERIA: <map req-104=6 req-105=3>
134
+ GLOSSARY_ADDS: <n or ->
135
+ OPEN_QUESTIONS: <n>
136
+ STATUS: draft
137
+ NEXT: /po-lint <first REQ id>
138
+ ```
@@ -0,0 +1,130 @@
1
+ ---
2
+ name: po-status
3
+ description: Requirements status for the PO in business language — reads the REQ files, the event log (req.event + gate events), the task states, and the decoded commit trailers to answer what is in progress, what was delivered, what each requirement has cost so far, and which acceptance criteria are blocked. Use when the PO asks "como estão os requisitos", for a status report, or before prioritizing.
4
+ ---
5
+
6
+ # po-status — where the requirements stand
7
+
8
+ Answer the PO's three questions — what's moving, what's done, what is it costing — from the artifacts,
9
+ in business language. This is the terminal-side preview of the platform's per-requirement rollup
10
+ (`docs/PLATFORM-API.md`, `GET /v1/report/summary?groupBy=req`).
11
+
12
+ ## Standing rules
13
+
14
+ - Communicate with the user in the language configured in `.invictus/manifest.json` (`language.render`,
15
+ default pt-BR), in business language — status names may be said in the PO's words ("em desenvolvimento",
16
+ "entregue"), block values stay EN.
17
+ - Read-only: this skill changes no REQ, no task, no log — it only reports.
18
+ - **Honesty about data quality:** local numbers cover only what this clone has seen. Say which source each
19
+ number came from; a number you couldn't compute is "not available", never an estimate presented as fact.
20
+
21
+ ## Input
22
+
23
+ Optional scope: a REQ id or an epic slug (`/po-status REQ-104`, `/po-status checkout`). No argument →
24
+ all requirements.
25
+
26
+ ## Procedure
27
+
28
+ ### 1. Requirements inventory + progress — the deterministic view first
29
+
30
+ Prefer the verb (PIPELINE.md §8.1): `invi req status --json` returns, per REQ, the lifecycle
31
+ status, title, criteria count, per-AC UAT verdicts (latest `ac_result` per AC), the `req.event` counts,
32
+ and every task whose `task.json` `req[]` cites it with its state and per-gate progress — steps 1 and 2
33
+ in one read. Filter to the requested scope; epic grouping still comes from the REQ front-matter.
34
+
35
+ CLI unavailable → assemble the same view by hand:
36
+
37
+ - Front-matter of every `.invictus/requirements/REQ-*.md` in scope → group by `status`
38
+ (draft / approved / in_progress / delivered), with title, epic, priority, created.
39
+ - Event log (`.invictus/log/*.jsonl`, union across devs — read-only): `req.event` entries give the
40
+ lifecycle (approved, handoff→task ids, per-AC `ac_result`, delivered, reopened); `gate` events for the
41
+ handoff task ids give pipeline position (which gate passed last, loops burned).
42
+ - `.invictus/tasks/<id>/state.json` for each handoff task → pipeline state (`in_progress`,
43
+ `pr_open`, `blocked`…).
44
+
45
+ ### 2. Blocked ACs
46
+
47
+ `ac_result` fail with no later pass for the same AC (the verb's `acVerdicts` shows the latest verdict
48
+ per AC), plus ACs of tasks sitting in `blocked`. Translate the blocker to business terms (what the PO
49
+ would notice, what decision unblocks).
50
+
51
+ ### 3. Cost per requirement — decoded from local trailers
52
+
53
+ Sum the observability trailers in local git history (metrics the `prepare-commit-msg` hook embedded):
54
+
55
+ ```bash
56
+ node --input-type=module -e '
57
+ import { extractTrailers, decodeTrailer } from "@invictus-group-ai/core";
58
+ import { execFileSync } from "node:child_process";
59
+ const log = execFileSync("git", ["log", "--format=%H%x00%B%x1e"], { maxBuffer: 64 * 1024 * 1024 }).toString();
60
+ const perReq = {};
61
+ for (const rec of log.split("\x1e")) {
62
+ const msg = rec.split("\x00")[1];
63
+ if (!msg) continue;
64
+ for (const value of extractTrailers(msg)) {
65
+ try {
66
+ const p = decodeTrailer(value);
67
+ for (const r of p.req) {
68
+ const acc = (perReq[r] ??= { usd_cents: 0, tokens_in: 0, tokens_out: 0, commits: 0 });
69
+ acc.usd_cents += p.usd; acc.tokens_in += p.t.i; acc.tokens_out += p.t.o; acc.commits += 1;
70
+ }
71
+ } catch { /* malformed/foreign trailer — count nothing for it */ }
72
+ }
73
+ }
74
+ console.log(JSON.stringify(perReq));
75
+ '
76
+ ```
77
+
78
+ Caveats to state with the numbers, every time:
79
+
80
+ - **Coverage:** local history only — commits not fetched into this clone are missing; run `git fetch`
81
+ first and say which branches were summed. Commits without a trailer are untracked here (the platform
82
+ counts them as the untracked-commit metric).
83
+ - **Trust:** `decodeTrailer` does not verify the HMAC (per-dev keys are platform-side) — these are
84
+ *reported* numbers, tamper-evident only after `invi sync` + platform reconciliation. The synced
85
+ platform rollup is the authoritative figure; when a platform is configured, point the PO to the
86
+ dashboard for the audited number.
87
+ - Cost is **estimated USD, stored in cents** — present as USD (e.g. `usd_cents: 187` → US$ 1.87); don't
88
+ convert to BRL silently.
89
+ - `@invictus-group-ai/core` not resolvable → cost is "not available locally"; suggest `invi sync` +
90
+ platform report. Never guess.
91
+
92
+ ### 4. Answer — business language, one screen
93
+
94
+ ```
95
+ ## Requirements — <date> (scope: <all | id | epic>)
96
+
97
+ ### Delivered
98
+ - REQ-104 — <title> — accepted <date>, 6/6 criteria, cost so far US$ <x> (<n> commits)
99
+
100
+ ### In development
101
+ - REQ-105 — <title> — pipeline at <gate/state in plain words>; 2/5 criteria accepted; cost so far US$ <y>
102
+
103
+ ### Waiting to start
104
+ - <approved but not handed off> / <drafts pending lint or approval — what each needs>
105
+
106
+ ### Blocked criteria
107
+ - AC-105.3 — <business meaning> — blocked by <plain-words reason>; unblock: <decision/action, whose>
108
+
109
+ ### Recommended next action
110
+ **<one action, one sentence>** — <why, grounded in the above>
111
+ ```
112
+
113
+ Exactly one recommended action (the `invi-status` discipline) — the PO should leave knowing what to decide
114
+ next, not with a menu.
115
+
116
+ ## Output block
117
+
118
+ End with (grammar: `content/PIPELINE.md` §5; `PO-*` block specs: §7):
119
+
120
+ ```INVICTUS-RESULT
121
+ BLOCK: PO-STATUS
122
+ SCOPE: <all | REQ id | epic>
123
+ REQS: <map draft=n approved=n in_progress=n delivered=n>
124
+ DELIVERED: <REQ id list or ->
125
+ IN_PROGRESS: <REQ id list or ->
126
+ BLOCKED_ACS: <AC id list or ->
127
+ COST_SOURCE: local-trailers | platform | none
128
+ COST_USD_CENTS: <map req-104=187 req-105=42 or ->
129
+ NEXT: <the one recommended action>
130
+ ```