feat(runner): support target_type: project for project-level rules #14

Closed
opened 2026-05-19 14:30:46 +02:00 by michael · 0 comments
Owner

Problem

All rules currently run against individual files (target_type: file).
Some checks are not file-based but project-based -- e.g. whether
a required file exists in the project root.

Solution

Introduce target_type: project as a first-class concept in the runner.
Project rules run once per check run against the project root directory,
not per file.

Rule example:

when:
  target_type: project
check:
  primitive: daw.fragjan.check.exists
  path: config/module.conf

Runner logic:

  • target_type: project -> single run with { type="project", path=dir }
  • target_type: file (default) -> existing per-file scan

Affected Files

  • core/runner.lua: target_type branching, file_count from runner
  • core/commands.lua: use file_count from runner.run()
  • var/rules/daw-code/rules/module-conf-exists.yaml: first project rule

Notes

MVP target types: file, project.
Not yet: markdown_block, url, vm_session.
Project rules run once per check -- not per file.

## Problem All rules currently run against individual files (target_type: file). Some checks are not file-based but project-based -- e.g. whether a required file exists in the project root. ## Solution Introduce target_type: project as a first-class concept in the runner. Project rules run once per check run against the project root directory, not per file. Rule example: ```yaml when: target_type: project check: primitive: daw.fragjan.check.exists path: config/module.conf ``` Runner logic: - target_type: project -> single run with { type="project", path=dir } - target_type: file (default) -> existing per-file scan ## Affected Files - core/runner.lua: target_type branching, file_count from runner - core/commands.lua: use file_count from runner.run() - var/rules/daw-code/rules/module-conf-exists.yaml: first project rule ## Notes MVP target types: file, project. Not yet: markdown_block, url, vm_session. Project rules run once per check -- not per file.
michael added this to the Basic Version milestone 2026-05-30 16:05:10 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/fragjan#14
No description provided.