@vesviet/agent-skills 5.7.3 β†’ 5.10.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 (241) hide show
  1. package/INDEX.md +21 -18
  2. package/README.md +11 -10
  3. package/VERSION +1 -1
  4. package/adapters/antigravity/ANTIGRAVITY.md +89 -4
  5. package/adapters/antigravity/INDEX_TIER1.json +1294 -0
  6. package/adapters/antigravity/a2a-config.template.yaml +22 -8
  7. package/adapters/antigravity/role-skill-index.json +48 -19
  8. package/adapters/claude/CLAUDE_ADAPTER.md +1 -1
  9. package/adapters/claude/settings.template.json +7 -3
  10. package/adapters/cursor/hooks.template.json +3 -1
  11. package/core/contracts/README.md +4 -1
  12. package/core/contracts/schemas/INDEX.md +7 -1
  13. package/core/contracts/schemas/a2a-artifact.json +9 -2
  14. package/core/contracts/schemas/a2a-jsonrpc-envelope.json +7 -2
  15. package/core/contracts/schemas/a2a-task-progress.json +15 -4
  16. package/core/contracts/schemas/a2a-task.json +11 -3
  17. package/core/contracts/schemas/agent-card.json +48 -1
  18. package/core/contracts/schemas/agent-skills-discovery.json +91 -0
  19. package/core/contracts/schemas/compliance-report.json +255 -0
  20. package/core/contracts/schemas/mcp-server-card.json +193 -0
  21. package/core/contracts/schemas/seo-content-brief.json +1 -1
  22. package/core/contracts/schemas/seo-weekly-board.json +1 -1
  23. package/core/contracts/schemas/series-article.json +1 -1
  24. package/core/policies/action-boundaries.yaml +334 -2
  25. package/core/policies/mcp-tool-map.yaml +61 -4
  26. package/core/roles/3d-graphics-engineer.md +5 -1
  27. package/core/roles/README.md +1 -1
  28. package/core/roles/agent-coordinator.md +21 -3
  29. package/core/roles/agent-discovery-engineer.md +27 -8
  30. package/core/roles/ai-systems-engineer.md +3 -1
  31. package/core/roles/aws-engineer.md +6 -8
  32. package/core/roles/backend-developer.md +5 -5
  33. package/core/roles/business-analyst.md +4 -2
  34. package/core/roles/cloudflare-engineer.md +4 -2
  35. package/core/roles/content-manager.md +3 -1
  36. package/core/roles/content-writer.md +3 -1
  37. package/core/roles/data-analyst.md +3 -1
  38. package/core/roles/data-engineer.md +3 -1
  39. package/core/roles/devops-engineer.md +9 -9
  40. package/core/roles/ecommerce-engineer.md +7 -7
  41. package/core/roles/frontend-developer.md +10 -8
  42. package/core/roles/game-developer.md +5 -3
  43. package/core/roles/mmo-engineer.md +8 -9
  44. package/core/roles/mobile-engineer.md +5 -3
  45. package/core/roles/product-manager.md +8 -9
  46. package/core/roles/project-manager.md +10 -13
  47. package/core/roles/prompt-engineer.md +6 -4
  48. package/core/roles/qa-engineer.md +9 -9
  49. package/core/roles/references/vietnam-accounting-specialist-review-checklist.md +6 -6
  50. package/core/roles/researcher.md +12 -14
  51. package/core/roles/reverse-engineer.md +5 -2
  52. package/core/roles/reviewer.md +7 -5
  53. package/core/roles/role-standard.md +23 -1
  54. package/core/roles/sdet.md +7 -5
  55. package/core/roles/security-engineer.md +9 -7
  56. package/core/roles/seo-analyst.md +9 -7
  57. package/core/roles/solution-architect.md +8 -9
  58. package/core/roles/sre.md +8 -6
  59. package/core/roles/system-engineer.md +20 -20
  60. package/core/roles/task-planner.md +8 -10
  61. package/core/roles/teacher.md +8 -6
  62. package/core/roles/technical-architect.md +10 -8
  63. package/core/roles/technical-lead.md +9 -7
  64. package/core/roles/technical-writer.md +8 -6
  65. package/core/roles/ui-ux-designer.md +8 -7
  66. package/core/roles/vietnam-accounting-specialist.md +26 -24
  67. package/core/roles/vietnam-legal-counsel.md +6 -4
  68. package/core/rules/code.md +11 -6
  69. package/core/skills/README.md +3 -2
  70. package/core/skills/agent/agent-a2a-protocol/SKILL.md +25 -93
  71. package/core/skills/agent/agent-memory-compaction/SKILL.md +27 -0
  72. package/core/skills/agent/architect-mcp-server/SKILL.md +35 -27
  73. package/core/skills/agent/configure-agent-commerce/SKILL.md +2 -0
  74. package/core/skills/agent/configure-agent-commerce/examples/ucp-commerce-manifest-and-endpoints.json +55 -0
  75. package/core/skills/agent/configure-agent-commerce/references/acp-ucp-agent-commerce-manifest-specs.md +66 -0
  76. package/core/skills/agent/configure-agent-skills/SKILL.md +60 -68
  77. package/core/skills/agent/manage-agent-identity/SKILL.md +2 -0
  78. package/core/skills/agent/manage-agent-identity/examples/agent-identity-spire-workload.yaml +72 -0
  79. package/core/skills/agent/manage-agent-identity/references/nhi-lifecycle-and-token-rotation.md +45 -0
  80. package/core/skills/ai/openrouter-task/SKILL.md +5 -5
  81. package/core/skills/ai-agent/agent-evaluation/resources/eval-benchmarks/eval-cases.json +529 -0
  82. package/core/skills/ai-agent/agent-evaluation/resources/eval-benchmarks/eval-manifest.yaml +61 -0
  83. package/core/skills/ai-agent/agent-evaluation/scripts/run-eval-benchmark.py +856 -0
  84. package/core/skills/ai-agent/agent-evaluation/tests/test_golden_benchmarks.py +248 -0
  85. package/core/skills/ai-agent/context-optimization/SKILL.md +61 -60
  86. package/core/skills/ai-agent/context-optimization/examples/context-pruner-and-reorderer.py +85 -0
  87. package/core/skills/ai-agent/context-optimization/references/token-budgeting-and-attention-allocation.md +47 -0
  88. package/core/skills/ai-agent/memory-hygiene/SKILL.md +13 -0
  89. package/core/skills/ai-agent/memory-hygiene/examples/memory-audit-and-compaction-routine.py +90 -0
  90. package/core/skills/ai-agent/memory-hygiene/references/agent-memory-vault-spec.md +137 -0
  91. package/core/skills/ai-agent/memory-hygiene/references/owasp-asi06-and-memory-poisoning-defense.md +38 -0
  92. package/core/skills/backend/add-api-endpoint/examples/express-zod-rfc9457-endpoint.md +329 -0
  93. package/core/skills/backend/add-api-endpoint/examples/kratos-go-clean-architecture-endpoint.md +405 -0
  94. package/core/skills/backend/add-api-endpoint/references/idempotency-and-rate-limiting.md +116 -0
  95. package/core/skills/backend/add-event-handler/SKILL.md +1 -1
  96. package/core/skills/backend/scaffold-new-service/SKILL.md +2 -1
  97. package/core/skills/backend/scaffold-new-service/references/deep-modules-and-seams.md +43 -0
  98. package/core/skills/business/elicit-requirements/SKILL.md +1 -0
  99. package/core/skills/commerce/handle-checkout-flow/SKILL.md +3 -1
  100. package/core/skills/commerce/handle-checkout-flow/examples/production-checkout-orchestrator.ts +185 -0
  101. package/core/skills/commerce/handle-checkout-flow/references/pci-dss-v4-and-agentic-checkout-specs.md +72 -0
  102. package/core/skills/commerce/integrate-payment-gateway/SKILL.md +3 -1
  103. package/core/skills/commerce/integrate-payment-gateway/examples/resilient-webhook-and-mpp-handler.ts +164 -0
  104. package/core/skills/commerce/integrate-payment-gateway/references/mpp-x402-and-webhook-security-specs.md +47 -0
  105. package/core/skills/commerce/manage-order-fulfillment/SKILL.md +3 -1
  106. package/core/skills/commerce/manage-order-fulfillment/examples/temporal-fulfillment-saga.ts +104 -0
  107. package/core/skills/commerce/manage-order-fulfillment/references/event-sourced-fulfillment-and-carrier-webhooks.md +58 -0
  108. package/core/skills/commerce/manage-product-catalog/SKILL.md +3 -1
  109. package/core/skills/commerce/manage-product-catalog/examples/hybrid-search-and-governance-pipeline.ts +120 -0
  110. package/core/skills/commerce/manage-product-catalog/references/semantic-vector-catalog-and-graphrag.md +54 -0
  111. package/core/skills/content/write-article/SKILL.md +1 -1
  112. package/core/skills/document/pdf/SKILL.md +1 -0
  113. package/core/skills/document/pdf/references/pdf-acroforms-and-pdfplumber-specs.md +54 -0
  114. package/core/skills/document/pdf/scripts/check_fillable_fields.py +144 -0
  115. package/core/skills/document/pdf/scripts/fill_fillable_fields.py +145 -0
  116. package/core/skills/documentation/configure-llms-txt/SKILL.md +2 -0
  117. package/core/skills/documentation/configure-llms-txt/examples/canonical-llms-txt-and-full-txt.md +45 -0
  118. package/core/skills/documentation/configure-llms-txt/references/llms-txt-and-llms-full-txt-standard.md +37 -0
  119. package/core/skills/documentation/write-documentation/SKILL.md +3 -1
  120. package/core/skills/documentation/write-documentation/examples/microservice-production-readme-and-api-docs.md +70 -0
  121. package/core/skills/documentation/write-documentation/references/diataxis-framework-and-doc-standards.md +62 -0
  122. package/core/skills/foundation/ai-risk-assessment/SKILL.md +3 -5
  123. package/core/skills/foundation/ai-risk-assessment/examples/genai-system-risk-register.md +67 -0
  124. package/core/skills/foundation/ai-risk-assessment/references/nist-ai-rmf-and-eu-ai-act-taxonomy.md +49 -0
  125. package/core/skills/foundation/conduct-research/SKILL.md +1 -1
  126. package/core/skills/foundation/discernment-nudge/SKILL.md +1 -0
  127. package/core/skills/foundation/plan-technical-delivery/SKILL.md +2 -1
  128. package/core/skills/foundation/release-notes/SKILL.md +2 -3
  129. package/core/skills/foundation/release-notes/examples/enterprise-platform-release-notes.md +42 -0
  130. package/core/skills/foundation/release-notes/references/keep-a-changelog-and-semver-governance.md +43 -0
  131. package/core/skills/foundation/systematic-debugging/SKILL.md +5 -0
  132. package/core/skills/foundation/write-tests/examples/anti-tautological-tdd-walkthrough.md +204 -0
  133. package/core/skills/foundation/write-tests/examples/testcontainers-kratos-integration-test.md +186 -0
  134. package/core/skills/foundation/write-tests/references/contract-and-chaos-testing.md +187 -0
  135. package/core/skills/frontend/INDEX.json +16 -0
  136. package/core/skills/frontend/add-page-route/SKILL.md +3 -1
  137. package/core/skills/frontend/add-page-route/examples/streaming-rsc-page-with-view-transition.tsx +133 -0
  138. package/core/skills/frontend/add-page-route/references/rsc-routing-and-view-transitions.md +72 -0
  139. package/core/skills/frontend/add-ui-component/SKILL.md +3 -1
  140. package/core/skills/frontend/add-ui-component/examples/compound-dialog-and-form-actions.tsx +193 -0
  141. package/core/skills/frontend/add-ui-component/references/react19-component-standards-and-anti-slop.md +55 -0
  142. package/core/skills/frontend/component-composition/SKILL.md +2 -1
  143. package/core/skills/frontend/component-composition/examples/headless-combobox-compound-component.tsx +207 -0
  144. package/core/skills/frontend/frontend-testing/SKILL.md +3 -1
  145. package/core/skills/frontend/frontend-testing/examples/playwright-e2e-with-msw-and-axe.spec.ts +87 -0
  146. package/core/skills/frontend/frontend-testing/references/playwright-msw-and-a11y-testing-standards.md +78 -0
  147. package/core/skills/frontend/implement-ai-disclosure/SKILL.md +118 -0
  148. package/core/skills/frontend/implement-webmcp/SKILL.md +3 -1
  149. package/core/skills/frontend/implement-webmcp/examples/webmcp-provider-and-hitl-modal.tsx +163 -0
  150. package/core/skills/frontend/implement-webmcp/references/webmcp-architecture-and-hitl-security.md +48 -0
  151. package/core/skills/frontend/integrate-api-client/SKILL.md +3 -1
  152. package/core/skills/frontend/integrate-api-client/examples/orval-query-and-streaming-mutation.ts +102 -0
  153. package/core/skills/frontend/integrate-api-client/references/orval-tanstack-query-and-streaming-specs.md +57 -0
  154. package/core/skills/frontend/setup-design-system/SKILL.md +3 -1
  155. package/core/skills/frontend/setup-design-system/examples/tailwind-v4-theme-and-dtcg-tokens.css +87 -0
  156. package/core/skills/frontend/setup-design-system/references/tailwind-v4-oklch-and-dtcg-tokens.md +61 -0
  157. package/core/skills/frontend/setup-visual-regression/SKILL.md +3 -1
  158. package/core/skills/frontend/setup-visual-regression/examples/visual-regression-playwright.config.ts +83 -0
  159. package/core/skills/frontend/setup-visual-regression/references/visual-regression-docker-and-masking-specs.md +46 -0
  160. package/core/skills/gamedev/abstract-input-actions/SKILL.md +2 -0
  161. package/core/skills/gamedev/abstract-input-actions/examples/input-action-manager.ts +85 -0
  162. package/core/skills/gamedev/abstract-input-actions/references/action-mapping-and-analog-deadzones.md +54 -0
  163. package/core/skills/gamedev/architect-ecs-systems/SKILL.md +2 -0
  164. package/core/skills/gamedev/architect-ecs-systems/examples/bevy-flecs-combat-system.rs +73 -0
  165. package/core/skills/gamedev/architect-ecs-systems/references/data-oriented-design-and-archetype-ecs.md +39 -0
  166. package/core/skills/gamedev/author-game-ai/SKILL.md +2 -0
  167. package/core/skills/gamedev/author-game-ai/examples/modular-behavior-tree-ai.ts +98 -0
  168. package/core/skills/gamedev/author-game-ai/references/behavior-trees-and-utility-ai-curves.md +47 -0
  169. package/core/skills/gamedev/configure-physics-collision/SKILL.md +2 -0
  170. package/core/skills/gamedev/configure-physics-collision/examples/kinematic-physics-substepping.cpp +100 -0
  171. package/core/skills/gamedev/configure-physics-collision/references/continuous-collision-detection-and-substepping.md +50 -0
  172. package/core/skills/gamedev/develop-gameplay-systems/SKILL.md +2 -0
  173. package/core/skills/gamedev/develop-gameplay-systems/examples/kinematic-character-controller.gd +86 -0
  174. package/core/skills/gamedev/develop-gameplay-systems/references/deterministic-gameplay-state-machines.md +42 -0
  175. package/core/skills/gamedev/implement-save-persistence/SKILL.md +2 -0
  176. package/core/skills/gamedev/implement-save-persistence/examples/versioned-save-manager.ts +127 -0
  177. package/core/skills/gamedev/implement-save-persistence/references/versioned-save-schemas-and-checksums.md +44 -0
  178. package/core/skills/gamedev/render-webgl-threejs/SKILL.md +2 -0
  179. package/core/skills/gamedev/render-webgl-threejs/examples/production-threejs-webgpu-scene.ts +116 -0
  180. package/core/skills/gamedev/render-webgl-threejs/references/webgpu-threejs-pbr-pipeline.md +56 -0
  181. package/core/skills/mmo/analyze-campaign-roi/SKILL.md +2 -0
  182. package/core/skills/mmo/analyze-campaign-roi/examples/campaign-roi-and-roas-dashboard.py +80 -0
  183. package/core/skills/mmo/analyze-campaign-roi/references/multi-touch-attribution-and-cpa-analytics.md +33 -0
  184. package/core/skills/mmo/create-automation-script/SKILL.md +2 -0
  185. package/core/skills/mmo/create-automation-script/examples/stealth-browser-automation-flow.ts +65 -0
  186. package/core/skills/mmo/create-automation-script/references/stealth-cdp-and-behavioral-mimicry.md +37 -0
  187. package/core/skills/mmo/deploy-mmo-infrastructure/SKILL.md +2 -0
  188. package/core/skills/mmo/deploy-mmo-infrastructure/examples/proxy-health-probe-and-rotation-daemon.py +75 -0
  189. package/core/skills/mmo/deploy-mmo-infrastructure/references/proxy-pool-rotation-and-anti-detect-specs.md +45 -0
  190. package/core/skills/mmo/deploy-proxyware-fleet/SKILL.md +2 -0
  191. package/core/skills/mmo/deploy-proxyware-fleet/examples/docker-compose-depin-light-node-fleet.yaml +52 -0
  192. package/core/skills/mmo/deploy-proxyware-fleet/references/depin-bandwidth-monetization-node-specs.md +43 -0
  193. package/core/skills/mmo/generate-mmo-content/SKILL.md +2 -0
  194. package/core/skills/mmo/generate-mmo-content/examples/pseo-programmatic-page-generator.ts +76 -0
  195. package/core/skills/mmo/generate-mmo-content/references/pseo-landing-pages-and-social-video-hooks.md +39 -0
  196. package/core/skills/mmo/manage-mmo-assets/SKILL.md +2 -0
  197. package/core/skills/mmo/manage-mmo-assets/examples/mmo-asset-vault-manager.py +63 -0
  198. package/core/skills/mmo/manage-mmo-assets/references/mmo-asset-rbac-and-vault-isolation.md +38 -0
  199. package/core/skills/mmo/setup-tracking-system/SKILL.md +2 -0
  200. package/core/skills/mmo/setup-tracking-system/examples/meta-capi-s2s-event-dispatcher.ts +79 -0
  201. package/core/skills/mmo/setup-tracking-system/references/server-to-server-postback-and-capi-specs.md +45 -0
  202. package/core/skills/platform/add-telemetry-instrumentation/SKILL.md +2 -0
  203. package/core/skills/platform/add-telemetry-instrumentation/examples/kratos-otel-middleware-instrumentation.go +87 -0
  204. package/core/skills/platform/add-telemetry-instrumentation/references/opentelemetry-semantic-conventions-2026.md +37 -0
  205. package/core/skills/platform/aws-infrastructure/SKILL.md +2 -0
  206. package/core/skills/platform/aws-infrastructure/examples/opentofu-eks-pod-identity-vpc.tf +101 -0
  207. package/core/skills/platform/aws-infrastructure/references/opentofu-aws-zero-trust-and-irsa.md +40 -0
  208. package/core/skills/platform/setup-deployment/SKILL.md +4 -0
  209. package/core/skills/platform/setup-deployment/examples/kustomize-production-service-manifests.yaml +123 -0
  210. package/core/skills/platform/setup-deployment/references/interactive-hitl-wizard.md +55 -0
  211. package/core/skills/platform/setup-deployment/references/k8s-gitops-and-kustomize-invariants.md +40 -0
  212. package/core/skills/platform/supply-chain-security/SKILL.md +2 -0
  213. package/core/skills/platform/supply-chain-security/examples/github-actions-sbom-cosign.yaml +57 -0
  214. package/core/skills/platform/supply-chain-security/references/slsa-provenance-and-sbom-sigstore.md +60 -0
  215. package/core/skills/product/build-story-map/SKILL.md +2 -0
  216. package/core/skills/repo-ops/review-code/SKILL.md +2 -2
  217. package/core/skills/repo-ops/review-code/examples/adversarial-two-axis-pr-review.md +167 -0
  218. package/core/skills/repo-ops/review-code/examples/ai-vibe-slop-remediation.md +220 -0
  219. package/core/skills/repo-ops/review-code/references/supply-chain-and-migration-safety.md +103 -0
  220. package/core/skills/repo-ops/review-service/SKILL.md +1 -1
  221. package/core/skills/security-data/database-maintenance/SKILL.md +1 -1
  222. package/core/skills/security-data/manage-secrets/SKILL.md +2 -0
  223. package/core/skills/security-data/manage-secrets/examples/external-secrets-vault-crds.yaml +53 -0
  224. package/core/skills/security-data/manage-secrets/references/zero-trust-secret-rotation-and-eso.md +30 -0
  225. package/core/skills/security-data/manage-vietnam-accounting/SKILL.md +7 -7
  226. package/core/skills/security-data/prompt-injection-defense/SKILL.md +2 -0
  227. package/core/skills/security-data/prompt-injection-defense/examples/bounded-tool-execution-wrapper.py +78 -0
  228. package/core/skills/security-data/prompt-injection-defense/references/prompt-injection-taxonomy-and-delimiters.md +37 -0
  229. package/core/skills/security-data/reverse-engineer-binary/SKILL.md +2 -0
  230. package/core/skills/security-data/reverse-engineer-binary/examples/binary-triage-and-vulnerability-dossier.md +58 -0
  231. package/core/skills/security-data/reverse-engineer-binary/references/ghidra-radare2-and-rea-evidence-ledgers.md +43 -0
  232. package/core/skills/security-data/security-audit/SKILL.md +3 -1
  233. package/core/skills/security-data/security-audit/examples/enterprise-service-security-audit-report.md +54 -0
  234. package/core/skills/security-data/security-audit/references/owasp-asi-and-cvss4-threat-modeling.md +39 -0
  235. package/core/skills/security-data/skill-preflight-ast-check/SKILL.md +2 -0
  236. package/core/skills/security-data/skill-preflight-ast-check/references/ast-lethal-trifecta-and-static-vetting.md +38 -0
  237. package/core/skills/security-data/skill-preflight-ast-check/scripts/scan-skill-ast.py +127 -0
  238. package/overlays/README.md +1 -1
  239. package/overlays/security-research/README.md +1 -1
  240. package/package.json +2 -2
  241. package/overlays/security-research/skills/reverse-engineer-binary/SKILL.md +0 -129
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Hybrid Search (RRF) & AI Content Governance Pipeline
3
+ *
4
+ * Implements:
5
+ * - Reciprocal Rank Fusion (RRF) combining BM25 keyword ranking and pgvector dense cosine search
6
+ * - Human-in-the-Loop AI content governance review gate
7
+ * - Brand voice linter detecting disallowed claims prior to publishing
8
+ */
9
+
10
+ export interface ProductCatalogItem {
11
+ id: string;
12
+ sku: string;
13
+ title: string;
14
+ description: string;
15
+ status: 'draft' | 'pending_review' | 'published';
16
+ embedding: number[];
17
+ governanceMetadata?: {
18
+ model: string;
19
+ promptHash: string;
20
+ reviewedBy?: string;
21
+ reviewedAt?: string;
22
+ bannedWordsPassed: boolean;
23
+ };
24
+ }
25
+
26
+ export interface SearchResult {
27
+ productId: string;
28
+ title: string;
29
+ score: number;
30
+ }
31
+
32
+ export class HybridSearchPipeline {
33
+ private readonly RRF_K = 60;
34
+
35
+ /**
36
+ * Computes Reciprocal Rank Fusion across BM25 and Dense Vector ranking lists.
37
+ */
38
+ public computeRrf(
39
+ bm25RankedIds: string[],
40
+ denseRankedIds: string[]
41
+ ): Array<{ productId: string; rrfScore: number }> {
42
+ const scores = new Map<string, number>();
43
+
44
+ // Accumulate BM25 reciprocal ranks
45
+ bm25RankedIds.forEach((id, rankIndex) => {
46
+ const rank = rankIndex + 1;
47
+ const current = scores.get(id) || 0;
48
+ scores.set(id, current + 1 / (this.RRF_K + rank));
49
+ });
50
+
51
+ // Accumulate Dense Vector reciprocal ranks
52
+ denseRankedIds.forEach((id, rankIndex) => {
53
+ const rank = rankIndex + 1;
54
+ const current = scores.get(id) || 0;
55
+ scores.set(id, current + 1 / (this.RRF_K + rank));
56
+ });
57
+
58
+ // Sort by combined RRF score descending
59
+ return Array.from(scores.entries())
60
+ .map(([productId, rrfScore]) => ({ productId, rrfScore }))
61
+ .sort((a, b) => b.rrfScore - a.rrfScore);
62
+ }
63
+ }
64
+
65
+ export class ProductGovernanceEngine {
66
+ private readonly BANNED_TERMS = [
67
+ 'miracle cure',
68
+ 'guaranteed 100% profit',
69
+ 'risk-free',
70
+ 'FDA approved without clinical trial',
71
+ ];
72
+
73
+ /**
74
+ * Pre-review automated brand voice and regulatory linter.
75
+ */
76
+ public lintProductCopy(description: string): { passed: boolean; violations: string[] } {
77
+ const violations: string[] = [];
78
+ const lower = description.toLowerCase();
79
+
80
+ for (const term of this.BANNED_TERMS) {
81
+ if (lower.includes(term)) {
82
+ violations.push(term);
83
+ }
84
+ }
85
+
86
+ return {
87
+ passed: violations.length === 0,
88
+ violations,
89
+ };
90
+ }
91
+
92
+ /**
93
+ * Approves transition from draft to published, enforcing mandatory human review.
94
+ */
95
+ public approveForPublish(
96
+ item: ProductCatalogItem,
97
+ reviewerId: string
98
+ ): ProductCatalogItem {
99
+ const lint = this.lintProductCopy(item.description);
100
+ if (!lint.passed) {
101
+ throw new Error(`Cannot publish product with regulatory violations: ${lint.violations.join(', ')}`);
102
+ }
103
+
104
+ if (!reviewerId || reviewerId.trim() === '') {
105
+ throw new Error('Mandatory human reviewer ID required before publishing AI content');
106
+ }
107
+
108
+ return {
109
+ ...item,
110
+ status: 'published',
111
+ governanceMetadata: {
112
+ model: item.governanceMetadata?.model || 'manual',
113
+ promptHash: item.governanceMetadata?.promptHash || 'n/a',
114
+ reviewedBy: reviewerId,
115
+ reviewedAt: new Date().toISOString(),
116
+ bannedWordsPassed: true,
117
+ },
118
+ };
119
+ }
120
+ }
@@ -0,0 +1,54 @@
1
+ # Semantic Vector Catalog & GraphRAG Governance Specifications (2026)
2
+
3
+ ## 1. Hybrid Search Architecture & Reciprocal Rank Fusion (RRF)
4
+
5
+ ### 1.1 Dense Vector Layer with pgvector HNSW
6
+ E-commerce catalogs in 2026 deploy hybrid retrieval combining sparse BM25 text search with dense semantic embeddings:
7
+ - **Embedding Generation**: Compute dense embeddings on product write/update using `text-embedding-3-large` (1536/3072 dimensions) or Cohere `embed-v4`.
8
+ - **pgvector Indexing**: Index dense vectors using Hierarchical Navigable Small World (HNSW) with production-calibrated hyperparameters:
9
+ ```sql
10
+ CREATE INDEX idx_products_embedding ON products
11
+ USING hnsw (embedding vector_cosine_ops)
12
+ WITH (m = 16, ef_construction = 64);
13
+ ```
14
+ - **Reciprocal Rank Fusion (RRF)**:
15
+ Merge sparse keyword ranks ($R_{\text{BM25}}$) and vector similarity ranks ($R_{\text{dense}}$) using constant $k = 60$:
16
+ $$\text{RRF Score}(d) = \frac{1}{60 + R_{\text{BM25}}(d)} + \frac{1}{60 + R_{\text{dense}}(d)}$$
17
+
18
+ ---
19
+
20
+ ## 2. AI Content Governance Pipeline (Human-in-the-Loop)
21
+
22
+ ### 2.1 State Transition Enforcement
23
+ Autonomous LLM-generated product descriptions, titles, and variant attributes must never be set directly to `published`:
24
+ $$\text{Draft (AI Generated)} \xrightarrow{\text{Brand Voice Linter}} \text{Pending Review} \xrightarrow{\text{Human Gate Approved}} \text{Published}$$
25
+
26
+ ### 2.2 Mandatory Provenance Metadata
27
+ Every catalog entity carries immutable provenance audit attributes:
28
+ ```json
29
+ {
30
+ "generation_metadata": {
31
+ "generated_by_model": "gpt-4o-2026-08-06",
32
+ "prompt_hash": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
33
+ "generated_at": "2026-11-08T09:00:00Z",
34
+ "banned_claims_check_passed": true,
35
+ "reviewed_by_user_id": "usr_compliance_lead_08",
36
+ "reviewed_at": "2026-11-08T09:30:00Z",
37
+ "approval_status": "APPROVED"
38
+ }
39
+ }
40
+ ```
41
+
42
+ ---
43
+
44
+ ## 3. Real-Time Inventory CDC & Event Sourcing
45
+
46
+ - **Debezium CDC**: Stream database inventory adjustments to Kafka / Cloudflare Queues with sub-second latency.
47
+ - **Safety Stock Deduction**: Deduct a virtual safety stock buffer (5% or minimum 3 units) before publishing available inventory to external channels (Shopee, Lazada, TikTok Shop, Amazon).
48
+
49
+ ---
50
+
51
+ ## 4. Knowledge Graph & GraphRAG Grounding
52
+
53
+ - **Graph Topology**: Model cross-sell relationships, bundles, compatibility constraints, and replacement components in Neo4j or Amazon Neptune.
54
+ - **Cited Recommendations**: Use LangChain `GraphCypherQAChain` to execute natural language queries against graph topology, enforcing explicit source node citations on all LLM recommendations.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: write-article
3
- description: Plan, research, outline, and draft long-form articles and blog posts with explicit evidence discipline, answer-first structure, GEO/AEO execution, non-commodity (unique POV/first-hand evidence) quality gates, E-E-A-T experience signals, and SEO-brief alignment. Use for narrative content, guides, reviews, and announcementsβ€”not for API runbooks or pure technical reference docs.
3
+ description: Plan, research, outline, and draft long-form articles and blog posts with explicit evidence discipline, answer-first structure, GEO/AEO execution, non-commodity quality gates, E-E-A-T experience signals, and SEO-brief alignment. Use when writing narrative long-form content, guides, reviews, or announcementsβ€”not for API runbooks or pure technical reference docs.
4
4
  version: 2.0.0
