Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/agent_comms/todos.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import re
import subprocess
import sqlite3
import sys
import time
import asyncio
from abc import abstractmethod
Expand Down Expand Up @@ -758,7 +759,8 @@ class OrderWords(WireValue):
# for long ordinary words with no slash or filename suffix.
CITED: ClassVar[re.Pattern] = re.compile(
r'(?m)^ {4}.*$|`[^`\n]*`|"[^"\n]*"|“[^”\n]*”|'
r'(?:(?<!\S)|(?<=[`"”]))(?:\S*/\S*|\S+\.(?:py|md|jsonl?|txt|png|toml|ts|log|patch)\b)')
r'(?:(?<!\S)|(?<=[`"”]))(?:\S*/\S*|\S+\.(?:py|md|jsonl?|txt|png|toml|ts|log|patch)\b)|'
r'\b\w+_\w+\b|\b[A-Z][a-z0-9]+[A-Z]\w*\b') # identifiers are code, not prose
REFUSED: ClassVar[re.Pattern]
refusal: ClassVar[str]
least_words: ClassVar[int] = 1
Expand Down Expand Up @@ -804,6 +806,13 @@ class PlainText(OrderWords):
REFUSED = re.compile(r'\b(custody|admission|admit\w*|receipt\w*|checkpoint\w*|provenance|authority|authorities|witness\w*|lattice|surface|disposition\w*|invariant\w*|semantic\w*|ownership|lifecycle|acceptance|canonical|retained|borrow(?:ed|er|ers)?|bounded|certif\w*|recertif\w*|candidate|fence\w*|sidecar\w*|substrate|installed-path|source[- ]paired|exact[- ]head|integration owner|separately owned|follow-?up|remaining scope|not claimed|remains held|load[- ]bearing|cutover|carr(?:y|ies) across|declared dependency|qualifying)\b', re.I)
refusal = "Jargon {1} hides what happened; say it plainly."

@staticmethod
def refuses(found: list[str]) -> bool:
"""Flags, never blocks: a wording slip costs a note, not a resend."""
if found:
print(f"Flag: jargon {', '.join(found)} hides what happened; say it plainly.", file=sys.stderr)
return False


class StrikeReason(PlainText):
"""What a unit did, plainly, in enough words to stand on the public record. A unit's
Expand Down
Loading