@vesviet/agent-skills 5.6.0 → 5.6.1

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 (113) hide show
  1. package/INDEX.md +1 -1
  2. package/README.md +1 -1
  3. package/VERSION +1 -1
  4. package/adapters/antigravity/a2a-config.template.yaml +1 -1
  5. package/adapters/antigravity/role-skill-index.json +1 -1
  6. package/adapters/claude/CLAUDE_ADAPTER.md +1 -1
  7. package/adapters/cursor/README.md +185 -185
  8. package/bin/agent-skills.mjs +17 -14
  9. package/core/contracts/schemas/api-contract-spec.json +191 -191
  10. package/core/contracts/schemas/feature-ticket.json +1293 -1293
  11. package/core/contracts/schemas/pull-request-spec.json +338 -338
  12. package/core/contracts/schemas/references/detailed/01-solution-and-governance.md +19 -19
  13. package/core/contracts/schemas/references/detailed/02-engineering-delivery.md +93 -93
  14. package/core/contracts/schemas/references/detailed/04-finance-accounting-and-compliance.md +54 -54
  15. package/core/contracts/schemas/references/detailed/05-design-and-content.md +92 -92
  16. package/core/contracts/schemas/references/detailed/06-seo-and-publishing.md +48 -48
  17. package/core/contracts/schemas/references/detailed/07-a2a-protocol.md +85 -85
  18. package/core/contracts/schemas/test-report.json +530 -530
  19. package/core/roles/references/business-analyst-responsibilities.md +207 -207
  20. package/core/roles/references/frontend-developer-responsibilities.md +275 -275
  21. package/core/roles/system-engineer.md +465 -465
  22. package/core/skills/agent/agent-memory-compaction/references/anchored-schema-and-compaction-algorithms.md +141 -141
  23. package/core/skills/backend/build-mcp-server/SKILL.md +100 -100
  24. package/core/skills/backend/implement-structured-outputs/SKILL.md +94 -94
  25. package/core/skills/business/elicit-requirements/SKILL.md +102 -102
  26. package/core/skills/business/elicit-requirements/references/elicitation-techniques-and-babok-criteria.md +60 -60
  27. package/core/skills/business/trace-requirements-impact/SKILL.md +97 -97
  28. package/core/skills/business/trace-requirements-impact/references/rtm-graph-and-prioritization-models.md +109 -109
  29. package/core/skills/business/write-use-cases/SKILL.md +106 -106
  30. package/core/skills/business/write-use-cases/references/cockburn-scoping-and-13-field-template.md +135 -135
  31. package/core/skills/document/pptx/scripts/add_slide.py +0 -0
  32. package/core/skills/document/pptx/scripts/clean.py +0 -0
  33. package/core/skills/document/pptx/scripts/thumbnail.py +0 -0
  34. package/core/skills/document/xlsx/scripts/recalc.py +0 -0
  35. package/core/skills/documentation/write-documentation/SKILL.md +143 -143
  36. package/core/skills/documentation/write-tech-radar/SKILL.md +149 -149
  37. package/core/skills/foundation/accessibility-review/SKILL.md +160 -160
  38. package/core/skills/foundation/release-notes/SKILL.md +192 -192
  39. package/core/skills/foundation/webapp-server-runner/scripts/with_server.py +0 -0
  40. package/core/skills/foundation/write-product-brief/SKILL.md +160 -160
  41. package/core/skills/platform/cloudflare-email-service/SKILL.md +166 -166
  42. package/core/skills/platform/cloudflare-email-service/references/routing.md +199 -199
  43. package/core/skills/platform/debug-workers-edge/SKILL.md +111 -111
  44. package/core/skills/platform/sandbox-sdk/SKILL.md +183 -183
  45. package/core/skills/platform/setup-gpu-finops/SKILL.md +107 -107
  46. package/core/skills/platform/setup-llm-gateway/SKILL.md +108 -108
  47. package/core/skills/platform/turnstile-spin/SKILL.md +118 -118
  48. package/core/skills/platform/turnstile-spin/scripts/auth-probe.sh +0 -0
  49. package/core/skills/platform/turnstile-spin/scripts/fetch-secret.sh +0 -0
  50. package/core/skills/platform/turnstile-spin/scripts/persist-skill.sh +0 -0
  51. package/core/skills/platform/turnstile-spin/scripts/validate.sh +0 -0
  52. package/core/skills/platform/turnstile-spin/scripts/widget-create.sh +0 -0
  53. package/core/skills/platform/turnstile-spin/scripts/worker-deploy.sh +0 -0
  54. package/core/skills/platform/turnstile-spin/templates/worker/src/index.ts +199 -199
  55. package/core/skills/platform/turnstile-spin/templates/worker/wrangler.toml +31 -31
  56. package/core/skills/platform/web-perf/SKILL.md +151 -151
  57. package/core/skills/platform/workers-best-practices/references/rules.md +463 -463
  58. package/core/skills/product/build-story-map/SKILL.md +104 -104
  59. package/core/skills/product/build-story-map/references/story-mapping-and-cpm-scheduling.md +101 -101
  60. package/core/skills/product/define-product-strategy/SKILL.md +105 -105
  61. package/core/skills/product/define-product-strategy/references/strategy-frameworks-and-pr-faq.md +142 -142
  62. package/core/skills/product/model-saas-metrics/SKILL.md +104 -104
  63. package/core/skills/product/model-saas-metrics/references/saas-unit-economics-and-pricing.md +110 -110
  64. package/core/skills/product/prioritize-roadmap/SKILL.md +106 -106
  65. package/core/skills/product/prioritize-roadmap/references/prioritization-scoring-and-kill-criteria.md +105 -105
  66. package/core/skills/repo-ops/commit-code/SKILL.md +190 -190
  67. package/core/skills/repo-ops/commit-code/references/multi-repo-and-deployment.md +21 -21
  68. package/core/skills/repo-ops/navigate-service/SKILL.md +199 -199
  69. package/core/skills/repo-ops/review-code/references/process-and-format.md +100 -100
  70. package/core/skills/repo-ops/review-service/SKILL.md +186 -186
  71. package/core/skills/repo-ops/troubleshoot-service/SKILL.md +127 -127
  72. package/core/skills/repo-ops/troubleshoot-service/references/failure-modes-and-security.md +22 -22
  73. package/core/skills/repo-ops/troubleshoot-service/references/suggested-process.md +110 -110
  74. package/core/skills/security-data/security-audit/SKILL.md +119 -119
  75. package/core/workflows/add-new-feature.md +212 -212
  76. package/core/workflows/agent-a2a-delegation.md +142 -142
  77. package/core/workflows/bug-fix.md +147 -147
  78. package/core/workflows/build-deploy.md +208 -208
  79. package/core/workflows/code-review.md +137 -137
  80. package/core/workflows/dependency-upgrade.md +193 -193
  81. package/core/workflows/feature-delivery.md +149 -149
  82. package/core/workflows/hotfix-production.md +172 -172
  83. package/core/workflows/qa-validation.md +231 -231
  84. package/core/workflows/refactoring.md +154 -154
  85. package/core/workflows/revert-deployment.md +147 -147
  86. package/core/workflows/security-incident-response.md +191 -191
  87. package/core/workflows/seo-content-lifecycle.md +91 -91
  88. package/core/workflows/service-review-release.md +223 -223
  89. package/core/workflows/setup-new-service.md +214 -214
  90. package/core/workflows/tech-repo-review.md +245 -245
  91. package/core/workflows/troubleshooting.md +241 -241
  92. package/overlays/astro-cloudflare/README.md +93 -93
  93. package/overlays/data-analyst-stack/README.md +109 -109
  94. package/overlays/data-analyst-stack/rules/metric-dashboard-templates.md +135 -135
  95. package/overlays/data-analyst-stack/rules/stack-conventions.md +80 -80
  96. package/overlays/ecommerce-microservices/README.md +65 -65
  97. package/overlays/go-microservices/README.md +78 -78
  98. package/overlays/go-microservices/rules/go-conventions.md +223 -223
  99. package/overlays/laravel-filament/README.md +90 -90
  100. package/overlays/laravel-filament/rules/laravel-conventions.md +220 -220
  101. package/overlays/laravel-filament/skills/develop-laravel-feature/SKILL.md +141 -141
  102. package/overlays/laravel-filament/workflows/deploy-laravel.md +133 -133
  103. package/overlays/obj-configurator/rules/obj-project-rules.md +111 -111
  104. package/overlays/obj-configurator/skills/develop-obj-feature/SKILL.md +71 -71
  105. package/overlays/r3f-stack/README.md +89 -89
  106. package/overlays/r3f-stack/rules/stub.md +43 -43
  107. package/overlays/r3f-stack/skills/debug-3d-scene/SKILL.md +166 -166
  108. package/overlays/r3f-stack/skills/integrate-r3f-three-legacy/SKILL.md +159 -159
  109. package/overlays/r3f-stack/skills/optimize-3d-assets/SKILL.md +128 -128
  110. package/overlays/seo-publishing/rules/site-mix-and-cannibalization.md +52 -52
  111. package/overlays/ui-design-system/rules/handoff-conventions.md +73 -73
  112. package/package.json +2 -2
  113. package/core/README.md +0 -53