5
5
  allowed-tools: [read_file, write_file, edit_file, create_file, search_code]
6
6
  ---
@@ -58,6 +58,7 @@ allowed-tools: [read_file, write_file, edit_file, create_file, search_code]
58
58
  - **write-documentation**: Author technical specifications converted to executive PDF manuals.
59
59
  - **release-notes**: Compiles release artifacts into customer-facing PDF documentation.
60
60
  - **docx**: Converts source Word manuscripts into finalized PDF publications.
61
+ - Companion reference: `references/pdf-acroforms-and-pdfplumber-specs.md`
61
62
 
62
63
  ## Output Contracts
63
64
 
@@ -0,0 +1,54 @@
1
+ # PDF AcroForms, pdfplumber & Form Extraction Specifications (2026)
2
+
3
+ ## 1. Overview & Tooling Architecture
4
+
5
+ Automated PDF document processing enforces a deterministic tripartite extraction architecture:
6
+
7
+ ```
8
+ Input PDF Document
9
+ β”‚
10
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
11
+ β–Ό β–Ό β–Ό
12
+ Interactive Form? Native Text? Scanned Raster?
13
+ β”‚ β”‚ β”‚
14
+ pypdf AcroForm pdfplumber Tesseract OCR
15
+ get_fields() API Cell Extractor Confidence Gate
16
+ β”‚ β”‚ β”‚
17
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
18
+ β–Ό
19
+ Document Manifest & Validation
20
+ (document-manifest.json)
21
+ ```
22
+
23
+ ## 2. AcroForm Discovery & Population Invariants
24
+
25
+ 1. **Discovery API**:
26
+ Use `pypdf.PdfReader.get_fields()`. Never parse raw PDF dictionary syntax with ad-hoc regex.
27
+ 2. **Field Classification**:
28
+ Distinguish text fields (`/Tx`), choice fields (`/Ch`), checkboxes (`/Btn`), and signature blocks (`/Sig`).
29
+ 3. **Form Filling Semantics**:
30
+ - Write using `PdfWriter.update_page_form_field_values()`.
31
+ - Set `/NeedAppearances` flag to `true` in `/AcroForm` catalog to force visual rendering across diverse PDF viewers.
32
+ - Flatten annotations when producing immutable archival PDF/A deliverables.
33
+
34
+ ## 3. Tabular Data Extraction with `pdfplumber`
35
+
36
+ When parsing invoices, financial statements, and manifests:
37
+ - Extract bounding boxes using explicit horizontal and vertical line detection:
38
+ ```python
39
+ table_settings = {
40
+ "vertical_strategy": "lines",
41
+ "horizontal_strategy": "lines",
42
+ "snap_tolerance": 3,
43
+ "join_tolerance": 3,
44
+ }
45
+ tables = page.extract_tables(table_settings)
46
+ ```
47
+ - Normalize column alignment, strip leading/trailing whitespace, and preserve multiline cell wraps.
48
+
49
+ ## 4. Visual Verification Gate
50
+
51
+ Before committing generated PDFs:
52
+ 1. Render pages to high-resolution PNGs: `pdftoppm -png -r 150 document.pdf page_preview`.
53
+ 2. Inspect for visual defects, truncated table cells, text overflows, and missing font subsets.
54
+ 3. Verify signature vector presence: $w \ge 100\text{px}, h \ge 50\text{px}$.
@@ -0,0 +1,144 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Inspect and discover interactive AcroForm fields in PDF documents.
4
+
5
+ Scans PDF files using pypdf, reporting field names, types, default values,
6
+ and validation flags (Required, Read-Only). Emits formatted tables or JSON.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import argparse
12
+ import json
13
+ import sys
14
+ from pathlib import Path
15
+ from typing import Any, Dict, List, Optional
16
+
17
+ try:
18
+ import pypdf
19
+ from pypdf import PdfReader
20
+ except ImportError:
21
+ pypdf = None
22
+ PdfReader = None
23
+
24
+ FIELD_TYPE_MAP: Dict[str, str] = {
25
+ "/Tx": "Text",
26
+ "/Btn": "Button/Checkbox",
27
+ "/Ch": "Choice/Dropdown",
28
+ "/Sig": "Signature",
29
+ }
30
+
31
+
32
+ def inspect_pdf_fields(pdf_path: Path) -> Dict[str, Any]:
33
+ if pypdf is None:
34
+ raise RuntimeError("pypdf is required. Install via 'pip install pypdf>=4.0.0'.")
35
+
36
+ if not pdf_path.exists():
37
+ raise FileNotFoundError(f"PDF file not found: {pdf_path}")
38
+
39
+ try:
40
+ reader = PdfReader(str(pdf_path))
41
+ except Exception as exc:
42
+ raise ValueError(f"Failed to parse PDF document: {exc}") from exc
43
+
44
+ if reader.is_encrypted:
45
+ try:
46
+ reader.decrypt("")
47
+ except Exception as exc:
48
+ raise PermissionError(f"PDF is encrypted and requires a password: {exc}") from exc
49
+
50
+ raw_fields = reader.get_fields() or {}
51
+ fields_list: List[Dict[str, Any]] = []
52
+
53
+ for name, field_obj in raw_fields.items():
54
+ if not isinstance(field_obj, dict):
55
+ continue
56
+
57
+ raw_type = str(field_obj.get("/FT", "Unknown"))
58
+ readable_type = FIELD_TYPE_MAP.get(raw_type, raw_type)
59
+ value = field_obj.get("/V", "")
60
+ flags = int(field_obj.get("/Ff", 0) or 0)
61
+
62
+ read_only = bool(flags & 1)
63
+ required = bool(flags & 2)
64
+
65
+ fields_list.append({
66
+ "name": name,
67
+ "type": readable_type,
68
+ "field_type_raw": raw_type,
69
+ "value": str(value) if value is not None else "",
70
+ "read_only": read_only,
71
+ "required": required,
72
+ })
73
+
74
+ return {
75
+ "file": str(pdf_path),
76
+ "page_count": len(reader.pages),
77
+ "is_fillable": len(fields_list) > 0,
78
+ "field_count": len(fields_list),
79
+ "fields": fields_list,
80
+ }
81
+
82
+
83
+ def format_text_table(data: Dict[str, Any]) -> str:
84
+ lines = [
85
+ "=" * 70,
86
+ f"PDF ACROFORM FIELD AUDIT: {data['file']}",
87
+ "=" * 70,
88
+ f"Page Count : {data['page_count']}",
89
+ f"Is Fillable : {data['is_fillable']}",
90
+ f"Field Count : {data['field_count']}",
91
+ "-" * 70,
92
+ ]
93
+
94
+ if not data["fields"]:
95
+ lines.append("No interactive AcroForm fields discovered in this document.")
96
+ lines.append("=" * 70)
97
+ return "\n".join(lines)
98
+
99
+ lines.append(f"{'#':<4} {'Field Name':<30} {'Type':<18} {'Flags':<12}")
100
+ lines.append("-" * 70)
101
+
102
+ for idx, f in enumerate(data["fields"], 1):
103
+ flags = []
104
+ if f["required"]:
105
+ flags.append("REQ")
106
+ if f["read_only"]:
107
+ flags.append("RO")
108
+ flags_str = ",".join(flags) if flags else "-"
109
+ lines.append(f"{idx:<4} {f['name'][:28]:<30} {f['type'][:16]:<18} {flags_str:<12}")
110
+
111
+ lines.append("=" * 70)
112
+ return "\n".join(lines)
113
+
114
+
115
+ def main() -> int:
116
+ parser = argparse.ArgumentParser(description="Inspect interactive AcroForm fields in a PDF.")
117
+ parser.add_argument("pdf_path", type=Path, help="Path to input PDF file")
118
+ parser.add_argument("--json", action="store_true", help="Emit output as JSON")
119
+ parser.add_argument("--strict", action="store_true", help="Exit 2 if no fillable fields exist")
120
+ parser.add_argument("-o", "--output", type=Path, default=None, help="Save report to file")
121
+ args = parser.parse_args()
122
+
123
+ try:
124
+ report = inspect_pdf_fields(args.pdf_path)
125
+ except Exception as exc:
126
+ print(f"Error: {exc}", file=sys.stderr)
127
+ return 1
128
+
129
+ out_content = json.dumps(report, indent=2) if args.json else format_text_table(report)
130
+
131
+ if args.output:
132
+ args.output.parent.mkdir(parents=True, exist_ok=True)
133
+ args.output.write_text(out_content, encoding="utf-8")
134
+ else:
135
+ print(out_content)
136
+
137
+ if args.strict and not report["is_fillable"]:
138
+ return 2
139
+
140
+ return 0
141
+
142
+
143
+ if __name__ == "__main__":
144
+ sys.exit(main())
@@ -0,0 +1,145 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Populate interactive AcroForm fields in a PDF using a JSON payload.
4
+
5
+ Enforces Core Rule 5 ASCII Dash normalization (U+2011 to U+002D) and generates
6
+ machine-readable forms with optional field flattening.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import argparse
12
+ import hashlib
13
+ import json
14
+ import sys
15
+ from pathlib import Path
16
+ from typing import Any, Dict, Set
17
+
18
+ try:
19
+ import pypdf
20
+ from pypdf import PdfReader, PdfWriter
21
+ except ImportError:
22
+ pypdf = None
23
+ PdfReader = None
24
+ PdfWriter = None
25
+
26
+
27
+ def normalize_value(val: Any) -> Any:
28
+ """Normalize text according to Core Rule 5: convert non-breaking hyphens to ASCII."""
29
+ if isinstance(val, str):
30
+ return val.replace("\u2011", "\u002d")
31
+ return val
32
+
33
+
34
+ def fill_pdf_form(
35
+ input_pdf: Path,
36
+ values_json: Path,
37
+ output_pdf: Path,
38
+ flatten: bool = False,
39
+ strict: bool = False,
40
+ ) -> Dict[str, Any]:
41
+ if pypdf is None:
42
+ raise RuntimeError("pypdf is required. Install via 'pip install pypdf>=4.0.0'.")
43
+
44
+ if not input_pdf.exists():
45
+ raise FileNotFoundError(f"Input PDF not found: {input_pdf}")
46
+ if not values_json.exists():
47
+ raise FileNotFoundError(f"Values JSON not found: {values_json}")
48
+
49
+ try:
50
+ payload = json.loads(values_json.read_text(encoding="utf-8"))
51
+ if not isinstance(payload, dict):
52
+ raise ValueError("Values JSON root must be an object/dict")
53
+ except Exception as exc:
54
+ raise ValueError(f"Failed to parse values JSON: {exc}") from exc
55
+
56
+ normalized_payload = {str(k): normalize_value(v) for k, v in payload.items()}
57
+
58
+ try:
59
+ reader = PdfReader(str(input_pdf))
60
+ except Exception as exc:
61
+ raise ValueError(f"Failed to read input PDF: {exc}") from exc
62
+
63
+ available_fields = reader.get_fields() or {}
64
+ if not available_fields:
65
+ raise ValueError(f"Input PDF '{input_pdf}' contains no interactive AcroForm fields.")
66
+
67
+ available_keys: Set[str] = set(available_fields.keys())
68
+ payload_keys: Set[str] = set(normalized_payload.keys())
69
+
70
+ matched = payload_keys.intersection(available_keys)
71
+ unmatched = payload_keys.difference(available_keys)
72
+
73
+ if strict and unmatched:
74
+ raise ValueError(f"Strict mode failure: Payload keys not in PDF fields: {sorted(unmatched)}")
75
+
76
+ writer = PdfWriter()
77
+ writer.append(reader)
78
+
79
+ # Populate form fields across all pages
80
+ for page in writer.pages:
81
+ try:
82
+ writer.update_page_form_field_values(page, normalized_payload)
83
+ except Exception:
84
+ pass
85
+
86
+ if flatten:
87
+ for page in writer.pages:
88
+ try:
89
+ page.flatten_annotations()
90
+ except Exception:
91
+ pass
92
+
93
+ output_pdf.parent.mkdir(parents=True, exist_ok=True)
94
+ with output_pdf.open("wb") as fp:
95
+ writer.write(fp)
96
+
97
+ out_bytes = output_pdf.read_bytes()
98
+ sha256 = hashlib.sha256(out_bytes).hexdigest()
99
+
100
+ return {
101
+ "status": "SUCCESS",
102
+ "input_pdf": str(input_pdf),
103
+ "output_pdf": str(output_pdf),
104
+ "total_pdf_fields": len(available_keys),
105
+ "payload_fields_count": len(payload_keys),
106
+ "matched_fields_count": len(matched),
107
+ "unmatched_fields": sorted(unmatched),
108
+ "flattened": flatten,
109
+ "output_size_bytes": len(out_bytes),
110
+ "output_sha256": sha256,
111
+ }
112
+
113
+
114
+ def main() -> int:
115
+ parser = argparse.ArgumentParser(description="Populate AcroForm fields from JSON payload.")
116
+ parser.add_argument("input_pdf", type=Path, help="Path to input fillable PDF")
117
+ parser.add_argument("values_json", type=Path, help="Path to JSON values payload")
118
+ parser.add_argument("output_pdf", type=Path, help="Path where filled PDF is written")
119
+ parser.add_argument("--flatten", action="store_true", help="Flatten form fields into static text")
120
+ parser.add_argument("--strict", action="store_true", help="Fail if payload contains unknown keys")
121
+ args = parser.parse_args()
122
+
123
+ try:
124
+ result = fill_pdf_form(
125
+ args.input_pdf,
126
+ args.values_json,
127
+ args.output_pdf,
128
+ flatten=args.flatten,
129
+ strict=args.strict,
130
+ )
131
+ print("=" * 60)
132
+ print("PDF FORM FILL AUDIT")
133
+ print("=" * 60)
134
+ print(f"Output File : {result['output_pdf']}")
135
+ print(f"Fields Matched: {result['matched_fields_count']} / {result['payload_fields_count']}")
136
+ print(f"SHA-256 Digest: {result['output_sha256']}")
137
+ print("πŸŽ‰ Form populated successfully.")
138
+ return 0
139
+ except Exception as exc:
140
+ print(f"Error: {exc}", file=sys.stderr)
141
+ return 1
142
+
143
+
144
+ if __name__ == "__main__":
145
+ sys.exit(main())
@@ -168,3 +168,5 @@ Skip emission for trivial manifest updates that do not cross a role boundary.
168
168
  - **manage-api-catalog**: RFC 9727 API catalog should be linked from `llms.txt`
