Skip to content

feat(spec): .tri Spec Linter — validate before pipeline #68

Description

@gHashTag

Problem

Pipeline runs on invalid specs and produces garbage. No pre-validation gate.

Solution

Validate .tri spec structure before pipeline runs:

  • Required sections: name, version, language, module
  • Optional but checked: types, behaviors, constants, tests
  • Type field format validation (simple field: Type vs YAML list - name: field)
  • Behavior format validation (given/when/then)

Acceptance Criteria

  • zig build tri -- lint specs/tri/<name>.tri validates structure
  • Returns exit 0 for valid, exit 1 with errors for invalid
  • Integrated into Link 5 (strict_check) of pipeline
  • Catches the 5 error categories found in REGENERATION_REPORT

Activity

  1. gHashTag commented on Mar 10, 2026

    @gHashTag
    OwnerAuthor

    🛡️ Agent: Linter | ⏱️ 2026-03-10T16:36:00+07
    📋 Task: Spec Linter — validate before pipeline
    🔄 Status: ✅ COMPLETED

    Deliverables:

    • validate_cmd.zig — 500 LOC, 13 tests, 42 known types
    • Pipeline Link 25 (spec_lint) — lint gate blocks bad specs
    • tri lint CLI — file / --all / --report modes
    • .trinity/lint/ JSONL protocol logging
    • linter_gate.tri self-describing spec

    Metrics:

    • 339 specs audited: 325 pass, 14 fail (95.9%)
    • 📐 V = φ·(95.9/100)² = 1.488

    Files changed:

    • src/vibeec/validate_cmd.zig (new)
    • src/tri/golden_chain.zig (+spec_lint=25)
    • src/tri/pipeline_executor.zig (+executeSpecLint)
    • src/tri/tri_commands.zig (+runLintCommand)
    • specs/tri/linter_gate.tri (new)

    ✨ φ says: "Quality at the gate prevents chaos at the core."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions