Skip to content

feat: configurable instructions - #624

Merged
thdxr merged 1 commit into
anomalyco:devfrom
rekram1-node:feat/configurable-instructions
Jul 3, 2025
Merged

feat: configurable instructions#624
thdxr merged 1 commit into
anomalyco:devfrom
rekram1-node:feat/configurable-instructions

Conversation

@rekram1-node

@rekram1-noderekram1-node commented Jul 2, 2025

Copy link
Copy Markdown
Collaborator

Fixes: #583

Changes:

  • optional instructions config key (array of files to read for instructions)
  • behaviors:
    • instructions won't override the defaults only extend (AGENTS.md, CLAUDE.md, CONTEXT.md)
    • instructions can be globs (notably for .cursor/rules/*.mdc support)

This was just an initial pass happy to make any changes.

@rekram1-node
rekram1-node marked this pull request as draft July 2, 2025 21:54
@rekram1-node
rekram1-nodeforce-pushed the feat/configurable-instructions branch from 00e99b5 to 480e7f8CompareJuly 2, 2025 22:07
@rekram1-node
rekram1-node marked this pull request as ready for review July 2, 2025 22:08
@thdxr
thdxr merged commit b995659 into anomalyco:devJul 3, 2025
achembarpu pushed a commit to achembarpu/opencode that referenced this pull request Aug 4, 2025
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
mayoalexander added a commit to FREELABEL/iris-opencode that referenced this pull request Aug 23, 2026
Found while building the RevOps KPI layer on bloq anomalyco#624. `--status` is registered
for every entity in this group and `goals` and `strategies` both persist it. The
`kpis` builder set name, target, current and unit, and dropped status on the
floor — accepted on the command line, reported as success, absent from the
stored record.
It matters more here than the one-line fix suggests. Status is how a KPI layer
distinguishes MEASURED AND ON TRACK from MEASURED AND SLIPPING from NOT MEASURED
AT ALL. Without it, twelve KPIs that cannot be computed yet — no billing source,
no deal amounts, no stage timestamps — store as a bare target with an empty
current, which reads as zero. A metric nobody can calculate and a metric sitting
at zero are opposite facts and looked identical.
Verified by round-trip through the stored business_context, not by the command
echoing back: 17 KPIs, 5 carrying status "live" with real computed values, 12
carrying the specific input each one waits on.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BZagd8eJFQz593QjSkVG4u
mayoalexander added a commit to FREELABEL/iris-opencode that referenced this pull request Aug 23, 2026
…as undetectable
#182078. Three behaviours that are each defensible alone: Prospected is hidden by
default (1,944 of the first 2,000 rows), results cap by recency, and the footer
printed only how many were shown. Together, with no population figure, they
produce a confident partial answer indistinguishable from a complete one.
THE TOTAL WAS ALWAYS THERE AND ALWAYS MISREAD. The endpoint is a Laravel
paginator with `total` at the TOP level; the code read `data.meta.total`, which
does not exist, and fell back to `leads.length`. So totalFromApi could only ever
equal the page size, which made `total > shown` impossible and truncation
undetectable BY CONSTRUCTION.
Measured while fixing it: per_page=5 returns total 28522.
WHAT IT COST. I used this command as a measurement instrument and published six
funnel KPIs from it onto bloq anomalyco#624 — lead-to-contact 39.3%, contact-to-qualified
81.8%, win rate 66.7%. Every one was computed over 56 rows out of 28,522, and
reported as measured fact. They were wrong in the FLATTERING direction, because a
truncated sample of WORKED leads looks like a healthy funnel precisely when the
unworked ones are the ones missing. All six are corrected to blocked.
NOW:
20 lead(s) (62 Prospected hidden — use --all · newest 20 of 28522)
And in --json, the array shape is preserved because callers parse it, so the
caveat goes to STDERR — reaching a human or an agent without corrupting piped
stdout:
[leads list] TRUNCATED: newest 20 of 28522 by id
[leads list] FILTERED: 62 Prospected hidden (pass --all)
[leads list] This is a page, not a population — do not compute rates from it.
A silent truncation in JSON is the exact failure this exists to prevent.
Refs #182078, RevOps epic #182075
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BZagd8eJFQz593QjSkVG4u
mayoalexander added a commit to FREELABEL/iris-opencode that referenced this pull request Aug 24, 2026
…d the live KPI layer
`iris kpi` was a second KPI store standing next to one that already existed and
was better. `iris bloq kpis 624` holds 19 KPIs, five computing from real data,
each blocked one annotated with WHY, with a gap map (#182060) and build order
(#182075) built on top of it. Mine was global instead of bloq-scoped,
hand-entered instead of computed, and tracked no blocked reasons. Two stores
both called "KPI" is how a number ends up in the one nothing reads, so this
removes mine rather than keeping both.
What genuinely did not exist is an objective with SEVERAL key results under it.
`bloq goals` carries one `target` string and one `--kpi` link. `iris okr` keeps
that job and nothing else — it is now a goal layer, not a measurement layer.
A key result can now REFERENCE a KPI (`--kpi-bloq 624 --kpi k_zrl88kmtov`) and
read its value live instead of having it retyped and left to drift.
The reference is deliberately strict about what it will claim:
- The KPI is the source of truth for the READING. When it has none — 14 of the
19 on anomalyco#624 are blocked — the key result is UNMEASURED and says so, naming the
blocking reason. It does NOT fall back to the KR's own current_value, which
defaults to 0: that fallback rendered a confident "0%" for a metric nobody is
computing, the same defect as the decrease-KR bug one commit earlier, and it
was caught the same way — by pointing it at a real blocked KPI and reading the
output instead of trusting it.
- The TARGET still falls back, because a KPI can declare a goal before it
measures against it.
- A reference to a KPI that no longer exists renders loudly as missing rather
than silently showing stale local numbers.
- Unmeasured and blocked key results are EXCLUDED from an objective's average
and reported as "(+N unmeasured)", never averaged in as zero.
Verified live against bloq anomalyco#624:
MRR 99 / 5000 2% ← live
Logo churn 25% / 5% ↓ 20% ← live, decrease applied
Lead-to-Contact not measured / 60% ← blocked: no population query
crm_ops objective reads "25% avg across 1 KR (+1 unmeasured)"
Note: evolving revops_key_results to carry the reference orphaned its existing
rows (Atlas #181628 — the read path only sees the newest schema version). Rows
were backed up and re-seeded. Anything with real data in it needs that handled
before a schema change, not after.
18 tests here; full suite 799 pass.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HzGwGaksRciQ6AWi4y7WW3
mayoalexander added a commit to FREELABEL/iris-opencode that referenced this pull request Aug 24, 2026
…files (RO-7 #182271)
The RevOps KPI layer was built against one revenue model: a B2B SaaS funnel.
The customer it was built toward — GTC MediGuide (bloq anomalyco#601) — is TELEHEALTH,
where revenue operations means the revenue CYCLE: eligibility, prior auth,
coding, claim submission, adjudication, denials, A/R. Not a missing metric, a
missing half (RO-6 #182260).
Only the client can say which model applies. Waiting blocks the build; guessing
wastes weeks in whichever direction is wrong. So the model stops being a
prerequisite and becomes a parameter.
Both models share one spine — work item -> staged pipeline -> terminal outcome
-> reason taxonomy -> recovery motion -> cycle time -> cost ratio. opportunity
/claim, won/paid, lost/denied, loss-reason/CARC, re-engagement/appeal,
sales-cycle/days-in-A-R, CAC/cost-to-collect. That mapping came from laying the
HFMA MAP Keys beside our own gap map, not from analogy-hunting.
Ships:
- revenue-models.ts — typed profile registry: subscription, payer_billed,
cash_pay. Serialisable by design so it can move to a served registry when
agents need it.
- `iris bloq models [bloqId]` — profiles are discoverable, and it says which
one a given bloq is running.
- `iris bloq kpis list` filters to the active profile, ALWAYS prints which
profile answered, and distinguishes "declared on this bloq" from "DEFAULT —
not declared". A default is not a decision, and reporting one as a choice is
the same defect as a gate that says "gated" without saying gated to whom.
- `--model <key>` previews another profile without mutating the bloq; an
unknown key is REFUSED, never silently defaulted, so a typo cannot read as
a deliberate choice.
- `--applies-to` on `bloq kpis add`; `--all` to see every profile's KPIs.
Two safety properties, both tested:
- An untagged KPI applies EVERYWHERE. All 19 KPIs on anomalyco#624 are untagged today;
if absence meant hidden, enabling this would empty the board — and a metric
that vanishes reads as "we don't track that", which is indistinguishable
from "we track it and it's fine".
- Filtering reports what it set aside rather than quietly shrinking the list.
Default is `subscription`, so no existing board changes meaning.
Phase 2 (837/835 ingestion, clearinghouse, CARC parsing) stays correctly
blocked. Verified live against bloq anomalyco#624.
20 new tests; 613 pass across the CLI suite.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HzGwGaksRciQ6AWi4y7WW3
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature request: ability to configure which file will contain agent rules

2 participants

@rekram1-node@thdxr