169
169
  - **optimize-seo**: GEO/AEO strategy depends on `llms.txt` as a discoverability primitive
170
170
  - **configure-agent-headers**: `agent-card.json` endpoint referenced in `llms.txt`
171
+ - Companion reference: `references/llms-txt-and-llms-full-txt-standard.md`
172
+ - Companion example: `examples/canonical-llms-txt-and-full-txt.md`
@@ -0,0 +1,45 @@
1
+ # Canonical llms.txt & llms-full.txt Examples
2
+
3
+ ## 1. Canonical `/llms.txt`
4
+
5
+ ```markdown
6
+ # Agent Skills Platform
7
+
8
+ > Agent Skills is an enterprise engineering skill pack and multi-agent coordination
9
+ > framework providing deterministic A2A contracts, PromptOps golden benchmarks,
10
+ > and Clean Architecture microservice patterns.
11
+
12
+ ## Architecture & Core Documentation
13
+
14
+ - [Clean Architecture Guide](https://skills.example.com/docs/architecture.md): Kratos layer separation, Wire dependency injection, and zero-leakage biz layers.
15
+ - [A2A Delegation Protocol](https://skills.example.com/docs/a2a-protocol.md): JSON-RPC 2.0 task contracts, structured handoffs, and verification gates.
16
+ - [Security & Zero Trust](https://skills.example.com/docs/security.md): SPIFFE/SPIRE workload attestation, ephemeral JWT rotation, and OWASP ASI mitigations.
17
+
18
+ ## Machine & Agentic Discovery
19
+
20
+ - [Agent Registry](https://skills.example.com/.well-known/agent-card.json): A2A 1.0 Agent Card registry.
21
+ - [API Catalog](https://skills.example.com/.well-known/api-catalog): RFC 9727 API Linkset endpoints.
22
+ - [MCP Server Card](https://skills.example.com/.well-known/mcp/server-card.json): MCP server tools and resource schemas.
23
+ - [Commerce Manifest](https://skills.example.com/.well-known/ucp): UCP v2026-08-25 agent checkout capabilities.
24
+ ```
25
+
26
+ ## 2. Canonical `/llms-full.txt` (Exemplar Extract)
27
+
28
+ ```markdown
29
+ # File: docs/architecture.md
30
+ # Architecture & Clean Code Standards
31
+ The system follows strict Clean Architecture layout:
32
+ - `api/`: Protobuf contracts and OpenAPI specifications.
33
+ - `internal/service/`: Protocol adapter translating transport to domain usecases.
34
+ - `internal/biz/`: Pure business logic; no GORM DB imports.
35
+ - `internal/data/`: Persistence layer wrapping GORM and Redis clients.
36
+
37
+ ---
38
+
39
+ # File: docs/a2a-protocol.md
40
+ # Agent-to-Agent (A2A 1.0) Task Lifecycle
41
+ All agent handoffs require structured JSON artifacts validating against:
42
+ - `contracts/schemas/a2a-task.json`
43
+ - `contracts/schemas/a2a-artifact.json`
44
+ - `contracts/schemas/a2a-task-status.json`
45
+ ```
@@ -0,0 +1,37 @@
1
+ # llms.txt & llms-full.txt Standard Specification (2026)
2
+
3
+ ## 1. Specification Overview (llmstxt.org v2)
4
+
5
+ The `llms.txt` standard specifies how websites, APIs, and software documentation provide machine-readable discovery interfaces optimized for AI agents and LLMs.
6
+
7
+ ```
8
+ Domain Root (/)
9
+ β”œβ”€β”€ /llms.txt # Concise, token-budgeted index & section manifest
10
+ β”œβ”€β”€ /llms-full.txt # Concatenated full-text corpus for long-context models
11
+ └── /.well-known/ # Machine discovery (api-catalog, agent-card, mcp)
12
+ ```
13
+
14
+ ## 2. Structural Requirements for `/llms.txt`
15
+
16
+ 1. **Title H1**: `# Project or Product Name`
17
+ 2. **Blockquote Summary**: `> Factual, dense summary of project architecture and purpose. No marketing fluff.`
18
+ 3. **Sections H2**: Categorized navigation links (`## Core Documentation`, ## API Reference`, `## Agent Interfaces`).
19
+ 4. **Link Pattern**: `- [Page Title](https://example.com/docs/page.md): Concise description of content.`
20
+ 5. **v2 Link Relations**:
21
+ - HTTP Header: `Link: </llms.txt>; rel="describedby"`
22
+ - HTML Header: `<link rel="alternate" type="text/markdown" href="/docs/page.md">`
23
+
24
+ ## 3. High-Context Ingestion (`/llms-full.txt`)
25
+
26
+ For frontier LLMs with 1M+ context windows:
27
+ - Concatenates authoritative markdown source files in dependency order.
28
+ - Each section preceded by `# File: /path/to/source.md` delimiter.
29
+ - Strict exclusion of interactive widgets, raw binary embeds, or duplicated header navigation chrome.
30
+
31
+ ## 4. Agentic Interface Discovery
32
+
33
+ When a platform supports agentic protocols, `llms.txt` must explicitly index:
34
+ - `/.well-known/agent-card.json`: A2A 1.0 agent discovery.
35
+ - `/.well-known/api-catalog`: RFC 9727 API discovery.
36
+ - `/.well-known/mcp/server-card.json`: Model Context Protocol server capabilities.
37
+ - `/.well-known/ucp`: Universal Commerce Protocol checkout capabilities.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: write-documentation
3
- description: Draft or update technical documentation by following the repo's existing doc structure, audience needs, and source-of-truth boundaries. Use for README updates, service docs, runbooks, integration notes, or change explanations.
3
+ description: Draft or update technical documentation by following the repo's existing doc structure, audience needs, DiΓ‘taxis framework, and source-of-truth boundaries. Use when writing or updating README files, service docs, runbooks, architecture overviews, integration notes, or change explanations.
4
4
  allowed-tools: [read_file, write_file, edit_file, create_file, search_code]
5
5
  ---
6
6
 
@@ -141,3 +141,5 @@ To align with modern AI-assisted engineering and automated API publishing:
141
141
  - **troubleshoot-service**: Turn learned recovery steps into runbook updates
142
142
  - **write-tech-radar**: Draft higher-level technology assessments
143
143
  - **commit-code**: Prepare doc updates for delivery
144
+ - Companion reference: `references/diataxis-framework-and-doc-standards.md`
145
+ - Companion example: `examples/microservice-production-readme-and-api-docs.md`