STEP-07-C — Ticket Lint Gate
Part of: STEP-07 spec
Depends on: #3 (STEP-07-B)
What to build
Add lint_ticket(ticket: Ticket) -> List[str] to src/ticket_io.py.
Lint rules:
LINT-001 — task references a .py filename but context_files is empty
LINT-002 — produces/consumes declared but context_files is empty
LINT-003 — context_files references a file that does not exist on disk
LINT-004 — task is None or empty string
Call lint_ticket() inside write_tickets() in runner.py:
- Warn (print) on violations — do NOT block ticket write
- Log violations to
logs/lint-violations.jsonl
Warn-not-block by design. Hard-fail comes in STEP-08 after false-positive rate measured in real runs.
Gate
pytest tests/test_ticket_io.py -v green. 4+ new tests covering each lint rule.
Files
src/ticket_io.py
agent/runner.py
tests/test_ticket_io.py
STEP-07-C — Ticket Lint Gate
Part of: STEP-07 spec
Depends on: #3 (STEP-07-B)
What to build
Add
lint_ticket(ticket: Ticket) -> List[str]tosrc/ticket_io.py.Lint rules:
LINT-001— task references a.pyfilename butcontext_filesis emptyLINT-002—produces/consumesdeclared butcontext_filesis emptyLINT-003—context_filesreferences a file that does not exist on diskLINT-004— task is None or empty stringCall
lint_ticket()insidewrite_tickets()inrunner.py:logs/lint-violations.jsonlGate
pytest tests/test_ticket_io.py -vgreen. 4+ new tests covering each lint rule.Files
src/ticket_io.pyagent/runner.pytests/test_ticket_io.py