@@ -1,109 +1,109 @@
1
- # Data Analyst Stack — DuckDB, Metabase, BI Overlay
2
-
3
- Stack overlay for the `data-analyst` role. Extends `core/roles/data-analyst.md` with conventions for local analytics (DuckDB), dashboard requirements (Metabase), and generic BI chart specs.
4
-
5
- ## Tech Stack (2026)
6
-
7
- | Layer | Tool | Version | Notes |
8
- |-------|------|---------|-------|
9
- | Explore & SQL | DuckDB | Latest | File-backed or in-memory; Iceberg REST catalog support |
10
- | Transformation | dbt Core | **1.9** | Microbatch incremental strategy, dbt Fusion engine |
11
- | Lakehouse format | Apache Iceberg | — | Production standard for analytics at scale |
12
- | Dashboards | Metabase | 1.x | Business KPIs for non-technical stakeholders |
13
- | Infrastructure | Grafana | — | Service observability, time-series (NOT business KPIs) |
14
- | Presentation | Excel/CSV | — | Dated exports with Metrics sheet |
15
-
16
- ## 2026 Key Updates
17
-
18
- ### dbt Core 1.9 — Microbatch Incremental Strategy
19
- ```yaml
20
- # dbt_project.yml — microbatch for large Iceberg tables
21
- models:
22
- my_model:
23
- materialized: incremental
24
- incremental_strategy: microbatch
25
- event_time: created_at
26
- batch_size: day
27
- begin: '2024-01-01'
28
- ```
29
- Microbatch runs are **parallelizable** — critical performance win for large Iceberg tables.
30
-
31
- ### Apache Iceberg + DuckDB (Production Standard)
32
- ```python
33
- # Production requirements for Iceberg:
34
- # 1. Use Iceberg REST Catalog (not path-based scanning)
35
- import duckdb
36
- con = duckdb.connect()
37
- con.execute("INSTALL iceberg; LOAD iceberg;")
38
- con.execute("""
39
- CREATE SECRET iceberg_catalog (
40
- TYPE S3,
41
- REGION 'us-east-1',
42
- KEY_ID '...',
43
- SECRET '...'
44
- )
45
- """)
46
- # 2. Implement compaction + snapshot expiration + orphan file removal
47
- # 3. Medallion architecture: Staging → Intermediate → Marts
48
- ```
49
-
50
- ### Metabase vs Grafana (Clear Separation)
51
- | Tool | Use For |
52
- |------|---------|
53
- | **Metabase 1.x** | Business KPIs, non-technical users, SQL-based analytics |
54
- | **Grafana** | Infrastructure metrics, time-series, Loki logs, operational observability |
55
-
56
- Do NOT use Grafana for business dashboards — escalate to Metabase spec.
57
-
58
- ## Base Role & Scope
59
-
60
- - **Base role:** `core/roles/data-analyst.md`
61
- - **Primary skill:** `analyze-data`
62
- - **Default compute:** DuckDB (file-backed or Iceberg-backed)
63
- - **Dashboard handoff:** Metabase question/card requirements (spec only)
64
- - **Stakeholder exports:** Excel/CSV with dated filenames
65
-
66
- ## Included
67
-
68
- - `rules/stack-conventions.md` — Paths, env vars, SQL layout, export naming, PII
69
- - `rules/metric-dashboard-templates.md` — Metric tables, Metabase spec template, JSON mapping
70
-
71
- ## Activation
72
-
73
- ```
74
- Role: data-analyst
75
- Overlay: overlays/data-analyst-stack
76
- ```
77
-
78
- ## Environment Variables
79
-
80
- | Variable | Purpose | Example |
81
- |----------|---------|---------|
82
- | `ANALYTICS_DATA_ROOT` | Root for inputs (CSV, Parquet) | `./data/analytics` |
83
- | `DUCKDB_PATH` | File-backed DuckDB database | `./data/analytics/warehouse.duckdb` |
84
- | `METABASE_INSTANCE_URL` | Base URL for linking specs (read-only) | `http://localhost:3000` |
85
- | `DBT_PROFILES_DIR` | dbt profiles directory | `~/.dbt` |
86
-
87
- Default: `ANALYTICS_DATA_ROOT=./data/analytics` relative to active repo.
88
-
89
- ## Standard 2026 Alignment
90
-
91
- This file is part of the agent-skills engineering pack. The 2026 upgrade
92
- pass added this footer so every prose file in the pack carries a
93
- consistent Standard 2026 pointer.
94
-
95
- - **OWASP ASI**: applied as described in `core/roles/role-standard.md`
96
- (ASI01-ASI10) and the per-skill `## Security Guardrails (OWASP ASI)` sections.
97
- - **Failure Modes**: the rule in this file can be violated by drift, missing
98
- context, or untracked exceptions. Concrete failure scenarios belong in the
99
- related skill or workflow's `### Failure Modes` section.
100
- - **Output Contracts**: structured artifacts produced under this file must
101
- conform to schemas in `core/contracts/schemas/`.
102
- - **Skill Toolbox Lock**: this file's rules are enforced by the role that
103
- owns the affected action; the runtime gate is
104
- `core/scripts/hooks/check-policy.py`.
105
- - **Commit / publish gate**: changes that affect user-visible behavior
106
- follow the META-RULE in `core/rules/code.md` — no commit, no push, no
107
- publish without explicit user confirmation.
108
-
109
- Last updated: 2026-09-01
1
+ # Data Analyst Stack — DuckDB, Metabase, BI Overlay
2
+
3
+ Stack overlay for the `data-analyst` role. Extends `core/roles/data-analyst.md` with conventions for local analytics (DuckDB), dashboard requirements (Metabase), and generic BI chart specs.
4
+
5
+ ## Tech Stack (2026)
6
+
7
+ | Layer | Tool | Version | Notes |
8
+ |-------|------|---------|-------|
9
+ | Explore & SQL | DuckDB | Latest | File-backed or in-memory; Iceberg REST catalog support |
10
+ | Transformation | dbt Core | **1.9** | Microbatch incremental strategy, dbt Fusion engine |
11
+ | Lakehouse format | Apache Iceberg | — | Production standard for analytics at scale |
12
+ | Dashboards | Metabase | 1.x | Business KPIs for non-technical stakeholders |
13
+ | Infrastructure | Grafana | — | Service observability, time-series (NOT business KPIs) |
14
+ | Presentation | Excel/CSV | — | Dated exports with Metrics sheet |
15
+
16
+ ## 2026 Key Updates
17
+
18
+ ### dbt Core 1.9 — Microbatch Incremental Strategy
19
+ ```yaml
20
+ # dbt_project.yml — microbatch for large Iceberg tables
21
+ models:
22
+ my_model:
23
+ materialized: incremental
24
+ incremental_strategy: microbatch
25
+ event_time: created_at
26
+ batch_size: day
27
+ begin: '2024-01-01'
28
+ ```
29
+ Microbatch runs are **parallelizable** — critical performance win for large Iceberg tables.
30
+
31
+ ### Apache Iceberg + DuckDB (Production Standard)
32
+ ```python
33
+ # Production requirements for Iceberg:
34
+ # 1. Use Iceberg REST Catalog (not path-based scanning)
35
+ import duckdb
36
+ con = duckdb.connect()
37
+ con.execute("INSTALL iceberg; LOAD iceberg;")
38
+ con.execute("""
39
+ CREATE SECRET iceberg_catalog (
40
+ TYPE S3,
41
+ REGION 'us-east-1',
42
+ KEY_ID '...',
43
+ SECRET '...'
44
+ )
45
+ """)
46
+ # 2. Implement compaction + snapshot expiration + orphan file removal
47
+ # 3. Medallion architecture: Staging → Intermediate → Marts
48
+ ```
49
+
50
+ ### Metabase vs Grafana (Clear Separation)
51
+ | Tool | Use For |
52
+ |------|---------|
53
+ | **Metabase 1.x** | Business KPIs, non-technical users, SQL-based analytics |
54
+ | **Grafana** | Infrastructure metrics, time-series, Loki logs, operational observability |
55
+
56
+ Do NOT use Grafana for business dashboards — escalate to Metabase spec.
57
+
58
+ ## Base Role & Scope
59
+
60
+ - **Base role:** `core/roles/data-analyst.md`
61
+ - **Primary skill:** `analyze-data`
62
+ - **Default compute:** DuckDB (file-backed or Iceberg-backed)
63
+ - **Dashboard handoff:** Metabase question/card requirements (spec only)
64
+ - **Stakeholder exports:** Excel/CSV with dated filenames
65
+
66
+ ## Included
67
+
68
+ - `rules/stack-conventions.md` — Paths, env vars, SQL layout, export naming, PII
69
+ - `rules/metric-dashboard-templates.md` — Metric tables, Metabase spec template, JSON mapping
70
+
71
+ ## Activation
72
+
73
+ ```
74
+ Role: data-analyst
75
+ Overlay: overlays/data-analyst-stack
76
+ ```
77
+
78
+ ## Environment Variables
79
+
80
+ | Variable | Purpose | Example |
81
+ |----------|---------|---------|
82
+ | `ANALYTICS_DATA_ROOT` | Root for inputs (CSV, Parquet) | `./data/analytics` |
83
+ | `DUCKDB_PATH` | File-backed DuckDB database | `./data/analytics/warehouse.duckdb` |
84
+ | `METABASE_INSTANCE_URL` | Base URL for linking specs (read-only) | `http://localhost:3000` |
85
+ | `DBT_PROFILES_DIR` | dbt profiles directory | `~/.dbt` |
86
+
87
+ Default: `ANALYTICS_DATA_ROOT=./data/analytics` relative to active repo.
88
+
89
+ ## Standard 2026 Alignment
90
+
91
+ This file is part of the agent-skills engineering pack. The 2026 upgrade
92
+ pass added this footer so every prose file in the pack carries a
93
+ consistent Standard 2026 pointer.
94
+
95
+ - **OWASP ASI**: applied as described in `core/roles/role-standard.md`
96
+ (ASI01-ASI10) and the per-skill `## Security Guardrails (OWASP ASI)` sections.
97
+ - **Failure Modes**: the rule in this file can be violated by drift, missing
98
+ context, or untracked exceptions. Concrete failure scenarios belong in the
99
+ related skill or workflow's `### Failure Modes` section.
100
+ - **Output Contracts**: structured artifacts produced under this file must
101
+ conform to schemas in `core/contracts/schemas/`.
102
+ - **Skill Toolbox Lock**: this file's rules are enforced by the role that
103
+ owns the affected action; the runtime gate is
104
+ `core/scripts/hooks/check-policy.py`.
105
+ - **Commit / publish gate**: changes that affect user-visible behavior
106
+ follow the META-RULE in `core/rules/code.md` — no commit, no push, no
107
+ publish without explicit user confirmation.
108
+
109
+ Last updated: 2026-09-01
@@ -1,135 +1,135 @@
1
- # Metric And Dashboard Templates — Data Analyst Stack
2
-
3
- Copy-ready templates for metrics, Metabase handoff, and mapping to `data-analysis-report.json`.
4
-
5
- ## Metric Definition Table
6
-
7
- Use in every analysis brief and Excel **Metrics** sheet:
8
-
9
- | Metric | Definition | Numerator / Denominator | Filters | Grain | Time zone | Notes |
10
- | ------ | ---------- | ----------------------- | ------- | ----- | --------- | ----- |
11
- | Example: WAU | Distinct users with ≥1 qualifying event in ISO week | COUNT(DISTINCT user_id) / none | exclude test accounts | user_id, week_start | UTC+7 | Align with product analytics doc v2 |
12
-
13
- ## Metabase Question Spec Template
14
-
15
- Save as `specs/metabase/<slug>.md`:
16
-
17
- ```markdown
18
- # Metabase — <Title>
19
-
20
- ## Purpose
21
- - Business question:
22
- - Audience:
23
- - Refresh: (e.g. daily 06:00 UTC+7)
24
-
25
- ## Data Source
26
- - Database / schema:
27
- - Table or view:
28
- - Grain:
29
- - Known limitations:
30
-
31
- ## Question Type
32
- - (simple / native SQL / model)
33
-
34
- ## Dimensions
35
- | Field | Type | Description |
36
- | ----- | ---- | ----------- |
37
-
38
- ## Measures
39
- | Measure | Aggregation | Definition |
40
- | ------- | ----------- | ---------- |
41
-
42
- ## Filters (default)
43
- - ...
44
-
45
- ## Segments
46
- - ...
47
-
48
- ## Visualization
49
- - Chart type:
50
- - Sort / limit:
51
- - Comparison period (if any):
52
-
53
- ## Acceptance
54
- - [ ] Spot-check total matches DuckDB export for same filters
55
- - [ ] PII columns hidden or aggregated
56
- - [ ] Definition matches official metric catalog / BA ticket
57
- ```
58
-
59
- ## Generic BI Chart Spec (non-Metabase)
60
-
61
- ```markdown
62
- # BI Chart — <Title>
63
-
64
- - Chart type:
65
- - X-axis / dimension:
66
- - Y-axis / measure(s):
67
- - Filters:
68
- - Drill-down:
69
- - Export schedule:
70
- ```
71
-
72
- ## Mapping To `data-analysis-report.json`
73
-
74
- | Report section | JSON field |
75
- | -------------- | ---------- |
76
- | Business question | `business_question` |
77
- | Metric table rows | `metrics[]` (`name`, `definition`, `value`, `grain`, `time_range`) |
78
- | Source inventory | `sources[]` |
79
- | Verified numbers / tables | `findings[]` |
80
- | Narrative / options | `interpretation[]` |
81
- | Profiling issues | `data_quality_issues[]` |
82
- | Next steps | `recommendations[]` |
83
- | High / Medium / Low | `confidence` |
84
- | `exports/...`, `queries/...`, `specs/...` | `artifacts[]` |
85
-
86
- ## BA → Analyst Handoff Block
87
-
88
- When Business Analyst delegates analysis, the brief SHOULD include:
89
-
90
- ```markdown
91
- ## Analytics Request (for Data Analyst)
92
- - Decision supported:
93
- - Questions (numbered):
94
- - Proposed metrics (names only if undefined):
95
- - Segments / actors:
96
- - Time range and timezone:
97
- - Sources known (paths, tables, exports):
98
- - Constraints (PII, read-only, deadline):
99
- - Out of scope for this analysis:
100
- ```
101
-
102
- Analyst returns `data-analysis-report.json` plus optional Metabase spec and dated export.
103
-
104
- ## Standard 2026 Alignment
105
-
106
- This overlay rule file is part of the agent-skills engineering pack. The 2026
107
- upgrade pass added the following Standard 2026 alignment footer to every
108
- overlay rule file in the pack.
109
-
110
- - **OWASP ASI**: applied as described in the core pack — see
111
- `core/roles/role-standard.md` (ASI01-ASI10) and the per-skill
112
- `## Security Guardrails (OWASP ASI)` section in each skill. The rules in this
113
- file are applied by the role that owns the affected action; the runtime
114
- gate is `core/scripts/hooks/check-policy.py` with
115
- `core/policies/action-boundaries.yaml`.
116
- - **Failure Modes** (overlay-specific): the rules in this file can be violated
117
- by drift, missing context, or untracked exceptions. The owning role is
118
- expected to surface concrete failure scenarios in the workflow's
119
- `### Failure Modes` section and to capture remediations via
120
- `contracts/schemas/incident-report.json` when the rule is bypassed.
121
- - **Output Contracts**: when a rule in this file produces a structured
122
- artifact (brief, plan, config, content handoff, audit event), the artifact
123
- must conform to the corresponding schema in `core/contracts/schemas/`.
124
- See `See `core/skills/foundation/analyze-data/SKILL.md` and the `data-analysis-report.json` schema.` for the related skill output contract reference.
125
- - **Skill Toolbox Lock**: a rule in this file is enforced by the role whose
126
- Skill Toolbox lists the related skill as Primary. Roles that hold the
127
- skill as Supporting must delegate rather than execute directly (per
128
- `core/workflows/README.md`).
129
- - **Commit / publish gate**: rule changes that affect user-visible behavior
130
- must follow the META-RULE in `core/rules/code.md` — no commit, no push,
131
- no publish without explicit user confirmation.
132
-
133
- See `core/skills/foundation/analyze-data/SKILL.md` and the `data-analysis-report.json` schema.
134
-
135
- Last updated: 2026-09-01
1
+ # Metric And Dashboard Templates — Data Analyst Stack
2
+
3
+ Copy-ready templates for metrics, Metabase handoff, and mapping to `data-analysis-report.json`.
4
+
5
+ ## Metric Definition Table
6
+
7
+ Use in every analysis brief and Excel **Metrics** sheet:
8
+
9
+ | Metric | Definition | Numerator / Denominator | Filters | Grain | Time zone | Notes |
10
+ | ------ | ---------- | ----------------------- | ------- | ----- | --------- | ----- |
11
+ | Example: WAU | Distinct users with ≥1 qualifying event in ISO week | COUNT(DISTINCT user_id) / none | exclude test accounts | user_id, week_start | UTC+7 | Align with product analytics doc v2 |
12
+
13
+ ## Metabase Question Spec Template
14
+
15
+ Save as `specs/metabase/<slug>.md`:
16
+
17
+ ```markdown
18
+ # Metabase — <Title>
19
+
20
+ ## Purpose
21
+ - Business question:
22
+ - Audience:
23
+ - Refresh: (e.g. daily 06:00 UTC+7)
24
+
25
+ ## Data Source
26
+ - Database / schema:
27
+ - Table or view:
28
+ - Grain:
29
+ - Known limitations:
30
+
31
+ ## Question Type
32
+ - (simple / native SQL / model)
33
+
34
+ ## Dimensions
35
+ | Field | Type | Description |
36
+ | ----- | ---- | ----------- |
37
+
38
+ ## Measures
39
+ | Measure | Aggregation | Definition |
40
+ | ------- | ----------- | ---------- |
41
+
42
+ ## Filters (default)
43
+ - ...
44
+
45
+ ## Segments
46
+ - ...
47
+
48
+ ## Visualization
49
+ - Chart type:
50
+ - Sort / limit:
51
+ - Comparison period (if any):
52
+
53
+ ## Acceptance
54
+ - [ ] Spot-check total matches DuckDB export for same filters
55
+ - [ ] PII columns hidden or aggregated
56
+ - [ ] Definition matches official metric catalog / BA ticket
57
+ ```
58
+
59
+ ## Generic BI Chart Spec (non-Metabase)
60
+
61
+ ```markdown
62
+ # BI Chart — <Title>
63
+
64
+ - Chart type:
65
+ - X-axis / dimension:
66
+ - Y-axis / measure(s):
67
+ - Filters:
68
+ - Drill-down:
69
+ - Export schedule:
70
+ ```
71
+
72
+ ## Mapping To `data-analysis-report.json`
73
+
74
+ | Report section | JSON field |
75
+ | -------------- | ---------- |
76
+ | Business question | `business_question` |
77
+ | Metric table rows | `metrics[]` (`name`, `definition`, `value`, `grain`, `time_range`) |
78
+ | Source inventory | `sources[]` |
79
+ | Verified numbers / tables | `findings[]` |
80
+ | Narrative / options | `interpretation[]` |
81
+ | Profiling issues | `data_quality_issues[]` |
82
+ | Next steps | `recommendations[]` |
83
+ | High / Medium / Low | `confidence` |
84
+ | `exports/...`, `queries/...`, `specs/...` | `artifacts[]` |
85
+
86
+ ## BA → Analyst Handoff Block
87
+
88
+ When Business Analyst delegates analysis, the brief SHOULD include:
89
+
90
+ ```markdown
91
+ ## Analytics Request (for Data Analyst)
92
+ - Decision supported:
93
+ - Questions (numbered):
94
+ - Proposed metrics (names only if undefined):
95
+ - Segments / actors:
96
+ - Time range and timezone:
97
+ - Sources known (paths, tables, exports):
98
+ - Constraints (PII, read-only, deadline):
99
+ - Out of scope for this analysis:
100
+ ```
101
+
102
+ Analyst returns `data-analysis-report.json` plus optional Metabase spec and dated export.
103
+
104
+ ## Standard 2026 Alignment
105
+
106
+ This overlay rule file is part of the agent-skills engineering pack. The 2026
107
+ upgrade pass added the following Standard 2026 alignment footer to every
108
+ overlay rule file in the pack.
109
+
110
+ - **OWASP ASI**: applied as described in the core pack — see
111
+ `core/roles/role-standard.md` (ASI01-ASI10) and the per-skill
112
+ `## Security Guardrails (OWASP ASI)` section in each skill. The rules in this
113
+ file are applied by the role that owns the affected action; the runtime
114
+ gate is `core/scripts/hooks/check-policy.py` with
115
+ `core/policies/action-boundaries.yaml`.
116
+ - **Failure Modes** (overlay-specific): the rules in this file can be violated
117
+ by drift, missing context, or untracked exceptions. The owning role is
118
+ expected to surface concrete failure scenarios in the workflow's
119
+ `### Failure Modes` section and to capture remediations via
120
+ `contracts/schemas/incident-report.json` when the rule is bypassed.
121
+ - **Output Contracts**: when a rule in this file produces a structured
122
+ artifact (brief, plan, config, content handoff, audit event), the artifact
123
+ must conform to the corresponding schema in `core/contracts/schemas/`.
124
+ See `See `core/skills/foundation/analyze-data/SKILL.md` and the `data-analysis-report.json` schema.` for the related skill output contract reference.
125
+ - **Skill Toolbox Lock**: a rule in this file is enforced by the role whose
126
+ Skill Toolbox lists the related skill as Primary. Roles that hold the
127
+ skill as Supporting must delegate rather than execute directly (per
128
+ `core/workflows/README.md`).
129
+ - **Commit / publish gate**: rule changes that affect user-visible behavior
130
+ must follow the META-RULE in `core/rules/code.md` — no commit, no push,
131
+ no publish without explicit user confirmation.
132
+
133
+ See `core/skills/foundation/analyze-data/SKILL.md` and the `data-analysis-report.json` schema.
134
+
135
+ Last updated: 2026-09-01
@@ -1,80 +1,80 @@
1
- # Stack Conventions — Data Analyst (DuckDB, Metabase, BI)
2
-
3
- Strict toolchain rules for the `data-analyst` role operating with DuckDB, Metabase, and Spreadsheet BI exports.
4
-
5
- ## 1. Data Layout & Workspace Hygiene
6
-
7
- To keep the analytics environment uncluttered, all analysis must occur strictly within the `ANALYTICS_DATA_ROOT` (default `./data/analytics`).
8
-
9
- ```text
10
- analytics/
11
- raw/ # Immutable raw drops (gitignored)
12
- staging/ # Cleaned intermediate files
13
- warehouse.duckdb # Local DuckDB instance
14
- queries/ # Saved SQL scripts (.sql)
15
- exports/ # Finalized Excel/CSV outputs (gitignored if sensitive)
16
- specs/ # Metabase requirement docs (markdown/JSON)
17
- ```
18
-
19
- - **Saved SQL Rules:** All analytical queries must be saved as `.sql` files inside `queries/`. Do not run ephemeral queries without saving logic.
20
- - **SQL Headers:** Every `.sql` file MUST begin with a header specifying: `purpose`, `grain`, and `as_of` date.
21
- - **Data Privacy:** Absolutely NO Personally Identifiable Information (PII) is allowed to be committed to version control. PII must be aggregated, masked, or kept locally in gitignored folders.
22
-
23
- ## 2. DuckDB Execution Rules
24
-
25
- - **Connections:** Open connections using an explicit file path (`DUCKDB_PATH`), or strictly in-memory for ephemeral probes.
26
- - **Tracing:** Always log row counts after any materializing steps (`CREATE TABLE AS`, `INSERT`, major `WHERE`).
27
- - **Boundaries:** Analysts read from paths engineered by the `data-engineer`. Analysts DO NOT invent production ingest pipelines.
28
-
29
- ## 3. Metabase Handoff Boundaries
30
-
31
- - **No Admin Assumptions:** The Data Analyst does NOT create dashboards directly in the production Metabase instance unless explicitly granted admin access.
32
- - **Specification Delivery:** The analyst delivers dashboard requirements purely as **Specs** (Markdown or JSON) stored in `specs/metabase/`.
33
- - **Spec Requirements:** Every spec MUST strictly define: the source table/view, the exact `dimensions`, `measures`, default `filters`, `segment` logic, and `refresh` intervals.
34
-
35
- ## 4. Excel / BI Export Standards
36
-
37
- - **Output Path:** All exports must be saved to `exports/` with the filename pattern: `YYYY-MM-DD_<slug>.xlsx` (or `.csv`).
38
- - **Mandatory "Metrics" Sheet:** Every Excel export MUST include a dedicated "Metrics" sheet that clearly documents the definitions of the numbers presented.
39
- - **Structure:** Separate **Facts** (computed data tables) from **Notes** (analyst interpretation/insights) on distinct sheets or distinct visual sections.
40
- - **Anonymization:** Mask or aggregate all PII columns before export unless the user explicitly confirms clearance.
41
-
42
- ## 5. Escalation To Data Engineer
43
-
44
- Escalate to a Data Engineer if:
45
- - New recurring ingest pipelines (Airflow, dbt) are needed.
46
- - DuckDB hits processing limits and needs replacement with a dedicated Cloud Data Warehouse.
47
- - Source data is missing, corrupt, or stale.
48
-
49
- ## Standard 2026 Alignment
50
-
51
- This overlay rule file is part of the agent-skills engineering pack. The 2026
52
- upgrade pass added the following Standard 2026 alignment footer to every
53
- overlay rule file in the pack.
54
-
55
- - **OWASP ASI**: applied as described in the core pack — see
56
- `core/roles/role-standard.md` (ASI01-ASI10) and the per-skill
57
- `## Security Guardrails (OWASP ASI)` section in each skill. The rules in this
58
- file are applied by the role that owns the affected action; the runtime
59
- gate is `core/scripts/hooks/check-policy.py` with
60
- `core/policies/action-boundaries.yaml`.
61
- - **Failure Modes** (overlay-specific): the rules in this file can be violated
62
- by drift, missing context, or untracked exceptions. The owning role is
63
- expected to surface concrete failure scenarios in the workflow's
64
- `### Failure Modes` section and to capture remediations via
65
- `contracts/schemas/incident-report.json` when the rule is bypassed.
66
- - **Output Contracts**: when a rule in this file produces a structured
67
- artifact (brief, plan, config, content handoff, audit event), the artifact
68
- must conform to the corresponding schema in `core/contracts/schemas/`.
69
- See `See `core/skills/foundation/analyze-data/SKILL.md` and the `data-analysis-report.json` schema.` for the related skill output contract reference.
70
- - **Skill Toolbox Lock**: a rule in this file is enforced by the role whose
71
- Skill Toolbox lists the related skill as Primary. Roles that hold the
72
- skill as Supporting must delegate rather than execute directly (per
73
- `core/workflows/README.md`).
74
- - **Commit / publish gate**: rule changes that affect user-visible behavior
75
- must follow the META-RULE in `core/rules/code.md` — no commit, no push,
76
- no publish without explicit user confirmation.
77
-
78
- See `core/skills/foundation/analyze-data/SKILL.md` and the `data-analysis-report.json` schema.
79
-
80
- Last updated: 2026-09-01
1
+ # Stack Conventions — Data Analyst (DuckDB, Metabase, BI)
2
+
3
+ Strict toolchain rules for the `data-analyst` role operating with DuckDB, Metabase, and Spreadsheet BI exports.
4
+
5
+ ## 1. Data Layout & Workspace Hygiene
6
+
7
+ To keep the analytics environment uncluttered, all analysis must occur strictly within the `ANALYTICS_DATA_ROOT` (default `./data/analytics`).
8
+
9
+ ```text
10
+ analytics/
11
+ raw/ # Immutable raw drops (gitignored)
12
+ staging/ # Cleaned intermediate files
13
+ warehouse.duckdb # Local DuckDB instance
14
+ queries/ # Saved SQL scripts (.sql)
15
+ exports/ # Finalized Excel/CSV outputs (gitignored if sensitive)
16
+ specs/ # Metabase requirement docs (markdown/JSON)
17
+ ```
18
+
19
+ - **Saved SQL Rules:** All analytical queries must be saved as `.sql` files inside `queries/`. Do not run ephemeral queries without saving logic.
20
+ - **SQL Headers:** Every `.sql` file MUST begin with a header specifying: `purpose`, `grain`, and `as_of` date.
21
+ - **Data Privacy:** Absolutely NO Personally Identifiable Information (PII) is allowed to be committed to version control. PII must be aggregated, masked, or kept locally in gitignored folders.
22
+
23
+ ## 2. DuckDB Execution Rules
24
+
25
+ - **Connections:** Open connections using an explicit file path (`DUCKDB_PATH`), or strictly in-memory for ephemeral probes.
26
+ - **Tracing:** Always log row counts after any materializing steps (`CREATE TABLE AS`, `INSERT`, major `WHERE`).
27
+ - **Boundaries:** Analysts read from paths engineered by the `data-engineer`. Analysts DO NOT invent production ingest pipelines.
28
+
29
+ ## 3. Metabase Handoff Boundaries
30
+
31
+ - **No Admin Assumptions:** The Data Analyst does NOT create dashboards directly in the production Metabase instance unless explicitly granted admin access.
32
+ - **Specification Delivery:** The analyst delivers dashboard requirements purely as **Specs** (Markdown or JSON) stored in `specs/metabase/`.
33
+ - **Spec Requirements:** Every spec MUST strictly define: the source table/view, the exact `dimensions`, `measures`, default `filters`, `segment` logic, and `refresh` intervals.
34
+
35
+ ## 4. Excel / BI Export Standards
36
+
37
+ - **Output Path:** All exports must be saved to `exports/` with the filename pattern: `YYYY-MM-DD_<slug>.xlsx` (or `.csv`).
38
+ - **Mandatory "Metrics" Sheet:** Every Excel export MUST include a dedicated "Metrics" sheet that clearly documents the definitions of the numbers presented.
39
+ - **Structure:** Separate **Facts** (computed data tables) from **Notes** (analyst interpretation/insights) on distinct sheets or distinct visual sections.
40
+ - **Anonymization:** Mask or aggregate all PII columns before export unless the user explicitly confirms clearance.
41
+
42
+ ## 5. Escalation To Data Engineer
43
+
44
+ Escalate to a Data Engineer if:
45
+ - New recurring ingest pipelines (Airflow, dbt) are needed.
46
+ - DuckDB hits processing limits and needs replacement with a dedicated Cloud Data Warehouse.
47
+ - Source data is missing, corrupt, or stale.
48
+
49
+ ## Standard 2026 Alignment
50
+
51
+ This overlay rule file is part of the agent-skills engineering pack. The 2026
52
+ upgrade pass added the following Standard 2026 alignment footer to every
53
+ overlay rule file in the pack.
54
+
55
+ - **OWASP ASI**: applied as described in the core pack — see
56
+ `core/roles/role-standard.md` (ASI01-ASI10) and the per-skill
57
+ `## Security Guardrails (OWASP ASI)` section in each skill. The rules in this
58
+ file are applied by the role that owns the affected action; the runtime
59
+ gate is `core/scripts/hooks/check-policy.py` with
60
+ `core/policies/action-boundaries.yaml`.
61
+ - **Failure Modes** (overlay-specific): the rules in this file can be violated
62
+ by drift, missing context, or untracked exceptions. The owning role is
63
+ expected to surface concrete failure scenarios in the workflow's
64
+ `### Failure Modes` section and to capture remediations via
65
+ `contracts/schemas/incident-report.json` when the rule is bypassed.
66
+ - **Output Contracts**: when a rule in this file produces a structured
67
+ artifact (brief, plan, config, content handoff, audit event), the artifact
68
+ must conform to the corresponding schema in `core/contracts/schemas/`.
69
+ See `See `core/skills/foundation/analyze-data/SKILL.md` and the `data-analysis-report.json` schema.` for the related skill output contract reference.
70
+ - **Skill Toolbox Lock**: a rule in this file is enforced by the role whose
71
+ Skill Toolbox lists the related skill as Primary. Roles that hold the
72
+ skill as Supporting must delegate rather than execute directly (per
73
+ `core/workflows/README.md`).
74
+ - **Commit / publish gate**: rule changes that affect user-visible behavior
75
+ must follow the META-RULE in `core/rules/code.md` — no commit, no push,
76
+ no publish without explicit user confirmation.
77
+
78
+ See `core/skills/foundation/analyze-data/SKILL.md` and the `data-analysis-report.json` schema.
79
+
80
+ Last updated: 2026-09-01