Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 4 additions & 3 deletions .specfuse/skills/derive-monitoring/PROMPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ stdout for the user to review.
Read these in the loop scaffold under this repo's `.specfuse/` before acting:

- `.specfuse/skills/derive-monitoring/SKILL.md` — the binding method.
- `.specfuse/rules/design-for-diagnosis.md` — the five diagnosability
- `.specfuse/rules/design-for-diagnosis.md` — the diagnosability
properties the audit checks against.
- `.specfuse/monitoring.yml.example` and
`.specfuse/monitoring.overrides.yml.example` — the file shapes.
Expand Down Expand Up @@ -74,9 +74,10 @@ check — its `query` is operator-supplied by definition.
### Step 2 — Diagnosability audit

Audit the discovered components against
`.specfuse/rules/design-for-diagnosis.md`'s five properties: correlation-ID
`.specfuse/rules/design-for-diagnosis.md`'s properties: correlation-ID
propagation, structured logging, per-component role names, heartbeat
emission, DLQ failure-context capture. A component given `heartbeat`
emission, DLQ failure-context capture, version stamping, data-store signals,
backlog-snapshot emission (each detailed below). A component given `heartbeat`
targets whose own code emits no `ScheduleHeartbeat` event (schedule name
in a `scheduleName` property, under its role name) gets a
`heartbeat-emission` finding — those targets would all report silent. An HTTP-serving component showing no per-deployment version stamp (`version-stamping`) gets one finding and no `http-status-regression` check; with the stamp it gets that check (`deploy_signal: {kind: app-version}`, a `window_after_deploy`).
Expand Down
6 changes: 4 additions & 2 deletions .specfuse/skills/derive-monitoring/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ diverging into two different things.
### Step 2 — Diagnosability audit

Audit the discovered components against
`.specfuse/rules/design-for-diagnosis.md` (T04)'s five properties: correlation-ID
`.specfuse/rules/design-for-diagnosis.md` (T04)'s properties: correlation-ID
propagation, structured logging, per-component role names matching
`monitoring.yml`, heartbeat emission, and DLQ failure-context capture. The
`monitoring.yml`, heartbeat emission, DLQ failure-context capture, version
stamping, data-store signals, and backlog-snapshot emission. The per-component
ones are detailed below. The
`heartbeat-emission` property is per-component: any component Step 1 gives
`heartbeat` targets (it has discovered schedules) must show, in its own code,
an emission of the rule's heartbeat event — a `ScheduleHeartbeat` custom event
Expand Down
5 changes: 5 additions & 0 deletions changelog.d/3586-the-derive-monitoring-skill-no-longer-cl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
class: fixed
trace: #3586
---
The derive-monitoring skill no longer claims its diagnosability audit checks "five properties"; it names all eight it audits and states no count
7 changes: 4 additions & 3 deletions plugins/specfuse/skills/derive-monitoring/PROMPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ stdout for the user to review.
Read these in the loop scaffold under this repo's `.specfuse/` before acting:

- `.specfuse/skills/derive-monitoring/SKILL.md` — the binding method.
- `.specfuse/rules/design-for-diagnosis.md` — the five diagnosability
- `.specfuse/rules/design-for-diagnosis.md` — the diagnosability
properties the audit checks against.
- `.specfuse/monitoring.yml.example` and
`.specfuse/monitoring.overrides.yml.example` — the file shapes.
Expand Down Expand Up @@ -74,9 +74,10 @@ check — its `query` is operator-supplied by definition.
### Step 2 — Diagnosability audit

Audit the discovered components against
`.specfuse/rules/design-for-diagnosis.md`'s five properties: correlation-ID
`.specfuse/rules/design-for-diagnosis.md`'s properties: correlation-ID
propagation, structured logging, per-component role names, heartbeat
emission, DLQ failure-context capture. A component given `heartbeat`
emission, DLQ failure-context capture, version stamping, data-store signals,
backlog-snapshot emission (each detailed below). A component given `heartbeat`
targets whose own code emits no `ScheduleHeartbeat` event (schedule name
in a `scheduleName` property, under its role name) gets a
`heartbeat-emission` finding — those targets would all report silent. An HTTP-serving component showing no per-deployment version stamp (`version-stamping`) gets one finding and no `http-status-regression` check; with the stamp it gets that check (`deploy_signal: {kind: app-version}`, a `window_after_deploy`).
Expand Down
6 changes: 4 additions & 2 deletions plugins/specfuse/skills/derive-monitoring/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ diverging into two different things.
### Step 2 — Diagnosability audit

Audit the discovered components against
`.specfuse/rules/design-for-diagnosis.md` (T04)'s five properties: correlation-ID
`.specfuse/rules/design-for-diagnosis.md` (T04)'s properties: correlation-ID
propagation, structured logging, per-component role names matching
`monitoring.yml`, heartbeat emission, and DLQ failure-context capture. The
`monitoring.yml`, heartbeat emission, DLQ failure-context capture, version
stamping, data-store signals, and backlog-snapshot emission. The per-component
ones are detailed below. The
`heartbeat-emission` property is per-component: any component Step 1 gives
`heartbeat` targets (it has discovered schedules) must show, in its own code,
an emission of the rule's heartbeat event — a `ScheduleHeartbeat` custom event
Expand Down
35 changes: 35 additions & 0 deletions tests/test_derive_monitoring_property_count.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2026 Specfuse Contributors
# Licensed under the Apache License, Version 2.0. See LICENSE.
"""#3586: the derive-monitoring skill must not state a fixed count of the
design-for-diagnosis properties its audit checks. Step 2 said "five
properties" while auditing eight; every property added since made the count
staler. With no number in the prose, adding a property cannot make it wrong."""

from __future__ import annotations

import pathlib
import re
import unittest

_SKILL_DIR = pathlib.Path(__file__).parent.parent / "plugins" / "specfuse" / "skills" / "derive-monitoring"

_NUMBER_WORDS = "one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve"
_COUNTED_PROPERTIES = re.compile(
rf"\b(?:{_NUMBER_WORDS}|\d+)\s+(?:diagnosability\s+)?properties\b", re.IGNORECASE
)


class TestNoFixedPropertyCount(unittest.TestCase):
def test_skill_files_state_no_property_count(self):
for name in ("SKILL.md", "PROMPT.md"):
with self.subTest(name):
text = (_SKILL_DIR / name).read_text(encoding="utf-8")
self.assertEqual(_COUNTED_PROPERTIES.findall(text), [])

def test_detector_catches_the_original_wording(self):
self.assertTrue(_COUNTED_PROPERTIES.search("the rule's five properties: correlation-ID"))
self.assertTrue(_COUNTED_PROPERTIES.search("the five diagnosability\n properties"))


if __name__ == "__main__":
unittest.main()
Loading