How this command is triggered — by the user, by Claude, or both
Slash command
/wire:semantic_layer-validate <project-folder>The summary Claude sees in its command listing — used to decide when to auto-load this command
# Validate semantic layer ## User Input ## Path Configuration - **Projects**: `.wire` (project data and status files) When following the workflow specification below, resolve paths as follows: - `.wire/` in specs refers to the `.wire/` directory in the current repository - `TEMPLATES/` references refer to the templates section embedded at the end of this command ## Workflow Specification --- description: Validate semantic layer (LookML) against standards, schema references, and best practices argument-hint: <project-folder> --- # Semantic Layer (LookML) Validation Command ## Purpo...
$ARGUMENTS
.wire (project data and status files)When following the workflow specification below, resolve paths as follows:
.wire/ in specs refers to the .wire/ directory in the current repositoryTEMPLATES/ references refer to the templates section embedded at the end of this commandValidate generated LookML files against quality standards, verify all table and column references match the source schema, check preferred_slug compliance, and ensure syntax correctness. This validation is MANDATORY before marking semantic layer work as complete.
/wire:semantic_layer-validate YYYYMMDD_project_name
/wire:semantic_layer-generate complete)Process:
semantic_layer.generate == complete in status.md/looker/ directory.view.lkml, .model.lkml, .explore.lkml, and .dashboard.lkml filesIf not generated:
Error: Semantic layer not generated yet.
Run `/wire:semantic_layer-generate <project>` first.
Verify all generated LookML files:
| Check | Rule | Severity |
|---|---|---|
| Balanced braces | All {} properly nested | Critical |
| SQL terminators | All SQL blocks end with ;; | Critical |
| Dimension types | Every dimension has type: specified | Critical |
| SQL references | All use ${TABLE}.column or ${view.field} syntax | Critical |
| Primary keys | Defined with primary_key: yes where appropriate | Major |
| Labels | Business-friendly (not raw column names) | Major |
| Trailing commas | No trailing commas in lists | Major |
| Indentation | 2-space standard | Info |
Common Syntax Errors to Check:
# ❌ WRONG: Missing type
dimension: name {
sql: ${TABLE}.name ;;
}
# ✅ CORRECT
dimension: name {
type: string
sql: ${TABLE}.name ;;
}
# ❌ WRONG: Missing semicolons after SQL
dimension: name {
type: string
sql: ${TABLE}.name
}
# ✅ CORRECT
dimension: name {
type: string
sql: ${TABLE}.name ;;
}
# ❌ WRONG: Unbalanced braces
view: test {
dimension: id {
type: number
sql: ${TABLE}.id ;;
}
# ✅ CORRECT
view: test {
dimension: id {
type: number
sql: ${TABLE}.id ;;
}
}
Cross-reference ALL SQL table and column names against the source schema file (DDL, schema.yml, or other provided schema documentation).
Validation Process:
sql_table_name references from generated LookML${TABLE}.column references from each viewFor every view, verify:
sql_table_name or FROM clause references a table that exists in the DDL/schemaproject.dataset.table matches the actual structure${TABLE}.column_name reference matches an actual column in the source tableExample Validation:
Given this DDL:
CREATE TABLE `ra-development.analytics_seed.employee_pto` (
First_name STRING,
Last_name STRING,
email STRING,
Start_date DATE,
End_date DATE,
Days FLOAT64,
Type STRING
);
Validate the LookML references:
| LookML Reference | DDL Column | Status |
|---|---|---|
${TABLE}.First_name | First_name STRING | ✅ Match |
${TABLE}.Last_name | Last_name STRING | ✅ Match |
${TABLE}.email | email STRING | ✅ Match |
${TABLE}.Start_date | Start_date DATE | ✅ Match |
${TABLE}.first_name | - | ❌ Case mismatch! Should be First_name |
${TABLE}.pto_type | - | ❌ Column doesn't exist! Should be Type |
Fixing Mismatches:
If validation reveals mismatches:
If any view, explore, or dashboard uses preferred_slug, validate compliance:
Syntax Rules:
| Rule | Requirement |
|---|---|
| Maximum length | 255 characters |
| Allowed characters | Letters (A-Z, a-z), numbers (0-9), dashes (-), underscores (_) |
| NOT allowed | Spaces, special characters, unicode, dots, slashes |
Validation Regex: ^[A-Za-z0-9_-]{1,255}$
Valid Examples:
preferred_slug: "orders-analysis"
preferred_slug: "customer_metrics_v2"
preferred_slug: "exec-summary-2024"
Invalid Examples:
# ❌ INVALID - contains spaces
preferred_slug: "orders analysis"
# ❌ INVALID - contains dots
preferred_slug: "orders.analysis"
# ❌ INVALID - contains special characters
preferred_slug: "orders@analysis!"
# ❌ INVALID - exceeds 255 characters
preferred_slug: "this_is_a_very_long_slug_that_..."
For all explores and joins:
| Check | Rule | Severity |
|---|---|---|
| Explicit relationship | Joins have relationship: defined | Critical |
| Join type appropriate | left_outer, inner, etc. match data model | Major |
| SQL ON conditions | Reference correct fields from both views | Critical |
| View exists | All joined views are defined in the project | Critical |
| Check | Rule | Severity |
|---|---|---|
| View descriptions | Every view has a description | Major |
| Complex field descriptions | Calculated/derived dimensions are documented | Major |
| Business logic comments | SQL with complex logic has comments | Info |
| Group labels | Related fields use group_label | Info |
| Measure formats | Numeric measures have value_format_name | Info |
Dimensions:
type: specifiedprimary_key: yeshidden: yesMeasures:
Dates:
dimension_group with appropriate timeframesdatatype: (date vs timestamp)convert_tz: no for date-only fieldsOutput Format:
## Semantic Layer (LookML) Validation: [PROJECT_NAME]
**Status:** PASS | FAIL
### Table/Column Reference Check
- **Schema source**: `[DDL file or schema.yml path]`
- **Tables validated**: [count]
- **Columns validated**: [count]
- **Status**: ✅ All references valid | ❌ Mismatches found
| View | Table | Columns Checked | Status |
|------|-------|-----------------|--------|
| [view_name] | `[full_table_path]` | [count] | ✅ Valid / ❌ [issue] |
### preferred_slug Validation
- **Slugs found**: [count]
- **Status**: ✅ All valid | ❌ Issues found | N/A (none used)
| Location | Slug | Length | Characters | Status |
|----------|------|--------|------------|--------|
| [explore/view/dashboard name] | `[slug]` | [len] | ✅/❌ | ✅ Valid / ❌ [issue] |
### Syntax Check
| Check | Status | Notes |
|-------|--------|-------|
| Balanced braces | ✅/❌ | |
| SQL terminators | ✅/❌ | |
| Dimension types | ✅/❌ | |
| SQL references | ✅/❌ | |
| Primary keys | ✅/❌ | |
| Labels | ✅/⚠️ | |
### Relationship Check
| Explore | Joins | Relationship Defined | SQL ON Valid | Status |
|---------|-------|---------------------|-------------|--------|
### Documentation Check
| View | Description | Fields Documented | Complex Logic Commented | Status |
|------|-------------|-------------------|------------------------|--------|
### Issues Found
- [list of issues, if any]
### Recommendations
- [actionable recommendations]
### Next Steps
1. **Fix issues** (if FAIL): Address listed problems, then re-validate
2. **Review with stakeholders**: `/wire:semantic_layer-review <project>`
3. **Sync in Looker IDE** - Pull changes and validate
Process:
status.mdsemantic_layer:
generate: complete
validate: pass | fail
review: not_started
validated_date: [today]
Follow the Jira sync workflow in specs/utils/jira_sync.md:
semantic_layervalidateIf checks fail:
failWarning: No DDL or schema.yml files found for cross-referencing.
Table/column reference validation cannot be performed without a schema source.
Proceeding with syntax and structure validation only.
To enable full validation, provide one of:
1. DDL file in artifacts/
2. dbt schema.yml files
3. Schema specification file
If sql_table_name references a table not in the schema:
❌ Table not found in schema: `project.dataset.unknown_table`
View: [view_name]
Line: sql_table_name: `project.dataset.unknown_table` ;;
Available tables:
- project.dataset.table_a
- project.dataset.table_b
- ...
This command:
status.md with validation resultsExecute the complete workflow as specified above.
After completing the workflow, append a log entry to the project's execution_log.md:
After completing any generate, validate, or review workflow (or a project management command that changes state), append a single log entry to the project's execution log file. Skills also append an entry on activation, making the log a unified trace of all agent activity — both explicit commands and auto-activated skills.
<DP_PROJECTS_PATH>/<project_folder>/execution_log.md
Where <project_folder> is the project directory passed as an argument (e.g., 20260222_acme_platform).
If the file does not exist, create it with the header:
# Execution Log
| Timestamp | Command | Result | Detail |
|-----------|---------|--------|--------|
Then append one row per execution:
| YYYY-MM-DD HH:MM | /wire:<command> | <result> | <detail> |
YYYY-MM-DD HH:MM format (24-hour, local time)/wire:* command invoked, or skill for a skill activation entrycomplete — generate command finished successfullypass — validate command passed all checksfail — validate command found failuresapproved — review command: stakeholder approvedchanges_requested — review command: stakeholder requested changescreated — /wire:new created a new projectarchived — /wire:archive archived a projectremoved — /wire:remove deleted a projectactivated — a skill was auto-activated (used with skill in the Command column)When a skill activates, it appends a row in the same format as commands, using skill in the Command column and the skill identifier in the Result column:
| YYYY-MM-DD HH:MM | skill | <skill-identifier> | activated | <brief trigger description> |
Skill identifiers:
| Skill | Identifier |
|---|---|
| Engagement Context | engagement-context |
| Research Persistence | research-persistence |
| dbt Development | dbt-development |
| LookML Content Authoring | lookml-authoring |
| dbt Analytics QA | dbt-analytics-qa |
| dbt Migration | dbt-migration |
| dbt Troubleshooting | dbt-troubleshooting |
| dbt Semantic Layer | dbt-semantic-layer |
| dbt Unit Testing | dbt-unit-testing |
| dbt DAG | dbt-dag |
| Dagster | dagster |
| Fivetran | fivetran |
| Project Review | project-review |
| Looker Dashboard Mockup | looker-dashboard-mockup |
This makes skill activations visible in the same log that captures command invocations, enabling full activity tracing across both explicit commands and automatic skill triggers.
|, replace with — to preserve table formatting# Execution Log
| Timestamp | Command | Result | Detail |
|-----------|---------|--------|--------|
| 2026-02-22 14:30 | skill | engagement-context | activated | Context loaded for new conversation |
| 2026-02-22 14:35 | /wire:new | created | Project created (type: full_platform, client: Acme Corp) |
| 2026-02-22 14:40 | /wire:requirements-generate | complete | Generated requirements specification (3 files) |
| 2026-02-22 15:12 | /wire:requirements-validate | pass | 14 checks passed, 0 failed |
| 2026-02-22 16:00 | /wire:requirements-review | approved | Reviewed by Jane Smith |
| 2026-02-23 09:15 | /wire:conceptual_model-generate | complete | Generated entity model with 8 entities |
| 2026-02-23 10:30 | /wire:conceptual_model-validate | fail | 2 issues: missing relationship, orphaned entity |
| 2026-02-23 11:00 | /wire:conceptual_model-generate | complete | Regenerated entity model (fixed 2 issues, 8 entities) |
| 2026-02-23 11:15 | /wire:conceptual_model-validate | pass | 12 checks passed, 0 failed |
| 2026-02-23 14:00 | /wire:conceptual_model-review | changes_requested | Reviewed by John Doe — add Customer entity |
| 2026-02-23 15:30 | /wire:conceptual_model-generate | complete | Regenerated entity model (9 entities, added Customer) |
| 2026-02-23 15:45 | /wire:conceptual_model-validate | pass | 14 checks passed, 0 failed |
| 2026-02-23 16:00 | /wire:conceptual_model-review | approved | Reviewed by John Doe |
npx claudepluginhub rittmananalytics/wire-plugin --plugin wire