Skip to content

Match Rules from successful Read observations #54

Description

@frap129

Parent

#38

What to build

Allow Rule authors to select guidance with case-sensitive literal fileContains conditions evaluated against text successfully observed by Read. Keep File observations runtime-owned and separate from path-only Working context, and require globs plus fileContains to match the same observation.

Acceptance criteria

  • Scalar and array declarations are trimmed, deduplicated exactly, preserve case and multiline text, and use literal substring matching with OR semantics.
  • A declared field with no valid literals logs one warning and makes the entire Rule fail closed.
  • Content-only matching works, while combined globs and fileContains conditions require one File observation to satisfy both and remain one family under match: any|all.
  • Successful text Reads contribute only returned file text, excluding wrappers and line-number prefixes; continuation and truncated Reads contribute only their returned slice.
  • Binary, image, PDF, and otherwise unparseable file Reads are path-only; directory Reads and failed Reads contribute no File observation.
  • File observations are retained monotonically for the resident session without filesystem scanning or historical tool-event replay.
  • Existing initial-turn durable Rule delivery remains functional and the full repository verification suite passes.

Blocked by

  • None (can start immediately).

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions