@wazir-dev/cli 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 (629) hide show
  1. package/AGENTS.md +111 -0
  2. package/CHANGELOG.md +14 -0
  3. package/CONTRIBUTING.md +101 -0
  4. package/LICENSE +21 -0
  5. package/README.md +314 -0
  6. package/assets/composition-engine.mmd +34 -0
  7. package/assets/demo-script.sh +17 -0
  8. package/assets/logo-dark.svg +14 -0
  9. package/assets/logo.svg +14 -0
  10. package/assets/pipeline.mmd +39 -0
  11. package/assets/record-demo.sh +51 -0
  12. package/docs/README.md +51 -0
  13. package/docs/adapters/context-mode.md +60 -0
  14. package/docs/concepts/architecture.md +87 -0
  15. package/docs/concepts/artifact-model.md +60 -0
  16. package/docs/concepts/composition-engine.md +36 -0
  17. package/docs/concepts/indexing-and-recall.md +160 -0
  18. package/docs/concepts/observability.md +41 -0
  19. package/docs/concepts/roles-and-workflows.md +59 -0
  20. package/docs/concepts/terminology-policy.md +27 -0
  21. package/docs/getting-started/01-installation.md +78 -0
  22. package/docs/getting-started/02-first-run.md +102 -0
  23. package/docs/getting-started/03-adding-to-project.md +15 -0
  24. package/docs/getting-started/04-host-setup.md +15 -0
  25. package/docs/guides/ci-integration.md +15 -0
  26. package/docs/guides/creating-skills.md +15 -0
  27. package/docs/guides/expertise-module-authoring.md +15 -0
  28. package/docs/guides/hook-development.md +15 -0
  29. package/docs/guides/memory-and-learnings.md +34 -0
  30. package/docs/guides/multi-host-export.md +15 -0
  31. package/docs/guides/troubleshooting.md +101 -0
  32. package/docs/guides/writing-custom-roles.md +15 -0
  33. package/docs/plans/2026-03-15-cli-pipeline-integration-design.md +592 -0
  34. package/docs/plans/2026-03-15-cli-pipeline-integration-plan.md +598 -0
  35. package/docs/plans/2026-03-15-docs-enforcement-plan.md +238 -0
  36. package/docs/readmes/INDEX.md +99 -0
  37. package/docs/readmes/features/expertise/README.md +171 -0
  38. package/docs/readmes/features/exports/README.md +222 -0
  39. package/docs/readmes/features/hooks/README.md +103 -0
  40. package/docs/readmes/features/hooks/loop-cap-guard.md +133 -0
  41. package/docs/readmes/features/hooks/post-tool-capture.md +121 -0
  42. package/docs/readmes/features/hooks/post-tool-lint.md +130 -0
  43. package/docs/readmes/features/hooks/pre-compact-summary.md +122 -0
  44. package/docs/readmes/features/hooks/pre-tool-capture-route.md +100 -0
  45. package/docs/readmes/features/hooks/protected-path-write-guard.md +128 -0
  46. package/docs/readmes/features/hooks/session-start.md +119 -0
  47. package/docs/readmes/features/hooks/stop-handoff-harvest.md +125 -0
  48. package/docs/readmes/features/roles/README.md +157 -0
  49. package/docs/readmes/features/roles/clarifier.md +152 -0
  50. package/docs/readmes/features/roles/content-author.md +190 -0
  51. package/docs/readmes/features/roles/designer.md +193 -0
  52. package/docs/readmes/features/roles/executor.md +184 -0
  53. package/docs/readmes/features/roles/learner.md +210 -0
  54. package/docs/readmes/features/roles/planner.md +182 -0
  55. package/docs/readmes/features/roles/researcher.md +164 -0
  56. package/docs/readmes/features/roles/reviewer.md +184 -0
  57. package/docs/readmes/features/roles/specifier.md +162 -0
  58. package/docs/readmes/features/roles/verifier.md +215 -0
  59. package/docs/readmes/features/schemas/README.md +178 -0
  60. package/docs/readmes/features/skills/README.md +63 -0
  61. package/docs/readmes/features/skills/brainstorming.md +96 -0
  62. package/docs/readmes/features/skills/debugging.md +148 -0
  63. package/docs/readmes/features/skills/design.md +120 -0
  64. package/docs/readmes/features/skills/prepare-next.md +109 -0
  65. package/docs/readmes/features/skills/run-audit.md +159 -0
  66. package/docs/readmes/features/skills/scan-project.md +109 -0
  67. package/docs/readmes/features/skills/self-audit.md +176 -0
  68. package/docs/readmes/features/skills/tdd.md +137 -0
  69. package/docs/readmes/features/skills/using-skills.md +92 -0
  70. package/docs/readmes/features/skills/verification.md +120 -0
  71. package/docs/readmes/features/skills/writing-plans.md +104 -0
  72. package/docs/readmes/features/tooling/README.md +320 -0
  73. package/docs/readmes/features/workflows/README.md +186 -0
  74. package/docs/readmes/features/workflows/author.md +181 -0
  75. package/docs/readmes/features/workflows/clarify.md +154 -0
  76. package/docs/readmes/features/workflows/design-review.md +171 -0
  77. package/docs/readmes/features/workflows/design.md +169 -0
  78. package/docs/readmes/features/workflows/discover.md +162 -0
  79. package/docs/readmes/features/workflows/execute.md +173 -0
  80. package/docs/readmes/features/workflows/learn.md +167 -0
  81. package/docs/readmes/features/workflows/plan-review.md +165 -0
  82. package/docs/readmes/features/workflows/plan.md +170 -0
  83. package/docs/readmes/features/workflows/prepare-next.md +167 -0
  84. package/docs/readmes/features/workflows/review.md +169 -0
  85. package/docs/readmes/features/workflows/run-audit.md +191 -0
  86. package/docs/readmes/features/workflows/spec-challenge.md +159 -0
  87. package/docs/readmes/features/workflows/specify.md +160 -0
  88. package/docs/readmes/features/workflows/verify.md +177 -0
  89. package/docs/readmes/packages/README.md +50 -0
  90. package/docs/readmes/packages/ajv.md +117 -0
  91. package/docs/readmes/packages/context-mode.md +118 -0
  92. package/docs/readmes/packages/gray-matter.md +116 -0
  93. package/docs/readmes/packages/node-test.md +137 -0
  94. package/docs/readmes/packages/yaml.md +112 -0
  95. package/docs/reference/configuration-reference.md +159 -0
  96. package/docs/reference/expertise-index.md +52 -0
  97. package/docs/reference/git-flow.md +43 -0
  98. package/docs/reference/hooks.md +87 -0
  99. package/docs/reference/host-exports.md +50 -0
  100. package/docs/reference/launch-checklist.md +172 -0
  101. package/docs/reference/marketplace-listings.md +76 -0
  102. package/docs/reference/release-process.md +34 -0
  103. package/docs/reference/roles-reference.md +77 -0
  104. package/docs/reference/skills.md +33 -0
  105. package/docs/reference/templates.md +29 -0
  106. package/docs/reference/tooling-cli.md +94 -0
  107. package/docs/truth-claims.yaml +222 -0
  108. package/expertise/PROGRESS.md +63 -0
  109. package/expertise/README.md +18 -0
  110. package/expertise/antipatterns/PROGRESS.md +56 -0
  111. package/expertise/antipatterns/backend/api-design-antipatterns.md +1271 -0
  112. package/expertise/antipatterns/backend/auth-antipatterns.md +1195 -0
  113. package/expertise/antipatterns/backend/caching-antipatterns.md +622 -0
  114. package/expertise/antipatterns/backend/database-antipatterns.md +1038 -0
  115. package/expertise/antipatterns/backend/index.md +24 -0
  116. package/expertise/antipatterns/backend/microservices-antipatterns.md +850 -0
  117. package/expertise/antipatterns/code/architecture-antipatterns.md +919 -0
  118. package/expertise/antipatterns/code/async-antipatterns.md +622 -0
  119. package/expertise/antipatterns/code/code-smells.md +1186 -0
  120. package/expertise/antipatterns/code/dependency-antipatterns.md +1209 -0
  121. package/expertise/antipatterns/code/error-handling-antipatterns.md +1360 -0
  122. package/expertise/antipatterns/code/index.md +27 -0
  123. package/expertise/antipatterns/code/naming-and-abstraction.md +1118 -0
  124. package/expertise/antipatterns/code/state-management-antipatterns.md +1076 -0
  125. package/expertise/antipatterns/code/testing-antipatterns.md +1053 -0
  126. package/expertise/antipatterns/design/accessibility-antipatterns.md +1136 -0
  127. package/expertise/antipatterns/design/dark-patterns.md +1121 -0
  128. package/expertise/antipatterns/design/index.md +22 -0
  129. package/expertise/antipatterns/design/ui-antipatterns.md +1202 -0
  130. package/expertise/antipatterns/design/ux-antipatterns.md +680 -0
  131. package/expertise/antipatterns/frontend/css-layout-antipatterns.md +691 -0
  132. package/expertise/antipatterns/frontend/flutter-antipatterns.md +1827 -0
  133. package/expertise/antipatterns/frontend/index.md +23 -0
  134. package/expertise/antipatterns/frontend/mobile-antipatterns.md +573 -0
  135. package/expertise/antipatterns/frontend/react-antipatterns.md +1128 -0
  136. package/expertise/antipatterns/frontend/spa-antipatterns.md +1235 -0
  137. package/expertise/antipatterns/index.md +31 -0
  138. package/expertise/antipatterns/performance/index.md +20 -0
  139. package/expertise/antipatterns/performance/performance-antipatterns.md +1013 -0
  140. package/expertise/antipatterns/performance/premature-optimization.md +623 -0
  141. package/expertise/antipatterns/performance/scaling-antipatterns.md +785 -0
  142. package/expertise/antipatterns/process/ai-coding-antipatterns.md +853 -0
  143. package/expertise/antipatterns/process/code-review-antipatterns.md +656 -0
  144. package/expertise/antipatterns/process/deployment-antipatterns.md +920 -0
  145. package/expertise/antipatterns/process/index.md +23 -0
  146. package/expertise/antipatterns/process/technical-debt-antipatterns.md +647 -0
  147. package/expertise/antipatterns/security/index.md +20 -0
  148. package/expertise/antipatterns/security/secrets-antipatterns.md +849 -0
  149. package/expertise/antipatterns/security/security-theater.md +843 -0
  150. package/expertise/antipatterns/security/vulnerability-patterns.md +801 -0
  151. package/expertise/architecture/PROGRESS.md +70 -0
  152. package/expertise/architecture/data/caching-architecture.md +671 -0
  153. package/expertise/architecture/data/data-consistency.md +574 -0
  154. package/expertise/architecture/data/data-modeling.md +536 -0
  155. package/expertise/architecture/data/event-streams-and-queues.md +634 -0
  156. package/expertise/architecture/data/index.md +25 -0
  157. package/expertise/architecture/data/search-architecture.md +663 -0
  158. package/expertise/architecture/data/sql-vs-nosql.md +708 -0
  159. package/expertise/architecture/decisions/architecture-decision-records.md +640 -0
  160. package/expertise/architecture/decisions/build-vs-buy.md +616 -0
  161. package/expertise/architecture/decisions/index.md +23 -0
  162. package/expertise/architecture/decisions/monolith-to-microservices.md +790 -0
  163. package/expertise/architecture/decisions/technology-selection.md +616 -0
  164. package/expertise/architecture/distributed/cap-theorem-and-tradeoffs.md +800 -0
  165. package/expertise/architecture/distributed/circuit-breaker-bulkhead.md +741 -0
  166. package/expertise/architecture/distributed/consensus-and-coordination.md +796 -0
  167. package/expertise/architecture/distributed/distributed-systems-fundamentals.md +564 -0
  168. package/expertise/architecture/distributed/idempotency-and-retry.md +796 -0
  169. package/expertise/architecture/distributed/index.md +25 -0
  170. package/expertise/architecture/distributed/saga-pattern.md +797 -0
  171. package/expertise/architecture/foundations/architectural-thinking.md +460 -0
  172. package/expertise/architecture/foundations/coupling-and-cohesion.md +770 -0
  173. package/expertise/architecture/foundations/design-principles-solid.md +649 -0
  174. package/expertise/architecture/foundations/domain-driven-design.md +719 -0
  175. package/expertise/architecture/foundations/index.md +25 -0
  176. package/expertise/architecture/foundations/separation-of-concerns.md +472 -0
  177. package/expertise/architecture/foundations/twelve-factor-app.md +797 -0
  178. package/expertise/architecture/index.md +34 -0
  179. package/expertise/architecture/integration/api-design-graphql.md +638 -0
  180. package/expertise/architecture/integration/api-design-grpc.md +804 -0
  181. package/expertise/architecture/integration/api-design-rest.md +892 -0
  182. package/expertise/architecture/integration/index.md +25 -0
  183. package/expertise/architecture/integration/third-party-integration.md +795 -0
  184. package/expertise/architecture/integration/webhooks-and-callbacks.md +1152 -0
  185. package/expertise/architecture/integration/websockets-realtime.md +791 -0
  186. package/expertise/architecture/mobile-architecture/index.md +22 -0
  187. package/expertise/architecture/mobile-architecture/mobile-app-architecture.md +780 -0
  188. package/expertise/architecture/mobile-architecture/mobile-backend-for-frontend.md +670 -0
  189. package/expertise/architecture/mobile-architecture/offline-first.md +719 -0
  190. package/expertise/architecture/mobile-architecture/push-and-sync.md +782 -0
  191. package/expertise/architecture/patterns/cqrs-event-sourcing.md +717 -0
  192. package/expertise/architecture/patterns/event-driven.md +797 -0
  193. package/expertise/architecture/patterns/hexagonal-clean-architecture.md +870 -0
  194. package/expertise/architecture/patterns/index.md +27 -0
  195. package/expertise/architecture/patterns/layered-architecture.md +736 -0
  196. package/expertise/architecture/patterns/microservices.md +753 -0
  197. package/expertise/architecture/patterns/modular-monolith.md +692 -0
  198. package/expertise/architecture/patterns/monolith.md +626 -0
  199. package/expertise/architecture/patterns/plugin-architecture.md +735 -0
  200. package/expertise/architecture/patterns/serverless.md +780 -0
  201. package/expertise/architecture/scaling/database-scaling.md +615 -0
  202. package/expertise/architecture/scaling/feature-flags-and-rollouts.md +757 -0
  203. package/expertise/architecture/scaling/horizontal-vs-vertical.md +606 -0
  204. package/expertise/architecture/scaling/index.md +24 -0
  205. package/expertise/architecture/scaling/multi-tenancy.md +800 -0
  206. package/expertise/architecture/scaling/stateless-design.md +787 -0
  207. package/expertise/backend/embedded-firmware.md +625 -0
  208. package/expertise/backend/go.md +853 -0
  209. package/expertise/backend/index.md +24 -0
  210. package/expertise/backend/java-spring.md +448 -0
  211. package/expertise/backend/node-typescript.md +625 -0
  212. package/expertise/backend/python-fastapi.md +724 -0
  213. package/expertise/backend/rust.md +458 -0
  214. package/expertise/backend/solidity.md +711 -0
  215. package/expertise/composition-map.yaml +443 -0
  216. package/expertise/content/foundations/content-modeling.md +395 -0
  217. package/expertise/content/foundations/editorial-standards.md +449 -0
  218. package/expertise/content/foundations/index.md +24 -0
  219. package/expertise/content/foundations/microcopy.md +455 -0
  220. package/expertise/content/foundations/terminology-governance.md +509 -0
  221. package/expertise/content/index.md +34 -0
  222. package/expertise/content/patterns/accessibility-copy.md +518 -0
  223. package/expertise/content/patterns/index.md +24 -0
  224. package/expertise/content/patterns/notification-content.md +433 -0
  225. package/expertise/content/patterns/sample-content.md +486 -0
  226. package/expertise/content/patterns/state-copy.md +439 -0
  227. package/expertise/design/PROGRESS.md +58 -0
  228. package/expertise/design/disciplines/dark-mode-theming.md +577 -0
  229. package/expertise/design/disciplines/design-systems.md +595 -0
  230. package/expertise/design/disciplines/index.md +25 -0
  231. package/expertise/design/disciplines/information-architecture.md +800 -0
  232. package/expertise/design/disciplines/interaction-design.md +788 -0
  233. package/expertise/design/disciplines/responsive-design.md +552 -0
  234. package/expertise/design/disciplines/usability-testing.md +516 -0
  235. package/expertise/design/disciplines/user-research.md +792 -0
  236. package/expertise/design/foundations/accessibility-design.md +796 -0
  237. package/expertise/design/foundations/color-theory.md +797 -0
  238. package/expertise/design/foundations/iconography.md +795 -0
  239. package/expertise/design/foundations/index.md +26 -0
  240. package/expertise/design/foundations/motion-and-animation.md +653 -0
  241. package/expertise/design/foundations/rtl-design.md +585 -0
  242. package/expertise/design/foundations/spacing-and-layout.md +607 -0
  243. package/expertise/design/foundations/typography.md +800 -0
  244. package/expertise/design/foundations/visual-hierarchy.md +761 -0
  245. package/expertise/design/index.md +32 -0
  246. package/expertise/design/patterns/authentication-flows.md +474 -0
  247. package/expertise/design/patterns/content-consumption.md +789 -0
  248. package/expertise/design/patterns/data-display.md +618 -0
  249. package/expertise/design/patterns/e-commerce.md +1494 -0
  250. package/expertise/design/patterns/feedback-and-states.md +642 -0
  251. package/expertise/design/patterns/forms-and-input.md +819 -0
  252. package/expertise/design/patterns/gamification.md +801 -0
  253. package/expertise/design/patterns/index.md +31 -0
  254. package/expertise/design/patterns/microinteractions.md +449 -0
  255. package/expertise/design/patterns/navigation.md +800 -0
  256. package/expertise/design/patterns/notifications.md +705 -0
  257. package/expertise/design/patterns/onboarding.md +700 -0
  258. package/expertise/design/patterns/search-and-filter.md +601 -0
  259. package/expertise/design/patterns/settings-and-preferences.md +768 -0
  260. package/expertise/design/patterns/social-and-community.md +748 -0
  261. package/expertise/design/platforms/desktop-native.md +612 -0
  262. package/expertise/design/platforms/index.md +25 -0
  263. package/expertise/design/platforms/mobile-android.md +825 -0
  264. package/expertise/design/platforms/mobile-cross-platform.md +983 -0
  265. package/expertise/design/platforms/mobile-ios.md +699 -0
  266. package/expertise/design/platforms/tablet.md +794 -0
  267. package/expertise/design/platforms/web-dashboard.md +790 -0
  268. package/expertise/design/platforms/web-responsive.md +550 -0
  269. package/expertise/design/psychology/behavioral-nudges.md +449 -0
  270. package/expertise/design/psychology/cognitive-load.md +1191 -0
  271. package/expertise/design/psychology/error-psychology.md +778 -0
  272. package/expertise/design/psychology/index.md +22 -0
  273. package/expertise/design/psychology/persuasive-design.md +736 -0
  274. package/expertise/design/psychology/user-mental-models.md +623 -0
  275. package/expertise/design/tooling/open-pencil.md +266 -0
  276. package/expertise/frontend/angular.md +1073 -0
  277. package/expertise/frontend/desktop-electron.md +546 -0
  278. package/expertise/frontend/flutter.md +782 -0
  279. package/expertise/frontend/index.md +27 -0
  280. package/expertise/frontend/native-android.md +409 -0
  281. package/expertise/frontend/native-ios.md +490 -0
  282. package/expertise/frontend/react-native.md +1160 -0
  283. package/expertise/frontend/react.md +808 -0
  284. package/expertise/frontend/vue.md +1089 -0
  285. package/expertise/humanize/domain-rules-code.md +79 -0
  286. package/expertise/humanize/domain-rules-content.md +67 -0
  287. package/expertise/humanize/domain-rules-technical-docs.md +56 -0
  288. package/expertise/humanize/index.md +35 -0
  289. package/expertise/humanize/self-audit-checklist.md +87 -0
  290. package/expertise/humanize/sentence-patterns.md +218 -0
  291. package/expertise/humanize/vocabulary-blacklist.md +105 -0
  292. package/expertise/i18n/PROGRESS.md +65 -0
  293. package/expertise/i18n/advanced/accessibility-and-i18n.md +28 -0
  294. package/expertise/i18n/advanced/bidirectional-text-algorithm.md +38 -0
  295. package/expertise/i18n/advanced/complex-scripts.md +30 -0
  296. package/expertise/i18n/advanced/performance-and-i18n.md +27 -0
  297. package/expertise/i18n/advanced/testing-i18n.md +28 -0
  298. package/expertise/i18n/content/content-adaptation.md +23 -0
  299. package/expertise/i18n/content/locale-specific-formatting.md +23 -0
  300. package/expertise/i18n/content/machine-translation-integration.md +28 -0
  301. package/expertise/i18n/content/translation-management.md +29 -0
  302. package/expertise/i18n/foundations/date-time-calendars.md +67 -0
  303. package/expertise/i18n/foundations/i18n-architecture.md +272 -0
  304. package/expertise/i18n/foundations/locale-and-language-tags.md +79 -0
  305. package/expertise/i18n/foundations/numbers-currency-units.md +61 -0
  306. package/expertise/i18n/foundations/pluralization-and-gender.md +109 -0
  307. package/expertise/i18n/foundations/string-externalization.md +236 -0
  308. package/expertise/i18n/foundations/text-direction-bidi.md +241 -0
  309. package/expertise/i18n/foundations/unicode-and-encoding.md +86 -0
  310. package/expertise/i18n/index.md +38 -0
  311. package/expertise/i18n/platform/backend-i18n.md +31 -0
  312. package/expertise/i18n/platform/flutter-i18n.md +148 -0
  313. package/expertise/i18n/platform/native-android-i18n.md +36 -0
  314. package/expertise/i18n/platform/native-ios-i18n.md +36 -0
  315. package/expertise/i18n/platform/react-i18n.md +103 -0
  316. package/expertise/i18n/platform/web-css-i18n.md +81 -0
  317. package/expertise/i18n/rtl/arabic-specific.md +175 -0
  318. package/expertise/i18n/rtl/hebrew-specific.md +149 -0
  319. package/expertise/i18n/rtl/rtl-animations-and-transitions.md +111 -0
  320. package/expertise/i18n/rtl/rtl-forms-and-input.md +161 -0
  321. package/expertise/i18n/rtl/rtl-fundamentals.md +211 -0
  322. package/expertise/i18n/rtl/rtl-icons-and-images.md +181 -0
  323. package/expertise/i18n/rtl/rtl-layout-mirroring.md +252 -0
  324. package/expertise/i18n/rtl/rtl-navigation-and-gestures.md +107 -0
  325. package/expertise/i18n/rtl/rtl-testing-and-qa.md +147 -0
  326. package/expertise/i18n/rtl/rtl-typography.md +160 -0
  327. package/expertise/index.md +113 -0
  328. package/expertise/index.yaml +216 -0
  329. package/expertise/infrastructure/cloud-aws.md +597 -0
  330. package/expertise/infrastructure/cloud-gcp.md +599 -0
  331. package/expertise/infrastructure/cybersecurity.md +816 -0
  332. package/expertise/infrastructure/database-mongodb.md +447 -0
  333. package/expertise/infrastructure/database-postgres.md +400 -0
  334. package/expertise/infrastructure/devops-cicd.md +787 -0
  335. package/expertise/infrastructure/index.md +27 -0
  336. package/expertise/performance/PROGRESS.md +50 -0
  337. package/expertise/performance/backend/api-latency.md +1204 -0
  338. package/expertise/performance/backend/background-jobs.md +506 -0
  339. package/expertise/performance/backend/connection-pooling.md +1209 -0
  340. package/expertise/performance/backend/database-query-optimization.md +515 -0
  341. package/expertise/performance/backend/index.md +23 -0
  342. package/expertise/performance/backend/rate-limiting-and-throttling.md +971 -0
  343. package/expertise/performance/foundations/algorithmic-complexity.md +954 -0
  344. package/expertise/performance/foundations/caching-strategies.md +489 -0
  345. package/expertise/performance/foundations/concurrency-and-parallelism.md +847 -0
  346. package/expertise/performance/foundations/index.md +24 -0
  347. package/expertise/performance/foundations/measuring-and-profiling.md +440 -0
  348. package/expertise/performance/foundations/memory-management.md +964 -0
  349. package/expertise/performance/foundations/performance-budgets.md +1314 -0
  350. package/expertise/performance/index.md +31 -0
  351. package/expertise/performance/infrastructure/auto-scaling.md +1059 -0
  352. package/expertise/performance/infrastructure/cdn-and-edge.md +1081 -0
  353. package/expertise/performance/infrastructure/index.md +22 -0
  354. package/expertise/performance/infrastructure/load-balancing.md +1081 -0
  355. package/expertise/performance/infrastructure/observability.md +1079 -0
  356. package/expertise/performance/mobile/index.md +23 -0
  357. package/expertise/performance/mobile/mobile-animations.md +544 -0
  358. package/expertise/performance/mobile/mobile-memory-battery.md +416 -0
  359. package/expertise/performance/mobile/mobile-network.md +452 -0
  360. package/expertise/performance/mobile/mobile-rendering.md +599 -0
  361. package/expertise/performance/mobile/mobile-startup-time.md +505 -0
  362. package/expertise/performance/platform-specific/flutter-performance.md +647 -0
  363. package/expertise/performance/platform-specific/index.md +22 -0
  364. package/expertise/performance/platform-specific/node-performance.md +1307 -0
  365. package/expertise/performance/platform-specific/postgres-performance.md +1366 -0
  366. package/expertise/performance/platform-specific/react-performance.md +1403 -0
  367. package/expertise/performance/web/bundle-optimization.md +1239 -0
  368. package/expertise/performance/web/image-and-media.md +636 -0
  369. package/expertise/performance/web/index.md +24 -0
  370. package/expertise/performance/web/network-optimization.md +1133 -0
  371. package/expertise/performance/web/rendering-performance.md +1098 -0
  372. package/expertise/performance/web/ssr-and-hydration.md +918 -0
  373. package/expertise/performance/web/web-vitals.md +1374 -0
  374. package/expertise/quality/accessibility.md +985 -0
  375. package/expertise/quality/evidence-based-verification.md +499 -0
  376. package/expertise/quality/index.md +24 -0
  377. package/expertise/quality/ml-model-audit.md +614 -0
  378. package/expertise/quality/performance.md +600 -0
  379. package/expertise/quality/testing-api.md +891 -0
  380. package/expertise/quality/testing-mobile.md +496 -0
  381. package/expertise/quality/testing-web.md +849 -0
  382. package/expertise/security/PROGRESS.md +54 -0
  383. package/expertise/security/agentic-identity.md +540 -0
  384. package/expertise/security/compliance-frameworks.md +601 -0
  385. package/expertise/security/data/data-encryption.md +364 -0
  386. package/expertise/security/data/data-privacy-gdpr.md +692 -0
  387. package/expertise/security/data/database-security.md +1171 -0
  388. package/expertise/security/data/index.md +22 -0
  389. package/expertise/security/data/pii-handling.md +531 -0
  390. package/expertise/security/foundations/authentication.md +1041 -0
  391. package/expertise/security/foundations/authorization.md +603 -0
  392. package/expertise/security/foundations/cryptography.md +1001 -0
  393. package/expertise/security/foundations/index.md +25 -0
  394. package/expertise/security/foundations/owasp-top-10.md +1354 -0
  395. package/expertise/security/foundations/secrets-management.md +1217 -0
  396. package/expertise/security/foundations/secure-sdlc.md +700 -0
  397. package/expertise/security/foundations/supply-chain-security.md +698 -0
  398. package/expertise/security/index.md +31 -0
  399. package/expertise/security/infrastructure/cloud-security-aws.md +1296 -0
  400. package/expertise/security/infrastructure/cloud-security-gcp.md +1376 -0
  401. package/expertise/security/infrastructure/container-security.md +721 -0
  402. package/expertise/security/infrastructure/incident-response.md +1295 -0
  403. package/expertise/security/infrastructure/index.md +24 -0
  404. package/expertise/security/infrastructure/logging-and-monitoring.md +1618 -0
  405. package/expertise/security/infrastructure/network-security.md +1337 -0
  406. package/expertise/security/mobile/index.md +23 -0
  407. package/expertise/security/mobile/mobile-android-security.md +1218 -0
  408. package/expertise/security/mobile/mobile-binary-protection.md +1229 -0
  409. package/expertise/security/mobile/mobile-data-storage.md +1265 -0
  410. package/expertise/security/mobile/mobile-ios-security.md +1401 -0
  411. package/expertise/security/mobile/mobile-network-security.md +1520 -0
  412. package/expertise/security/smart-contract-security.md +594 -0
  413. package/expertise/security/testing/index.md +22 -0
  414. package/expertise/security/testing/penetration-testing.md +1258 -0
  415. package/expertise/security/testing/security-code-review.md +1765 -0
  416. package/expertise/security/testing/threat-modeling.md +1074 -0
  417. package/expertise/security/testing/vulnerability-scanning.md +1062 -0
  418. package/expertise/security/web/api-security.md +586 -0
  419. package/expertise/security/web/cors-and-headers.md +433 -0
  420. package/expertise/security/web/csrf.md +562 -0
  421. package/expertise/security/web/file-upload.md +1477 -0
  422. package/expertise/security/web/index.md +25 -0
  423. package/expertise/security/web/injection.md +1375 -0
  424. package/expertise/security/web/session-management.md +1101 -0
  425. package/expertise/security/web/xss.md +1158 -0
  426. package/exports/README.md +17 -0
  427. package/exports/hosts/claude/.claude/agents/clarifier.md +42 -0
  428. package/exports/hosts/claude/.claude/agents/content-author.md +63 -0
  429. package/exports/hosts/claude/.claude/agents/designer.md +55 -0
  430. package/exports/hosts/claude/.claude/agents/executor.md +55 -0
  431. package/exports/hosts/claude/.claude/agents/learner.md +51 -0
  432. package/exports/hosts/claude/.claude/agents/planner.md +53 -0
  433. package/exports/hosts/claude/.claude/agents/researcher.md +43 -0
  434. package/exports/hosts/claude/.claude/agents/reviewer.md +54 -0
  435. package/exports/hosts/claude/.claude/agents/specifier.md +47 -0
  436. package/exports/hosts/claude/.claude/agents/verifier.md +71 -0
  437. package/exports/hosts/claude/.claude/commands/author.md +42 -0
  438. package/exports/hosts/claude/.claude/commands/clarify.md +38 -0
  439. package/exports/hosts/claude/.claude/commands/design-review.md +46 -0
  440. package/exports/hosts/claude/.claude/commands/design.md +44 -0
  441. package/exports/hosts/claude/.claude/commands/discover.md +37 -0
  442. package/exports/hosts/claude/.claude/commands/execute.md +48 -0
  443. package/exports/hosts/claude/.claude/commands/learn.md +38 -0
  444. package/exports/hosts/claude/.claude/commands/plan-review.md +42 -0
  445. package/exports/hosts/claude/.claude/commands/plan.md +39 -0
  446. package/exports/hosts/claude/.claude/commands/prepare-next.md +37 -0
  447. package/exports/hosts/claude/.claude/commands/review.md +40 -0
  448. package/exports/hosts/claude/.claude/commands/run-audit.md +41 -0
  449. package/exports/hosts/claude/.claude/commands/spec-challenge.md +41 -0
  450. package/exports/hosts/claude/.claude/commands/specify.md +38 -0
  451. package/exports/hosts/claude/.claude/commands/verify.md +37 -0
  452. package/exports/hosts/claude/.claude/settings.json +34 -0
  453. package/exports/hosts/claude/CLAUDE.md +19 -0
  454. package/exports/hosts/claude/export.manifest.json +38 -0
  455. package/exports/hosts/claude/host-package.json +67 -0
  456. package/exports/hosts/codex/AGENTS.md +19 -0
  457. package/exports/hosts/codex/export.manifest.json +38 -0
  458. package/exports/hosts/codex/host-package.json +41 -0
  459. package/exports/hosts/cursor/.cursor/hooks.json +16 -0
  460. package/exports/hosts/cursor/.cursor/rules/wazir-core.mdc +19 -0
  461. package/exports/hosts/cursor/export.manifest.json +38 -0
  462. package/exports/hosts/cursor/host-package.json +42 -0
  463. package/exports/hosts/gemini/GEMINI.md +19 -0
  464. package/exports/hosts/gemini/export.manifest.json +38 -0
  465. package/exports/hosts/gemini/host-package.json +41 -0
  466. package/hooks/README.md +18 -0
  467. package/hooks/definitions/loop_cap_guard.yaml +21 -0
  468. package/hooks/definitions/post_tool_capture.yaml +24 -0
  469. package/hooks/definitions/pre_compact_summary.yaml +19 -0
  470. package/hooks/definitions/pre_tool_capture_route.yaml +19 -0
  471. package/hooks/definitions/protected_path_write_guard.yaml +19 -0
  472. package/hooks/definitions/session_start.yaml +19 -0
  473. package/hooks/definitions/stop_handoff_harvest.yaml +20 -0
  474. package/hooks/loop-cap-guard +17 -0
  475. package/hooks/post-tool-lint +36 -0
  476. package/hooks/protected-path-write-guard +17 -0
  477. package/hooks/session-start +41 -0
  478. package/llms-full.txt +2355 -0
  479. package/llms.txt +43 -0
  480. package/package.json +79 -0
  481. package/roles/README.md +20 -0
  482. package/roles/clarifier.md +42 -0
  483. package/roles/content-author.md +63 -0
  484. package/roles/designer.md +55 -0
  485. package/roles/executor.md +55 -0
  486. package/roles/learner.md +51 -0
  487. package/roles/planner.md +53 -0
  488. package/roles/researcher.md +43 -0
  489. package/roles/reviewer.md +54 -0
  490. package/roles/specifier.md +47 -0
  491. package/roles/verifier.md +71 -0
  492. package/schemas/README.md +24 -0
  493. package/schemas/accepted-learning.schema.json +20 -0
  494. package/schemas/author-artifact.schema.json +156 -0
  495. package/schemas/clarification.schema.json +19 -0
  496. package/schemas/design-artifact.schema.json +80 -0
  497. package/schemas/docs-claim.schema.json +18 -0
  498. package/schemas/export-manifest.schema.json +20 -0
  499. package/schemas/hook.schema.json +67 -0
  500. package/schemas/host-export-package.schema.json +18 -0
  501. package/schemas/implementation-plan.schema.json +19 -0
  502. package/schemas/proposed-learning.schema.json +19 -0
  503. package/schemas/research.schema.json +18 -0
  504. package/schemas/review.schema.json +29 -0
  505. package/schemas/run-manifest.schema.json +18 -0
  506. package/schemas/spec-challenge.schema.json +18 -0
  507. package/schemas/spec.schema.json +20 -0
  508. package/schemas/usage.schema.json +102 -0
  509. package/schemas/verification-proof.schema.json +29 -0
  510. package/schemas/wazir-manifest.schema.json +173 -0
  511. package/skills/README.md +40 -0
  512. package/skills/brainstorming/SKILL.md +77 -0
  513. package/skills/debugging/SKILL.md +50 -0
  514. package/skills/design/SKILL.md +61 -0
  515. package/skills/dispatching-parallel-agents/SKILL.md +128 -0
  516. package/skills/executing-plans/SKILL.md +70 -0
  517. package/skills/finishing-a-development-branch/SKILL.md +169 -0
  518. package/skills/humanize/SKILL.md +123 -0
  519. package/skills/init-pipeline/SKILL.md +124 -0
  520. package/skills/prepare-next/SKILL.md +20 -0
  521. package/skills/receiving-code-review/SKILL.md +123 -0
  522. package/skills/requesting-code-review/SKILL.md +105 -0
  523. package/skills/requesting-code-review/code-reviewer.md +108 -0
  524. package/skills/run-audit/SKILL.md +197 -0
  525. package/skills/scan-project/SKILL.md +41 -0
  526. package/skills/self-audit/SKILL.md +153 -0
  527. package/skills/subagent-driven-development/SKILL.md +154 -0
  528. package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
  529. package/skills/subagent-driven-development/implementer-prompt.md +102 -0
  530. package/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  531. package/skills/tdd/SKILL.md +23 -0
  532. package/skills/using-git-worktrees/SKILL.md +163 -0
  533. package/skills/using-skills/SKILL.md +95 -0
  534. package/skills/verification/SKILL.md +22 -0
  535. package/skills/wazir/SKILL.md +463 -0
  536. package/skills/writing-plans/SKILL.md +30 -0
  537. package/skills/writing-skills/SKILL.md +157 -0
  538. package/skills/writing-skills/anthropic-best-practices.md +122 -0
  539. package/skills/writing-skills/persuasion-principles.md +50 -0
  540. package/templates/README.md +20 -0
  541. package/templates/artifacts/README.md +10 -0
  542. package/templates/artifacts/accepted-learning.md +19 -0
  543. package/templates/artifacts/accepted-learning.template.json +12 -0
  544. package/templates/artifacts/author.md +74 -0
  545. package/templates/artifacts/author.template.json +19 -0
  546. package/templates/artifacts/clarification.md +21 -0
  547. package/templates/artifacts/clarification.template.json +12 -0
  548. package/templates/artifacts/execute-notes.md +19 -0
  549. package/templates/artifacts/implementation-plan.md +21 -0
  550. package/templates/artifacts/implementation-plan.template.json +11 -0
  551. package/templates/artifacts/learning-proposal.md +19 -0
  552. package/templates/artifacts/next-run-handoff.md +21 -0
  553. package/templates/artifacts/plan-review.md +19 -0
  554. package/templates/artifacts/proposed-learning.template.json +12 -0
  555. package/templates/artifacts/research.md +21 -0
  556. package/templates/artifacts/research.template.json +12 -0
  557. package/templates/artifacts/review-findings.md +19 -0
  558. package/templates/artifacts/review.template.json +11 -0
  559. package/templates/artifacts/run-manifest.template.json +8 -0
  560. package/templates/artifacts/spec-challenge.md +19 -0
  561. package/templates/artifacts/spec-challenge.template.json +11 -0
  562. package/templates/artifacts/spec.md +21 -0
  563. package/templates/artifacts/spec.template.json +12 -0
  564. package/templates/artifacts/verification-proof.md +19 -0
  565. package/templates/artifacts/verification-proof.template.json +11 -0
  566. package/templates/examples/accepted-learning.example.json +14 -0
  567. package/templates/examples/author.example.json +152 -0
  568. package/templates/examples/clarification.example.json +15 -0
  569. package/templates/examples/docs-claim.example.json +8 -0
  570. package/templates/examples/export-manifest.example.json +7 -0
  571. package/templates/examples/host-export-package.example.json +11 -0
  572. package/templates/examples/implementation-plan.example.json +17 -0
  573. package/templates/examples/proposed-learning.example.json +13 -0
  574. package/templates/examples/research.example.json +15 -0
  575. package/templates/examples/research.example.md +6 -0
  576. package/templates/examples/review.example.json +17 -0
  577. package/templates/examples/run-manifest.example.json +9 -0
  578. package/templates/examples/spec-challenge.example.json +14 -0
  579. package/templates/examples/spec.example.json +21 -0
  580. package/templates/examples/verification-proof.example.json +21 -0
  581. package/templates/examples/wazir-manifest.example.yaml +65 -0
  582. package/templates/task-definition-schema.md +99 -0
  583. package/tooling/README.md +20 -0
  584. package/tooling/src/adapters/context-mode.js +50 -0
  585. package/tooling/src/capture/command.js +376 -0
  586. package/tooling/src/capture/store.js +99 -0
  587. package/tooling/src/capture/usage.js +270 -0
  588. package/tooling/src/checks/branches.js +50 -0
  589. package/tooling/src/checks/brand-truth.js +110 -0
  590. package/tooling/src/checks/changelog.js +231 -0
  591. package/tooling/src/checks/command-registry.js +36 -0
  592. package/tooling/src/checks/commits.js +102 -0
  593. package/tooling/src/checks/docs-drift.js +103 -0
  594. package/tooling/src/checks/docs-truth.js +201 -0
  595. package/tooling/src/checks/runtime-surface.js +156 -0
  596. package/tooling/src/cli.js +116 -0
  597. package/tooling/src/command-options.js +56 -0
  598. package/tooling/src/commands/validate.js +320 -0
  599. package/tooling/src/doctor/command.js +91 -0
  600. package/tooling/src/export/command.js +77 -0
  601. package/tooling/src/export/compiler.js +498 -0
  602. package/tooling/src/guards/loop-cap-guard.js +52 -0
  603. package/tooling/src/guards/protected-path-write-guard.js +67 -0
  604. package/tooling/src/index/command.js +152 -0
  605. package/tooling/src/index/storage.js +1061 -0
  606. package/tooling/src/index/summarizers.js +261 -0
  607. package/tooling/src/loaders.js +18 -0
  608. package/tooling/src/project-root.js +22 -0
  609. package/tooling/src/recall/command.js +225 -0
  610. package/tooling/src/schema-validator.js +30 -0
  611. package/tooling/src/state-root.js +40 -0
  612. package/tooling/src/status/command.js +71 -0
  613. package/wazir.manifest.yaml +135 -0
  614. package/workflows/README.md +19 -0
  615. package/workflows/author.md +42 -0
  616. package/workflows/clarify.md +38 -0
  617. package/workflows/design-review.md +46 -0
  618. package/workflows/design.md +44 -0
  619. package/workflows/discover.md +37 -0
  620. package/workflows/execute.md +48 -0
  621. package/workflows/learn.md +38 -0
  622. package/workflows/plan-review.md +42 -0
  623. package/workflows/plan.md +39 -0
  624. package/workflows/prepare-next.md +37 -0
  625. package/workflows/review.md +40 -0
  626. package/workflows/run-audit.md +41 -0
  627. package/workflows/spec-challenge.md +41 -0
  628. package/workflows/specify.md +38 -0
  629. package/workflows/verify.md +37 -0
