@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.
- package/AGENTS.md +111 -0
- package/CHANGELOG.md +14 -0
- package/CONTRIBUTING.md +101 -0
- package/LICENSE +21 -0
- package/README.md +314 -0
- package/assets/composition-engine.mmd +34 -0
- package/assets/demo-script.sh +17 -0
- package/assets/logo-dark.svg +14 -0
- package/assets/logo.svg +14 -0
- package/assets/pipeline.mmd +39 -0
- package/assets/record-demo.sh +51 -0
- package/docs/README.md +51 -0
- package/docs/adapters/context-mode.md +60 -0
- package/docs/concepts/architecture.md +87 -0
- package/docs/concepts/artifact-model.md +60 -0
- package/docs/concepts/composition-engine.md +36 -0
- package/docs/concepts/indexing-and-recall.md +160 -0
- package/docs/concepts/observability.md +41 -0
- package/docs/concepts/roles-and-workflows.md +59 -0
- package/docs/concepts/terminology-policy.md +27 -0
- package/docs/getting-started/01-installation.md +78 -0
- package/docs/getting-started/02-first-run.md +102 -0
- package/docs/getting-started/03-adding-to-project.md +15 -0
- package/docs/getting-started/04-host-setup.md +15 -0
- package/docs/guides/ci-integration.md +15 -0
- package/docs/guides/creating-skills.md +15 -0
- package/docs/guides/expertise-module-authoring.md +15 -0
- package/docs/guides/hook-development.md +15 -0
- package/docs/guides/memory-and-learnings.md +34 -0
- package/docs/guides/multi-host-export.md +15 -0
- package/docs/guides/troubleshooting.md +101 -0
- package/docs/guides/writing-custom-roles.md +15 -0
- package/docs/plans/2026-03-15-cli-pipeline-integration-design.md +592 -0
- package/docs/plans/2026-03-15-cli-pipeline-integration-plan.md +598 -0
- package/docs/plans/2026-03-15-docs-enforcement-plan.md +238 -0
- package/docs/readmes/INDEX.md +99 -0
- package/docs/readmes/features/expertise/README.md +171 -0
- package/docs/readmes/features/exports/README.md +222 -0
- package/docs/readmes/features/hooks/README.md +103 -0
- package/docs/readmes/features/hooks/loop-cap-guard.md +133 -0
- package/docs/readmes/features/hooks/post-tool-capture.md +121 -0
- package/docs/readmes/features/hooks/post-tool-lint.md +130 -0
- package/docs/readmes/features/hooks/pre-compact-summary.md +122 -0
- package/docs/readmes/features/hooks/pre-tool-capture-route.md +100 -0
- package/docs/readmes/features/hooks/protected-path-write-guard.md +128 -0
- package/docs/readmes/features/hooks/session-start.md +119 -0
- package/docs/readmes/features/hooks/stop-handoff-harvest.md +125 -0
- package/docs/readmes/features/roles/README.md +157 -0
- package/docs/readmes/features/roles/clarifier.md +152 -0
- package/docs/readmes/features/roles/content-author.md +190 -0
- package/docs/readmes/features/roles/designer.md +193 -0
- package/docs/readmes/features/roles/executor.md +184 -0
- package/docs/readmes/features/roles/learner.md +210 -0
- package/docs/readmes/features/roles/planner.md +182 -0
- package/docs/readmes/features/roles/researcher.md +164 -0
- package/docs/readmes/features/roles/reviewer.md +184 -0
- package/docs/readmes/features/roles/specifier.md +162 -0
- package/docs/readmes/features/roles/verifier.md +215 -0
- package/docs/readmes/features/schemas/README.md +178 -0
- package/docs/readmes/features/skills/README.md +63 -0
- package/docs/readmes/features/skills/brainstorming.md +96 -0
- package/docs/readmes/features/skills/debugging.md +148 -0
- package/docs/readmes/features/skills/design.md +120 -0
- package/docs/readmes/features/skills/prepare-next.md +109 -0
- package/docs/readmes/features/skills/run-audit.md +159 -0
- package/docs/readmes/features/skills/scan-project.md +109 -0
- package/docs/readmes/features/skills/self-audit.md +176 -0
- package/docs/readmes/features/skills/tdd.md +137 -0
- package/docs/readmes/features/skills/using-skills.md +92 -0
- package/docs/readmes/features/skills/verification.md +120 -0
- package/docs/readmes/features/skills/writing-plans.md +104 -0
- package/docs/readmes/features/tooling/README.md +320 -0
- package/docs/readmes/features/workflows/README.md +186 -0
- package/docs/readmes/features/workflows/author.md +181 -0
- package/docs/readmes/features/workflows/clarify.md +154 -0
- package/docs/readmes/features/workflows/design-review.md +171 -0
- package/docs/readmes/features/workflows/design.md +169 -0
- package/docs/readmes/features/workflows/discover.md +162 -0
- package/docs/readmes/features/workflows/execute.md +173 -0
- package/docs/readmes/features/workflows/learn.md +167 -0
- package/docs/readmes/features/workflows/plan-review.md +165 -0
- package/docs/readmes/features/workflows/plan.md +170 -0
- package/docs/readmes/features/workflows/prepare-next.md +167 -0
- package/docs/readmes/features/workflows/review.md +169 -0
- package/docs/readmes/features/workflows/run-audit.md +191 -0
- package/docs/readmes/features/workflows/spec-challenge.md +159 -0
- package/docs/readmes/features/workflows/specify.md +160 -0
- package/docs/readmes/features/workflows/verify.md +177 -0
- package/docs/readmes/packages/README.md +50 -0
- package/docs/readmes/packages/ajv.md +117 -0
- package/docs/readmes/packages/context-mode.md +118 -0
- package/docs/readmes/packages/gray-matter.md +116 -0
- package/docs/readmes/packages/node-test.md +137 -0
- package/docs/readmes/packages/yaml.md +112 -0
- package/docs/reference/configuration-reference.md +159 -0
- package/docs/reference/expertise-index.md +52 -0
- package/docs/reference/git-flow.md +43 -0
- package/docs/reference/hooks.md +87 -0
- package/docs/reference/host-exports.md +50 -0
- package/docs/reference/launch-checklist.md +172 -0
- package/docs/reference/marketplace-listings.md +76 -0
- package/docs/reference/release-process.md +34 -0
- package/docs/reference/roles-reference.md +77 -0
- package/docs/reference/skills.md +33 -0
- package/docs/reference/templates.md +29 -0
- package/docs/reference/tooling-cli.md +94 -0
- package/docs/truth-claims.yaml +222 -0
- package/expertise/PROGRESS.md +63 -0
- package/expertise/README.md +18 -0
- package/expertise/antipatterns/PROGRESS.md +56 -0
- package/expertise/antipatterns/backend/api-design-antipatterns.md +1271 -0
- package/expertise/antipatterns/backend/auth-antipatterns.md +1195 -0
- package/expertise/antipatterns/backend/caching-antipatterns.md +622 -0
- package/expertise/antipatterns/backend/database-antipatterns.md +1038 -0
- package/expertise/antipatterns/backend/index.md +24 -0
- package/expertise/antipatterns/backend/microservices-antipatterns.md +850 -0
- package/expertise/antipatterns/code/architecture-antipatterns.md +919 -0
- package/expertise/antipatterns/code/async-antipatterns.md +622 -0
- package/expertise/antipatterns/code/code-smells.md +1186 -0
- package/expertise/antipatterns/code/dependency-antipatterns.md +1209 -0
- package/expertise/antipatterns/code/error-handling-antipatterns.md +1360 -0
- package/expertise/antipatterns/code/index.md +27 -0
- package/expertise/antipatterns/code/naming-and-abstraction.md +1118 -0
- package/expertise/antipatterns/code/state-management-antipatterns.md +1076 -0
- package/expertise/antipatterns/code/testing-antipatterns.md +1053 -0
- package/expertise/antipatterns/design/accessibility-antipatterns.md +1136 -0
- package/expertise/antipatterns/design/dark-patterns.md +1121 -0
- package/expertise/antipatterns/design/index.md +22 -0
- package/expertise/antipatterns/design/ui-antipatterns.md +1202 -0
- package/expertise/antipatterns/design/ux-antipatterns.md +680 -0
- package/expertise/antipatterns/frontend/css-layout-antipatterns.md +691 -0
- package/expertise/antipatterns/frontend/flutter-antipatterns.md +1827 -0
- package/expertise/antipatterns/frontend/index.md +23 -0
- package/expertise/antipatterns/frontend/mobile-antipatterns.md +573 -0
- package/expertise/antipatterns/frontend/react-antipatterns.md +1128 -0
- package/expertise/antipatterns/frontend/spa-antipatterns.md +1235 -0
- package/expertise/antipatterns/index.md +31 -0
- package/expertise/antipatterns/performance/index.md +20 -0
- package/expertise/antipatterns/performance/performance-antipatterns.md +1013 -0
- package/expertise/antipatterns/performance/premature-optimization.md +623 -0
- package/expertise/antipatterns/performance/scaling-antipatterns.md +785 -0
- package/expertise/antipatterns/process/ai-coding-antipatterns.md +853 -0
- package/expertise/antipatterns/process/code-review-antipatterns.md +656 -0
- package/expertise/antipatterns/process/deployment-antipatterns.md +920 -0
- package/expertise/antipatterns/process/index.md +23 -0
- package/expertise/antipatterns/process/technical-debt-antipatterns.md +647 -0
- package/expertise/antipatterns/security/index.md +20 -0
- package/expertise/antipatterns/security/secrets-antipatterns.md +849 -0
- package/expertise/antipatterns/security/security-theater.md +843 -0
- package/expertise/antipatterns/security/vulnerability-patterns.md +801 -0
- package/expertise/architecture/PROGRESS.md +70 -0
- package/expertise/architecture/data/caching-architecture.md +671 -0
- package/expertise/architecture/data/data-consistency.md +574 -0
- package/expertise/architecture/data/data-modeling.md +536 -0
- package/expertise/architecture/data/event-streams-and-queues.md +634 -0
- package/expertise/architecture/data/index.md +25 -0
- package/expertise/architecture/data/search-architecture.md +663 -0
- package/expertise/architecture/data/sql-vs-nosql.md +708 -0
- package/expertise/architecture/decisions/architecture-decision-records.md +640 -0
- package/expertise/architecture/decisions/build-vs-buy.md +616 -0
- package/expertise/architecture/decisions/index.md +23 -0
- package/expertise/architecture/decisions/monolith-to-microservices.md +790 -0
- package/expertise/architecture/decisions/technology-selection.md +616 -0
- package/expertise/architecture/distributed/cap-theorem-and-tradeoffs.md +800 -0
- package/expertise/architecture/distributed/circuit-breaker-bulkhead.md +741 -0
- package/expertise/architecture/distributed/consensus-and-coordination.md +796 -0
- package/expertise/architecture/distributed/distributed-systems-fundamentals.md +564 -0
- package/expertise/architecture/distributed/idempotency-and-retry.md +796 -0
- package/expertise/architecture/distributed/index.md +25 -0
- package/expertise/architecture/distributed/saga-pattern.md +797 -0
- package/expertise/architecture/foundations/architectural-thinking.md +460 -0
- package/expertise/architecture/foundations/coupling-and-cohesion.md +770 -0
- package/expertise/architecture/foundations/design-principles-solid.md +649 -0
- package/expertise/architecture/foundations/domain-driven-design.md +719 -0
- package/expertise/architecture/foundations/index.md +25 -0
- package/expertise/architecture/foundations/separation-of-concerns.md +472 -0
- package/expertise/architecture/foundations/twelve-factor-app.md +797 -0
- package/expertise/architecture/index.md +34 -0
- package/expertise/architecture/integration/api-design-graphql.md +638 -0
- package/expertise/architecture/integration/api-design-grpc.md +804 -0
- package/expertise/architecture/integration/api-design-rest.md +892 -0
- package/expertise/architecture/integration/index.md +25 -0
- package/expertise/architecture/integration/third-party-integration.md +795 -0
- package/expertise/architecture/integration/webhooks-and-callbacks.md +1152 -0
- package/expertise/architecture/integration/websockets-realtime.md +791 -0
- package/expertise/architecture/mobile-architecture/index.md +22 -0
- package/expertise/architecture/mobile-architecture/mobile-app-architecture.md +780 -0
- package/expertise/architecture/mobile-architecture/mobile-backend-for-frontend.md +670 -0
- package/expertise/architecture/mobile-architecture/offline-first.md +719 -0
- package/expertise/architecture/mobile-architecture/push-and-sync.md +782 -0
- package/expertise/architecture/patterns/cqrs-event-sourcing.md +717 -0
- package/expertise/architecture/patterns/event-driven.md +797 -0
- package/expertise/architecture/patterns/hexagonal-clean-architecture.md +870 -0
- package/expertise/architecture/patterns/index.md +27 -0
- package/expertise/architecture/patterns/layered-architecture.md +736 -0
- package/expertise/architecture/patterns/microservices.md +753 -0
- package/expertise/architecture/patterns/modular-monolith.md +692 -0
- package/expertise/architecture/patterns/monolith.md +626 -0
- package/expertise/architecture/patterns/plugin-architecture.md +735 -0
- package/expertise/architecture/patterns/serverless.md +780 -0
- package/expertise/architecture/scaling/database-scaling.md +615 -0
- package/expertise/architecture/scaling/feature-flags-and-rollouts.md +757 -0
- package/expertise/architecture/scaling/horizontal-vs-vertical.md +606 -0
- package/expertise/architecture/scaling/index.md +24 -0
- package/expertise/architecture/scaling/multi-tenancy.md +800 -0
- package/expertise/architecture/scaling/stateless-design.md +787 -0
- package/expertise/backend/embedded-firmware.md +625 -0
- package/expertise/backend/go.md +853 -0
- package/expertise/backend/index.md +24 -0
- package/expertise/backend/java-spring.md +448 -0
- package/expertise/backend/node-typescript.md +625 -0
- package/expertise/backend/python-fastapi.md +724 -0
- package/expertise/backend/rust.md +458 -0
- package/expertise/backend/solidity.md +711 -0
- package/expertise/composition-map.yaml +443 -0
- package/expertise/content/foundations/content-modeling.md +395 -0
- package/expertise/content/foundations/editorial-standards.md +449 -0
- package/expertise/content/foundations/index.md +24 -0
- package/expertise/content/foundations/microcopy.md +455 -0
- package/expertise/content/foundations/terminology-governance.md +509 -0
- package/expertise/content/index.md +34 -0
- package/expertise/content/patterns/accessibility-copy.md +518 -0
- package/expertise/content/patterns/index.md +24 -0
- package/expertise/content/patterns/notification-content.md +433 -0
- package/expertise/content/patterns/sample-content.md +486 -0
- package/expertise/content/patterns/state-copy.md +439 -0
- package/expertise/design/PROGRESS.md +58 -0
- package/expertise/design/disciplines/dark-mode-theming.md +577 -0
- package/expertise/design/disciplines/design-systems.md +595 -0
- package/expertise/design/disciplines/index.md +25 -0
- package/expertise/design/disciplines/information-architecture.md +800 -0
- package/expertise/design/disciplines/interaction-design.md +788 -0
- package/expertise/design/disciplines/responsive-design.md +552 -0
- package/expertise/design/disciplines/usability-testing.md +516 -0
- package/expertise/design/disciplines/user-research.md +792 -0
- package/expertise/design/foundations/accessibility-design.md +796 -0
- package/expertise/design/foundations/color-theory.md +797 -0
- package/expertise/design/foundations/iconography.md +795 -0
- package/expertise/design/foundations/index.md +26 -0
- package/expertise/design/foundations/motion-and-animation.md +653 -0
- package/expertise/design/foundations/rtl-design.md +585 -0
- package/expertise/design/foundations/spacing-and-layout.md +607 -0
- package/expertise/design/foundations/typography.md +800 -0
- package/expertise/design/foundations/visual-hierarchy.md +761 -0
- package/expertise/design/index.md +32 -0
- package/expertise/design/patterns/authentication-flows.md +474 -0
- package/expertise/design/patterns/content-consumption.md +789 -0
- package/expertise/design/patterns/data-display.md +618 -0
- package/expertise/design/patterns/e-commerce.md +1494 -0
- package/expertise/design/patterns/feedback-and-states.md +642 -0
- package/expertise/design/patterns/forms-and-input.md +819 -0
- package/expertise/design/patterns/gamification.md +801 -0
- package/expertise/design/patterns/index.md +31 -0
- package/expertise/design/patterns/microinteractions.md +449 -0
- package/expertise/design/patterns/navigation.md +800 -0
- package/expertise/design/patterns/notifications.md +705 -0
- package/expertise/design/patterns/onboarding.md +700 -0
- package/expertise/design/patterns/search-and-filter.md +601 -0
- package/expertise/design/patterns/settings-and-preferences.md +768 -0
- package/expertise/design/patterns/social-and-community.md +748 -0
- package/expertise/design/platforms/desktop-native.md +612 -0
- package/expertise/design/platforms/index.md +25 -0
- package/expertise/design/platforms/mobile-android.md +825 -0
- package/expertise/design/platforms/mobile-cross-platform.md +983 -0
- package/expertise/design/platforms/mobile-ios.md +699 -0
- package/expertise/design/platforms/tablet.md +794 -0
- package/expertise/design/platforms/web-dashboard.md +790 -0
- package/expertise/design/platforms/web-responsive.md +550 -0
- package/expertise/design/psychology/behavioral-nudges.md +449 -0
- package/expertise/design/psychology/cognitive-load.md +1191 -0
- package/expertise/design/psychology/error-psychology.md +778 -0
- package/expertise/design/psychology/index.md +22 -0
- package/expertise/design/psychology/persuasive-design.md +736 -0
- package/expertise/design/psychology/user-mental-models.md +623 -0
- package/expertise/design/tooling/open-pencil.md +266 -0
- package/expertise/frontend/angular.md +1073 -0
- package/expertise/frontend/desktop-electron.md +546 -0
- package/expertise/frontend/flutter.md +782 -0
- package/expertise/frontend/index.md +27 -0
- package/expertise/frontend/native-android.md +409 -0
- package/expertise/frontend/native-ios.md +490 -0
- package/expertise/frontend/react-native.md +1160 -0
- package/expertise/frontend/react.md +808 -0
- package/expertise/frontend/vue.md +1089 -0
- package/expertise/humanize/domain-rules-code.md +79 -0
- package/expertise/humanize/domain-rules-content.md +67 -0
- package/expertise/humanize/domain-rules-technical-docs.md +56 -0
- package/expertise/humanize/index.md +35 -0
- package/expertise/humanize/self-audit-checklist.md +87 -0
- package/expertise/humanize/sentence-patterns.md +218 -0
- package/expertise/humanize/vocabulary-blacklist.md +105 -0
- package/expertise/i18n/PROGRESS.md +65 -0
- package/expertise/i18n/advanced/accessibility-and-i18n.md +28 -0
- package/expertise/i18n/advanced/bidirectional-text-algorithm.md +38 -0
- package/expertise/i18n/advanced/complex-scripts.md +30 -0
- package/expertise/i18n/advanced/performance-and-i18n.md +27 -0
- package/expertise/i18n/advanced/testing-i18n.md +28 -0
- package/expertise/i18n/content/content-adaptation.md +23 -0
- package/expertise/i18n/content/locale-specific-formatting.md +23 -0
- package/expertise/i18n/content/machine-translation-integration.md +28 -0
- package/expertise/i18n/content/translation-management.md +29 -0
- package/expertise/i18n/foundations/date-time-calendars.md +67 -0
- package/expertise/i18n/foundations/i18n-architecture.md +272 -0
- package/expertise/i18n/foundations/locale-and-language-tags.md +79 -0
- package/expertise/i18n/foundations/numbers-currency-units.md +61 -0
- package/expertise/i18n/foundations/pluralization-and-gender.md +109 -0
- package/expertise/i18n/foundations/string-externalization.md +236 -0
- package/expertise/i18n/foundations/text-direction-bidi.md +241 -0
- package/expertise/i18n/foundations/unicode-and-encoding.md +86 -0
- package/expertise/i18n/index.md +38 -0
- package/expertise/i18n/platform/backend-i18n.md +31 -0
- package/expertise/i18n/platform/flutter-i18n.md +148 -0
- package/expertise/i18n/platform/native-android-i18n.md +36 -0
- package/expertise/i18n/platform/native-ios-i18n.md +36 -0
- package/expertise/i18n/platform/react-i18n.md +103 -0
- package/expertise/i18n/platform/web-css-i18n.md +81 -0
- package/expertise/i18n/rtl/arabic-specific.md +175 -0
- package/expertise/i18n/rtl/hebrew-specific.md +149 -0
- package/expertise/i18n/rtl/rtl-animations-and-transitions.md +111 -0
- package/expertise/i18n/rtl/rtl-forms-and-input.md +161 -0
- package/expertise/i18n/rtl/rtl-fundamentals.md +211 -0
- package/expertise/i18n/rtl/rtl-icons-and-images.md +181 -0
- package/expertise/i18n/rtl/rtl-layout-mirroring.md +252 -0
- package/expertise/i18n/rtl/rtl-navigation-and-gestures.md +107 -0
- package/expertise/i18n/rtl/rtl-testing-and-qa.md +147 -0
- package/expertise/i18n/rtl/rtl-typography.md +160 -0
- package/expertise/index.md +113 -0
- package/expertise/index.yaml +216 -0
- package/expertise/infrastructure/cloud-aws.md +597 -0
- package/expertise/infrastructure/cloud-gcp.md +599 -0
- package/expertise/infrastructure/cybersecurity.md +816 -0
- package/expertise/infrastructure/database-mongodb.md +447 -0
- package/expertise/infrastructure/database-postgres.md +400 -0
- package/expertise/infrastructure/devops-cicd.md +787 -0
- package/expertise/infrastructure/index.md +27 -0
- package/expertise/performance/PROGRESS.md +50 -0
- package/expertise/performance/backend/api-latency.md +1204 -0
- package/expertise/performance/backend/background-jobs.md +506 -0
- package/expertise/performance/backend/connection-pooling.md +1209 -0
- package/expertise/performance/backend/database-query-optimization.md +515 -0
- package/expertise/performance/backend/index.md +23 -0
- package/expertise/performance/backend/rate-limiting-and-throttling.md +971 -0
- package/expertise/performance/foundations/algorithmic-complexity.md +954 -0
- package/expertise/performance/foundations/caching-strategies.md +489 -0
- package/expertise/performance/foundations/concurrency-and-parallelism.md +847 -0
- package/expertise/performance/foundations/index.md +24 -0
- package/expertise/performance/foundations/measuring-and-profiling.md +440 -0
- package/expertise/performance/foundations/memory-management.md +964 -0
- package/expertise/performance/foundations/performance-budgets.md +1314 -0
- package/expertise/performance/index.md +31 -0
- package/expertise/performance/infrastructure/auto-scaling.md +1059 -0
- package/expertise/performance/infrastructure/cdn-and-edge.md +1081 -0
- package/expertise/performance/infrastructure/index.md +22 -0
- package/expertise/performance/infrastructure/load-balancing.md +1081 -0
- package/expertise/performance/infrastructure/observability.md +1079 -0
- package/expertise/performance/mobile/index.md +23 -0
- package/expertise/performance/mobile/mobile-animations.md +544 -0
- package/expertise/performance/mobile/mobile-memory-battery.md +416 -0
- package/expertise/performance/mobile/mobile-network.md +452 -0
- package/expertise/performance/mobile/mobile-rendering.md +599 -0
- package/expertise/performance/mobile/mobile-startup-time.md +505 -0
- package/expertise/performance/platform-specific/flutter-performance.md +647 -0
- package/expertise/performance/platform-specific/index.md +22 -0
- package/expertise/performance/platform-specific/node-performance.md +1307 -0
- package/expertise/performance/platform-specific/postgres-performance.md +1366 -0
- package/expertise/performance/platform-specific/react-performance.md +1403 -0
- package/expertise/performance/web/bundle-optimization.md +1239 -0
- package/expertise/performance/web/image-and-media.md +636 -0
- package/expertise/performance/web/index.md +24 -0
- package/expertise/performance/web/network-optimization.md +1133 -0
- package/expertise/performance/web/rendering-performance.md +1098 -0
- package/expertise/performance/web/ssr-and-hydration.md +918 -0
- package/expertise/performance/web/web-vitals.md +1374 -0
- package/expertise/quality/accessibility.md +985 -0
- package/expertise/quality/evidence-based-verification.md +499 -0
- package/expertise/quality/index.md +24 -0
- package/expertise/quality/ml-model-audit.md +614 -0
- package/expertise/quality/performance.md +600 -0
- package/expertise/quality/testing-api.md +891 -0
- package/expertise/quality/testing-mobile.md +496 -0
- package/expertise/quality/testing-web.md +849 -0
- package/expertise/security/PROGRESS.md +54 -0
- package/expertise/security/agentic-identity.md +540 -0
- package/expertise/security/compliance-frameworks.md +601 -0
- package/expertise/security/data/data-encryption.md +364 -0
- package/expertise/security/data/data-privacy-gdpr.md +692 -0
- package/expertise/security/data/database-security.md +1171 -0
- package/expertise/security/data/index.md +22 -0
- package/expertise/security/data/pii-handling.md +531 -0
- package/expertise/security/foundations/authentication.md +1041 -0
- package/expertise/security/foundations/authorization.md +603 -0
- package/expertise/security/foundations/cryptography.md +1001 -0
- package/expertise/security/foundations/index.md +25 -0
- package/expertise/security/foundations/owasp-top-10.md +1354 -0
- package/expertise/security/foundations/secrets-management.md +1217 -0
- package/expertise/security/foundations/secure-sdlc.md +700 -0
- package/expertise/security/foundations/supply-chain-security.md +698 -0
- package/expertise/security/index.md +31 -0
- package/expertise/security/infrastructure/cloud-security-aws.md +1296 -0
- package/expertise/security/infrastructure/cloud-security-gcp.md +1376 -0
- package/expertise/security/infrastructure/container-security.md +721 -0
- package/expertise/security/infrastructure/incident-response.md +1295 -0
- package/expertise/security/infrastructure/index.md +24 -0
- package/expertise/security/infrastructure/logging-and-monitoring.md +1618 -0
- package/expertise/security/infrastructure/network-security.md +1337 -0
- package/expertise/security/mobile/index.md +23 -0
- package/expertise/security/mobile/mobile-android-security.md +1218 -0
- package/expertise/security/mobile/mobile-binary-protection.md +1229 -0
- package/expertise/security/mobile/mobile-data-storage.md +1265 -0
- package/expertise/security/mobile/mobile-ios-security.md +1401 -0
- package/expertise/security/mobile/mobile-network-security.md +1520 -0
- package/expertise/security/smart-contract-security.md +594 -0
- package/expertise/security/testing/index.md +22 -0
- package/expertise/security/testing/penetration-testing.md +1258 -0
- package/expertise/security/testing/security-code-review.md +1765 -0
- package/expertise/security/testing/threat-modeling.md +1074 -0
- package/expertise/security/testing/vulnerability-scanning.md +1062 -0
- package/expertise/security/web/api-security.md +586 -0
- package/expertise/security/web/cors-and-headers.md +433 -0
- package/expertise/security/web/csrf.md +562 -0
- package/expertise/security/web/file-upload.md +1477 -0
- package/expertise/security/web/index.md +25 -0
- package/expertise/security/web/injection.md +1375 -0
- package/expertise/security/web/session-management.md +1101 -0
- package/expertise/security/web/xss.md +1158 -0
- package/exports/README.md +17 -0
- package/exports/hosts/claude/.claude/agents/clarifier.md +42 -0
- package/exports/hosts/claude/.claude/agents/content-author.md +63 -0
- package/exports/hosts/claude/.claude/agents/designer.md +55 -0
- package/exports/hosts/claude/.claude/agents/executor.md +55 -0
- package/exports/hosts/claude/.claude/agents/learner.md +51 -0
- package/exports/hosts/claude/.claude/agents/planner.md +53 -0
- package/exports/hosts/claude/.claude/agents/researcher.md +43 -0
- package/exports/hosts/claude/.claude/agents/reviewer.md +54 -0
- package/exports/hosts/claude/.claude/agents/specifier.md +47 -0
- package/exports/hosts/claude/.claude/agents/verifier.md +71 -0
- package/exports/hosts/claude/.claude/commands/author.md +42 -0
- package/exports/hosts/claude/.claude/commands/clarify.md +38 -0
- package/exports/hosts/claude/.claude/commands/design-review.md +46 -0
- package/exports/hosts/claude/.claude/commands/design.md +44 -0
- package/exports/hosts/claude/.claude/commands/discover.md +37 -0
- package/exports/hosts/claude/.claude/commands/execute.md +48 -0
- package/exports/hosts/claude/.claude/commands/learn.md +38 -0
- package/exports/hosts/claude/.claude/commands/plan-review.md +42 -0
- package/exports/hosts/claude/.claude/commands/plan.md +39 -0
- package/exports/hosts/claude/.claude/commands/prepare-next.md +37 -0
- package/exports/hosts/claude/.claude/commands/review.md +40 -0
- package/exports/hosts/claude/.claude/commands/run-audit.md +41 -0
- package/exports/hosts/claude/.claude/commands/spec-challenge.md +41 -0
- package/exports/hosts/claude/.claude/commands/specify.md +38 -0
- package/exports/hosts/claude/.claude/commands/verify.md +37 -0
- package/exports/hosts/claude/.claude/settings.json +34 -0
- package/exports/hosts/claude/CLAUDE.md +19 -0
- package/exports/hosts/claude/export.manifest.json +38 -0
- package/exports/hosts/claude/host-package.json +67 -0
- package/exports/hosts/codex/AGENTS.md +19 -0
- package/exports/hosts/codex/export.manifest.json +38 -0
- package/exports/hosts/codex/host-package.json +41 -0
- package/exports/hosts/cursor/.cursor/hooks.json +16 -0
- package/exports/hosts/cursor/.cursor/rules/wazir-core.mdc +19 -0
- package/exports/hosts/cursor/export.manifest.json +38 -0
- package/exports/hosts/cursor/host-package.json +42 -0
- package/exports/hosts/gemini/GEMINI.md +19 -0
- package/exports/hosts/gemini/export.manifest.json +38 -0
- package/exports/hosts/gemini/host-package.json +41 -0
- package/hooks/README.md +18 -0
- package/hooks/definitions/loop_cap_guard.yaml +21 -0
- package/hooks/definitions/post_tool_capture.yaml +24 -0
- package/hooks/definitions/pre_compact_summary.yaml +19 -0
- package/hooks/definitions/pre_tool_capture_route.yaml +19 -0
- package/hooks/definitions/protected_path_write_guard.yaml +19 -0
- package/hooks/definitions/session_start.yaml +19 -0
- package/hooks/definitions/stop_handoff_harvest.yaml +20 -0
- package/hooks/loop-cap-guard +17 -0
- package/hooks/post-tool-lint +36 -0
- package/hooks/protected-path-write-guard +17 -0
- package/hooks/session-start +41 -0
- package/llms-full.txt +2355 -0
- package/llms.txt +43 -0
- package/package.json +79 -0
- package/roles/README.md +20 -0
- package/roles/clarifier.md +42 -0
- package/roles/content-author.md +63 -0
- package/roles/designer.md +55 -0
- package/roles/executor.md +55 -0
- package/roles/learner.md +51 -0
- package/roles/planner.md +53 -0
- package/roles/researcher.md +43 -0
- package/roles/reviewer.md +54 -0
- package/roles/specifier.md +47 -0
- package/roles/verifier.md +71 -0
- package/schemas/README.md +24 -0
- package/schemas/accepted-learning.schema.json +20 -0
- package/schemas/author-artifact.schema.json +156 -0
- package/schemas/clarification.schema.json +19 -0
- package/schemas/design-artifact.schema.json +80 -0
- package/schemas/docs-claim.schema.json +18 -0
- package/schemas/export-manifest.schema.json +20 -0
- package/schemas/hook.schema.json +67 -0
- package/schemas/host-export-package.schema.json +18 -0
- package/schemas/implementation-plan.schema.json +19 -0
- package/schemas/proposed-learning.schema.json +19 -0
- package/schemas/research.schema.json +18 -0
- package/schemas/review.schema.json +29 -0
- package/schemas/run-manifest.schema.json +18 -0
- package/schemas/spec-challenge.schema.json +18 -0
- package/schemas/spec.schema.json +20 -0
- package/schemas/usage.schema.json +102 -0
- package/schemas/verification-proof.schema.json +29 -0
- package/schemas/wazir-manifest.schema.json +173 -0
- package/skills/README.md +40 -0
- package/skills/brainstorming/SKILL.md +77 -0
- package/skills/debugging/SKILL.md +50 -0
- package/skills/design/SKILL.md +61 -0
- package/skills/dispatching-parallel-agents/SKILL.md +128 -0
- package/skills/executing-plans/SKILL.md +70 -0
- package/skills/finishing-a-development-branch/SKILL.md +169 -0
- package/skills/humanize/SKILL.md +123 -0
- package/skills/init-pipeline/SKILL.md +124 -0
- package/skills/prepare-next/SKILL.md +20 -0
- package/skills/receiving-code-review/SKILL.md +123 -0
- package/skills/requesting-code-review/SKILL.md +105 -0
- package/skills/requesting-code-review/code-reviewer.md +108 -0
- package/skills/run-audit/SKILL.md +197 -0
- package/skills/scan-project/SKILL.md +41 -0
- package/skills/self-audit/SKILL.md +153 -0
- package/skills/subagent-driven-development/SKILL.md +154 -0
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
- package/skills/subagent-driven-development/implementer-prompt.md +102 -0
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/skills/tdd/SKILL.md +23 -0
- package/skills/using-git-worktrees/SKILL.md +163 -0
- package/skills/using-skills/SKILL.md +95 -0
- package/skills/verification/SKILL.md +22 -0
- package/skills/wazir/SKILL.md +463 -0
- package/skills/writing-plans/SKILL.md +30 -0
- package/skills/writing-skills/SKILL.md +157 -0
- package/skills/writing-skills/anthropic-best-practices.md +122 -0
- package/skills/writing-skills/persuasion-principles.md +50 -0
- package/templates/README.md +20 -0
- package/templates/artifacts/README.md +10 -0
- package/templates/artifacts/accepted-learning.md +19 -0
- package/templates/artifacts/accepted-learning.template.json +12 -0
- package/templates/artifacts/author.md +74 -0
- package/templates/artifacts/author.template.json +19 -0
- package/templates/artifacts/clarification.md +21 -0
- package/templates/artifacts/clarification.template.json +12 -0
- package/templates/artifacts/execute-notes.md +19 -0
- package/templates/artifacts/implementation-plan.md +21 -0
- package/templates/artifacts/implementation-plan.template.json +11 -0
- package/templates/artifacts/learning-proposal.md +19 -0
- package/templates/artifacts/next-run-handoff.md +21 -0
- package/templates/artifacts/plan-review.md +19 -0
- package/templates/artifacts/proposed-learning.template.json +12 -0
- package/templates/artifacts/research.md +21 -0
- package/templates/artifacts/research.template.json +12 -0
- package/templates/artifacts/review-findings.md +19 -0
- package/templates/artifacts/review.template.json +11 -0
- package/templates/artifacts/run-manifest.template.json +8 -0
- package/templates/artifacts/spec-challenge.md +19 -0
- package/templates/artifacts/spec-challenge.template.json +11 -0
- package/templates/artifacts/spec.md +21 -0
- package/templates/artifacts/spec.template.json +12 -0
- package/templates/artifacts/verification-proof.md +19 -0
- package/templates/artifacts/verification-proof.template.json +11 -0
- package/templates/examples/accepted-learning.example.json +14 -0
- package/templates/examples/author.example.json +152 -0
- package/templates/examples/clarification.example.json +15 -0
- package/templates/examples/docs-claim.example.json +8 -0
- package/templates/examples/export-manifest.example.json +7 -0
- package/templates/examples/host-export-package.example.json +11 -0
- package/templates/examples/implementation-plan.example.json +17 -0
- package/templates/examples/proposed-learning.example.json +13 -0
- package/templates/examples/research.example.json +15 -0
- package/templates/examples/research.example.md +6 -0
- package/templates/examples/review.example.json +17 -0
- package/templates/examples/run-manifest.example.json +9 -0
- package/templates/examples/spec-challenge.example.json +14 -0
- package/templates/examples/spec.example.json +21 -0
- package/templates/examples/verification-proof.example.json +21 -0
- package/templates/examples/wazir-manifest.example.yaml +65 -0
- package/templates/task-definition-schema.md +99 -0
- package/tooling/README.md +20 -0
- package/tooling/src/adapters/context-mode.js +50 -0
- package/tooling/src/capture/command.js +376 -0
- package/tooling/src/capture/store.js +99 -0
- package/tooling/src/capture/usage.js +270 -0
- package/tooling/src/checks/branches.js +50 -0
- package/tooling/src/checks/brand-truth.js +110 -0
- package/tooling/src/checks/changelog.js +231 -0
- package/tooling/src/checks/command-registry.js +36 -0
- package/tooling/src/checks/commits.js +102 -0
- package/tooling/src/checks/docs-drift.js +103 -0
- package/tooling/src/checks/docs-truth.js +201 -0
- package/tooling/src/checks/runtime-surface.js +156 -0
- package/tooling/src/cli.js +116 -0
- package/tooling/src/command-options.js +56 -0
- package/tooling/src/commands/validate.js +320 -0
- package/tooling/src/doctor/command.js +91 -0
- package/tooling/src/export/command.js +77 -0
- package/tooling/src/export/compiler.js +498 -0
- package/tooling/src/guards/loop-cap-guard.js +52 -0
- package/tooling/src/guards/protected-path-write-guard.js +67 -0
- package/tooling/src/index/command.js +152 -0
- package/tooling/src/index/storage.js +1061 -0
- package/tooling/src/index/summarizers.js +261 -0
- package/tooling/src/loaders.js +18 -0
- package/tooling/src/project-root.js +22 -0
- package/tooling/src/recall/command.js +225 -0
- package/tooling/src/schema-validator.js +30 -0
- package/tooling/src/state-root.js +40 -0
- package/tooling/src/status/command.js +71 -0
- package/wazir.manifest.yaml +135 -0
- package/workflows/README.md +19 -0
- package/workflows/author.md +42 -0
- package/workflows/clarify.md +38 -0
- package/workflows/design-review.md +46 -0
- package/workflows/design.md +44 -0
- package/workflows/discover.md +37 -0
- package/workflows/execute.md +48 -0
- package/workflows/learn.md +38 -0
- package/workflows/plan-review.md +42 -0
- package/workflows/plan.md +39 -0
- package/workflows/prepare-next.md +37 -0
- package/workflows/review.md +40 -0
- package/workflows/run-audit.md +41 -0
- package/workflows/spec-challenge.md +41 -0
- package/workflows/specify.md +38 -0
- package/workflows/verify.md +37 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# gray-matter
|
|
2
|
+
|
|
3
|
+
> Parse front-matter from a string or file. Fast, reliable, and lightweight, with zero dependencies.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/gray-matter)
|
|
6
|
+
[](https://github.com/jonschlinkert/gray-matter/blob/master/LICENSE)
|
|
7
|
+
[](https://www.npmjs.com/package/gray-matter)
|
|
8
|
+
|
|
9
|
+
## What is gray-matter?
|
|
10
|
+
|
|
11
|
+
gray-matter parses YAML, TOML, JSON, or custom front-matter from the top of Markdown and text files. Front-matter is the block of structured metadata between `---` delimiters at the start of a file, a convention popularized by static site generators like Jekyll and Hugo and now pervasive across developer tooling, documentation systems, and AI context files.
|
|
12
|
+
|
|
13
|
+
When you call `matter(string)`, it returns two things: the `data` object (the parsed front-matter block) and the `content` string (everything after the closing delimiter). This clean separation lets consumers treat the same file as both structured configuration and prose documentation without any ambiguity about where one ends and the other begins.
|
|
14
|
+
|
|
15
|
+
gray-matter handles edge cases that naive split-on-`---` approaches miss: files with no front-matter, files where the front-matter block contains literal `---` inside YAML block scalars, files starting with a BOM, and files using alternative delimiters like `+++` for TOML.
|
|
16
|
+
|
|
17
|
+
## Why Wazir Uses gray-matter
|
|
18
|
+
|
|
19
|
+
Wazir's skill files (`skills/*/SKILL.md`) are the canonical mechanism for delivering structured, in-context operating procedures to AI hosts. Each skill file combines two concerns in a single document:
|
|
20
|
+
|
|
21
|
+
1. A YAML front-matter block declaring the skill's `name` and `description` — structured fields consumed by the skills registry and the `Skill` tool dispatcher.
|
|
22
|
+
2. A Markdown body — the human- and AI-readable procedure that the agent follows when the skill is invoked.
|
|
23
|
+
|
|
24
|
+
Keeping both in one file is intentional: it eliminates drift between "the metadata that describes the skill" and "the instructions the skill contains." gray-matter is the only reliable way to split those two parts back out programmatically.
|
|
25
|
+
|
|
26
|
+
Every skill file in `skills/` follows this structure:
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
---
|
|
30
|
+
name: wz:tdd
|
|
31
|
+
description: Enforces RED -> GREEN -> REFACTOR for implementation work
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
# TDD
|
|
35
|
+
|
|
36
|
+
...prose instructions...
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
gray-matter parses that file and returns `{ data: { name: 'wz:tdd', description: '...' }, content: '# TDD\n\n...' }`.
|
|
40
|
+
|
|
41
|
+
## How Wazir Uses It
|
|
42
|
+
|
|
43
|
+
gray-matter is consumed by the skill validation and registry tooling that reads `skills/*/SKILL.md` files. The `data` fields are what the tooling checks against the skills registry — confirming that every declared skill has a matching file with the correct `name` field. The `content` is what gets served to the AI host at invocation time.
|
|
44
|
+
|
|
45
|
+
A representative usage pattern from the Wazir tooling:
|
|
46
|
+
|
|
47
|
+
```js
|
|
48
|
+
import matter from 'gray-matter';
|
|
49
|
+
import fs from 'node:fs';
|
|
50
|
+
|
|
51
|
+
function loadSkill(skillPath) {
|
|
52
|
+
const raw = fs.readFileSync(skillPath, 'utf8');
|
|
53
|
+
const { data, content } = matter(raw);
|
|
54
|
+
|
|
55
|
+
return {
|
|
56
|
+
name: data.name,
|
|
57
|
+
description: data.description,
|
|
58
|
+
body: content.trim(),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The `validate.test.js` test suite checks that skill files start with `---` (confirming front-matter presence) and that the `name` and `description` fields are present:
|
|
64
|
+
|
|
65
|
+
```js
|
|
66
|
+
test('design skill file exists and has frontmatter', () => {
|
|
67
|
+
const content = fs.readFileSync(skillPath, 'utf8');
|
|
68
|
+
assert.ok(content.startsWith('---'), 'missing YAML frontmatter');
|
|
69
|
+
assert.ok(content.includes('name: design'), 'missing name in frontmatter');
|
|
70
|
+
assert.ok(content.includes('description:'), 'missing description in frontmatter');
|
|
71
|
+
});
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Key Concepts
|
|
75
|
+
|
|
76
|
+
**Front-matter delimiters**: By default gray-matter expects `---` (YAML), but also supports `+++` (TOML) and `{` (JSON). Wazir uses YAML exclusively for skill front-matter.
|
|
77
|
+
|
|
78
|
+
**`data` vs `content`**: `data` is the parsed front-matter object; `content` is the raw Markdown body after the closing delimiter. Both are available on every parse result.
|
|
79
|
+
|
|
80
|
+
**`isEmpty`**: gray-matter returns `isEmpty: true` when no front-matter block is present. This is useful for validating that every skill file actually has metadata.
|
|
81
|
+
|
|
82
|
+
**`stringify`**: gray-matter can serialize back to a front-matter string with `matter.stringify(content, data)`. This is useful for programmatic generation of skill files.
|
|
83
|
+
|
|
84
|
+
**Custom engines**: gray-matter accepts a custom engine map so you can replace the default `js-yaml` parser with your own. Wazir does not use this — it relies on the default YAML engine.
|
|
85
|
+
|
|
86
|
+
## API Reference (Wazir-relevant subset)
|
|
87
|
+
|
|
88
|
+
| API | Usage in Wazir |
|
|
89
|
+
|-----|---------------------|
|
|
90
|
+
| `matter(string)` | Parse a raw skill file string into `{ data, content }` |
|
|
91
|
+
| `result.data` | The front-matter fields: `name`, `description` |
|
|
92
|
+
| `result.content` | The Markdown body delivered to the AI host |
|
|
93
|
+
| `result.isEmpty` | Check whether a skill file is missing its front-matter block |
|
|
94
|
+
| `matter.stringify(content, data)` | Serialize a skill body + metadata back to a single file |
|
|
95
|
+
|
|
96
|
+
## Common Patterns
|
|
97
|
+
|
|
98
|
+
**Single-file skill documents**: Store both skill metadata (for tooling) and skill instructions (for the AI host) in one `.md` file. Parse with gray-matter to separate them without duplicating content across files.
|
|
99
|
+
|
|
100
|
+
**Front-matter validation gate**: After parsing, immediately validate that `data.name` and `data.description` are present and non-empty before accepting the file as a valid skill. Fail loudly on malformed skills rather than silently serving incomplete ones.
|
|
101
|
+
|
|
102
|
+
**Round-trip generation**: When programmatically generating or updating skill files, use `matter.stringify` to ensure the front-matter block is always correctly formatted rather than manually constructing `---\nkey: value\n---`.
|
|
103
|
+
|
|
104
|
+
## Alternatives Considered
|
|
105
|
+
|
|
106
|
+
| Package | Why not chosen |
|
|
107
|
+
|---------|---------------|
|
|
108
|
+
| `front-matter` | Older, YAML-only, less actively maintained |
|
|
109
|
+
| Manual `split('---')` | Fragile — breaks on `---` inside YAML block scalars, BOMs, and empty files |
|
|
110
|
+
| `vfile` + `remark-frontmatter` | Full remark pipeline is overkill for reading a single structured field |
|
|
111
|
+
| `yaml` alone | Cannot split front-matter from body — requires manual parsing of delimiters |
|
|
112
|
+
|
|
113
|
+
## Resources
|
|
114
|
+
|
|
115
|
+
- [GitHub](https://github.com/jonschlinkert/gray-matter)
|
|
116
|
+
- [npm](https://www.npmjs.com/package/gray-matter)
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# node:test
|
|
2
|
+
|
|
3
|
+
> The built-in test runner shipped with Node.js since v18, providing `describe`, `test`, and `assert` without any external dependencies.
|
|
4
|
+
|
|
5
|
+
[](https://nodejs.org/api/test.html)
|
|
6
|
+
[]()
|
|
7
|
+
|
|
8
|
+
## What is node:test?
|
|
9
|
+
|
|
10
|
+
`node:test` is the test runner built directly into Node.js. It was stabilized in Node.js v18 and provides the same structural primitives that Jest and Mocha users expect — `describe` for grouping, `test` for individual cases, `before`/`after` lifecycle hooks — but ships as part of the Node.js standard library with zero npm dependencies.
|
|
11
|
+
|
|
12
|
+
Tests are run by invoking `node --test <file>...` directly. Node discovers test files, runs them in parallel by default, and reports results in TAP (Test Anything Protocol) format or as human-readable output depending on the `--reporter` flag. There is no config file, no plugin system to configure, and no babel/esbuild transform pipeline — it runs your files exactly as Node would run any other module.
|
|
13
|
+
|
|
14
|
+
`node:assert` (also a built-in) provides the assertion library. The key methods are `assert.strictEqual`, `assert.deepStrictEqual`, `assert.match` (regex matching), `assert.ok`, `assert.throws`, and `assert.doesNotMatch`. These cover virtually every assertion Wazir's test suite requires.
|
|
15
|
+
|
|
16
|
+
## Why Wazir Uses node:test
|
|
17
|
+
|
|
18
|
+
Wazir is a CLI tooling package with a `"type": "module"` ESM codebase. The team chose `node:test` deliberately rather than defaulting to Jest or Vitest:
|
|
19
|
+
|
|
20
|
+
1. **Zero dependencies**: Wazir's `package.json` has exactly three runtime dependencies (ajv, gray-matter, yaml). A test runner adds only dev-time weight at best, but `node:test` adds nothing at all — not even a dev dependency. This keeps the package surface minimal and install times fast.
|
|
21
|
+
|
|
22
|
+
2. **No transform layer**: Jest requires either Babel or `--experimental-vm-modules` to work with ESM. Vitest handles ESM natively but bundles an entire Vite pipeline. `node --test` runs Wazir's ESM source files directly, exactly as `node src/cli.js` would. There is no separate build step, no source map configuration, and no module resolution differences between test and production.
|
|
23
|
+
|
|
24
|
+
3. **Built-in with the platform**: Wazir targets developers who already have Node.js. There is nothing to install, no version pinning to manage, and no possibility of the test runner becoming incompatible with a future Node.js release while the production code works fine.
|
|
25
|
+
|
|
26
|
+
4. **Sufficient API surface**: Wazir's tests are integration-style CLI tests and unit tests for pure functions. The `describe`/`test`/`assert` surface is everything needed. Mocking, snapshot testing, and parallel async test suites are not required.
|
|
27
|
+
|
|
28
|
+
## How Wazir Uses It
|
|
29
|
+
|
|
30
|
+
Every test file in `tooling/test/` imports from `node:test` and `node:assert`:
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import { describe, test } from 'node:test';
|
|
34
|
+
import assert from 'node:assert';
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Tests are organized with `describe` blocks grouping related scenarios, and `test` for individual assertions:
|
|
38
|
+
|
|
39
|
+
```js
|
|
40
|
+
describe('wazir validate command', () => {
|
|
41
|
+
test('validates the manifest from a nested working directory', () => {
|
|
42
|
+
const result = runCli(['validate', 'manifest'], {
|
|
43
|
+
cwd: path.join(ROOT, 'tooling'),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
assert.strictEqual(result.exitCode, 0);
|
|
47
|
+
assert.match(result.stdout, /manifest is valid/i);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
test('rejects manifest_version 1 with targeted migration guidance', () => {
|
|
51
|
+
// ...
|
|
52
|
+
assert.strictEqual(result.exitCode, 1);
|
|
53
|
+
assert.match(result.stderr, /manifest_version 1 is no longer supported/i);
|
|
54
|
+
assert.match(result.stderr, /migrate to manifest_version 2/i);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The `package.json` test script runs all active test files in a single `node --test` invocation:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
"test:active": "node --test tooling/test/cli.test.js tooling/test/validate.test.js tooling/test/index.test.js tooling/test/doctor-status.test.js tooling/test/guard-hooks.test.js tooling/test/export.test.js tooling/test/capture.test.js tooling/test/schema-examples.test.js tooling/test/git-flow-docs.test.js tooling/test/role-contracts.test.js tooling/test/ci-workflow.test.js"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Integration tests use `execFileSync` to spawn the CLI as a child process and verify its stdout, stderr, and exit code — a common pattern across all test files:
|
|
66
|
+
|
|
67
|
+
```js
|
|
68
|
+
function runCli(args, options = {}) {
|
|
69
|
+
try {
|
|
70
|
+
const stdout = execFileSync('node', [CLI_PATH, ...args], {
|
|
71
|
+
encoding: 'utf8',
|
|
72
|
+
cwd: options.cwd ?? ROOT,
|
|
73
|
+
});
|
|
74
|
+
return { exitCode: 0, stdout, stderr: '' };
|
|
75
|
+
} catch (error) {
|
|
76
|
+
return {
|
|
77
|
+
exitCode: error.status ?? 1,
|
|
78
|
+
stdout: error.stdout ?? '',
|
|
79
|
+
stderr: error.stderr ?? '',
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Fixture setup and teardown use `try/finally` blocks because `node:test` does not have an `afterEach` that runs on failure unless you use the full lifecycle hooks API. The `finally` block ensures `fs.rmSync` always cleans up temp directories even when assertions throw.
|
|
86
|
+
|
|
87
|
+
## Key Concepts
|
|
88
|
+
|
|
89
|
+
**`node --test`**: The CLI entry point. Pass one or more file paths explicitly. Node runs each file and aggregates results. Exits with code `0` on all-pass, non-zero on any failure.
|
|
90
|
+
|
|
91
|
+
**`describe`**: A grouping block. Tests inside a `describe` share a label prefix in the output. Nesting is supported.
|
|
92
|
+
|
|
93
|
+
**`test`**: An individual test case. Receives a callback. Passes if the callback returns without throwing; fails if an assertion throws an `AssertionError` or any other error is thrown.
|
|
94
|
+
|
|
95
|
+
**`assert.strictEqual(actual, expected)`**: Uses `===` comparison. This is distinct from `assert.equal`, which uses `==`. Wazir always uses `strictEqual`.
|
|
96
|
+
|
|
97
|
+
**`assert.match(string, regexp)`**: Passes if the string matches the regex. Used heavily for CLI output assertions where exact text is not required but a pattern must appear.
|
|
98
|
+
|
|
99
|
+
**`assert.deepStrictEqual(actual, expected)`**: Recursively compares objects and arrays with `===` semantics for primitives. Used for structured output assertions like JSON payloads.
|
|
100
|
+
|
|
101
|
+
## API Reference (Wazir-relevant subset)
|
|
102
|
+
|
|
103
|
+
| API | Usage in Wazir |
|
|
104
|
+
|-----|---------------------|
|
|
105
|
+
| `describe(label, fn)` | Groups related tests in every test file |
|
|
106
|
+
| `test(label, fn)` | Every individual test case |
|
|
107
|
+
| `assert.strictEqual(a, b)` | Exit code checks, string equality |
|
|
108
|
+
| `assert.match(str, re)` | CLI stdout/stderr pattern matching |
|
|
109
|
+
| `assert.deepStrictEqual(a, b)` | JSON output structure assertions |
|
|
110
|
+
| `assert.ok(value, msg)` | Boolean truthy assertions with a message |
|
|
111
|
+
| `assert.throws(fn, re)` | Error-throwing assertions in `export.test.js` |
|
|
112
|
+
| `assert.doesNotMatch(str, re)` | Negative pattern assertions |
|
|
113
|
+
|
|
114
|
+
## Common Patterns
|
|
115
|
+
|
|
116
|
+
**CLI integration tests via `execFileSync`**: Spawn the real CLI binary, capture stdout/stderr, assert on exit code and output text. This tests the full system including argument parsing, file I/O, and error formatting — not just individual functions.
|
|
117
|
+
|
|
118
|
+
**Temp fixture directories**: Use `fs.mkdtempSync` to create isolated project roots per test, populate them with the minimal required files, run the CLI against them, and clean up with `fs.rmSync` in a `finally` block.
|
|
119
|
+
|
|
120
|
+
**`try/finally` cleanup**: Because `node:test` does not run `afterEach` on assertion failures without explicit lifecycle hook usage, wrap each fixture test in `try { ... } finally { fs.rmSync(...) }`.
|
|
121
|
+
|
|
122
|
+
**`assert.match` for CLI output**: Prefer regex over exact string comparison for CLI messages. Messages evolve; patterns are stable.
|
|
123
|
+
|
|
124
|
+
## Alternatives Considered
|
|
125
|
+
|
|
126
|
+
| Package | Why not chosen |
|
|
127
|
+
|---------|---------------|
|
|
128
|
+
| Jest | Requires Babel or `--experimental-vm-modules` for ESM; heavy dependency tree |
|
|
129
|
+
| Vitest | Excellent ESM support but bundles Vite, adding significant install weight |
|
|
130
|
+
| Mocha + Chai | Two packages instead of zero; needs ESM configuration |
|
|
131
|
+
| tap | TAP-native but external; `node:test` outputs TAP natively anyway |
|
|
132
|
+
|
|
133
|
+
## Resources
|
|
134
|
+
|
|
135
|
+
- [Node.js test runner documentation](https://nodejs.org/api/test.html)
|
|
136
|
+
- [Node.js assert documentation](https://nodejs.org/api/assert.html)
|
|
137
|
+
- [Node.js blog: built-in test runner](https://nodejs.org/en/blog/announcements/v18-release-announce)
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# yaml
|
|
2
|
+
|
|
3
|
+
> A fully-featured YAML 1.2 parser and serializer for JavaScript, with support for all YAML types, custom tags, and streaming.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/yaml)
|
|
6
|
+
[](https://github.com/eemeli/yaml/blob/main/LICENSE)
|
|
7
|
+
[](https://www.npmjs.com/package/yaml)
|
|
8
|
+
|
|
9
|
+
## What is yaml?
|
|
10
|
+
|
|
11
|
+
The `yaml` package (published by Eemeli Aro) is the most complete YAML 1.2 implementation in JavaScript. It goes beyond the YAML 1.1 subset that many older parsers handle and correctly implements the full 1.2 specification — including proper boolean handling (`true`/`false` only, not `yes`/`no`), correct integer/float parsing, null semantics, and multi-document streams.
|
|
12
|
+
|
|
13
|
+
Unlike `js-yaml`, the `yaml` package provides a full document object model (DOM): you can parse YAML into an AST, inspect and modify nodes, and then serialize back to YAML while preserving comments, formatting hints, and custom tags. For Wazir's use case — reading manifest and hook definition files — only the `YAML.parse()` surface is needed, but the underlying fidelity of the parser matters for correctness.
|
|
14
|
+
|
|
15
|
+
The package is ESM-native, ships with TypeScript types, and has zero runtime dependencies, making it appropriate for a lean CLI tool like Wazir that must install and run quickly.
|
|
16
|
+
|
|
17
|
+
## Why Wazir Uses yaml
|
|
18
|
+
|
|
19
|
+
Wazir's primary configuration artifact is `wazir.manifest.yaml` — a YAML file declaring the project's hosts, workflows, phases, roles, protected paths, and adapter configuration. Every validation, export, and status command starts by reading this file with `YAML.parse()`.
|
|
20
|
+
|
|
21
|
+
The `yaml` package was chosen over alternatives for these reasons:
|
|
22
|
+
|
|
23
|
+
1. **YAML 1.2 compliance**: `wazir.manifest.yaml` uses plain YAML 1.2 constructs without `yes`/`no` booleans or YAML 1.1 edge cases, but having a parser that correctly handles the spec avoids subtle future bugs as schemas evolve.
|
|
24
|
+
2. **ESM native**: Wazir's `package.json` declares `"type": "module"`, which means all imports are ESM. The `yaml` package ships a proper ESM entry point (`import YAML from 'yaml'`). `js-yaml` requires an additional import path dance in ESM contexts.
|
|
25
|
+
3. **Clear error messages**: When `YAML.parse()` encounters a malformed file, it throws a `YAMLParseError` with a line/column pointer and an excerpt of the offending content — far more actionable than `js-yaml`'s generic messages.
|
|
26
|
+
4. **Actively maintained**: The package receives regular updates and the maintainer is responsive to spec compliance issues.
|
|
27
|
+
|
|
28
|
+
## How Wazir Uses It
|
|
29
|
+
|
|
30
|
+
All YAML file reading is consolidated in a single loader function:
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
// tooling/src/loaders.js
|
|
34
|
+
import YAML from 'yaml';
|
|
35
|
+
import fs from 'node:fs';
|
|
36
|
+
|
|
37
|
+
export function readYamlFile(filePath) {
|
|
38
|
+
return YAML.parse(fs.readFileSync(filePath, 'utf8'));
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
This function is imported by every module that needs to read YAML:
|
|
43
|
+
|
|
44
|
+
- `tooling/src/commands/validate.js` — reads `wazir.manifest.yaml` and all hook definition files in `hooks/definitions/*.yaml`
|
|
45
|
+
- `tooling/src/export/compiler.js` — reads `wazir.manifest.yaml` to drive the host export build
|
|
46
|
+
- `tooling/test/validate.test.js` and `tooling/test/schema-examples.test.js` — read YAML example templates to validate against schemas
|
|
47
|
+
|
|
48
|
+
The `listYamlFiles` helper in `loaders.js` pairs with `readYamlFile` to enumerate and read entire directories of YAML files:
|
|
49
|
+
|
|
50
|
+
```js
|
|
51
|
+
export function listYamlFiles(dirPath) {
|
|
52
|
+
return fs.readdirSync(dirPath)
|
|
53
|
+
.filter((entry) => entry.endsWith('.yaml') || entry.endsWith('.yml'))
|
|
54
|
+
.sort()
|
|
55
|
+
.map((entry) => path.join(dirPath, entry));
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Hook definition files (`hooks/definitions/*.yaml`) are loaded this way — the validator enumerates all files, reads each with `readYamlFile`, then validates each against the hook JSON Schema.
|
|
60
|
+
|
|
61
|
+
In the test suite, the YAML example template for the manifest is read and validated end-to-end:
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
// tooling/test/schema-examples.test.js
|
|
65
|
+
['templates/examples/wazir-manifest.example.yaml', 'schemas/wazir-manifest.schema.json', 'yaml'],
|
|
66
|
+
// ...
|
|
67
|
+
function loadExample(examplePath, kind) {
|
|
68
|
+
return kind === 'yaml' ? readYamlFile(absolutePath) : readJsonFile(absolutePath);
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Key Concepts
|
|
73
|
+
|
|
74
|
+
**`YAML.parse(string)`**: The primary API. Parses a YAML string and returns a plain JavaScript value (object, array, string, number, boolean, or null). Throws `YAMLParseError` on invalid input.
|
|
75
|
+
|
|
76
|
+
**`YAML.stringify(value)`**: Serializes a JavaScript value to a YAML string. Wazir does not currently use this, but it is the correct way to write YAML programmatically.
|
|
77
|
+
|
|
78
|
+
**YAML 1.2 vs 1.1**: The critical difference is boolean parsing. YAML 1.1 treats `yes`, `no`, `on`, `off` as booleans; YAML 1.2 does not. Wazir schemas use explicit `true`/`false` to stay 1.2-safe.
|
|
79
|
+
|
|
80
|
+
**Document object model**: `YAML.parseDocument()` returns a `Document` node with full AST access, preserving comments. Wazir does not need this — `YAML.parse()` returning a plain object is sufficient.
|
|
81
|
+
|
|
82
|
+
## API Reference (Wazir-relevant subset)
|
|
83
|
+
|
|
84
|
+
| API | Usage in Wazir |
|
|
85
|
+
|-----|---------------------|
|
|
86
|
+
| `YAML.parse(string)` | Reads every `.yaml` file in the tooling — manifests, hooks, example templates |
|
|
87
|
+
| `YAML.stringify(value)` | Not currently used; available for future YAML generation |
|
|
88
|
+
| `YAMLParseError` | Thrown on malformed YAML; surfaces file path and line number in error messages |
|
|
89
|
+
|
|
90
|
+
## Common Patterns
|
|
91
|
+
|
|
92
|
+
**Centralized loader**: Never call `YAML.parse()` directly in feature modules. Keep it in `loaders.js` so that error handling, encoding, and the import can be changed in one place.
|
|
93
|
+
|
|
94
|
+
**Parse-then-validate**: Wazir always passes the result of `readYamlFile()` immediately to `validateAgainstSchema()`. YAML parsing catches syntax errors; JSON Schema validation catches semantic errors. These are two distinct failure modes.
|
|
95
|
+
|
|
96
|
+
**Consistent file sorting**: `listYamlFiles` sorts file names before returning them. This ensures that validation and export produce deterministic results regardless of filesystem ordering, which matters for reproducible builds and test stability.
|
|
97
|
+
|
|
98
|
+
## Alternatives Considered
|
|
99
|
+
|
|
100
|
+
| Package | Why not chosen |
|
|
101
|
+
|---------|---------------|
|
|
102
|
+
| `js-yaml` | YAML 1.1 only, requires import path workaround in strict ESM, less clear parse errors |
|
|
103
|
+
| `yamljs` | Abandoned, YAML 1.1, known compliance bugs |
|
|
104
|
+
| `@humanwhocodes/momoa` | JSON/JSONC only, not YAML |
|
|
105
|
+
| Inline `JSON.parse` with `.yaml` extension | Not YAML — Wazir configs use YAML intentionally for readability |
|
|
106
|
+
|
|
107
|
+
## Resources
|
|
108
|
+
|
|
109
|
+
- [Official documentation](https://eemeli.org/yaml/)
|
|
110
|
+
- [GitHub](https://github.com/eemeli/yaml)
|
|
111
|
+
- [npm](https://www.npmjs.com/package/yaml)
|
|
112
|
+
- [YAML 1.2 specification](https://yaml.org/spec/1.2.2/)
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Configuration Reference
|
|
2
|
+
|
|
3
|
+
Wazir configuration currently starts from the canonical manifest:
|
|
4
|
+
|
|
5
|
+
- `wazir.manifest.yaml`
|
|
6
|
+
|
|
7
|
+
That manifest is the source of truth for:
|
|
8
|
+
|
|
9
|
+
- project identity
|
|
10
|
+
- project description and versioning policy
|
|
11
|
+
- canonical repo paths
|
|
12
|
+
- supported hosts
|
|
13
|
+
- canonical workflows and export targets
|
|
14
|
+
- phase and role rosters
|
|
15
|
+
- required hooks
|
|
16
|
+
- protected paths
|
|
17
|
+
- brand-term enforcement for active surfaces
|
|
18
|
+
- optional adapters
|
|
19
|
+
- validation checks
|
|
20
|
+
|
|
21
|
+
## Path policy
|
|
22
|
+
|
|
23
|
+
Repo-managed canonical paths live in the repository:
|
|
24
|
+
|
|
25
|
+
- `input/`
|
|
26
|
+
- `roles/`
|
|
27
|
+
- `workflows/`
|
|
28
|
+
- `skills/`
|
|
29
|
+
- `hooks/`
|
|
30
|
+
- `templates/`
|
|
31
|
+
- `schemas/`
|
|
32
|
+
- `expertise/`
|
|
33
|
+
- `docs/`
|
|
34
|
+
- `exports/`
|
|
35
|
+
- `tooling/`
|
|
36
|
+
- `memory/`
|
|
37
|
+
- `examples/`
|
|
38
|
+
|
|
39
|
+
The default external run-state root is declared in the manifest as:
|
|
40
|
+
|
|
41
|
+
- `~/.wazir/projects/{project_slug}`
|
|
42
|
+
|
|
43
|
+
That path is intentionally outside the repo so normal runs do not dirty adopters' worktrees.
|
|
44
|
+
|
|
45
|
+
Indexing and recall commands also accept:
|
|
46
|
+
|
|
47
|
+
- `--state-root <path>`
|
|
48
|
+
|
|
49
|
+
Use that override for tests, CI fixtures, or operators who need the index somewhere else.
|
|
50
|
+
|
|
51
|
+
The status command uses the same state-root resolution rules when reading run-local status files.
|
|
52
|
+
|
|
53
|
+
## Protected paths
|
|
54
|
+
|
|
55
|
+
The current protected path roster is declared in `wazir.manifest.yaml`:
|
|
56
|
+
|
|
57
|
+
- `input`
|
|
58
|
+
- `roles`
|
|
59
|
+
- `workflows`
|
|
60
|
+
- `schemas`
|
|
61
|
+
- `exports/hosts`
|
|
62
|
+
|
|
63
|
+
These paths are reserved for canonical source material or generated host exports and should not be rewritten by ad hoc task output.
|
|
64
|
+
|
|
65
|
+
Generated host packages live under:
|
|
66
|
+
|
|
67
|
+
- `exports/hosts/claude`
|
|
68
|
+
- `exports/hosts/codex`
|
|
69
|
+
- `exports/hosts/gemini`
|
|
70
|
+
- `exports/hosts/cursor`
|
|
71
|
+
|
|
72
|
+
## Dependency policy
|
|
73
|
+
|
|
74
|
+
The active CLI keeps runtime dependencies small and explicit:
|
|
75
|
+
|
|
76
|
+
- `ajv` for JSON Schema enforcement
|
|
77
|
+
- `yaml` for canonical manifest and hook parsing
|
|
78
|
+
- `gray-matter` for frontmatter parsing in library tests
|
|
79
|
+
|
|
80
|
+
Policy:
|
|
81
|
+
|
|
82
|
+
- prefer built-in Node APIs unless a library meaningfully reduces correctness risk
|
|
83
|
+
- allow small parsing and schema-validation libraries
|
|
84
|
+
- do not add framework, server, or web-stack dependencies to the product surface
|
|
85
|
+
- keep optional adapter integrations external by default
|
|
86
|
+
|
|
87
|
+
## Adapter policy
|
|
88
|
+
|
|
89
|
+
The manifest currently declares one optional adapter:
|
|
90
|
+
|
|
91
|
+
- `context_mode`
|
|
92
|
+
|
|
93
|
+
It is:
|
|
94
|
+
|
|
95
|
+
- disabled by default
|
|
96
|
+
- optional
|
|
97
|
+
- external-install mode
|
|
98
|
+
|
|
99
|
+
Wazir must remain useful without the adapter present.
|
|
100
|
+
|
|
101
|
+
## Versioning and naming guardrails
|
|
102
|
+
|
|
103
|
+
The manifest also records:
|
|
104
|
+
|
|
105
|
+
- a versioning policy for the active pre-`1.0` line
|
|
106
|
+
- export targets for each supported host
|
|
107
|
+
- brand-term enforcement rules for active surfaces
|
|
108
|
+
- `manifest_version`, currently `2`, for breaking manifest contract changes
|
|
109
|
+
|
|
110
|
+
Those fields exist to keep the active repo aligned with the Wazir product identity.
|
|
111
|
+
|
|
112
|
+
The required manifest fields are:
|
|
113
|
+
|
|
114
|
+
- `project.description`
|
|
115
|
+
- `versioning_policy`
|
|
116
|
+
- `workflows`
|
|
117
|
+
- `export_targets`
|
|
118
|
+
- `prohibited_terms`
|
|
119
|
+
|
|
120
|
+
Current enforcement scope:
|
|
121
|
+
|
|
122
|
+
- manifest-declared role files under `roles/`
|
|
123
|
+
- manifest-declared workflow files under `workflows/`
|
|
124
|
+
|
|
125
|
+
That scope is intentional. The manifest check is a canonical-surface guard for active operating-model content, not a blanket full-repo grep.
|
|
126
|
+
|
|
127
|
+
Out of scope for this manifest check:
|
|
128
|
+
|
|
129
|
+
- undeclared helper scripts
|
|
130
|
+
- undeclared config files
|
|
131
|
+
- scratch files
|
|
132
|
+
- generated run artifacts
|
|
133
|
+
|
|
134
|
+
Maintainers are responsible for policing those surfaces with the separate docs-truth, runtime-surface, and repository review checks.
|
|
135
|
+
|
|
136
|
+
## Workflows vs phases
|
|
137
|
+
|
|
138
|
+
- `phases` are the core lifecycle states of the operating model.
|
|
139
|
+
- `workflows` are the canonical callable or review-gated entrypoints that drive those phases.
|
|
140
|
+
|
|
141
|
+
They overlap heavily, but they are not identical:
|
|
142
|
+
|
|
143
|
+
- `spec_challenge`, `plan_review`, and `prepare_next` are workflows that sit between or around the core execution phases.
|
|
144
|
+
- Validators and exports should treat manifest-declared workflows as the canonical workflow file roster.
|
|
145
|
+
|
|
146
|
+
## Current index parser roster
|
|
147
|
+
|
|
148
|
+
The active manifest currently declares built-in heuristic extractors for:
|
|
149
|
+
|
|
150
|
+
- JavaScript
|
|
151
|
+
- TypeScript
|
|
152
|
+
- Python
|
|
153
|
+
- Go
|
|
154
|
+
- Rust
|
|
155
|
+
- Java
|
|
156
|
+
- SQL
|
|
157
|
+
- JSON
|
|
158
|
+
- YAML
|
|
159
|
+
- Markdown
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Expertise Index
|
|
2
|
+
|
|
3
|
+
This reference documents the expertise module system and anti-pattern catalog.
|
|
4
|
+
|
|
5
|
+
## Metadata
|
|
6
|
+
|
|
7
|
+
Top-level expertise metadata lives in:
|
|
8
|
+
|
|
9
|
+
- `expertise/index.yaml`
|
|
10
|
+
|
|
11
|
+
That index records domain, use cases, review applicability, and freshness date so loading can stay scoped instead of brute-force.
|
|
12
|
+
|
|
13
|
+
## Module locations
|
|
14
|
+
|
|
15
|
+
- Domain expertise modules: `expertise/` (organized by domain subdirectory)
|
|
16
|
+
- Anti-pattern modules: `expertise/antipatterns/`
|
|
17
|
+
- Research source material: `docs/research/`
|
|
18
|
+
|
|
19
|
+
## Loading policy
|
|
20
|
+
|
|
21
|
+
| Phase | Loads from |
|
|
22
|
+
|-------|-----------|
|
|
23
|
+
| `clarify`, `discover` | `input/`, active docs, `docs/research/` |
|
|
24
|
+
| `specify`, `plan` | Relevant expertise slices based on stack and risks |
|
|
25
|
+
| `review` | `expertise/antipatterns/` first, then broader domain modules |
|
|
26
|
+
| `learn` | Can propose updates to expertise (not silently rewrite) |
|
|
27
|
+
|
|
28
|
+
## Anti-pattern catalog
|
|
29
|
+
|
|
30
|
+
The `expertise/antipatterns/` directory contains modules that catch:
|
|
31
|
+
|
|
32
|
+
- **Fake completion** — claiming done without evidence
|
|
33
|
+
- **Unwired abstractions** — interfaces defined but never connected
|
|
34
|
+
- **Shallow tests** — tests that pass without exercising real behavior
|
|
35
|
+
- **Security theater** — security measures that look good but do not protect
|
|
36
|
+
- **Architecture drift** — implementation diverging from documented architecture
|
|
37
|
+
- **AI-coding failure modes** — patterns specific to LLM-generated code
|
|
38
|
+
|
|
39
|
+
## Humanize domain
|
|
40
|
+
|
|
41
|
+
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.
|
|
42
|
+
|
|
43
|
+
**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.
|
|
44
|
+
|
|
45
|
+
## Rules
|
|
46
|
+
|
|
47
|
+
- Expertise modules must be scoped by domain and use case
|
|
48
|
+
- Anti-patterns are always loaded before domain modules during review
|
|
49
|
+
- The composition engine enforces a maximum of 15 modules per dispatch
|
|
50
|
+
- Token budget is enforced per dispatch
|
|
51
|
+
|
|
52
|
+
For conceptual understanding of how the composition engine works, see [Composition Engine](../concepts/composition-engine.md).
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Git-Flow Policy
|
|
2
|
+
|
|
3
|
+
This document defines the branching model, merge discipline, and changelog rules for the Wazir project.
|
|
4
|
+
|
|
5
|
+
## Branching Model
|
|
6
|
+
|
|
7
|
+
| Branch | Pattern | Created From | Merges To | Protected |
|
|
8
|
+
|--------|---------|-------------|-----------|-----------|
|
|
9
|
+
| Main | `main` | — | — | Yes |
|
|
10
|
+
| Develop | `develop` | `main` (once) | — | Yes |
|
|
11
|
+
| Feature | `feat/<slug>` or `feature/<slug>` | `develop` | `develop` | No |
|
|
12
|
+
| Codex | `codex/<slug>` | `develop` | `develop` | No |
|
|
13
|
+
| Release | `release/<version>` | `develop` | `main` + `develop` | No |
|
|
14
|
+
| Hotfix | `hotfix/<slug>` | `main` | `main` + `develop` | No |
|
|
15
|
+
|
|
16
|
+
## Merge Rules
|
|
17
|
+
|
|
18
|
+
- All merges to `develop` and `main` use `--no-ff` to preserve merge commits
|
|
19
|
+
- Merges happen only after the full Executor, Verifier, Reviewer gate passes
|
|
20
|
+
- No role performs the merge — it is a post-review integration step
|
|
21
|
+
|
|
22
|
+
## Conventional Commits
|
|
23
|
+
|
|
24
|
+
All commit messages must follow the conventional commits specification:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
<type>(<optional scope>): <description>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Allowed types: `feat`, `fix`, `docs`, `chore`, `refactor`, `test`, `ci`, `perf`, `build`
|
|
31
|
+
|
|
32
|
+
## Changelog Rules
|
|
33
|
+
|
|
34
|
+
- Format: Keep a Changelog (keepachangelog.com)
|
|
35
|
+
- Every user-facing change must have an entry under `[Unreleased]`
|
|
36
|
+
- Valid categories: Added, Changed, Deprecated, Removed, Fixed, Security
|
|
37
|
+
- The executor updates the changelog; the verifier validates it; the reviewer flags quality issues
|
|
38
|
+
|
|
39
|
+
## Enforcement
|
|
40
|
+
|
|
41
|
+
- **Tooling:** `wazir validate branches`, `wazir validate commits`, `wazir validate changelog`
|
|
42
|
+
- **CI:** All three validators run on pull requests; `--require-entries` blocks feature/codex/hotfix branches without changelog entries
|
|
43
|
+
- **Roles:** Each role has documented git-flow responsibilities in its contract
|