Summary
Add full coding-ethos integration for luacheck from the pyqa_lint catalog.
Parent tracker: #77
pyqa_lint source: ~/Active/pyqa_lint/tooling/catalog/languages/lua/luacheck.json
Scope
This issue covers one tool only. Integration is complete only when coding-ethos owns acquisition, execution, diagnostics, Lua language facts, CEL/SARIF output, policy alignment, MCP/agent visibility, docs, and tests.
Required Integration Surface
1. Tool Acquisition
- Add deterministic managed acquisition for
luacheck.
- Pin the version and checksum where a release artifact is downloaded.
- Record provenance in the managed toolchain manifest.
- Validate the acquired executable during bootstrap and fail fast with a structured diagnostic if validation fails.
- Do not rely on an arbitrary host-installed
luacheck from PATH.
2. Command Orchestration
- Build command construction in Go through the hook runner or managed capture path.
- Select staged/changed targets when safe; if
luacheck requires project-level execution, document the reason and isolate the scope.
- Pass config paths explicitly and log the selected source of truth.
- Respect sandboxing, timeout, filesystem, and network policy.
- Avoid shell glue and Go-to-shell-to-Go execution paths.
3. Diagnostics Parsing
- Parse native
luacheck output into normalized diagnostics with tool, file, line, column, severity, rule/code, and message.
- Convert unparseable output into structured tool-failure diagnostics.
- Preserve raw output in traces without flooding TOON or MCP summaries.
- Add parser fixtures for success, warning/error severity mapping, empty output, and malformed output.
4. Language AST Facts
- Confirm Tree-sitter/AST fact support for Lua files is sufficient for policy context and SARIF locations.
- Extend shared AST fact collection first if policy context is missing.
- Do not add ad hoc text scanners or policy-specific AST walkers before checking the AST/CEL/SARIF architecture path.
- Add fixtures proving representative Lua files can be indexed, or explicitly document why AST facts are not applicable for this tool.
5. CEL and Policy Alignment
- Expose
luacheck findings through the existing CEL diagnostic inputs by tool, rule/code, file, severity, and path metadata.
- Add policy mappings only where coding-ethos has a clear repo-trust, maintainability, security, or safety opinion.
- Align actionable findings with relevant ethos principles and remediation skills.
- Keep advisory versus blocking behavior explicit and configurable.
6. SARIF Integration
- Emit SARIF with stable
ruleId, source tool metadata, severity, and location data.
- Include related locations, fixes, or help text when
luacheck exposes them.
- Add SARIF shape tests for at least one real diagnostic.
- Preserve stable identities so CI, PR review, and IDE surfaces can correlate findings over time.
7. MCP and Agent Surface
- Ensure
lint_check, lint_advice, SARIF remediation, risk summary, trend analysis, and hook traces identify luacheck correctly.
- Add capability metadata for file reads, file writes, tool execution, network use, autofix support, and advisory/blocking role.
- Make failure modes actionable for agents and human contributors.
8. Docs and Config
- Document managed acquisition, config source of truth, generated config behavior, and common remediation guidance.
- Update README/tooling docs and examples for the Lua path.
- If coding-ethos generates config for
luacheck, add drift checks and hash manifest entries.
Acceptance Criteria
Summary
Add full coding-ethos integration for
luacheckfrom the pyqa_lint catalog.Parent tracker: #77
pyqa_lint source:
~/Active/pyqa_lint/tooling/catalog/languages/lua/luacheck.jsonScope
This issue covers one tool only. Integration is complete only when coding-ethos owns acquisition, execution, diagnostics, Lua language facts, CEL/SARIF output, policy alignment, MCP/agent visibility, docs, and tests.
Required Integration Surface
1. Tool Acquisition
luacheck.luacheckfromPATH.2. Command Orchestration
luacheckrequires project-level execution, document the reason and isolate the scope.3. Diagnostics Parsing
luacheckoutput into normalized diagnostics with tool, file, line, column, severity, rule/code, and message.4. Language AST Facts
5. CEL and Policy Alignment
luacheckfindings through the existing CEL diagnostic inputs by tool, rule/code, file, severity, and path metadata.6. SARIF Integration
ruleId, source tool metadata, severity, and location data.luacheckexposes them.7. MCP and Agent Surface
lint_check,lint_advice, SARIF remediation, risk summary, trend analysis, and hook traces identifyluacheckcorrectly.8. Docs and Config
luacheck, add drift checks and hash manifest entries.Acceptance Criteria
luacheckis acquired through the managed toolchain with version/checksum/provenance recorded where applicable.luacheckwithout shell glue or implicit host config discovery.luacheckfindings by tool/code/file/severity.luacheckoutput cleanly.luacheckon a representative fixture.make build,make pre-commit, and relevant Go package tests pass.