package/llms-full.txt ADDED
@@ -0,0 +1,2355 @@
1
+ # Wazir — Complete Documentation
2
+
3
+ > Generated: 2026-03-16T23:53:58Z
4
+
5
+ ---
6
+ ## Source: docs/concepts/architecture.md
7
+
8
+ # Architecture
9
+
10
+ Wazir is a host-native engineering OS kit. The host environment (Claude, Codex, Gemini, Cursor) remains the execution container. Wazir supplies the operating model, guardrails, and artifact contracts.
11
+
12
+ ## Core components
13
+
14
+ | Component | Purpose |
15
+ |-----------|---------|
16
+ | Roles | Canonical contracts defining what each agent role does and produces |
17
+ | Workflows | Phase entrypoints that sequence roles through delivery |
18
+ | Skills | Reusable procedures (wz:tdd, wz:debugging, wz:verification, wz:brainstorming) |
19
+ | Hooks | Guardrails enforcing protected paths, loop caps, and capture routing |
20
+ | Expertise | 308 curated knowledge modules composed into agent prompts |
21
+ | Templates | Artifact templates for phase outputs and handoff |
22
+ | Schemas | Validation schemas for manifest, hooks, artifacts, and exports |
23
+ | Exports | Generated host packages tailored per supported host |
24
+ | Tooling | CLI for validation, indexing, recall, capture, and status |
25
+
26
+ ## Design influences
27
+
28
+ | Source | What Wazir keeps |
29
+ |--------|----------------------|
30
+ | Wazir skill system | Disciplined workflows, TDD, verification, review rigor, skill ergonomics |
31
+ | Spec-Kit | Spec-first development, explicit artifacts, approval gates |
32
+ | Oh My Claude | Host-native prompt structure and operator ergonomics |
33
+ | autoresearch | Research loops, experiment tracking, self-improvement discipline |
34
+
35
+ ## Context and indexing
36
+
37
+ Wazir ships a built-in local index and recall surface that reduces context window consumption by 60-80% on exploration-heavy phases.
38
+
39
+ ### Context tiers
40
+
41
+ | Tier | Token budget | Content | When to use |
42
+ |------|-------------|---------|-------------|
43
+ | L0 | ~100 tokens | One-line identifier (name, kind, language, line range) | Inventory scans, deciding what to load |
44
+ | L1 | ~500-2k tokens | Structural summary (signature, fields, purpose, dependencies) | Understanding shape without full source |
45
+ | L2 | Full content | Exact line-bounded source slice | Implementation, debugging, code review |
46
+
47
+ ### Role-specific recall defaults
48
+
49
+ Roles are assigned default tiers based on their information needs:
50
+
51
+ - **Exploration roles** (clarifier, researcher, specifier, content-author, designer, planner) default to L1 -- they need to understand structure across many files without reading every line
52
+ - **Implementation roles** (executor, verifier) default to direct read (L2) -- they need exact source for code changes and verification
53
+ - **Review role** (reviewer) starts at L1 as a triage pass, escalating to direct read only for logic errors, security concerns, or ambiguous summaries
54
+ - **Learning role** (learner) defaults to L0 -- it needs only inventory-level context to identify what changed
55
+
56
+ Every role includes a fallback chain: if the preferred tier fails (no index, no summaries), the role falls back to direct file reads. The system degrades gracefully -- no wasted tokens on failed index operations.
57
+
58
+ ### Capture routing
59
+
60
+ Large tool output is routed to run-local files via `wazir capture route` and `wazir capture output`, keeping the context window lean. The agent receives a file path reference (~50 tokens) instead of the full output.
61
+
62
+ ### Pipeline integration points
63
+
64
+ The index and recall surface integrates with the pipeline at five points:
65
+
66
+ 1. **Session start** -- the bootstrap hook runs `index refresh` (or `build` for first run) to ensure the index is current
67
+ 2. **Scan project** -- the `scan-project` skill runs `index stats` to report index health in the project profile
68
+ 3. **Debugging** -- the `wz:debugging` OBSERVE phase uses `index search-symbols` and `recall --tier L1` for symbol-first exploration
69
+ 4. **Execute** -- the executor uses `recall file` and `recall symbol` for targeted source reads
70
+ 5. **Verify** -- the verifier uses direct reads for full validation
71
+
72
+ ### Measuring savings
73
+
74
+ `wazir capture usage` generates a per-run token savings report showing capture routing statistics and context window savings. This provides concrete evidence of token reduction per session.
75
+
76
+ The context-mode integration remains an optional adapter -- off by default, never required for core install, build, or test paths.
77
+
78
+ See [Indexing and Recall](indexing-and-recall.md) for full command details and extractor documentation.
79
+
80
+ ## Design Phase
81
+
82
+ The design phase runs after specification and before planning. The `designer` role uses open-pencil MCP tools to produce visual designs from the approved spec. Outputs include a `.fig` design file, exported Tailwind JSX/HTML+CSS scaffolds, design tokens JSON, and screenshot PNGs.
83
+
84
+ The `design-review` workflow validates designs against the spec before planning begins. The existing `review` workflow also checks design-vs-implementation alignment after execution.
85
+
86
+ open-pencil is integrated as an optional adapter (`open_pencil`) — it is not required for core Wazir functionality.
87
+
88
+ ## Key references
89
+
90
+ - [Roles & Workflows](roles-and-workflows.md)
91
+ - [Artifact Model](artifact-model.md)
92
+ - [Host Exports](../reference/host-exports.md)
93
+ - [Hooks](../reference/hooks.md)
94
+ - [Expertise & Antipatterns](composition-engine.md)
95
+
96
+ ---
97
+ ## Source: docs/concepts/artifact-model.md
98
+
99
+ # Artifact Model
100
+
101
+ Wazir separates operator input, committed repo artifacts, and live run state.
102
+
103
+ ## Human Truth
104
+
105
+ - `input/` is the read-only operator briefing surface.
106
+
107
+ ## Default Live Run State
108
+
109
+ Default run state lives outside the repo:
110
+
111
+ - `~/.wazir/projects/<project-slug>/runs/<run-id>/`
112
+
113
+ Typical run contents:
114
+
115
+ - `manifest.json`
116
+ - `sources.json`
117
+ - phase subdirectories such as `clarify/`, `plan/`, `verify/`, `review/`
118
+ - `status.json`
119
+ - `events.ndjson`
120
+ - `summary.md`
121
+
122
+ ## Committed Repo Artifacts
123
+
124
+ Use `artifacts/` only for committed evidence such as:
125
+
126
+ - release evidence
127
+ - checked-in examples
128
+
129
+ ## Artifact Rules
130
+
131
+ - every artifact should declare phase, role, run ID, timestamp, sources, status, and loop number
132
+ - non-trivial claims must cite a source file, source URL, or verification command
133
+ - approval-gated artifacts must record approval status and approver when relevant
134
+ - scratch work must not be confused with durable artifacts
135
+ - learnings belong in `memory/`, not in fresh-run source truth
136
+
137
+ ## Templates
138
+
139
+ Canonical starting points live under:
140
+
141
+ - `templates/artifacts/*.md`
142
+ - `templates/artifacts/*.json`
143
+
144
+ Those templates define the minimum metadata for clarification, research, specs, plan review, execution notes, verification, review, learning promotion, and next-run handoff artifacts.
145
+
146
+ ## Repo-Local Override
147
+
148
+ Repo-local run state is opt-in only. If an operator deliberately uses a repo-local override, the recommended path is:
149
+
150
+ - `.wazir-state/`
151
+
152
+ That path must remain gitignored so a normal run still leaves `git status` clean.
153
+
154
+ ## Retention
155
+
156
+ - keep committed `artifacts/` focused on release evidence and checked-in examples
157
+ - archive stale or disproven learnings instead of rewriting history in place
158
+ - prune external run-state captures when they no longer provide audit or debugging value
159
+
160
+ ---
161
+ ## Source: docs/concepts/composition-engine.md
162
+
163
+ # Composition Engine
164
+
165
+ Wazir uses a composition engine to assemble the right expertise into each role's context at each phase.
166
+
167
+ ## How expertise loading works
168
+
169
+ - `clarify` and `discover` start from `input/`, active docs, and `docs/research/`
170
+ - `specify` and `plan` pull only the expertise slices relevant to the stack and risks
171
+ - `review` always considers `expertise/antipatterns/` before broader domain modules
172
+ - `learn` can propose updates to expertise, but may not silently rewrite it
173
+
174
+ ## Anti-patterns first
175
+
176
+ `expertise/antipatterns/` is first-class review input. It exists to catch:
177
+
178
+ - fake completion
179
+ - unwired abstractions
180
+ - shallow tests
181
+ - security theater
182
+ - architecture drift
183
+ - AI-coding failure modes
184
+
185
+ Anti-patterns are loaded into reviewer context before any other domain modules. This ordering ensures that known failure modes are the first lens through which review happens.
186
+
187
+ ## Why scoped loading matters
188
+
189
+ Brute-force loading of all expertise modules would flood the context window. The composition engine resolves which modules to load based on the task's declared stack and concerns, keeping context tight and relevant. Max 15 modules per dispatch, with token budget enforcement.
190
+
191
+ ## Source material
192
+
193
+ - Research findings: `docs/research/`
194
+ - Expertise modules: `expertise/`
195
+ - Anti-pattern catalog: `expertise/antipatterns/`
196
+ - Expertise metadata: `expertise/index.yaml`
197
+
198
+ For the complete module listing and anti-pattern catalog, see the [Expertise Index reference](../reference/expertise-index.md).
199
+
200
+ ---
201
+ ## Source: docs/concepts/indexing-and-recall.md
202
+
203
+ # Indexing and Recall
204
+
205
+ Wazir ships a built-in local indexer so context reduction does not depend on an external commercial tool.
206
+
207
+ ## Current implementation
208
+
209
+ - storage engine: built-in `node:sqlite`
210
+ - index location: `<state-root>/index/index.sqlite`
211
+ - default state root: `~/.wazir/projects/{project_slug}`
212
+ - override: `--state-root <path>`
213
+ - refresh model: hash-based incremental refresh
214
+ - retrieval model: exact file slices and symbol slices read back from the working tree
215
+
216
+ ## Context tiers
217
+
218
+ Wazir supports three context tiers for recall, enabling token-efficient context loading:
219
+
220
+ | Tier | Target size | Content | Use case |
221
+ | --- | --- | --- | --- |
222
+ | L0 | ~100 tokens | One-line identifier summary (name, kind, language, line range) | Inventory scans, bulk listing, deciding what to load |
223
+ | L1 | ~500-2k tokens | Structural summary (signature, key fields, purpose, dependencies) | Understanding shape and role without full source |
224
+ | L2 | Full content | Exact line-bounded source slice | Implementation details, debugging, code review |
225
+
226
+ L2 is the default recall behavior (exact slices). L0 and L1 require summaries to be generated first via `index summarize`.
227
+
228
+ ## Summary generation
229
+
230
+ The `wazir index summarize` command generates L0 and L1 heuristic summaries for all indexed files and symbols.
231
+
232
+ ```
233
+ wazir index summarize [--state-root <path>] [--refresh]
234
+ ```
235
+
236
+ - Generates summaries for every file and symbol currently in the index
237
+ - Summaries are stored in the index database alongside the source metadata
238
+ - The `--refresh` flag regenerates summaries even if they already exist
239
+ - Summary generation is heuristic-based (no external LLM calls required)
240
+ - Each summary records the content hash at generation time for freshness checking
241
+
242
+ ## Tiered recall
243
+
244
+ The `--tier` flag on `recall file` and `recall symbol` switches from full-content (L2) recall to summary recall:
245
+
246
+ ```
247
+ wazir recall file <path> --tier L0
248
+ wazir recall file <path> --tier L1
249
+ wazir recall symbol <name> --tier L0
250
+ wazir recall symbol <name> --tier L1
251
+ ```
252
+
253
+ - `--tier` is mutually exclusive with `--start`/`--end` line-range options
254
+ - When `--tier` is specified, the response includes the summary text and a `fresh` field
255
+ - Without `--tier`, recall behaves exactly as before (L2 exact slices)
256
+
257
+ ## Freshness checking
258
+
259
+ When summaries are recalled via `--tier`, the response includes a `fresh` boolean field:
260
+
261
+ - `fresh: true` -- the content hash at summary generation time matches the current file hash on disk
262
+ - `fresh: false` -- the file has been modified since the summary was generated; the summary may be stale
263
+
264
+ Consumers should treat stale summaries as approximate and consider re-running `index summarize --refresh` or falling back to L2 recall for critical decisions.
265
+
266
+ ## Pipeline integration
267
+
268
+ The index and recall surface integrates with the Wazir pipeline at multiple points:
269
+
270
+ - **Session start** -- the session-start hook runs `index refresh` (or `index build` for first run) as part of the 3-step CLI bootstrap
271
+ - **Scan project** -- the `scan-project` skill runs `index stats` to report index health in the project profile
272
+ - **Debugging** -- the `wz:debugging` OBSERVE phase uses `index search-symbols` and `recall --tier L1` for symbol-first exploration before targeted source reads
273
+ - **Execution** -- the executor uses `recall file` and `recall symbol` for targeted source access
274
+ - **Verification** -- the verifier uses direct reads for full validation
275
+
276
+ Each role has a default recall tier. See [Roles Reference -- Context retrieval defaults](../reference/roles-reference.md#context-retrieval-defaults) for the full table.
277
+
278
+ ## Current commands
279
+
280
+ Implemented now:
281
+
282
+ - `wazir index build`
283
+ - `wazir index refresh`
284
+ - `wazir index stats`
285
+ - `wazir index summarize`
286
+ - `wazir index search-symbols`
287
+ - `wazir index get-symbol`
288
+ - `wazir index get-file-outline`
289
+ - `wazir recall file`
290
+ - `wazir recall symbol`
291
+
292
+ Reserved for later host/runtime work:
293
+
294
+ - adapter-backed summary generation (LLM-powered summaries via optional adapters)
295
+ - directory-level summaries (roll up file summaries into directory-level context)
296
+ - adapter activation flows
297
+ - richer parser inventories
298
+
299
+ ## Extractor coverage
300
+
301
+ The current core extractor roster is heuristic and built in-repo:
302
+
303
+ - `builtin-heuristic-javascript`
304
+ - `builtin-heuristic-typescript`
305
+ - `builtin-heuristic-python`
306
+ - `builtin-heuristic-go`
307
+ - `builtin-heuristic-rust`
308
+ - `builtin-heuristic-java`
309
+ - `builtin-heuristic-sql`
310
+ - `builtin-heuristic-json`
311
+ - `builtin-heuristic-yaml`
312
+ - `builtin-heuristic-markdown`
313
+
314
+ Behavior:
315
+
316
+ - supported files get file metadata, hashes, outlines, and best-effort symbol extraction
317
+ - unsupported text files can still be added later, but should not claim symbol precision they do not provide
318
+ - markdown headings and top-level structured keys are first-class outline targets
319
+
320
+ ## Output model
321
+
322
+ The index stores:
323
+
324
+ - files
325
+ - symbols
326
+ - outlines
327
+ - hashes
328
+ - ingestion runs
329
+ - retrieval logs
330
+
331
+ Recall returns:
332
+
333
+ - exact line-bounded slice
334
+ - exact source path
335
+ - exact line start and line end
336
+ - optional surrounding context window
337
+
338
+ ## Ignore and hygiene rules
339
+
340
+ The built-in index currently skips common non-source or generated trees such as:
341
+
342
+ - `.git/`
343
+ - `.worktrees/`
344
+ - `node_modules/`
345
+ - `dist/`
346
+ - `build/`
347
+ - `coverage/`
348
+ - `.next/`
349
+
350
+ If the chosen state root lives inside the repo, Wazir skips indexing that path so it does not index its own artifacts.
351
+
352
+ ## Adapter stance
353
+
354
+ The built-in index is the default and required path.
355
+
356
+ The optional `context-mode` adapter remains:
357
+
358
+ - disabled by default
359
+ - external
360
+ - non-required for default install or test paths
361
+
362
+ See the adapter docs for current status and constraints.
363
+
364
+ ---
365
+ ## Source: docs/concepts/observability.md
366
+
367
+ # Observability
368
+
369
+ Wazir observability is file-based and host-native. All observability requires no external services.
370
+
371
+ ## Current observability surfaces
372
+
373
+ Implemented now:
374
+
375
+ - `wazir status --run <id> [--json]`
376
+ - canonical hook definitions for status, capture, compaction, and handoff events
377
+ - external state-root policy for run-local files
378
+ - `wazir capture init` for `status.json` and `events.ndjson` bootstrap
379
+ - `wazir capture event` for event append and status updates
380
+ - `wazir capture route` and `wazir capture output` for large-output artifact capture
381
+ - `wazir capture summary` for `summary.md` and stop-time or compaction summaries
382
+
383
+ Planned next:
384
+
385
+ - host-specific native-hook or wrapper wiring that calls the capture commands automatically
386
+
387
+ ## Current status path
388
+
389
+ The status command reads:
390
+
391
+ - `<state-root>/runs/<run-id>/status.json`
392
+
393
+ Use `--state-root <path>` to target a fixture or non-default state location.
394
+
395
+ The capture command family writes under:
396
+
397
+ - `<state-root>/runs/<run-id>/status.json`
398
+ - `<state-root>/runs/<run-id>/events.ndjson`
399
+ - `<state-root>/runs/<run-id>/summary.md`
400
+ - `<state-root>/runs/<run-id>/captures/*`
401
+
402
+ ## Design rules
403
+
404
+ - run-local observability lives outside the repo by default
405
+ - machine-readable status must exist without any server
406
+ - captured output should reduce context flooding, not increase it
407
+ - summaries must point back to captured files instead of pretending the full output stayed in context
408
+
409
+ ---
410
+ ## Source: docs/concepts/roles-and-workflows.md
411
+
412
+ # Roles and Workflows
413
+
414
+ Wazir defines explicit canonical roles and explicit phase workflows. Understanding why these exist and how they interact is key to using the system effectively.
415
+
416
+ ## Why roles?
417
+
418
+ Roles are isolation boundaries, not personas. Each role has defined inputs, allowed tools, required outputs, escalation rules, and failure conditions. An agent inside a role cannot write to protected paths, cannot skip required outputs, and must escalate when ambiguity conditions are met. The discipline is structural, not instructional.
419
+
420
+ Separating concerns into roles means that the entity implementing a task is never the same entity reviewing it. This adversarial separation is what makes quality enforcement structural rather than aspirational.
421
+
422
+ ## Why phases?
423
+
424
+ Phases are artifact checkpoints, not conversation stages. Every phase consumes a named artifact from the previous phase and produces a named artifact for the next. Nothing flows via conversation history. A session can end, a new agent can pick up the artifacts, and delivery continues — because the handoff is explicit, structured, and schema-validated.
425
+
426
+ ## The phase model
427
+
428
+ The canonical workflow sequence is:
429
+
430
+ 1. **clarify** — resolve ambiguity before committing to a spec
431
+ 2. **discover** — gather research and prior art
432
+ 3. **specify** — produce a measurable spec with acceptance criteria
433
+ 4. **spec-challenge** — adversarial review of the spec
434
+ 5. **author** — finalize content, microcopy, and i18n keys
435
+ 6. **design** — produce visual designs from the approved spec
436
+ 7. **design-review** — validate designs against spec, accessibility, and visual consistency
437
+ 8. **plan** — create an implementation plan from the approved spec and designs
438
+ 9. **plan-review** — adversarial review of the plan
439
+ 10. **execute** — implement the plan
440
+ 11. **verify** — QA hard gate with fresh proof
441
+ 12. **review** — adversarial quality review
442
+ 13. **learn** — capture scoped learnings
443
+ 14. **prepare-next** — produce a clean handoff for the next run
444
+
445
+ ## Role routing
446
+
447
+ The orchestrator dispatches three roles per task: `executor`, `reviewer`, and `verifier`. By default, all three run for every task. The `required_roles` field in a task's YAML frontmatter controls which roles are dispatched, allowing the orchestrator to skip unnecessary roles and save context window budget.
448
+
449
+ ### Auto-detection
450
+
451
+ The clarifier assigns `required_roles` based on task type:
452
+
453
+ | Task type | Required roles | Rationale |
454
+ |-----------|---------------|-----------|
455
+ | `feature` | `[executor, reviewer, verifier]` | Full pipeline |
456
+ | `bugfix` | `[executor, reviewer, verifier]` | Full pipeline |
457
+ | `refactor` | `[executor, reviewer, verifier]` | Full pipeline |
458
+ | `docs` | `[executor, verifier]` | No adversarial review needed |
459
+ | `config` | `[executor, verifier]` | No adversarial review needed |
460
+
461
+ If `security_critical: true`, `reviewer` is always included.
462
+
463
+ ### Constraints
464
+
465
+ - `verifier` is always present — it is the QA hard gate and cannot be removed
466
+ - Default when `required_roles` is absent: `[executor, reviewer, verifier]` (backward compatible)
467
+
468
+ ## Canonical source
469
+
470
+ Use the files under `roles/` and `workflows/` as the canonical source for role contracts and phase entrypoints. For exact role and workflow tables, see the [Roles Reference](../reference/roles-reference.md).
471
+
472
+ ---
473
+ ## Source: docs/concepts/terminology-policy.md
474
+
475
+ # Wazir Brand and Terminology Guide
476
+
477
+ ## Canonical Terms
478
+
479
+ Use these terms in all product surfaces:
480
+
481
+ - Wazir
482
+ - host-native engineering OS kit
483
+ - roles
484
+ - workflows
485
+ - skills
486
+ - hooks
487
+ - templates
488
+ - schemas
489
+ - research
490
+ - memory
491
+ - host exports
492
+
493
+ ## Terms That Do Not Describe This Product
494
+
495
+ Do not use terms that describe Wazir as a background service, a web-based control surface, or a long-running process. The product is a host-native kit, and all terminology should reflect that.
496
+
497
+ ## Rules
498
+
499
+ - Wazir is a host-native engineering OS kit, not a server or background service.
500
+ - Use the canonical terms above in all roles, workflows, skills, and documentation.
501
+ - When in doubt, describe what Wazir is, not what it is not.
502
+
503
+ ---
504
+ ## Source: docs/getting-started/01-installation.md
505
+
506
+ # Installation
507
+
508
+ ## Claude Code Plugin (recommended)
509
+
510
+ The fastest way to use Wazir. Two commands in Claude Code:
511
+
512
+ ```bash
513
+ /plugin marketplace add MohamedAbdallah-14/Wazir
514
+ /plugin install wazir
515
+ ```
516
+
517
+ Skills, roles, and workflows are now available in your Claude sessions. No files to copy, no exports needed.
518
+
519
+ ## Codex
520
+
521
+ Copy the generated host export to your project:
522
+
523
+ ```bash
524
+ git clone https://github.com/MohamedAbdallah-14/Wazir.git
525
+ cd wazir && npm install && npx wazir export build
526
+ cp exports/hosts/codex/AGENTS.md ~/your-project/
527
+ ```
528
+
529
+ ## Gemini
530
+
531
+ ```bash
532
+ git clone https://github.com/MohamedAbdallah-14/Wazir.git
533
+ cd wazir && npm install && npx wazir export build
534
+ cp exports/hosts/gemini/GEMINI.md ~/your-project/
535
+ ```
536
+
537
+ ## Cursor
538
+
539
+ ```bash
540
+ git clone https://github.com/MohamedAbdallah-14/Wazir.git
541
+ cd wazir && npm install && npx wazir export build
542
+ cp -r exports/hosts/cursor/.cursor ~/your-project/
543
+ ```
544
+
545
+ ## npm (global CLI)
546
+
547
+ ```bash
548
+ npm install -g @wazir-dev/cli
549
+ ```
550
+
551
+ The CLI provides validation, export, indexing, and doctor commands. You still need to clone the source to build host exports.
552
+
553
+ ## Homebrew (macOS)
554
+
555
+ ```bash
556
+ brew tap MohamedAbdallah-14/Wazir
557
+ brew install wazir
558
+ ```
559
+
560
+ ## From Source (contributors)
561
+
562
+ ```bash
563
+ git clone https://github.com/MohamedAbdallah-14/Wazir.git
564
+ cd wazir
565
+ npm ci
566
+ npx wazir doctor # verify environment
567
+ npm test # run test suite
568
+ ```
569
+
570
+ ## Verify
571
+
572
+ After any install method, verify with:
573
+
574
+ ```bash
575
+ npx wazir doctor
576
+ # PASS manifest: Manifest is valid.
577
+ # PASS hooks: Hook definitions are valid.
578
+ # PASS host-exports: All required host export directories exist.
579
+ ```
580
+
581
+ ## What's next
582
+
583
+ [Your First Run](02-first-run.md) — walk through the full pipeline from brief to shipped code.
584
+
585
+ ---
586
+ ## Source: docs/getting-started/02-first-run.md
587
+
588
+ # Your First Run
589
+
590
+ Walk through the full Wazir pipeline: describe a task, clarify it, execute with TDD, and review.
591
+
592
+ ## What you'll do
593
+
594
+ Take a vague requirement through the full pipeline and see what each role produces.
595
+
596
+ ## Prerequisites
597
+
598
+ - Wazir installed (see [Installation](01-installation.md))
599
+ - An AI host open in your project (Claude, Codex, Gemini, or Cursor)
600
+
601
+ ## Step 1: Describe your task
602
+
603
+ Tell your agent what you want to build. For example:
604
+
605
+ > "Add a user registration endpoint with email validation"
606
+
607
+ The clarifier role activates and reads your brief.
608
+
609
+ ## Step 2: Clarify
610
+
611
+ The clarifier asks questions and produces a structured spec with acceptance criteria. It escalates ambiguity — it never assumes.
612
+
613
+ **Expected output:**
614
+ - Acceptance criteria (testable, specific)
615
+ - Open questions resolved
616
+ - Scope boundaries defined
617
+ - Assumptions and non-goals listed
618
+
619
+ If the clarifier can't resolve ambiguity, it escalates to you rather than guessing.
620
+
621
+ ## Step 3: Spec Challenge (approval gate)
622
+
623
+ A reviewer (different from the clarifier) adversarially reviews the spec. The reviewer checks for gaps, contradictions, and unstated assumptions.
624
+
625
+ **Expected output:** Gate decision — APPROVED or REJECTED with specific reasons.
626
+
627
+ **Your action:** You must explicitly approve the spec before planning begins. If rejected, it loops back to clarify with the reviewer's feedback.
628
+
629
+ ## Step 4: Plan (approval gate)
630
+
631
+ The planner breaks the approved spec into ordered, testable tasks with dependencies.
632
+
633
+ The plan-review phase runs adversarial review on the plan — checking for missing edge cases, incorrect ordering, and scope creep.
634
+
635
+ **Expected output:** Task breakdown with:
636
+ - Implementation order and dependencies
637
+ - Test strategy per task
638
+ - Estimated complexity
639
+
640
+ **Your action:** You must explicitly approve the plan before execution begins.
641
+
642
+ ## Step 5: Execute
643
+
644
+ The executor implements each task with TDD:
645
+ 1. Write a failing test (RED)
646
+ 2. Write minimal code to pass (GREEN)
647
+ 3. Refactor while green (REFACTOR)
648
+ 4. Commit with conventional message
649
+
650
+ The composition engine loads role-specific expertise modules automatically — the executor gets modules on how to build, anti-patterns to avoid, and stack-specific guidance.
651
+
652
+ **Expected output:**
653
+ - Test files (failing → passing)
654
+ - Implementation code
655
+ - Conventional commits at each step
656
+
657
+ ## Step 6: Review
658
+
659
+ The reviewer (never the executor) performs adversarial review against the acceptance criteria from the spec.
660
+
661
+ **Expected output:** Review artifact with:
662
+ - Pass/fail per acceptance criterion
663
+ - Findings with severity and evidence
664
+ - Recommendation: APPROVE, REQUEST_CHANGES, or REJECT
665
+
666
+ ## Step 7: Learn
667
+
668
+ The learner captures what worked and what didn't. Proposed learnings go to `memory/learnings/proposed/` and require explicit review before promotion.
669
+
670
+ Only learnings whose file patterns overlap the current task are loaded in future runs — the system gets smarter per-project without drifting.
671
+
672
+ **Expected output:** Proposed learnings with scope tags.
673
+
674
+ ## Under the hood
675
+
676
+ The 7 steps above map to 14 internal phases:
677
+
678
+ | User Stage | Internal Phases | Roles |
679
+ |------------|----------------|-------|
680
+ | **Clarify** | clarify → discover → specify → spec-challenge | clarifier, researcher, specifier, reviewer |
681
+ | **Execute** | author → design → design-review → plan → plan-review → execute → verify | content-author, designer, planner, executor, verifier |
682
+ | **Review** | review | reviewer |
683
+ | **Learn** | learn → prepare-next | learner |
684
+
685
+ ## What's next
686
+
687
+ - [Architecture](../concepts/architecture.md) — understand why Wazir works this way
688
+ - [Roles & Workflows](../concepts/roles-and-workflows.md) — deep dive into role contracts
689
+ - [Composition Engine](../concepts/composition-engine.md) — how expertise modules are loaded
690
+
691
+ ---
692
+ ## Source: docs/guides/memory-and-learnings.md
693
+
694
+ # Memory and Learnings
695
+
696
+ Wazir keeps learning durable but scoped.
697
+
698
+ ## Memory Layout
699
+
700
+ - `memory/learnings/proposed/`
701
+ - `memory/learnings/accepted/`
702
+ - `memory/learnings/archived/`
703
+ - `memory/experiments/`
704
+ - `memory/anti-pattern-observations/`
705
+ - `memory/summaries/`
706
+
707
+ ## Rules
708
+
709
+ - new learnings start as proposed
710
+ - accepted learnings require explicit review and scope tags
711
+ - fresh runs do not auto-load learnings by default
712
+ - experiments must record whether they improved, regressed, or were neutral
713
+ - every learning or experiment must cite the artifacts or verification that justify it
714
+ - stale proposed learnings should be archived instead of silently lingering as pending truth
715
+
716
+ ## Guardrails
717
+
718
+ - do not silently rewrite canonical guidance from a learning
719
+ - do not broaden a learning beyond its proven scope
720
+ - archive stale or disproven learnings instead of letting them drift
721
+
722
+ ## Promotion Path
723
+
724
+ 1. Capture a proposed learning with scope, evidence, and confidence.
725
+ 2. Review it explicitly.
726
+ 3. Promote it to `memory/learnings/accepted/` only when the scope and evidence are durable.
727
+ 4. Move disproven or obsolete learnings to `memory/learnings/archived/`.
728
+
729
+ ---
730
+ ## Source: docs/guides/troubleshooting.md
731
+
732
+ # Troubleshooting
733
+
734
+ This guide covers the Wazir CLI and host-native tooling surface.
735
+
736
+ ## `wazir validate manifest` fails
737
+
738
+ Common causes:
739
+
740
+ - required canonical paths are missing
741
+ - a manifest path resolves outside the project root
742
+ - manifest fields no longer match `schemas/wazir-manifest.schema.json`
743
+
744
+ What to check:
745
+
746
+ - `wazir.manifest.yaml`
747
+ - `schemas/wazir-manifest.schema.json`
748
+ - directory names under the repo root
749
+
750
+ ## `wazir validate hooks` fails
751
+
752
+ Common causes:
753
+
754
+ - hook YAML parses to `null` or another non-object shape
755
+ - hook file name and `id` do not match
756
+ - required hooks in the manifest do not match files in `hooks/definitions/`
757
+ - a host fallback entry is missing for one of the declared hosts
758
+
759
+ What to check:
760
+
761
+ - `hooks/definitions/*.yaml`
762
+ - `schemas/hook.schema.json`
763
+ - `wazir.manifest.yaml`
764
+
765
+ ## `wazir index build` or `refresh` does not index what you expect
766
+
767
+ Current ignore rules skip common generated or dependency trees such as:
768
+
769
+ - `.git/`
770
+ - `.worktrees/`
771
+ - `node_modules/`
772
+ - `dist/`
773
+ - `build/`
774
+ - `coverage/`
775
+ - `.next/`
776
+
777
+ Also note:
778
+
779
+ - only the current built-in text/code extractor set is indexed
780
+ - the chosen state root is skipped if it lives inside the repo
781
+ - use `--state-root <path>` in tests or custom setups
782
+
783
+ ## `wazir recall file` or `recall symbol` fails
784
+
785
+ Common causes:
786
+
787
+ - the index was never built
788
+ - the file or symbol is not present in the current index
789
+ - the wrong state root is being queried
790
+
791
+ Recommended sequence:
792
+
793
+ 1. `wazir index build --state-root <path>`
794
+ 2. `wazir index stats --state-root <path>`
795
+ 3. `wazir index search-symbols <query> --state-root <path>`
796
+ 4. retry the recall command with the same state root
797
+
798
+ ## `wazir doctor` fails
799
+
800
+ Current doctor checks:
801
+
802
+ - manifest validation
803
+ - hook validation
804
+ - external default state-root policy
805
+ - required host export directories under `exports/hosts/`
806
+
807
+ If doctor fails, inspect the returned check list and fix the specific failing surface instead of bypassing the command.
808
+
809
+ ## Guard hook blocks a write or loop
810
+
811
+ Current guard wrapper exit codes:
812
+
813
+ - `42` from `hooks/protected-path-write-guard`
814
+ - `43` from `hooks/loop-cap-guard`
815
+
816
+ Typical causes:
817
+
818
+ - trying to write under `input/` or generated host export paths without an approved regeneration flow
819
+ - phase loop counts in run status already meeting the configured cap
820
+
821
+ ## `wazir status --run <id>` fails
822
+
823
+ The status command reads:
824
+
825
+ - `<state-root>/runs/<run-id>/status.json`
826
+
827
+ If it says the run status is missing:
828
+
829
+ - confirm the run ID
830
+ - confirm the state root
831
+ - confirm the file exists on disk
832
+ - use `--json` for machine-readable output during automation
833
+
834
+ ---
835
+ ## Source: docs/reference/configuration-reference.md
836
+
837
+ # Configuration Reference
838
+
839
+ Wazir configuration currently starts from the canonical manifest:
840
+
841
+ - `wazir.manifest.yaml`
842
+
843
+ That manifest is the source of truth for:
844
+
845
+ - project identity
846
+ - project description and versioning policy
847
+ - canonical repo paths
848
+ - supported hosts
849
+ - canonical workflows and export targets
850
+ - phase and role rosters
851
+ - required hooks
852
+ - protected paths
853
+ - brand-term enforcement for active surfaces
854
+ - optional adapters
855
+ - validation checks
856
+
857
+ ## Path policy
858
+
859
+ Repo-managed canonical paths live in the repository:
860
+
861
+ - `input/`
862
+ - `roles/`
863
+ - `workflows/`
864
+ - `skills/`
865
+ - `hooks/`
866
+ - `templates/`
867
+ - `schemas/`
868
+ - `expertise/`
869
+ - `docs/`
870
+ - `exports/`
871
+ - `tooling/`
872
+ - `memory/`
873
+ - `examples/`
874
+
875
+ The default external run-state root is declared in the manifest as:
876
+
877
+ - `~/.wazir/projects/{project_slug}`
878
+
879
+ That path is intentionally outside the repo so normal runs do not dirty adopters' worktrees.
880
+
881
+ Indexing and recall commands also accept:
882
+
883
+ - `--state-root <path>`
884
+
885
+ Use that override for tests, CI fixtures, or operators who need the index somewhere else.
886
+
887
+ The status command uses the same state-root resolution rules when reading run-local status files.
888
+
889
+ ## Protected paths
890
+
891
+ The current protected path roster is declared in `wazir.manifest.yaml`:
892
+
893
+ - `input`
894
+ - `roles`
895
+ - `workflows`
896
+ - `schemas`
897
+ - `exports/hosts`
898
+
899
+ These paths are reserved for canonical source material or generated host exports and should not be rewritten by ad hoc task output.
900
+
901
+ Generated host packages live under:
902
+
903
+ - `exports/hosts/claude`
904
+ - `exports/hosts/codex`
905
+ - `exports/hosts/gemini`
906
+ - `exports/hosts/cursor`
907
+
908
+ ## Dependency policy
909
+
910
+ The active CLI keeps runtime dependencies small and explicit:
911
+
912
+ - `ajv` for JSON Schema enforcement
913
+ - `yaml` for canonical manifest and hook parsing
914
+ - `gray-matter` for frontmatter parsing in library tests
915
+
916
+ Policy:
917
+
918
+ - prefer built-in Node APIs unless a library meaningfully reduces correctness risk
919
+ - allow small parsing and schema-validation libraries
920
+ - do not add framework, server, or web-stack dependencies to the product surface
921
+ - keep optional adapter integrations external by default
922
+
923
+ ## Adapter policy
924
+
925
+ The manifest currently declares one optional adapter:
926
+
927
+ - `context_mode`
928
+
929
+ It is:
930
+
931
+ - disabled by default
932
+ - optional
933
+ - external-install mode
934
+
935
+ Wazir must remain useful without the adapter present.
936
+
937
+ ## Versioning and naming guardrails
938
+
939
+ The manifest also records:
940
+
941
+ - a versioning policy for the active pre-`1.0` line
942
+ - export targets for each supported host
943
+ - brand-term enforcement rules for active surfaces
944
+ - `manifest_version`, currently `2`, for breaking manifest contract changes
945
+
946
+ Those fields exist to keep the active repo aligned with the Wazir product identity.
947
+
948
+ The required manifest fields are:
949
+
950
+ - `project.description`
951
+ - `versioning_policy`
952
+ - `workflows`
953
+ - `export_targets`
954
+ - `prohibited_terms`
955
+
956
+ Current enforcement scope:
957
+
958
+ - manifest-declared role files under `roles/`
959
+ - manifest-declared workflow files under `workflows/`
960
+
961
+ That scope is intentional. The manifest check is a canonical-surface guard for active operating-model content, not a blanket full-repo grep.
962
+
963
+ Out of scope for this manifest check:
964
+
965
+ - undeclared helper scripts
966
+ - undeclared config files
967
+ - scratch files
968
+ - generated run artifacts
969
+
970
+ Maintainers are responsible for policing those surfaces with the separate docs-truth, runtime-surface, and repository review checks.
971
+
972
+ ## Workflows vs phases
973
+
974
+ - `phases` are the core lifecycle states of the operating model.
975
+ - `workflows` are the canonical callable or review-gated entrypoints that drive those phases.
976
+
977
+ They overlap heavily, but they are not identical:
978
+
979
+ - `spec_challenge`, `plan_review`, and `prepare_next` are workflows that sit between or around the core execution phases.
980
+ - Validators and exports should treat manifest-declared workflows as the canonical workflow file roster.
981
+
982
+ ## Current index parser roster
983
+
984
+ The active manifest currently declares built-in heuristic extractors for:
985
+
986
+ - JavaScript
987
+ - TypeScript
988
+ - Python
989
+ - Go
990
+ - Rust
991
+ - Java
992
+ - SQL
993
+ - JSON
994
+ - YAML
995
+ - Markdown
996
+
997
+ ---
998
+ ## Source: docs/reference/expertise-index.md
999
+
1000
+ # Expertise Index
1001
+
1002
+ This reference documents the expertise module system and anti-pattern catalog.
1003
+
1004
+ ## Metadata
1005
+
1006
+ Top-level expertise metadata lives in:
1007
+
1008
+ - `expertise/index.yaml`
1009
+
1010
+ That index records domain, use cases, review applicability, and freshness date so loading can stay scoped instead of brute-force.
1011
+
1012
+ ## Module locations
1013
+
1014
+ - Domain expertise modules: `expertise/` (organized by domain subdirectory)
1015
+ - Anti-pattern modules: `expertise/antipatterns/`
1016
+ - Research source material: `docs/research/`
1017
+
1018
+ ## Loading policy
1019
+
1020
+ | Phase | Loads from |
1021
+ |-------|-----------|
1022
+ | `clarify`, `discover` | `input/`, active docs, `docs/research/` |
1023
+ | `specify`, `plan` | Relevant expertise slices based on stack and risks |
1024
+ | `review` | `expertise/antipatterns/` first, then broader domain modules |
1025
+ | `learn` | Can propose updates to expertise (not silently rewrite) |
1026
+
1027
+ ## Anti-pattern catalog
1028
+
1029
+ The `expertise/antipatterns/` directory contains modules that catch:
1030
+
1031
+ - **Fake completion** — claiming done without evidence
1032
+ - **Unwired abstractions** — interfaces defined but never connected
1033
+ - **Shallow tests** — tests that pass without exercising real behavior
1034
+ - **Security theater** — security measures that look good but do not protect
1035
+ - **Architecture drift** — implementation diverging from documented architecture
1036
+ - **AI-coding failure modes** — patterns specific to LLM-generated code
1037
+
1038
+ ## Humanize domain
1039
+
1040
+ The `expertise/humanize/` domain provides AI text pattern detection and removal. It contains 7 modules: vocabulary blacklist (61 items), sentence patterns (24-pattern taxonomy), domain-specific rules for technical docs, code artifacts, and user-facing content, and a two-pass self-audit checklist.
1041
+
1042
+ **Loading policy:** Loads for `specify`, `plan`, `execute`, `author`, `review`, and `learn` phases -- broader than most domains because all text-producing roles generate content that benefits from humanization. Loaded via the `humanize` concern in `expertise/composition-map.yaml` with role-specific module selection.
1043
+
1044
+ ## Rules
1045
+
1046
+ - Expertise modules must be scoped by domain and use case
1047
+ - Anti-patterns are always loaded before domain modules during review
1048
+ - The composition engine enforces a maximum of 15 modules per dispatch
1049
+ - Token budget is enforced per dispatch
1050
+
1051
+ For conceptual understanding of how the composition engine works, see [Composition Engine](../concepts/composition-engine.md).
1052
+
1053
+ ---
1054
+ ## Source: docs/reference/git-flow.md
1055
+
1056
+ # Git-Flow Policy
1057
+
1058
+ This document defines the branching model, merge discipline, and changelog rules for the Wazir project.
1059
+
1060
+ ## Branching Model
1061
+
1062
+ | Branch | Pattern | Created From | Merges To | Protected |
1063
+ |--------|---------|-------------|-----------|-----------|
1064
+ | Main | `main` | — | — | Yes |
1065
+ | Develop | `develop` | `main` (once) | — | Yes |
1066
+ | Feature | `feat/<slug>` or `feature/<slug>` | `develop` | `develop` | No |
1067
+ | Codex | `codex/<slug>` | `develop` | `develop` | No |
1068
+ | Release | `release/<version>` | `develop` | `main` + `develop` | No |
1069
+ | Hotfix | `hotfix/<slug>` | `main` | `main` + `develop` | No |
1070
+
1071
+ ## Merge Rules
1072
+
1073
+ - All merges to `develop` and `main` use `--no-ff` to preserve merge commits
1074
+ - Merges happen only after the full Executor, Verifier, Reviewer gate passes
1075
+ - No role performs the merge — it is a post-review integration step
1076
+
1077
+ ## Conventional Commits
1078
+
1079
+ All commit messages must follow the conventional commits specification:
1080
+
1081
+ ```
1082
+ <type>(<optional scope>): <description>
1083
+ ```
1084
+
1085
+ Allowed types: `feat`, `fix`, `docs`, `chore`, `refactor`, `test`, `ci`, `perf`, `build`
1086
+
1087
+ ## Changelog Rules
1088
+
1089
+ - Format: Keep a Changelog (keepachangelog.com)
1090
+ - Every user-facing change must have an entry under `[Unreleased]`
1091
+ - Valid categories: Added, Changed, Deprecated, Removed, Fixed, Security
1092
+ - The executor updates the changelog; the verifier validates it; the reviewer flags quality issues
1093
+
1094
+ ## Enforcement
1095
+
1096
+ - **Tooling:** `wazir validate branches`, `wazir validate commits`, `wazir validate changelog`
1097
+ - **CI:** All three validators run on pull requests; `--require-entries` blocks feature/codex/hotfix branches without changelog entries
1098
+ - **Roles:** Each role has documented git-flow responsibilities in its contract
1099
+
1100
+ ---
1101
+ ## Source: docs/reference/hooks.md
1102
+
1103
+ # Hooks Reference
1104
+
1105
+ Wazir defines canonical hook contracts in `hooks/definitions/*.yaml`.
1106
+
1107
+ These hook definitions are product contracts first. Host-specific native hooks or wrapper commands must preserve the same behavior.
1108
+
1109
+ ## Canonical hook roster
1110
+
1111
+ | Hook ID | Purpose | Failure mode |
1112
+ | --- | --- | --- |
1113
+ | `session_start` | Initialize run-local status capture and bootstrap summaries | capture |
1114
+ | `pre_tool_capture_route` | Route large tool output away from model context | warn |
1115
+ | `post_tool_capture` | Append tool execution events and captured output metadata | capture |
1116
+ | `pre_compact_summary` | Summarize captured state before compaction or handoff | warn |
1117
+ | `stop_handoff_harvest` | Persist final handoff and stop-time observability data | capture |
1118
+ | `protected_path_write_guard` | Block writes to protected canonical paths outside approved flows | block |
1119
+ | `loop_cap_guard` | Block extra iterations after the configured loop cap | block |
1120
+
1121
+ ## Source of truth
1122
+
1123
+ - hook contracts: `hooks/definitions/*.yaml`
1124
+ - schema: `schemas/hook.schema.json`
1125
+ - required hook roster: `wazir.manifest.yaml`
1126
+ - validation command: `wazir validate hooks`
1127
+
1128
+ ## Host fallback policy
1129
+
1130
+ Every canonical hook definition includes `host_fallback` guidance for:
1131
+
1132
+ - Claude
1133
+ - Codex
1134
+ - Gemini
1135
+ - Cursor
1136
+
1137
+ Fallbacks may be native hooks or wrapper commands, but they must preserve:
1138
+
1139
+ - the same trigger intent
1140
+ - the same protected-path policy
1141
+ - the same loop-cap policy
1142
+ - the same observable outputs or an explicitly documented equivalent
1143
+
1144
+ ## Current implementation status
1145
+
1146
+ Implemented now:
1147
+
1148
+ - canonical hook definitions and schema validation
1149
+ - manifest-level required hook roster
1150
+ - CLI validation through `wazir validate hooks`
1151
+ - capture/status file writers through:
1152
+ - `wazir capture init`
1153
+ - `wazir capture event`
1154
+ - `wazir capture route`
1155
+ - `wazir capture output`
1156
+ - `wazir capture summary`
1157
+ - wrapper guard scripts:
1158
+ - `hooks/protected-path-write-guard`
1159
+ - `hooks/loop-cap-guard`
1160
+ - session-start CLI bootstrap script (`hooks/session-start`) emitting `<cli-bootstrap-guidance>` for doctor, index, and run recovery
1161
+
1162
+ Planned next:
1163
+
1164
+ - wrapper/native execution helpers
1165
+
1166
+ ## CLI bootstrap
1167
+
1168
+ The `session_start` hook emits a `<cli-bootstrap-guidance>` block alongside the skill bootstrap text. This block guides agents through a 3-step CLI bootstrap sequence at the start of every session:
1169
+
1170
+ 1. **Doctor check** -- run `wazir doctor` to validate the repo surface (manifest, hooks, state-root, exports)
1171
+ 2. **Index refresh** -- run `wazir index refresh` (or `index build` if no index exists) to ensure the local index is current
1172
+ 3. **Run recovery** -- check `<state-root>/runs/latest` for a prior run ID; resume it or start a new run via `capture init`
1173
+
1174
+ The `session_start.yaml` output contract produces `cli_bootstrap_guidance` alongside `skill_bootstrap_text`. Both are injected into the agent's initial context.
1175
+
1176
+ The bootstrap sequence is advisory -- it guides the agent but does not enforce execution order. The session-start hook always exits 0 to avoid blocking session startup.
1177
+
1178
+ ## Guardrail note
1179
+
1180
+ Hook definitions are the authoritative product contracts. The canonical definitions above take precedence over any other hook documentation.
1181
+
1182
+ ## Current guard exit codes
1183
+
1184
+ - `hooks/protected-path-write-guard`
1185
+ - `0` allow
1186
+ - `42` block
1187
+ - `hooks/loop-cap-guard`
1188
+ - `0` allow
1189
+ - `43` block
1190
+
1191
+ ---
1192
+ ## Source: docs/reference/host-exports.md
1193
+
1194
+ # Host Exports
1195
+
1196
+ Wazir now includes a canonical export compiler for host packages under:
1197
+
1198
+ - `exports/hosts/claude/`
1199
+ - `exports/hosts/codex/`
1200
+ - `exports/hosts/gemini/`
1201
+ - `exports/hosts/cursor/`
1202
+
1203
+ ## Current commands
1204
+
1205
+ - `wazir export build`
1206
+ - `wazir export --check`
1207
+
1208
+ ## What `build` does
1209
+
1210
+ The compiler currently:
1211
+
1212
+ - validates the manifest
1213
+ - validates canonical hook definitions
1214
+ - reads canonical role files
1215
+ - reads canonical workflow files
1216
+ - writes host-specific package files under `exports/hosts/*`
1217
+ - writes `host-package.json`
1218
+ - writes `export.manifest.json`
1219
+ - records source hashes for drift detection
1220
+
1221
+ ## What `--check` does
1222
+
1223
+ The drift check:
1224
+
1225
+ - verifies the generated package metadata exists for every host
1226
+ - verifies the listed generated files still exist
1227
+ - compares current source hashes against each host export manifest
1228
+ - fails non-zero when canonical sources changed after the last export
1229
+
1230
+ ## Current host package shapes
1231
+
1232
+ Current generated highlights:
1233
+
1234
+ - Claude: `CLAUDE.md`, `.claude/settings.json`, `.claude/agents/*`, `.claude/commands/*`
1235
+ - Codex: `AGENTS.md`
1236
+ - Gemini: `GEMINI.md`
1237
+ - Cursor: `.cursor/rules/wazir-core.mdc`, `.cursor/hooks.json`
1238
+
1239
+ ## Scope note
1240
+
1241
+ The compiler generates the canonical host packages under `exports/hosts/*`.
1242
+
1243
+ The only root host bootstrap retained is `.claude/settings.json`, which mirrors the generated Claude settings contract.
1244
+
1245
+ ---
1246
+ ## Source: docs/reference/launch-checklist.md
1247
+
1248
+ # Discovery and Launch Checklist
1249
+
1250
+ End-to-end checklist for launching a Wazir release into the wild.
1251
+
1252
+ ---
1253
+
1254
+ ## 1. Pre-Launch Verification
1255
+
1256
+ Complete these before any public announcement:
1257
+
1258
+ - [ ] **npx works:** Run `npx @wazir-dev/cli --version` from a clean machine (no local clone).
1259
+ - [ ] **GitHub Release exists:** A tagged release with release notes is published on the repo.
1260
+ - [ ] **README polished:** README.md has clear install instructions, feature summary, and badges (npm version, license, CI status).
1261
+ - [ ] **CHANGELOG updated:** Latest version entry is present with all notable changes.
1262
+ - [ ] **CI green:** All tests and linting pass on the main branch.
1263
+ - [ ] **Marketplace configs published:** All automated channels from the marketplace listings guide are live (Claude Code Plugin).
1264
+ - [ ] **Host exports current:** `exports/hosts/` directories contain the latest generated configs for all supported hosts.
1265
+ - [ ] **License file present:** `LICENSE` matches the declared license in `package.json`.
1266
+
1267
+ ---
1268
+
1269
+ ## 2. Awesome List Submissions
1270
+
1271
+ Submit pull requests to these curated lists (one PR per list, follow each repo's contributing guidelines):
1272
+
1273
+ ### awesome-claude-code
1274
+ - **Repo:** `github.com/anthropics/awesome-claude-code` (or the most-starred community fork)
1275
+ - **Section:** Tools / Plugins / Extensions
1276
+ - **Entry format:** `[Wazir](https://github.com/MohamedAbdallah-14/Wazir) - Host-native engineering OS kit with 10 roles, 14 phases, and 308 expertise modules.`
1277
+ - **Tips:** Keep the description under 120 characters. Link directly to the repo.
1278
+
1279
+ ### awesome-ai-agents
1280
+ - **Repo:** `github.com/e2b-dev/awesome-ai-agents`
1281
+ - **Section:** Developer Tools / Coding Agents
1282
+ - **Entry format:** Follow the existing table format in the README.
1283
+
1284
+ ### awesome-llm-apps
1285
+ - **Repo:** `github.com/Shubhamsaboo/awesome-llm-apps`
1286
+ - **Section:** Developer Tools
1287
+ - **Entry format:** Follow the existing list format.
1288
+
1289
+ ---
1290
+
1291
+ ## 3. Hacker News "Show HN"
1292
+
1293
+ ### Timing
1294
+ - **Best days:** Tuesday through Thursday
1295
+ - **Best time:** 8:00-9:00 AM ET (when the US East Coast audience is waking up)
1296
+ - **Avoid:** Weekends, holidays, and days with major tech news
1297
+
1298
+ ### Title format
1299
+ ```
1300
+ Show HN: Wazir – Engineering OS kit for AI coding agents (Claude, Codex, Gemini, Cursor)
1301
+ ```
1302
+
1303
+ ### First comment
1304
+ Post a comment immediately after submission explaining:
1305
+ 1. What problem Wazir solves (AI agents lack structured engineering workflows)
1306
+ 2. How it works (10 canonical roles, 14-phase pipeline, 308 expertise modules)
1307
+ 3. What makes it different (host-native, works across Claude/Codex/Gemini/Cursor)
1308
+ 4. Quick install: `npx @wazir-dev/cli init`
1309
+ 5. Invite feedback -- HN readers appreciate genuine requests for input
1310
+
1311
+ ### Guidelines
1312
+ - Do not ask for upvotes (against HN rules).
1313
+ - Respond to every comment within the first 2 hours.
1314
+ - Be honest about limitations and what is not yet built.
1315
+
1316
+ ---
1317
+
1318
+ ## 4. Dev.to Technical Post
1319
+
1320
+ ### Suggested outline
1321
+
1322
+ **Title:** "How I Built an Engineering OS for AI Coding Agents"
1323
+
1324
+ 1. **Hook** -- The problem: AI agents write code but lack engineering discipline.
1325
+ 2. **Architecture overview** -- 10 roles, 14 phases, expertise modules, quality gates.
1326
+ 3. **Code walkthrough** -- Show a real workflow: how a feature moves from requirements through TDD to deployment.
1327
+ 4. **Host-native approach** -- Explain why one kit works across Claude, Codex, Gemini, and Cursor.
1328
+ 5. **Results** -- Concrete metrics or before/after comparisons.
1329
+ 6. **Getting started** -- `npx @wazir-dev/cli init` with a 3-step quickstart.
1330
+ 7. **Call to action** -- Star the repo, try it, file issues.
1331
+
1332
+ ### Tags
1333
+ `ai`, `productivity`, `devtools`, `opensource`
1334
+
1335
+ ### Tips
1336
+ - Include at least one diagram or screenshot.
1337
+ - Cross-post to your blog if you have one (Dev.to supports canonical URLs).
1338
+ - Respond to all comments within 24 hours.
1339
+
1340
+ ---
1341
+
1342
+ ## 5. Social Media
1343
+
1344
+ ### Twitter / X Thread
1345
+
1346
+ Structure as a 5-7 tweet thread:
1347
+
1348
+ 1. **Hook tweet:** One-liner about the problem + link to repo.
1349
+ 2. **What it is:** Brief description of Wazir.
1350
+ 3. **Architecture:** 10 roles, 14 phases, 308 modules (include a diagram image).
1351
+ 4. **Demo:** Short GIF or screenshot of a workflow in action.
1352
+ 5. **Multi-host:** Works with Claude, Codex, Gemini, and Cursor.
1353
+ 6. **Install:** `npx @wazir-dev/cli init`
1354
+ 7. **Ask:** "What workflows would you add?" -- invite engagement.
1355
+
1356
+ **Timing:** Post between 9-11 AM ET on weekdays.
1357
+
1358
+ ### LinkedIn
1359
+
1360
+ - Write a single long-form post (not a thread).
1361
+ - Lead with the problem, not the product.
1362
+ - Include 3-5 bullet points on key features.
1363
+ - End with the install command and repo link.
1364
+ - Tag relevant people and companies (Anthropic, OpenAI, Google DeepMind).
1365
+
1366
+ ### Reddit
1367
+
1368
+ Submit to these subreddits (read each sub's rules first):
1369
+
1370
+ | Subreddit | Post type | Notes |
1371
+ |-----------|-----------|-------|
1372
+ | r/ClaudeAI | Link post | Flair as "Tool/Resource" if available |
1373
+ | r/LocalLLaMA | Text post | Emphasize the open-source, host-agnostic angle |
1374
+ | r/programming | Link post | Focus on engineering discipline, not AI hype |
1375
+ | r/devtools | Link post | Emphasize developer productivity |
1376
+
1377
+ **Reddit guidelines:**
1378
+ - Do not post to multiple subreddits on the same day (looks spammy).
1379
+ - Space posts 1-2 days apart.
1380
+ - Engage genuinely with all comments.
1381
+ - Do not use marketing language -- be technical and direct.
1382
+
1383
+ ---
1384
+
1385
+ ## 6. Metrics to Track
1386
+
1387
+ Monitor these metrics weekly for the first month, then monthly:
1388
+
1389
+ ### GitHub
1390
+ - **Stars:** Track weekly growth rate, not just total.
1391
+ - **Forks:** Indicator of serious users exploring the code.
1392
+ - **Issues opened:** Both bugs and feature requests signal engagement.
1393
+ - **Pull requests:** External PRs indicate community adoption.
1394
+ - **Clones and traffic:** Available in the repo Insights tab.
1395
+
1396
+ ### npm
1397
+ - **Weekly downloads:** Available at `npmjs.com/package/@wazir-dev/cli`.
1398
+ - **Download trend:** Use `npm-stat.com` for historical charts.
1399
+ - **Dependent packages:** Other packages that list Wazir as a dependency.
1400
+
1401
+ ### Marketplace
1402
+ - **Claude Code Plugin installs:** Check plugin analytics if available.
1403
+ - **MCP Registry page views:** Monitor via registry dashboard.
1404
+ - **Cursor Marketplace installs:** Available in the Cursor publisher dashboard.
1405
+
1406
+ ### Content
1407
+ - **HN points and comments:** Track within 24 hours of posting.
1408
+ - **Dev.to views, reactions, and comments:** Track within 1 week.
1409
+ - **Twitter impressions and engagement:** Track within 48 hours.
1410
+ - **Reddit upvotes and comments:** Track within 48 hours per subreddit.
1411
+
1412
+ ### Success benchmarks (first 30 days)
1413
+ | Metric | Target |
1414
+ |--------|--------|
1415
+ | GitHub stars | 100+ |
1416
+ | npm weekly downloads | 50+ |
1417
+ | Issues opened (external) | 10+ |
1418
+ | External PRs | 2+ |
1419
+ | HN points | 50+ |
1420
+
1421
+ ---
1422
+ ## Source: docs/reference/marketplace-listings.md
1423
+
1424
+ # Marketplace Listings Guide
1425
+
1426
+ This guide covers every distribution channel for Wazir.
1427
+
1428
+ ---
1429
+
1430
+ ## Install Methods
1431
+
1432
+ ### npm (primary)
1433
+
1434
+ ```bash
1435
+ npx @wazir-dev/cli --help # run directly
1436
+ npm install -g @wazir-dev/cli # or install globally
1437
+ ```
1438
+
1439
+ - **Package:** [`@wazir-dev/cli`](https://www.npmjs.com/package/@wazir-dev/cli)
1440
+
1441
+ ### Homebrew (macOS)
1442
+
1443
+ ```bash
1444
+ brew tap MohamedAbdallah-14/Wazir
1445
+ brew install wazir
1446
+ ```
1447
+
1448
+ - **Tap repo:** [`homebrew-wazir`](https://github.com/MohamedAbdallah-14/homebrew-wazir)
1449
+ - **Formula source:** `homebrew/wazir.rb` in this repo
1450
+
1451
+ ### Claude Code Plugin
1452
+
1453
+ Wazir ships as a Claude Code plugin. Users install in two steps:
1454
+
1455
+ ```bash
1456
+ # In Claude Code:
1457
+ /plugin marketplace add MohamedAbdallah-14/Wazir
1458
+ /plugin install wazir
1459
+ ```
1460
+
1461
+ - **Marketplace config:** `.claude-plugin/marketplace.json`
1462
+ - **Plugin manifest:** `.claude-plugin/plugin.json`
1463
+ - **Docs:** [Claude Code plugin marketplaces](https://code.claude.com/docs/en/plugin-marketplaces)
1464
+
1465
+ ---
1466
+
1467
+ ## Host Exports
1468
+
1469
+ Wazir generates host-native packages for each AI coding agent. After cloning and running `npx wazir export build`, deploy to your project:
1470
+
1471
+ | Host | Deploy command |
1472
+ |------|---------------|
1473
+ | **Claude** | `cp -r exports/hosts/claude/.claude ~/your-project/ && cp exports/hosts/claude/CLAUDE.md ~/your-project/` |
1474
+ | **Codex** | `cp exports/hosts/codex/AGENTS.md ~/your-project/` |
1475
+ | **Gemini** | `cp exports/hosts/gemini/GEMINI.md ~/your-project/` |
1476
+ | **Cursor** | `cp -r exports/hosts/cursor/.cursor ~/your-project/` |
1477
+
1478
+ ---
1479
+
1480
+ ## MCP Registry
1481
+
1482
+ Wazir is listed in the MCP Registry as a metadata entry.
1483
+
1484
+ - **Config file:** `server.json` (repo root)
1485
+ - **Schema:** `https://registry.modelcontextprotocol.io/schema/server.json`
1486
+
1487
+ ---
1488
+
1489
+ ## Post-Publish Checklist
1490
+
1491
+ Run through this checklist after every `npm publish`:
1492
+
1493
+ - [ ] **npm:** Confirm package is live at `https://www.npmjs.com/package/@wazir-dev/cli`
1494
+ - [ ] **npx smoke test:** Run `npx @wazir-dev/cli --help` from a clean environment
1495
+ - [ ] **Claude Code Plugin:** Run `/plugin marketplace add MohamedAbdallah-14/Wazir` then `/plugin install wazir`
1496
+ - [ ] **GitHub Release:** Ensure a GitHub Release exists with tag matching the npm version
1497
+ - [ ] **Homebrew:** Update SHA256 in `homebrew/wazir.rb` and push to `homebrew-wazir` tap repo
1498
+ - [ ] **Host exports:** Run `npx wazir export --check` to verify no drift
1499
+ - [ ] **CHANGELOG:** Verify `CHANGELOG.md` is updated with the new version entry
1500
+
1501
+ ---
1502
+ ## Source: docs/reference/release-process.md
1503
+
1504
+ # Release Process
1505
+
1506
+ ## Tag Naming
1507
+
1508
+ Wazir uses semantic versioning: `v{MAJOR}.{MINOR}.{PATCH}`
1509
+
1510
+ Legacy tags (V5.1, V6.x, etc.) are historical artifacts and are ignored by validators.
1511
+
1512
+ ## Release Workflow
1513
+
1514
+ 1. Create `release/<version>` branch from `develop`
1515
+ 2. Update `CHANGELOG.md`: move `[Unreleased]` entries to `[<version>] - YYYY-MM-DD`
1516
+ 3. Add a fresh empty `[Unreleased]` section at the top
1517
+ 4. Update version in `wazir.manifest.yaml` and `package.json`
1518
+ 5. Commit: `chore: prepare release <version>`
1519
+ 6. Merge to `main` with `--no-ff`
1520
+ 7. Tag: `git tag -a v<version> -m "v<version>"`
1521
+ 8. Merge `main` back to `develop` with `--no-ff`
1522
+ 9. Delete the release branch
1523
+
1524
+ ## Hotfix Workflow
1525
+
1526
+ 1. Create `hotfix/<slug>` branch from `main`
1527
+ 2. Fix the issue with conventional commits
1528
+ 3. Update `CHANGELOG.md` with the fix under `[Unreleased]`
1529
+ 4. Follow the same merge/tag/merge-back pattern as releases
1530
+ 5. Delete the hotfix branch
1531
+
1532
+ ## Bootstrap (First Wazir Release)
1533
+
1534
+ When no Wazir release tag exists yet:
1535
+ - Diff-aware changelog validation diffs against the initial commit or `develop` creation point
1536
+ - Legacy tags are not considered release boundaries
1537
+ - The first release tag will be `v1.0.0` (or `v0.1.0` if pre-stable)
1538
+
1539
+ ---
1540
+ ## Source: docs/reference/roles-reference.md
1541
+
1542
+ # Roles Reference
1543
+
1544
+ This is the lookup reference for canonical roles, workflows, and their contracts.
1545
+
1546
+ ## Canonical roles
1547
+
1548
+ | Role | Purpose |
1549
+ |------|---------|
1550
+ | `clarifier` | Resolves ambiguity before spec production |
1551
+ | `researcher` | Gathers source-backed findings and prior art |
1552
+ | `specifier` | Produces measurable specs with acceptance criteria |
1553
+ | `content-author` | Produces finalized i18n keys, microcopy, glossary, state coverage, and accessibility copy |
1554
+ | `designer` | Transforms approved spec into visual designs using open-pencil MCP tools. Produces `.fig` files, exported code scaffolds, and design tokens |
1555
+ | `planner` | Creates implementation plans from approved spec and designs |
1556
+ | `executor` | Implements the plan (orchestrator "Dev" phase) |
1557
+ | `verifier` | QA hard gate — always mandatory (orchestrator "QA" phase) |
1558
+ | `reviewer` | Adversarial quality review (orchestrator "Reviewer" phase) |
1559
+ | `learner` | Captures scoped learnings for future runs |
1560
+
1561
+ ## Canonical workflows
1562
+
1563
+ | Workflow | Runs after | Description |
1564
+ |----------|-----------|-------------|
1565
+ | `clarify` | — | Resolve ambiguity |
1566
+ | `discover` | `clarify` | Gather research |
1567
+ | `specify` | `discover` | Produce spec |
1568
+ | `spec-challenge` | `specify` | Adversarial spec review |
1569
+ | `author` | `spec-challenge` | Content authoring |
1570
+ | `design` | `author` | Visual design from approved spec |
1571
+ | `design-review` | `design` | Validate designs against spec, accessibility, visual consistency |
1572
+ | `plan` | `design-review` | Create implementation plan |
1573
+ | `plan-review` | `plan` | Adversarial plan review |
1574
+ | `execute` | `plan-review` | Implement the plan |
1575
+ | `verify` | `execute` | QA hard gate |
1576
+ | `review` | `verify` | Adversarial quality review |
1577
+ | `learn` | `review` | Capture scoped learnings |
1578
+ | `prepare-next` | `learn` | Produce clean next-run handoff |
1579
+
1580
+ ## Role routing valid values
1581
+
1582
+ - `executor` — implements the task (orchestrator "Dev" phase)
1583
+ - `reviewer` — adversarial quality review (orchestrator "Reviewer" phase)
1584
+ - `verifier` — QA hard gate, always mandatory (orchestrator "QA" phase)
1585
+
1586
+ ## Contract source files
1587
+
1588
+ - Role contracts: `roles/<role-name>.md`
1589
+ - Workflow entrypoints: `workflows/<workflow-name>.md`
1590
+ - Manifest roster: `wazir.manifest.yaml`
1591
+
1592
+ For conceptual understanding of how roles and workflows interact, see [Roles and Workflows concepts](../concepts/roles-and-workflows.md).
1593
+
1594
+ ## Context retrieval defaults
1595
+
1596
+ Every role contract includes a `## Context retrieval` section specifying the default recall tier and fallback strategy. Agents should consult the individual role contracts for full details.
1597
+
1598
+ | Role | Default tier | Strategy | Fallback |
1599
+ |------|-------------|----------|----------|
1600
+ | `learner` | L0 | Inventory scan via `recall --tier L0` | L0 fails -> try L1 -> L1 fails -> direct file read |
1601
+ | `clarifier` | L1 | Structural summaries via `recall --tier L1` | If recall fails, fall back to direct file reads |
1602
+ | `researcher` | L1 | Structural summaries via `recall --tier L1` | If recall fails, fall back to direct file reads |
1603
+ | `specifier` | L1 | Structural summaries via `recall --tier L1` | If recall fails, fall back to direct file reads |
1604
+ | `content-author` | L1 | Structural summaries via `recall --tier L1` | If recall fails, fall back to direct file reads |
1605
+ | `designer` | L1 | Structural summaries via `recall --tier L1` | If recall fails, fall back to direct file reads |
1606
+ | `planner` | L1 | Structural summaries via `recall --tier L1` | If recall fails, fall back to direct file reads |
1607
+ | `executor` | Direct read | Full source via `Read` tool or `recall file` (L2) | If index search fails, use grep or file-tree exploration |
1608
+ | `verifier` | Direct read | Full source via `Read` tool or `recall file` (L2) | If index search fails, use grep or file-tree exploration |
1609
+ | `reviewer` | L1 + escalation | Start with `recall --tier L1`; escalate to direct read for logic errors, security, or ambiguous summaries | If recall fails, fall back to direct file reads |
1610
+
1611
+ **Tier token budgets:**
1612
+ - L0: ~100 tokens (one-line identifier summary)
1613
+ - L1: ~500-2k tokens (structural summary)
1614
+ - L2/Direct: full source content
1615
+
1616
+ Roles that explore broadly (clarifier, researcher, planner) benefit most from L1 summaries. Roles that need exact source (executor, verifier) use direct reads. The reviewer uses L1 as a triage pass before targeted deep reads.
1617
+
1618
+ See [Indexing and Recall](../concepts/indexing-and-recall.md) for full details on tiers and commands.
1619
+
1620
+ ---
1621
+ ## Source: docs/reference/skills.md
1622
+
1623
+ # Skills
1624
+
1625
+ Wazir uses skills as reusable in-host procedures.
1626
+
1627
+ The active thesis is:
1628
+
1629
+ - use Wazir inside your AI host
1630
+ - keep the operating model in canonical repo skills
1631
+
1632
+ ## Active Skills
1633
+
1634
+ These skills remain on the active surface:
1635
+
1636
+ | Skill | Purpose |
1637
+ | --- | --- |
1638
+ | `wz:using-skills` | Ensures skill discovery happens before work starts |
1639
+ | `wz:brainstorming` | Turns briefings into approved designs before implementation |
1640
+ | `scan-project` | Builds a project profile from the repo and `input/`, with index build/refresh and `index stats` in the profile output |
1641
+ | `wz:writing-plans` | Produces execution-grade implementation plans |
1642
+ | `wz:debugging` | Runs a disciplined observe-hypothesize-test-fix loop with symbol-first exploration (index search-symbols, recall L1) in the OBSERVE phase |
1643
+ | `wz:humanize` | Detects and removes AI writing patterns from text artifacts via a 4-phase pipeline (Scan, Identify, Rewrite, Verify) |
1644
+ | `wz:tdd` | Enforces RED -> GREEN -> REFACTOR for implementation work |
1645
+ | `wz:verification` | Requires fresh proof before completion claims |
1646
+ | `wz:design` | Guides the designer role through open-pencil MCP workflow to produce design artifacts |
1647
+ | `prepare-next` | Produces a clean next-run handoff without auto-loading stale context |
1648
+ | `run-audit` | Runs a structured codebase audit producing source-backed findings with remediation |
1649
+ | `self-audit` | Runs a worktree-isolated audit-fix loop — validates, audits, fixes, verifies, and merges back only on green |
1650
+
1651
+ ## Rules
1652
+
1653
+ - Skills must reference `input/`, canonical roles/workflows, or external state-root conventions.
1654
+ - Skills must not instruct users to run background services or wrapper scripts that are not part of the canonical workflow surface.
1655
+ - When a skill becomes contradictory to the current operating model, remove it from `skills/`.
1656
+
1657
+ ---
1658
+ ## Source: docs/reference/templates.md
1659
+
1660
+ # Templates
1661
+
1662
+ Wazir keeps two active template classes:
1663
+
1664
+ - `templates/artifacts/` for run outputs and handoffs
1665
+ - `templates/examples/` for schema-aligned example payloads
1666
+
1667
+ ## Artifact Templates
1668
+
1669
+ Active artifact templates cover:
1670
+
1671
+ - clarification
1672
+ - research
1673
+ - spec
1674
+ - spec challenge
1675
+ - implementation plan
1676
+ - plan review
1677
+ - execution notes
1678
+ - verification proof
1679
+ - review findings
1680
+ - learning proposal
1681
+ - accepted learning
1682
+ - next-run handoff
1683
+
1684
+ Each template requires run metadata, sources, loop number, and approval status where applicable.
1685
+
1686
+ ## Example Payloads
1687
+
1688
+ Schema-backed examples under `templates/examples/` exist to keep schemas, examples, and validation in sync.
1689
+
1690
+ ---
1691
+ ## Source: docs/reference/tooling-cli.md
1692
+
1693
+ # Wazir CLI
1694
+
1695
+ The `wazir` CLI is minimal on purpose. It exists to validate and export the host-native OS kit.
1696
+
1697
+ ## Current command surface
1698
+
1699
+ | Command | Status | Behavior |
1700
+ | --- | --- | --- |
1701
+ | `wazir validate manifest` | implemented | Validates `wazir.manifest.yaml` against its schema and checks required repo paths exist. |
1702
+ | `wazir validate hooks` | implemented | Validates canonical hook definitions against `schemas/hook.schema.json` and the manifest hook roster. |
1703
+ | `wazir validate docs` | implemented | Validates `docs/truth-claims.yaml`, checks documented command claims against the active CLI surface, and rejects broken local doc links. |
1704
+ | `wazir validate brand` | implemented | Enforces canonical product naming on the Wazir surface. |
1705
+ | `wazir validate runtime` | implemented | Rejects non-canonical runtime wrappers, repo-local task/state paths, and forbidden runtime-only package surfaces. |
1706
+ | `wazir validate branches` | implemented | Validates the current (or `--branch`-specified) branch name against the allowed git-flow patterns. |
1707
+ | `wazir validate commits` | implemented | Validates conventional commit format for commits in the range `--base..--head` (or auto-detected base to HEAD). |
1708
+ | `wazir validate changelog` | implemented | Validates `CHANGELOG.md` structure; with `--require-entries` and `--base`, enforces new entries since the base. |
1709
+ | `wazir validate docs-drift` | implemented | Detects when source files (roles, workflows, skills, hooks) change without corresponding documentation updates. Advisory by default; `--strict` exits non-zero on drift. |
1710
+ | `wazir validate artifacts` | reserved | Exits `2` until artifact-template and example validation expands. |
1711
+ | `wazir export build` | implemented | Generates host packages under `exports/hosts/*` from canonical sources. |
1712
+ | `wazir export --check` | implemented | Verifies generated host packages still match current canonical source hashes. |
1713
+ | `wazir index build` | implemented | Builds a local SQLite-backed index under the configured state root. |
1714
+ | `wazir index refresh` | implemented | Refreshes indexed files using stored content hashes. |
1715
+ | `wazir index stats` | implemented | Reports file, symbol, outline, and summary_counts for the current index. |
1716
+ | `wazir index summarize` | implemented | Generates L0/L1 heuristic summaries for all indexed files and symbols. |
1717
+ | `wazir index search-symbols` | implemented | Searches indexed symbol names. |
1718
+ | `wazir index get-symbol` | implemented | Returns a stored symbol record by name or ID. |
1719
+ | `wazir index get-file-outline` | implemented | Returns indexed outline entries for a file. |
1720
+ | `wazir recall file` | implemented | Returns an exact line-bounded slice from an indexed file. Supports `--tier L0\|L1` for summary recall. |
1721
+ | `wazir recall symbol` | implemented | Returns an exact slice for an indexed symbol match. Supports `--tier L0\|L1` for summary recall. |
1722
+ | `wazir doctor` | implemented | Validates the active repo surface for manifest, hooks, state-root policy, and host export directory presence. |
1723
+ | `wazir status` | implemented | Reads run status directly from `<state-root>/runs/<run-id>/status.json`. |
1724
+ | `wazir capture init` | implemented | Creates a run ledger with `status.json`, `events.ndjson`, and a captures directory under the configured state root. |
1725
+ | `wazir capture event` | implemented | Appends a run event and can update phase, status, and loop counts in `status.json`. |
1726
+ | `wazir capture route` | implemented | Reserves a run-local capture file path for large tool output. |
1727
+ | `wazir capture output` | implemented | Writes captured tool output to a run-local file and records a `post_tool_capture` event. |
1728
+ | `wazir capture summary` | implemented | Writes `summary.md` and records the chosen summary or handoff event. |
1729
+ | `wazir capture usage` | implemented | Generates a token savings report for a run, showing capture routing statistics and context window savings. |
1730
+
1731
+ ## Exit codes
1732
+
1733
+ - `0`: requested check passed
1734
+ - `1`: invalid input or validation failure
1735
+ - `2`: command surface exists but the implementation is intentionally not complete yet
1736
+
1737
+ ## Root discovery
1738
+
1739
+ The CLI resolves the project root by walking upward from the current working directory until it finds `wazir.manifest.yaml`. This keeps checks usable from nested directories inside the repo.
1740
+
1741
+ ## State-root override
1742
+
1743
+ Indexing and recall commands accept `--state-root <path>` so operators can keep index state wherever they want. If omitted, Wazir uses the manifest default outside the repo.
1744
+
1745
+ `wazir status` accepts the same override when reading run-local status files.
1746
+
1747
+ `wazir capture *` accepts the same override when writing run-local status, events, summaries, and captured output files.
1748
+
1749
+ `wazir export build` and `wazir export --check` work from the current project root and write under `exports/hosts/*`.
1750
+
1751
+ ## Run recovery
1752
+
1753
+ `wazir capture init` writes the current run ID to `<state-root>/runs/latest` as a plain text pointer. On session start, an agent can read this file to determine if a prior run exists and resume it rather than starting fresh.
1754
+
1755
+ This enables run continuity across context compaction boundaries. When a session is compacted, the new context can read `latest` and call `wazir status --run <id>` to load the prior run's state.
1756
+
1757
+ If no `latest` file exists, the agent starts a new run via `capture init`.
1758
+
1759
+ ## Token savings
1760
+
1761
+ Wazir reduces context window consumption through two mechanisms:
1762
+
1763
+ **Capture routing.** `wazir capture route` and `wazir capture output` redirect large tool output to run-local files instead of the context window. The agent receives a file path reference (~50 tokens) instead of the full output (potentially thousands of tokens).
1764
+
1765
+ **Tiered recall.** `wazir recall file` and `wazir recall symbol` support `--tier L0|L1` for summary-based recall:
1766
+ - L0 (~100 tokens): one-line identifier summary
1767
+ - L1 (~500-2k tokens): structural summary with signature, purpose, dependencies
1768
+ - L2 (default): full source slice
1769
+
1770
+ Roles are assigned default tiers based on their needs. Exploration-heavy roles (clarifier, researcher, planner) use L1 by default. Implementation roles (executor, verifier) use direct reads. See [Indexing and Recall](../concepts/indexing-and-recall.md) for details.
1771
+
1772
+ `wazir capture usage` generates a per-run token savings report showing how many tokens were saved by capture routing and tiered recall versus direct reads.
1773
+
1774
+ ## Current scope limits
1775
+
1776
+ - The CLI is a validation and export tool with no background processes.
1777
+ - Validation is the first active capability because it prevents fake green states while the rest of the kit is still being rebuilt.
1778
+ - Reserved commands are documented here so adopters can tell the difference between real behavior and planned behavior.
1779
+
1780
+ ## Docs truth source
1781
+
1782
+ Executable documentation claims are registered in:
1783
+
1784
+ - `docs/truth-claims.yaml`
1785
+
1786
+ `wazir validate docs` uses that file plus active markdown link checks to prevent stale command and path claims from silently drifting.
1787
+
1788
+ ---
1789
+ ## Source: README.md
1790
+
1791
+ <p align="center">
1792
+ <picture>
1793
+ <source media="(prefers-color-scheme: dark)" srcset="assets/logo-dark.svg">
1794
+ <source media="(prefers-color-scheme: light)" srcset="assets/logo.svg">
1795
+ <img alt="Wazir" src="assets/logo.svg" width="360">
1796
+ </picture>
1797
+ </p>
1798
+
1799
+ <h3 align="center">Wazir: engineering with itqan.</h3>
1800
+
1801
+ <p align="center">
1802
+ <a href="https://github.com/MohamedAbdallah-14/Wazir/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/MohamedAbdallah-14/Wazir/ci.yml?branch=main&label=CI" alt="CI"></a>
1803
+ <a href="https://www.npmjs.com/package/@wazir-dev/cli"><img src="https://img.shields.io/npm/v/@wazir-dev/cli" alt="npm"></a>
1804
+ <a href="https://github.com/MohamedAbdallah-14/Wazir/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
1805
+ <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen?logo=node.js" alt="Node.js"></a>
1806
+ <a href="https://codecov.io/gh/MohamedAbdallah-14/Wazir"><img src="https://codecov.io/gh/MohamedAbdallah-14/Wazir/graph/badge.svg" alt="codecov"></a>
1807
+ <a href="https://github.com/MohamedAbdallah-14/Wazir/blob/main/CONTRIBUTING.md"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a>
1808
+ </p>
1809
+
1810
+ <p align="center">
1811
+ <img src="https://img.shields.io/badge/Claude-supported-5436DA?logo=anthropic" alt="Claude">
1812
+ <img src="https://img.shields.io/badge/Codex-supported-00A36C" alt="Codex">
1813
+ <img src="https://img.shields.io/badge/Gemini-supported-4285F4?logo=google" alt="Gemini">
1814
+ <img src="https://img.shields.io/badge/Cursor-supported-FF6B35" alt="Cursor">
1815
+ </p>
1816
+
1817
+ <!-- Demo GIF: run assets/record-demo.sh to generate assets/demo.gif, then uncomment the img tag below -->
1818
+ <!-- <p align="center"><img src="assets/demo.gif" alt="Wazir Demo" width="700"></p> -->
1819
+
1820
+ A host-native operating model for AI coding agents. Wazir gives Claude, Codex, Gemini, and Cursor a 14-phase delivery pipeline, 10 canonical roles with enforceable contracts, 3 adversarial review phases with 9 hard approval gates, and 261 curated expertise modules loaded automatically per task. No server. No wrapper. No custom orchestration.
1821
+
1822
+ Install once. Your agent works the way your best engineer does.
1823
+
1824
+ ---
1825
+
1826
+ ## Table of Contents
1827
+
1828
+ - [Why Wazir?](#why-wazir)
1829
+ - [Quick Start](#quick-start)
1830
+ - [The Pipeline](#the-pipeline)
1831
+ - [How It Works](#how-it-works)
1832
+ - [How Wazir Handles Complex Tasks](#how-wazir-handles-complex-tasks)
1833
+ - [Token Savings](#token-savings)
1834
+ - [What's Included](#whats-included)
1835
+ - [Compared to Other Tools](#compared-to-other-tools)
1836
+ - [Install](#install)
1837
+ - [Documentation](#documentation)
1838
+ - [Project Status](#project-status)
1839
+ - [Acknowledgments](#acknowledgments)
1840
+ - [Contributing](#contributing)
1841
+ - [License](#license)
1842
+
1843
+ ---
1844
+
1845
+ ## Why Wazir?
1846
+
1847
+ AI coding agents fail the same five ways. Every time.
1848
+
1849
+ **Ambiguous specs become wrong code.** The clarifier role escalates unresolved ambiguity instead of guessing. No spec ships until material questions get answers. Escalation is a required output, not an option.
1850
+
1851
+ **Output quality varies randomly.** The reviewer role is never the phase author. Adversarial review runs at three chokepoints -- spec-challenge, design-review, and final review -- always by a different model or model family. Nine hard approval gates block advancement until artifacts pass.
1852
+
1853
+ **Context floods the window.** A 4-layer composition engine assembles only the relevant expertise modules per role per phase from a library of 261 curated modules across 12 domains. Max 15 modules per dispatch, token budget enforced. Three-tier recall (L0/L1/direct read) lets exploration roles load structural summaries instead of full files. Result: 60-80% fewer tokens on exploration-heavy phases. Run `wazir capture usage` to measure it.
1854
+
1855
+ **Good solutions vanish between sessions.** Proposed learnings start isolated. Only learnings that pass explicit review and scope-tagging get promoted into future runs. Stale or disproven learnings are archived. The system improves per-project without drifting.
1856
+
1857
+ **Nothing prevents structural failures.** Seven hook contracts enforce protected paths (exit 42), loop caps (exit 43), and session observability. Hooks are enforcement, not suggestions.
1858
+
1859
+ ---
1860
+
1861
+ ## Quick Start
1862
+
1863
+ **Step 1: Install**
1864
+
1865
+ ```bash
1866
+ /plugin marketplace add MohamedAbdallah-14/Wazir
1867
+ /plugin install wazir
1868
+ ```
1869
+
1870
+ **Step 2: Initialize**
1871
+
1872
+ ```bash
1873
+ /init-pipeline
1874
+ ```
1875
+
1876
+ **Step 3: Build something**
1877
+
1878
+ Drop your requirements in the input directory or just tell the agent what you want:
1879
+
1880
+ ```
1881
+ /clarifier Build a REST API for managing tasks with authentication
1882
+ ```
1883
+
1884
+ That's it. The pipeline takes over -- clarifies your requirements, writes a spec, plans the work, implements with TDD, reviews, and learns for next time. You approve at the gates. Everything else is automatic.
1885
+
1886
+ ---
1887
+
1888
+ ## The Pipeline
1889
+
1890
+ Every task flows through 14 phases. Three are adversarial review gates that block progress until the reviewer explicitly approves. Rejection loops back to the authoring phase.
1891
+
1892
+ ```mermaid
1893
+ graph LR
1894
+ P0["0 clarify<br/><sub>clarifier</sub>"]
1895
+ P1["1 discover<br/><sub>researcher</sub>"]
1896
+ P2["2 specify<br/><sub>specifier</sub>"]
1897
+ P3["3 spec-challenge<br/><sub>reviewer | APPROVAL GATE</sub>"]
1898
+ P4["4 author<br/><sub>content-author</sub>"]
1899
+ P5["5 design<br/><sub>designer</sub>"]
1900
+ P6["6 design-review<br/><sub>reviewer | APPROVAL GATE</sub>"]
1901
+ P7["7 plan<br/><sub>planner</sub>"]
1902
+ P8["8 plan-review<br/><sub>reviewer | APPROVAL GATE</sub>"]
1903
+ P9["9 execute<br/><sub>executor</sub>"]
1904
+ P10["10 verify<br/><sub>verifier</sub>"]
1905
+ P11["11 review<br/><sub>reviewer</sub>"]
1906
+ P12["12 learn<br/><sub>learner</sub>"]
1907
+ P13["13 prepare-next<br/><sub>learner</sub>"]
1908
+
1909
+ P0 --> P1 --> P2 --> P3
1910
+ P3 -- approved --> P4 --> P5 --> P6
1911
+ P3 -. rejected .-> P2
1912
+ P6 -- approved --> P7 --> P8
1913
+ P6 -. rejected .-> P5
1914
+ P8 -- approved --> P9 --> P10 --> P11
1915
+ P8 -. rejected .-> P7
1916
+ P11 --> P12 --> P13
1917
+
1918
+ style P3 fill:#c62828,color:#fff
1919
+ style P6 fill:#c62828,color:#fff
1920
+ style P8 fill:#c62828,color:#fff
1921
+ ```
1922
+
1923
+ > **GATE** = Approval gate. The phase blocks until the reviewer explicitly approves. Rejection loops back to the authoring phase.
1924
+
1925
+ ---
1926
+
1927
+ ## How It Works
1928
+
1929
+ Three concepts.
1930
+
1931
+ **1 -- Roles are isolation boundaries, not personas.** Each of the 10 roles has defined inputs, allowed tools, required outputs, escalation rules, and failure conditions. An agent inside a role cannot write to protected paths, cannot skip required outputs, and must escalate when ambiguity conditions are met. The discipline is structural, not instructional. See [Roles & Workflows](docs/concepts/roles-and-workflows.md).
1932
+
1933
+ **2 -- Phases are artifact checkpoints, not conversation stages.** Every phase consumes a named artifact from the previous phase and produces a named artifact for the next. Nothing flows through conversation history. A session can end, a new agent can pick up the artifacts, and delivery continues. The handoff is explicit, structured, and schema-validated against 18 JSON schemas. See [Architecture](docs/concepts/architecture.md).
1934
+
1935
+ **3 -- The composition engine loads the right expert automatically.** A 4-layer system (always, auto, stacks, concerns) decides which of 261 expertise modules load into each role's context. The executor gets modules on how to build. The verifier gets modules on what to detect. The reviewer gets modules on what to flag. All resolved automatically from the task's declared stack and concerns. Max 15 modules per dispatch, token budget enforced.
1936
+
1937
+ ---
1938
+
1939
+ ## How Wazir Handles Complex Tasks
1940
+
1941
+ Large coding tasks fail when agents lose track of quality. Wazir addresses this with three reinforcing mechanisms.
1942
+
1943
+ **14-phase pipeline with 9 hard approval gates.** Every task passes through clarify, research, specify, design, plan, execute, verify, review, and learn. Nine transitions have hard blocking conditions. No phase is skipped, no shortcut taken. The pipeline is defined in `workflows/` and enforced by the orchestrator.
1944
+
1945
+ **Adversarial review built in.** The reviewer role operates independently from the executor. It starts with structural summaries (L1 recall) to triage, then reads full source for logic errors, security concerns, or ambiguous code. Review criteria come from expertise modules, not guesswork.
1946
+
1947
+ **TDD and verification-before-completion.** The executor writes failing tests before implementation (red-green-refactor). The verifier independently runs all tests, checks truth claims, and validates exports. No task completes until the verifier confirms all acceptance criteria pass. This catches regressions that the executor's own testing misses.
1948
+
1949
+ The output is code held to the same standard a senior engineering team would enforce.
1950
+
1951
+ ---
1952
+
1953
+ ## Token Savings
1954
+
1955
+ Wazir's tiered recall system loads the minimum context each role needs.
1956
+
1957
+ | Tier | Tokens | Content | Used by |
1958
+ |------|--------|---------|---------|
1959
+ | L0 | ~100 | One-line identifier | learner (inventory scans) |
1960
+ | L1 | ~500-2k | Structural summary | clarifier, researcher, planner, reviewer (exploration) |
1961
+ | Direct read | Full file | Exact source lines | executor, verifier (implementation) |
1962
+
1963
+ Capture routing redirects large tool output to run-local files. The agent gets a file path (~50 tokens) instead of the full output. Combined with tiered recall, this yields 60-80% token reduction on exploration-heavy phases.
1964
+
1965
+ Run `wazir capture usage` at the end of a session to see the savings:
1966
+
1967
+ ```
1968
+ # Usage Report: run-20260316-091500-b3f7
1969
+
1970
+ ## Token Savings by Strategy
1971
+ | Strategy | Raw (est. tokens) | After (est. tokens) | Avoided |
1972
+ |------------------|--------------------|---------------------|--------------------|
1973
+ | Capture routing | 36,000 | 50 | 35,950 |
1974
+ | Context-mode | 81,920 | 1,382 | 80,538 |
1975
+ | Compaction | 80,000 | 5,000 | 75,000 |
1976
+
1977
+ ## "What If" Comparison
1978
+ | Scenario | Est. tokens consumed |
1979
+ |-----------------------------------|----------------------|
1980
+ | Without any savings strategies | 197,920 |
1981
+ | With Wazir savings only | 86,432 |
1982
+ | With Wazir + context-mode | 6,432 |
1983
+ | **Actual savings** | **96.8%** |
1984
+ ```
1985
+
1986
+ ---
1987
+
1988
+ ## What's Included
1989
+
1990
+ **10 canonical role contracts.** Clarifier, researcher, specifier, content-author, designer, planner, executor, verifier, reviewer, learner. Each has enforceable inputs, outputs, and escalation rules. The spec-challenge phase adversarially reviews every spec before planning begins. [Roles reference](docs/reference/roles-reference.md)
1991
+
1992
+ **Adversarial review at three chokepoints.** Spec-challenge, plan-review, and final review run by the reviewer role, never the phase author. Three review phases and nine hard approval gates span the 14-phase pipeline. Nothing advances without explicit clearance. [Architecture](docs/concepts/architecture.md)
1993
+
1994
+ **261 curated expertise modules across 12 domains.** Loaded selectively per role per phase via a 4-layer composition engine. Max 15 modules per dispatch, token budget enforced. [Expertise index](docs/reference/expertise-index.md)
1995
+
1996
+ **Three-tier recall for token savings.** L0 (~100 tokens), L1 (~500-2k tokens), direct read for full source. Symbol-first exploration searches the index before reading source. Capture routing redirects large tool output to files. Result: 60-80% token reduction on exploration-heavy phases, measured per-session by `wazir capture usage`. [Indexing and Recall](docs/concepts/indexing-and-recall.md)
1997
+
1998
+ **Structured learning.** Proposed learnings require explicit review and scope tagging before promotion. Only learnings whose file patterns overlap the current task get injected into context. The system improves per-project without drifting.
1999
+
2000
+ **7 hook contracts for structural guardrails.** These enforce protected path writes (exit 42), loop caps (exit 43), and session observability. [Hooks](docs/reference/hooks.md)
2001
+
2002
+ **20 callable skills.** wz:tdd, wz:verification, wz:debugging, wz:scan-project, wz:writing-plans, and 14 more. Each enforces an exact procedure with evidence at each step. [Skills](docs/reference/skills.md)
2003
+
2004
+ **Built-in text humanization.** The `wz:humanize` skill and 7 dedicated expertise modules automatically remove AI vocabulary patterns from generated text. The composition engine loads domain-specific rules per role: code rules for the executor (commit messages, comments), content rules for the content-author (microcopy, glossary), and technical-docs rules for the specifier, planner, reviewer, and learner. A 61-item vocabulary blacklist, 24-pattern sentence taxonomy, and two-pass self-audit checklist keep all output sounding like it was written by a person.
2005
+
2006
+ **Content-author role before design.** This role produces finalized i18n keys, microcopy, glossary entries, state coverage, and accessibility copy before design begins.
2007
+
2008
+ **Runs on 4 platforms.** `wazir export build` compiles canonical sources into native packages for Claude, Codex, Gemini, and Cursor. SHA-256 drift detection catches stale exports in CI. [Host exports](docs/reference/host-exports.md)
2009
+
2010
+ ---
2011
+
2012
+ ## Compared to Other Tools
2013
+
2014
+ The AI coding tool space is fragmenting. Developers bolt together separate plugins for workflow management, specification, memory, output compression, and orchestration. Research shows this approach has a cost: tool selection accuracy drops to 13.6% when models face too many tools (Gan & Sun, 2025), and 20 tools can consume 62% of an 8k context window before the task even begins (PromptForward, 2025).
2015
+
2016
+ Wazir takes a different path: one integrated operating model instead of many independent plugins.
2017
+
2018
+ | Dimension | Wazir | [Superpowers](https://github.com/obra/superpowers) | [Spec-Kit](https://github.com/github/spec-kit) | [Micro-Agent](https://github.com/BuilderIO/micro-agent) | [Distill](https://github.com/samuelfaj/distill) | [Claude-Mem](https://github.com/thedotmack/claude-mem) | [OMC](https://github.com/yeachan-heo/oh-my-claudecode) |
2019
+ |---|---|---|---|---|---|---|---|
2020
+ | **Category** | Engineering OS | Skills framework | Spec toolkit | Code gen agent | Output compressor | Memory plugin | Orchestration layer |
2021
+ | **Scope** | Full lifecycle (14 phases) | Dev workflow (~20 skills) | Specify / Plan / Implement | Single-file TDD loop | CLI output compression | Session memory | Multi-agent orchestration |
2022
+ | **Enforced roles** | 10 canonical, contractual | None (skills only) | None | None | None | None | 32 agents (behavioral) |
2023
+ | **Phase model** | 14 explicit, artifact-gated | 7-step (advisory) | 3-step | 1 (generate/test) | N/A | N/A | 5-step pipeline |
2024
+ | **Adversarial review** | 3 gate phases | Code review skill | No | No | No | No | team-verify step |
2025
+ | **Context management** | L0/L1 tiered recall | None | None | None | LLM compression | Vector DB (ChromaDB) | Token routing |
2026
+ | **Schema validation** | 18 JSON schemas | No | No | No | No | No | No |
2027
+ | **Guardrails** | 7 hook contracts | None | None | None | None | 5 hooks (memory) | Agent tracking |
2028
+ | **External deps** | None (host-native) | None (prompt-only) | Python CLI | Node.js CLI | Node.js + LLM | ChromaDB, SQLite, Bun | tmux, exp. teams API |
2029
+ | **Host support** | Claude, Codex, Gemini, Cursor | Claude, Codex, Gemini, Cursor, OpenCode | Claude, Copilot, Gemini | Any LLM provider | Any LLM | Claude Code only | Claude Code (+ workers) |
2030
+
2031
+ Each of these tools solves a real problem. Wazir's approach is to solve them together -- one system, shared context, structural enforcement -- instead of asking developers to wire separate plugins into a coherent workflow.
2032
+
2033
+ **Research sources:** [RAG-MCP: Mitigating Prompt Bloat in LLM Tool Selection](https://arxiv.org/abs/2505.03275) (Gan & Sun, 2025). [MCP Overload: Why Your LLM Agent Doesn't Need 20 Tools](https://promptforward.dev/blog/mcp-overload) (PromptForward, 2025). [Less is More: Optimizing Function Calling for LLM Execution](https://arxiv.org/abs/2411.15399) (Paramanayakam et al., 2024). [Tool RAG: The Next Breakthrough in Scalable AI Agents](https://next.redhat.com/2025/11/26/tool-rag-the-next-breakthrough-in-scalable-ai-agents/) (Red Hat, 2025).
2034
+
2035
+ ---
2036
+
2037
+ ## Install
2038
+
2039
+ **Claude Code plugin (recommended):**
2040
+
2041
+ ```bash
2042
+ /plugin marketplace add MohamedAbdallah-14/Wazir
2043
+ /plugin install wazir
2044
+ ```
2045
+
2046
+ The plugin loads skills, roles, and workflows into your Claude sessions. Done.
2047
+
2048
+ **npm / Homebrew:**
2049
+
2050
+ ```bash
2051
+ npm install -g @wazir-dev/cli # npm
2052
+ brew tap MohamedAbdallah-14/Wazir && brew install wazir # Homebrew
2053
+ ```
2054
+
2055
+ **Deploy to your project:**
2056
+
2057
+ | Host | Command |
2058
+ |------|---------|
2059
+ | **Claude** | `cp -r exports/hosts/claude/.claude ~/your-project/ && cp exports/hosts/claude/CLAUDE.md ~/your-project/` |
2060
+ | **Codex** | `cp exports/hosts/codex/AGENTS.md ~/your-project/` |
2061
+ | **Gemini** | `cp exports/hosts/gemini/GEMINI.md ~/your-project/` |
2062
+ | **Cursor** | `cp -r exports/hosts/cursor/.cursor ~/your-project/` |
2063
+
2064
+ > npm/Homebrew users: clone the source and run `npx wazir export build` to generate host exports. See [Installation Guide](docs/getting-started/01-installation.md) for the full path.
2065
+
2066
+ ---
2067
+
2068
+ ## Documentation
2069
+
2070
+ **For users:**
2071
+
2072
+ | I want to... | Go to |
2073
+ |---|---|
2074
+ | Install and get started | [Installation](docs/getting-started/01-installation.md) |
2075
+ | Run my first task | [First Run](docs/getting-started/02-first-run.md) |
2076
+ | Understand the architecture | [Architecture](docs/concepts/architecture.md) |
2077
+ | Learn about roles and workflows | [Roles & Workflows](docs/concepts/roles-and-workflows.md) |
2078
+
2079
+ **For contributors:**
2080
+
2081
+ | I want to... | Go to |
2082
+ |---|---|
2083
+ | Set up for development | [CONTRIBUTING.md](CONTRIBUTING.md) |
2084
+ | Look up CLI commands | [CLI Reference](docs/reference/tooling-cli.md) |
2085
+ | Configure the manifest | [Configuration Reference](docs/reference/configuration-reference.md) |
2086
+ | Browse all documentation | [Documentation Hub](docs/README.md) |
2087
+
2088
+ ---
2089
+
2090
+ ## Project Status
2091
+
2092
+ Wazir is in active early development (**v0.1.0**, pre-1.0-alpha).
2093
+
2094
+ The pipeline, roles, and expertise modules are stable and used in production by the maintainers. The CLI, schemas, and hook contracts work. But this is early software -- APIs may change before 1.0.
2095
+
2096
+ What's solid:
2097
+ - The 14-phase pipeline and 10 role contracts
2098
+ - 261 expertise modules across 12 domains
2099
+ - Host exports for Claude, Codex, Gemini, and Cursor
2100
+ - The composition engine and tiered recall system
2101
+
2102
+ What may change:
2103
+ - CLI command surface and flags
2104
+ - Schema field names
2105
+ - Hook contract signatures
2106
+ - State directory structure
2107
+
2108
+ Feedback and contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).
2109
+
2110
+ ---
2111
+
2112
+ ## Acknowledgments
2113
+
2114
+ Wazir builds on ideas and patterns from these projects:
2115
+
2116
+ - **[superpowers](https://github.com/obra/superpowers)** by [@obra](https://github.com/obra) -- skill system architecture, bootstrap injection pattern, session-start hooks
2117
+ - **[context-mode](https://github.com/mksglu/context-mode)** -- context window optimization and sandbox execution patterns
2118
+ - **[spec-kit](https://github.com/github/spec-kit)** by GitHub -- specification-driven development patterns
2119
+ - **[oh-my-claudecode](https://github.com/yeachan-heo/oh-my-claudecode)** by [@yeachan-heo](https://github.com/yeachan-heo) -- Claude Code customization and extension patterns
2120
+ - **[micro-agent](https://github.com/BuilderIO/micro-agent)** by Builder.io -- test-driven code generation patterns
2121
+ - **[distill](https://github.com/samuelfaj/distill)** by [@samuelfaj](https://github.com/samuelfaj) -- CLI output compression for token savings
2122
+ - **[claude-mem](https://github.com/thedotmack/claude-mem)** by [@thedotmack](https://github.com/thedotmack) -- persistent memory patterns for coding agents
2123
+
2124
+ ---
2125
+
2126
+ ## Contributing
2127
+
2128
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, branch conventions, commit format, and contribution guidelines.
2129
+
2130
+ ---
2131
+
2132
+ ## License
2133
+
2134
+ MIT -- see [LICENSE](LICENSE).
2135
+
2136
+ ---
2137
+ ## Source: CONTRIBUTING.md
2138
+
2139
+ # Contributing
2140
+
2141
+ Wazir is a host-native engineering OS kit. Contributions that strengthen the product surface are welcome.
2142
+
2143
+ ## Ground rules
2144
+
2145
+ - follow the architecture in `docs/concepts/architecture.md`
2146
+ - keep the product host-native — roles, workflows, skills, hooks, and host exports
2147
+ - prefer evidence:
2148
+ - TDD for behavior changes
2149
+ - verification commands before completion claims
2150
+ - no fake green paths
2151
+
2152
+ ## Local setup
2153
+
2154
+ 1. Clone the repository and install dependencies:
2155
+ ```bash
2156
+ git clone https://github.com/MohamedAbdallah-14/Wazir.git
2157
+ cd wazir
2158
+ npm install
2159
+ ```
2160
+ You should see output ending with something like:
2161
+ ```
2162
+ added XX packages in Xs
2163
+ ```
2164
+ 2. Run the test suite:
2165
+ ```bash
2166
+ npm test
2167
+ ```
2168
+ Expected output:
2169
+ ```
2170
+ TAP version 13
2171
+ # ... test descriptions ...
2172
+ ok
2173
+ ```
2174
+ All tests must pass before you submit a PR.
2175
+ 3. Regenerate host packages when export logic or canonical sources change:
2176
+ ```bash
2177
+ wazir export build
2178
+ ```
2179
+ 4. Check export drift:
2180
+ ```bash
2181
+ wazir export --check
2182
+ ```
2183
+ 5. Validate the project structure:
2184
+ ```bash
2185
+ wazir validate
2186
+ ```
2187
+
2188
+ ## Testing expectations
2189
+
2190
+ - **What to test:** Every behavior change, new CLI command, hook behavior, or schema change must have accompanying tests.
2191
+ - **How to run tests:**
2192
+ ```bash
2193
+ npm test # run the full suite
2194
+ ```
2195
+ - **Coverage:** Tests live alongside the code they verify. If you add a new module in `tooling/src/`, add a corresponding test in `tooling/test/`. If you add a new skill in `skills/`, include a test script or verification step in the skill directory.
2196
+ - **TDD is mandatory:** Write the failing test first, then implement the feature or fix.
2197
+
2198
+ ## Your first contribution
2199
+
2200
+ New to Wazir? Start here:
2201
+
2202
+ 1. Browse issues labeled [`good first issue`](https://github.com/MohamedAbdallah-14/Wazir/labels/good%20first%20issue)
2203
+ 2. Fork the repository and create a branch: `git checkout -b feat/your-change`
2204
+ 3. Make your change, add tests, run `npm test`
2205
+ 4. Open a pull request using the PR template
2206
+
2207
+ ### Good first issues
2208
+
2209
+ Good first issues are small, well-scoped tasks that help you learn the codebase. They typically involve:
2210
+
2211
+ - Fixing a typo or improving clarity in documentation
2212
+ - Adding a missing validation or error message to the CLI
2213
+ - Writing tests for an existing module that lacks coverage
2214
+ - Updating a role contract or workflow description to match current behavior
2215
+
2216
+ Look for the `good first issue` label, and feel free to comment on the issue to claim it before starting work.
2217
+
2218
+ Not sure where to start? Open a [Discussion](https://github.com/MohamedAbdallah-14/Wazir/discussions) and we'll help you find something.
2219
+
2220
+ ## Change expectations
2221
+
2222
+ - keep docs current with the actual behavior you changed
2223
+ - update `CHANGELOG.md`
2224
+ - add or update tests for new CLI behavior, hook behavior, or schemas
2225
+ - avoid adding dependencies unless they materially reduce correctness risk
2226
+
2227
+ ## Pull requests
2228
+
2229
+ - explain the problem, the change, and the verification you ran
2230
+ - call out any remaining gaps or follow-up work explicitly
2231
+ - if a review tool was unavailable, say so rather than implying review happened
2232
+
2233
+ ## PR review process
2234
+
2235
+ 1. **Automated checks:** When you open a PR, CI runs `npm test` and `wazir validate`. Both must pass before review begins.
2236
+ 2. **Human review:** A maintainer will review your PR for correctness, test coverage, documentation, and alignment with the architecture.
2237
+ 3. **Feedback:** If changes are requested, push additional commits to the same branch. Avoid force-pushing during review so that reviewers can see incremental changes.
2238
+ 4. **Merge:** Once approved and all checks pass, a maintainer will merge your PR using a squash merge with a conventional commit message.
2239
+ 5. **Timeline:** We aim to provide initial review feedback within a few days. If your PR has been open for more than a week without a response, feel free to leave a comment or ping in Discussions.
2240
+
2241
+ ---
2242
+ ## Source: AGENTS.md
2243
+
2244
+ # Wazir Agent Instructions
2245
+
2246
+ ## Role-Based Workflow System
2247
+
2248
+ Wazir uses canonical roles and phased workflows. Role contracts are in `roles/`. Workflow definitions are in `workflows/`.
2249
+
2250
+ ### Canonical Roles
2251
+
2252
+ 1. **clarifier** — disambiguate intent, extract acceptance criteria
2253
+ 2. **researcher** — gather evidence, prior art, domain context
2254
+ 3. **specifier** — write precise specs from clarified requirements
2255
+ 4. **designer** — produce architecture and interface designs
2256
+ 5. **content-author** — create documentation, guides, and prose artifacts
2257
+ 6. **planner** — break specs into ordered, testable tasks
2258
+ 7. **executor** — implement code following the plan
2259
+ 8. **verifier** — run tests, linting, and validation gates
2260
+ 9. **reviewer** — final quality review against acceptance criteria
2261
+ 10. **learner** — capture lessons learned and update knowledge base
2262
+
2263
+ See `roles/` for full contracts. See `wazir.manifest.yaml` for the authoritative list.
2264
+
2265
+ ### Entering a Workflow
2266
+
2267
+ 1. **Clarifier:** read and follow `~/.claude/agents/clarifier.md` — tasks are in `input/`
2268
+ 2. **Subsequent phases:** the workflow system assigns roles per phase. See `workflows/` for phase sequence.
2269
+ 3. **Review:** read and follow `~/.claude/agents/reviewer.md` — run all review phases
2270
+
2271
+ ## Build Commands
2272
+
2273
+ | Command | Purpose |
2274
+ |---------|---------|
2275
+ | `npm install` | Install dependencies |
2276
+ | `npm test` | Run full test suite (node:test) |
2277
+ | `wazir validate` | Validate manifest, hooks, docs, brand, runtime, branches, commits, changelog |
2278
+ | `wazir doctor` | Check environment health |
2279
+ | `wazir export build` | Build host-native packages |
2280
+
2281
+ ## Exit Codes
2282
+
2283
+ | Code | Meaning |
2284
+ |------|---------|
2285
+ | 0 | Success |
2286
+ | 1 | General error |
2287
+ | 2 | Usage / argument error |
2288
+ | 42 | Validation failure (non-fatal) |
2289
+ | 43 | Gate rejection (hard stop) |
2290
+
2291
+ ## Code Style
2292
+
2293
+ - Pure JavaScript — no TypeScript, no JSX, no transpilation
2294
+ - Node.js >= 20
2295
+ - ES modules (`import` / `export`)
2296
+ - Test framework: `node:test` + `node:assert`
2297
+ - Zero runtime dependencies in the core kit
2298
+
2299
+ ### Test Pattern
2300
+
2301
+ ```js
2302
+ import { describe, it } from 'node:test';
2303
+ import assert from 'node:assert/strict';
2304
+
2305
+ describe('featureName', () => {
2306
+ it('should behave correctly', () => {
2307
+ const result = featureName();
2308
+ assert.strictEqual(result, expected);
2309
+ });
2310
+ });
2311
+ ```
2312
+
2313
+ ## Project Structure
2314
+
2315
+ | Directory | Purpose |
2316
+ |-----------|---------|
2317
+ | `roles/` | Canonical role contracts (one file per role) |
2318
+ | `workflows/` | Phase-based workflow definitions and entry points |
2319
+ | `expertise/` | Domain knowledge modules consumed by roles |
2320
+ | `skills/` | Reusable skill definitions (prefixed `wz:`) |
2321
+ | `hooks/` | Lifecycle hooks (pre-commit, pre-push, gates) |
2322
+ | `tooling/` | CLI source, tests, and internal utilities |
2323
+ | `exports/` | Generated host-native packages (do not edit) |
2324
+ | `templates/` | Scaffold and boilerplate templates |
2325
+ | `schemas/` | JSON / YAML schemas for validation |
2326
+ | `docs/` | Architecture docs, guides, and references |
2327
+
2328
+ ## Git Workflow
2329
+
2330
+ - **Conventional commits:** `feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`
2331
+ - **Isolated feature branches** — never commit directly to `main`
2332
+ - **TDD cycle:** failing test -> implement -> verify -> commit
2333
+
2334
+ ## Boundaries
2335
+
2336
+ - Never edit files in `exports/` directly — they are generated from canonical sources
2337
+ - Never modify pipeline input files — they are read-only task input
2338
+ - Never skip `wazir doctor` before starting work
2339
+ - Never add runtime dependencies to the core kit
2340
+ - Never use TypeScript, JSX, or any transpilation step
2341
+ - Never commit without running `npm test` first
2342
+ - Never bypass validation gates (`wazir validate`)
2343
+
2344
+ ## Review Mode
2345
+
2346
+ This project uses Codex as a secondary reviewer. Review artifacts are in `tasks/opus/reviews/`.
2347
+
2348
+ ## Operating Constraints
2349
+
2350
+ - Use `roles/` as the source of truth for role contracts
2351
+ - Keep default live run state outside the repo under `~/.wazir/projects/<project-slug>/`
2352
+ - Preserve evidence-first execution, TDD, verification, and conventional commits
2353
+ - Use isolated feature branches
2354
+ - Reference `wazir.manifest.yaml` for the project manifest and schema
2355
+