secufusion-mcp
v4.15.1
Published
Project-level spec driven AI workflow tooling for SecuFusion, MCP server - developer workflow tooling with guardrails
Maintainers
Readme
SecuFusion MCP
A project-aware engineering assistant, delivered as a Model Context Protocol server and Claude plugin, built to behave like a disciplined senior engineer.
It does not just answer questions about your code. It runs a workflow (understand, specify, build, verify) with hard gates between the steps, keeps what the project has learned inside the repository, and refuses to let an assumption quietly become an architectural fact.
Agent remembers project → OLD. Project teaches the agent → NEW.
Version 4.15.1 · Node ≥ 18 · project knowledge moves into the repository (
.mcp/),/sfn-exploreand/sfn-planbecame/sfn-spec(4.0.0), 4.1.0 adds a knowledge health report, templates and a suggestion engine, 4.2.0 makes/sfn-reviewa standalone, product-aware, investigation-driven reviewer, 4.3.0 makes the release file written by/sfn-initsay what the new MCP version brings, 4.4.0 makes/sfn-reviewspec-aware and experience-aware, 4.5.0 gives every document one home, 4.6.0 adds the design investigation record to the post-review documents, 4.7.0 turns the PR summary into an engineering change summary and makes the philosophy gate show its reasoning, 4.8.0 writes ADRs as design narratives and seeds Device vs Machine by default, 4.9.0 adds the merge-regression, silent-behavior-change and scope-drift lanes to every review, 4.10.0 makes/sfn-reviewargue business consequences and calibration, 4.11.0 adds PASS 19 to PASS 24 and a standardized report, 4.15.0 brings the sfn-code-reviewer's quick check, rule catalog, adversarial verification, SARIF and HTML reports, CI templates, live-schema and dependency audits, release readiness, eval corpus and metrics, and 4.14.0 adds a deterministic guard that an applied migration is never edited, renamed or deleted, and 4.13.0 adds fourteen reasoning tools that work in any language (a claims ledger for story, code and reality, an edge matrix, platform-fact checking, an evidence gate, tenant-flow analysis, lifecycle model checking, invariant checks, mutation review, eval scoring, pass routing, fix history), and 4.12.0 adds code-quality enforcement to/sfn-code(SOLID, DRY, placement, formatting), three new review passes (SOLID, DRY and placement, fix-history regression) and severity floors. 122 tools. See What's New in 4.15.1, What's New in 4.15.0, What's New in 4.14.0, What's New in 4.13.0, What's New in 4.12.0, What's New in 4.11.0 and Upgrading from 3.x.
Contents
- Core Philosophy
- Why This Exists
- Major Revamp: Project Intelligence Layer
- Unified Project Knowledge System
- Project Intelligence Layer
- MCP Workflow
- Commands
- How the MCP Thinks
- Review Philosophy
- Knowledge Management
- Lessons Learned
- Architectural Decisions
- Work-Item Identity
- What's New in 4.15.1
- What's New in 4.15.0
- What's New in 4.14.0
- What's New in 4.13.0
- What's New in 4.12.0
- What's New in 4.11.0
- What's New in 4.10.0
- What's New in 4.9.0
- What's New in 4.8.0
- What's New in 4.7.0
- What's New in 4.6.0
- What's New in 4.5.0
- What's New in 4.4.0
- What's New in 4.3.0
- What's New in 4.2.0
- What's New in 4.1.0
- What's New in 4.0.0
- Upgrading from 3.x
- Getting Started
- New Contributor Guide
- Contributing Knowledge
- Release Notes Philosophy
- Tool Reference
- Repository Layout and Where State Lives
- Development
- Status and Known Limitations
- Roadmap: Next Evolution of the Project Intelligence Layer
- Long-Term Vision
Core Philosophy
- Understand before acting. Load the project's context before touching anything.
- Investigate before designing. Read the real code, tests and config. Cite
file:line. Never fabricate evidence. - Design before coding. A complete, validated specification exists before the first line of production code.
- Preserve repository conventions. The existing code is the reference. The MCP never imposes a preferred style.
- Minimize unnecessary change. Build only what was specified. No drive-by refactors, reformatting or reordering.
- Validate implementation quality and diff quality. A correct change with a noisy diff is not a reviewed change.
- Convert tribal knowledge into project-owned knowledge. What the team learns lives in the repository, version-controlled, not in a prompt or a person.
Why This Exists
| Problem | What it costs | How the MCP addresses it |
|---|---|---|
| Tribal knowledge | Critical facts live in one engineer's head and leave with them | Knowledge is recorded in .mcp/ with a source, next to the code |
| Lost architectural context | Nobody remembers why a service owns a table or a topic has two producers | Architecture notes and ADRs are loaded at /sfn-init and retrieved when relevant |
| Historical decisions disappearing | A past, deliberate trade-off gets "fixed" as if it were a bug | Intentional exceptions are recorded; the reviewer is told not to flag them |
| Repeated investigation | The same terminology trap or false positive is rediscovered every quarter | Lessons learned are searchable and surface by ticket terms and touched files |
| Onboarding difficulty | New engineers need weeks of conversations to become safe | The repository explains itself: read .mcp/, run /sfn-init |
| AI assistants without project context | Generic advice, invented facts, silent assumptions | The assistant works from recorded evidence, asks you for decisions only you can make, and is gated step by step |
Major Revamp: Project Intelligence Layer
| | Before | Now |
|---|---|---|
| Where project knowledge lives | Inside prompts and a growing AGENTS.md | In the repository, under .mcp/, version-controlled |
| Who owns it | A specific MCP instance, prompt or engineer | The project |
| New MCP instance / new engineer | Needs history from conversations | Reads the repository |
| What AGENTS.md is | A large store of project history and rules | A lightweight guide to how to think: workflow, investigation and review philosophy |
| Commands | explore → plan → code → review | init → spec → code → review |
| Review | Functional and architectural checks | Plus repository consistency and diff quality |
| Release notes | A repository scan with boilerplate | A change-driven changelog computed from the previous version |
| Trust in recorded knowledge | Implicit | Explicit: proposed vs accepted, with a source on every entry |
Knowledge belongs to the project, not to a specific engineer or MCP instance. The code explains what the system does. The Project Intelligence Layer explains why: which decisions are intentional, which patterns are preferred, which inconsistencies are legacy, which behaviours must not change, and which mistakes were already found.
Unified Project Knowledge System
The MCP builds one understanding of a project from two complementary layers. Neither is useful alone.
| | Layer 1: DNA | Layer 2: Project Intelligence (.mcp/) |
|---|---|---|
| Answers | What exists? | Why does it exist? |
| Holds | Services, controllers, APIs, topics, domain models, event flows, dependencies, database mappings, topology | Terminology, auth models, decisions, intentional exceptions, incidents, lessons, review findings, operational constraints |
| Produced by | Scanning the code (scan_repository_stack, extract_*); regenerable | People and reviews, with a source on every entry; version-controlled |
| Lives in | .secufusion/dna.json, .secufusion-project-spec.json, .secufusion-migrations.json | .mcp/ |
| Can be rebuilt from code? | Yes | No. That is why it must be recorded |
DNA tells the MCP what the system is. Project Intelligence tells the MCP why the system became that way.
/sfn-init loads both and presents them together: DNA counts (what exists) beside Project Intelligence counts (what is explained), then the health report, which measures how much of the discovered structure has recorded reasoning. Structure without rationale is how a deliberate trade-off gets "fixed" as a bug; rationale without structure cannot be checked against the code.
The knowledge belongs to the repository. Clone the project, run /sfn-init, and inherit both the structure and the understanding, regardless of who wrote it or which MCP instance is running.
Project Intelligence Layer
.mcp/
├── agents.md optional; lightweight: workflow rules and engineering philosophy only
├── architecture/ how the system works
├── adr/ why decisions were made
├── patterns/ how code should be written
├── known-exceptions/ intentional behaviours that may look incorrect
├── lessons-learned/ historical mistakes, findings, incidents, review lessons
├── operational/ deployment and runtime knowledge
└── release-history/ version evolution and release intelligence| Folder | Holds | Typical entry |
|---|---|---|
| architecture/ | System design, service relationships, domain terminology, entity ownership, data flow | Device vs Machine terminology |
| adr/ | The decision, the alternatives rejected, the reasoning, the constraints and trade-offs | Manual migrations instead of auto-apply |
| patterns/ | Coding conventions, API / Kafka / repository patterns, naming standards | Query-level tenant scoping |
| known-exceptions/ | Intentional inconsistencies, legacy constraints, backward-compatibility decisions, accepted debt | Retention scheduler authorizes as the system principal |
| lessons-learned/ | Production incidents, review findings, historical bugs, common false positives | A 3-line change landed as a 1,100-line diff |
| operational/ | Deployment constraints, migration knowledge, environment-specific behaviour, risk areas | Migrations are applied manually |
| release-history/ | Release notes and the snapshots each release is compared against | v2.2.5.md, snapshots/v2.2.5.json |
Each entry is one markdown file with a small frontmatter block:
---
id: "terminology-device-vs-machine"
title: "Device vs Machine terminology"
category: architecture # must match the folder
status: accepted # proposed | accepted | superseded | deprecated
tags: ["terminology", "device", "machine"]
applies_to: ["device", "*Device*"] # terms and/or path globs; used to surface the entry when relevant
source: "Where this came from: ticket, PR, incident, person, file"
date: 2026-10-08
supersedes: []
---
What is true, why, and what must NOT be "fixed".ADRs are documents first. An ADR is an engineering design narrative for engineers, reviewers, architects and future maintainers, so it never opens with metadata. The file starts with the title (# ADR-0003: Preventing Scheduler State Divergence Across Events API Replicas) and a one-sentence summary, and the same fields sit in an invisible <!-- mcp:entry ... --> comment at the end of the file. The loader reads either form, so older entries with front matter at the top keep working.
The required structure answers, on the first page, what problem did we have, why was it important, what did we choose, why:
# ADR-XXXX: <Decision Title>
> One sentence: the architectural problem and the selected approach.
## Decision Snapshot (**Problem**, **Decision**, **Outcome**, **Status**, **Related Work**)
## Executive Summary
## Context
## Problem Statement
## Investigation Summary
## Options Considered
## Decision
## Consequences (### Benefits, ### Trade-Offs, ### Risks, ### Future Reconsideration Criteria)
## Verification
## Referencesrecord_project_knowledge refuses an ADR that does not follow this structure and lists what is missing. The tool writes the title and the metadata; the readable Status line in the Decision Snapshot follows set_knowledge_status.
Entries are validated on load: missing fields, a wrong folder, a bad status, duplicate ids, dangling supersedes and empty bodies are reported, never silently ignored.
It is retrieved by relevance, not dumped. /sfn-init builds a compact index of the whole layer; during a task, get_project_knowledge returns only the entries that apply, ranked by the ticket's terms, the files involved and tags, with the reason each matched. Generic words in a free-text ticket do not drag in unrelated entries.
Platform defaults. /sfn-init calls load_project_knowledge(seed_defaults: true), which records the platform knowledge the MCP ships, starting with the Device vs Machine terminology, into .mcp/architecture/ by default. It is the MCP-owned terminology already carried in the project spec, so nothing is invented; it is saved proposed with its source until a person confirms it; it is skipped when the project already records an equivalent entry (no second copy), and it never overwrites or demotes an accepted one. Terminology lives in architecture/, not adr/, because an ADR records a decision and each document has one home.
Health, templates and suggestions.
get_knowledge_healthcompares what the project spec says exists with what.mcp/documents (see What's New in 4.1.0 for the exact definition) and lists the gaps;/sfn-initprints it..mcp/templates/holds a starter per category.load_project_knowledge(scaffold: true)creates the layer; auto-creation is opt-in and off by default.suggest_project_knowledgeturns evidence (repeated lookups, undocumented entities, tribal sections in the agent file) into prefilled, bodilessrecord_project_knowledgecalls.
MCP Workflow
/sfn-init ──► /sfn-spec ──► /sfn-code ──► /sfn-review
Load context Think Build Verify| | Legacy | Current |
|---|---|---|
| 1 | /explore | /init |
| 2 | /plan | /spec |
| 3 | /code | /code |
| 4 | /review | /review |
Short names are used in prose; the commands you type carry the plugin prefix: /sfn-init, /sfn-spec, /sfn-code, /sfn-review. The legacy /sfn-explore and /sfn-plan no longer exist.
Why explore and plan were merged. In practice they almost always ran back to back: exploration finds the current state, the root cause and the affected areas, and planning immediately uses those findings to define the approach, scope, risks and acceptance criteria. They are one engineering thought process, so they are now one specification phase (/sfn-spec) that keeps the same analytical depth behind a single command. The old command names no longer exist.
Between the commands the server enforces gates, so steps cannot be skipped:
philosophy → intent → classification → requirement → plan → reviewA tool called before its prerequisites have passed returns ⛔ SPEC GATE and says what to run first. spec_status shows the ledger and the next step at any time.
Command names. In examples the commands are written
/sfn-init,/sfn-spec,/sfn-code,/sfn-review. Use thesfn-prefix when invoking them: bare/initand/reviewcollide with built-in commands in some clients.
Commands
/sfn-init: build project understanding
Purpose. Establish project intelligence and working context. Not only metadata: it constructs the project's understanding.
Responsibilities
- Scan the repository and workspace; create or merge
.secufusion-project-spec.json(services, topics, rules, patterns) and the knowledge graph - Load the Project Intelligence Layer: architecture, ADRs, patterns, known exceptions, lessons learned, operational knowledge, release history (
load_project_knowledge) - Validate it and report unreviewed entries, problems, and whether
agents.mdhas grown into a knowledge dump - Draw the architecture diagram and generate change-driven release notes when the spec version changes
Outcome. The MCP understands the project before making any decision. Mental model: context first.
/sfn-spec: think before building
Purpose. Investigation and design as one process, ending in a complete specification.
Responsibilities
- Understand the requirement; check intent and story integrity (
philosophy_check) - Consult the project's recorded knowledge for the ticket's terms and files
- Investigate the real repository; identify the root cause with
file:lineevidence; classify the work - Identify impacted services and contracts (blast radius, traceability)
- Assess UI impact; build a static, clearly-marked reference design when the UI changes, and have you review it
- Ask you every decision only you can make, then stop until you answer
- Confirm the requirement, create and validate the implementation plan, assess risks
- Define acceptance criteria and write the specification
Outcome. A complete Implementation Specification (spec.md), assembled from recorded state, never free-written: requirement, current state, root cause, scope, impact, decisions, strategy, expected file changes, acceptance criteria, tests, risks, assumptions and unknowns. Mental model: understand → analyze → design.
/sfn-code: build only what was specified
Purpose. Implement the approved specification.
Responsibilities
- Refuse to start without a validated specification
- Follow the specification; produce focused changes
- Preserve repository conventions, including line endings and formatting
- Minimize the change surface; no unrelated refactoring; stop and ask before touching a file the specification does not cover
Outcome. An implementation that stays aligned to the specification and blends into the codebase. Mental model: build only what was specified.
/sfn-review: verify the change, not just the logic
Purpose. Validate implementation quality and change quality.
Responsibilities
- Verify functionality, requirement coverage and specification compliance (every acceptance criterion judged, with evidence)
- Verify architecture alignment, impacted services, edge cases, security and tenant isolation
- Verify repository consistency and diff cleanliness (PASS 10): CRLF ↔ LF conversions, mixed line endings, diff inflation, formatting rewrites, whitespace-only changes, encoding changes, unnecessary reordering, files outside the specification
- Check naming and convention consistency against the surrounding code
- Consult recorded exceptions and decisions before flagging anything
Outcome. Only intentional, minimal, repository-consistent changes pass. Mental model: trust but verify.
How the MCP Thinks
The server and the model have different jobs, and the split is deliberate.
| The server (deterministic) | The model (judgment) | The human (decision) | |---|---|---| | Stores state, enforces the order of steps, validates every verdict against a schema | Reads the code, forms an investigation, judges "is this requirement clear", "does this plan cover every criterion", "is every criterion met" | Business, security, tenant, data, deletion, API, UX and destructive decisions | | Measures the diff, detects line endings, computes release deltas, retrieves relevant knowledge | Writes the investigation and the implementation | Approves designs, accepts knowledge, accepts diff noise |
- Judgments are recorded, not assumed. Tools such as
philosophy_check,classify_task,manage_requirement assess,validate_implementation_planandverify_against_speceither ask the client model directly (MCP sampling) or reply🧠 JUDGMENT REQUIREDwith a rubric, the evidence and a JSON shape. The model answers by calling the tool again with ajudgment. Nothing is recorded until it validates, and verdicts need evidence (a criterion isMETonly with afile:lineor a test). - Evidence over assertion. Output is labelled FACT, INFERENCE, ASSUMPTION, UNKNOWN, CONFLICT, BLOCKER, DECISION or USER_DECISION_REQUIRED. Inferences are never presented as facts.
- Never invent a decision. An open decision is put to you with concrete options, and the work stops. Answering a decision, approving a design, accepting knowledge, accepting diff noise and converting line endings all require
user_statement: your own words. - Hard gates, not reminders. The server refuses out-of-order steps. A deterministic HIGH diff-quality finding blocks
APPROVEDno matter what the model concludes; only you can accept it.
Review Philosophy
A real review once exposed a gap. A client reported that a three-line change showed up as a 1,100-line diff because of an unintended CRLF → LF conversion. The functionality was correct, but the change was unreviewable: the real edit was buried, merge-conflict risk went up, and reviewer trust went down. The review process had checked correctness and missed repository consistency.
So reviews now validate:
| Dimension | Question | |---|---| | Functional correctness | Does it do what the acceptance criteria say, with evidence? | | Architectural correctness | Does it fit the service boundaries, tenancy, contracts and recorded decisions? | | Repository consistency | Does it follow the conventions already in this file and repository? | | Diff cleanliness | Is the committed diff the size of the intended change? | | Traceability | Does every change trace to a criterion or a necessary consequence? |
A correct implementation with a noisy diff is not a fully reviewed change.
Product-aware review (PASS 11 to 18)
/sfn-review is a standalone, product-aware engine. It needs no earlier session: it builds a Product Knowledge Brief first (.mcp/ entries, the project spec, the DNA graph, then the source itself), asks the developer what it cannot establish, and then reviews along eight dimensions: code quality, product behavior, service boundaries, deployment model, tenant hierarchy, privacy, operational resilience and maintainability.
PASS 11, Product & Privacy Fit, answers five questions with evidence, each as FITS, DOES NOT FIT, CONCERN or UNVERIFIED: does this match the product's actual behavior, will it work in the production deployment model, does it subtly break the tenant hierarchy, will it be hard to maintain in six months, does it violate the privacy model. PASS 12 to 18 supply the evidence.
Before it reads your code it loads three kinds of memory and keeps them apart: product knowledge (.mcp/, the project spec, the DNA graph), the specification the change was built against (requirement, plan, Implementation Specification, recorded decisions; it reviews scope, acceptance criteria, decisions and carried assumptions, and asks whether the spec itself contradicts the product), and engineering experience (lessons from earlier tasks, the lowest-trust source: a hint about where to look, never a rule). With no specification it says so and does not invent one.
It is an investigation, not a checklist. The reviewer models the change and its blast radius (using the DNA graph), forms specific hypotheses about how this change could harm the product, investigates each until it is confirmed or dismissed, asks the developer only what the evidence cannot settle, and shows its work in a Reasoning trace that includes the suspicions it dismissed. The passes are lenses that stop it forgetting a class of risk, not a form to fill in, and it reports what the lenses missed. The deterministic facts (check_diff_quality, the spec gate) stay deterministic.
The review stays inside the story. Before it judges anything it establishes the story boundary (objective, acceptance criteria, architectural and product decisions, out-of-scope items; with no specification the diff is the boundary) and classifies every finding:
| Class | Meaning | Reported as | Can change the verdict? | |---|---|---|---| | A, in scope | Directly impacts the acceptance criteria, requirements, implemented architecture, security, data or production correctness, or an explicit product decision, in what this change adds or modifies | In-scope findings (BLOCKER or WARNING) | Yes, and only these | | B, adjacent concern | Found while reviewing, but not needed to satisfy the story | Out-of-scope observations, each with why it is out of scope and a suggested separate story | No | | C, future product risk | Scalability, future tenant lifecycle, operational improvements, audit enhancements, UX ideas | Future considerations | No |
The test for every finding is: does fixing this directly contribute to satisfying the acceptance criteria, the ADR or the problem statement of this story? If not, the review does not ask for it to be changed in the current story. It does not hide real problems behind the boundary: whatever the acceptance criteria, the ADR or a recorded product decision requires is Class A, and diff-quality and scope-creep findings about the change itself are always Class A. The report order is Story scope assessment, In-scope findings, Out-of-scope observations, Future considerations, then the verdict, which says it rests only on in-scope findings.
Three lanes run in every review, beside the scope classes (each has its own section in the report):
| Lane | Tool | What it does | Effect on the verdict |
|---|---|---|---|
| Merge regressions | check_merge_regressions | Finds functionality accidentally lost during merge conflict resolution: methods, endpoints, repository queries and predicates, security and authorization checks, tests, config keys, translation keys, OpenAPI annotations, docs. Uses the merge commit, both parents and the merge base, and git's three-way logic (a deliberate deletion the merge honoured, and a method that moved, are not reported). Severity HIGH / MEDIUM / LOW. | None, unless one directly impacts an acceptance criterion |
| Silent behavior changes | check_behavior_changes | Finds behavior that moved while the code compiles and tests pass: authorization, validation, query predicates, filtering, defaults, feature flags, conditionals, time calculations. The reviewer writes a BEHAVIOR CHANGE block per change (old and new behavior, affected users, acceptance-criteria impact, risk, intent explicitly confirmed). Before it may write "intent not confirmed" it must search the acceptance criteria, the story text, ADRs, recorded product decisions and the user's instructions; with the work item, the tool searches the first four and lists possible supporting evidence under each change. | Unconfirmed MEDIUM/HIGH changes become in-scope findings |
| Scope drift | check_scope_drift | Classifies changed files as core, indirectly related or unrelated to the story and reports the unrelated ones with the recommendation to move them to a separate story or explain why they are included. | None: report only |
Product-centric pessimistic mode. For stories about ownership, roles, admin, tenancy, permissions or lifecycle (detected automatically, or requested with --pessimistic), the review stops asking whether the code works and asks why the change may fail in production. It explains the change in business terms and lists the feature invariants before reading code (confirmed by a source, or proposed and put to the developer, because the reviewer never invents a product rule), then reviews every write path against them across the lifecycle, state transitions, ownership, authorization (can ownership and authority diverge, elevation paths), tenancy (self, child, parent, peer, platform, system), concurrency, audit data, cross-service dependents, similar features, UX and operations. check_entity_impact searches the whole platform, not just the diff, for ownership, admin, role and status checks, tenant.email and defaultUser coupling, audit fields, write paths, caches, events and jobs. Findings carry a severity (CRITICAL to LOW), root cause, business and long-term impact, reproduction and fix; critical and high findings backed by facts block, suspicions become questions, and the story is approved only when the invariants, lifecycle, authorization, tenancy, audit data, operations, future behavior and platform assumptions all hold.
Review maturity: confidence, decisions, invariants. A review that finds nothing is not a review that can be trusted. score_review_confidence turns the evidence the review actually has (invariants confirmed vs inferred, cross-service scan, test evidence, database constraints examined, concurrency / lifecycle / authority coverage, UNVERIFIED and REQUIRES_DECISION counts) into HIGH / MEDIUM / LOW, with hard caps: a stale review or a pessimistic story with no cross-service scan is LOW, an open decision caps at MEDIUM. check_decision_alignment searches the decisions the project already made (.mcp/decisions/, and read-only the earlier work records) and shows which ones the change touches, with signals; the reviewer answers ALIGNS / VIOLATES / PARTIALLY ALIGNS / UNVERIFIED. get_relevant_invariants retrieves the invariant catalog (.mcp/invariants/) for the change, classified from status plus real enforcement evidence. The server suggests; a person confirms: nothing is recorded as accepted without the user's own words.
Calibration against a client review. build_feature_model builds the review's understanding before any diff is judged, and calibrate_review measures whether the review would have written the client's comments: concerns are sealed (and hashed) first, the client's comments are revealed afterwards, and the report counts derived, partial and missed. A review that has already seen the answers must say so; the figure is then an upper bound.
Three evidence helpers sharpen the pessimistic mode. check_entity_impact takes flags (fields that identify ownership or status, like defaultUser) and flags every use of one next to an authorization decision as authority coupling, then ranks the consumers Critical / Medium / Low (a rule copied across services appears once with its copies listed, because copies drift). check_invariant_enforcement rates the field behind an "exactly one" or "never zero" invariant as DB_ENFORCED, LOCK_PROTECTED, CHECK_THEN_ACT or CODE_ONLY, per writing method, so a check-then-act race (two owners, zero owners) is named with its write sites instead of guessed. And a review covers only the code it saw: when the verdict is APPROVED the server records a hash of every changed file; a file that changes afterwards makes the review stale, spec_status says so, and manage_task complete is refused until the delta is reviewed and a fresh verdict is recorded. Committing the reviewed work never makes it stale.
The reviewer is not a maintainer. It detects, explains and reports. It never deletes or restores code, removes methods, chooses develop (or any branch) automatically, or rewrites files without a request. When it is unsure it reports a DEVELOPER DECISION REQUIRED with its evidence and rationale, and the developer decides. A missing method is a possible merge regression, never "dead code".
The governance rule carries over from the knowledge layer: the reviewer never invents a product rule. Every product finding names its Source and its Basis (FACT, INFERENCE, ASSUMPTION, UNKNOWN). Only a FACT can block; an INFERENCE is a question; a rule nobody recorded is reported as UNVERIFIED and listed under Knowledge gaps, with an offer to record the answer in .mcp/ so the next review does not have to ask. Maintainability alone never blocks.
check_diff_quality measures the diff that would be committed (respecting core.autocrlf and .gitattributes) against the real change and explains the gap:
| Finding | Meaning |
|---|---|
| LINE_ENDING_CHANGE | Line endings flipped; churn far larger than the real change |
| MIXED_LINE_ENDINGS | CRLF and LF in one file (introduced by this change vs already there) |
| WHITESPACE_CHURN, FORMAT_REWRITE, REORDERING | Re-indentation, re-wrapped code with the same tokens, or the same lines in a different order |
| ENCODING_CHANGE, EOF_NEWLINE_CHANGE, FILE_MODE_CHANGE | BOM / encoding, final newline, executable bit |
| SHEBANG_WITH_CRLF | A script with a shebang saved as CRLF: a real defect |
| CONFIG_DISAGREES_WITH_FILE_HISTORY, CONVENTION_SOURCES_DISAGREE | The repository's own settings conflict with its files, or with each other. Reported, never silently resolved |
"When in Rome, do as the Romans do." The existing file and repository style is the expected style. Consistent CRLF is not a defect; consistent LF is not a defect. Mixed endings, unexplained churn and deviation from convention are. The reviewer never demands normalization to its own taste, and recommends it only when there is evidence it is required. The convention is read from .gitattributes, .editorconfig, prettier/eslint config, then the file's own history, then its tracked siblings; if those disagree, the conflict is reported.
When a file needs restoring, normalize_line_endings converts it back to its own style, changing only line terminators. It previews by default and writes only with your confirmation.
Generated, vendor, binary and lock files are excluded, files over 2 MB are skipped and reported, and outside a git repository the check says it cannot measure churn.
Knowledge Management
The MCP must not turn its own assumptions into architectural truth. Every piece of project knowledge carries its trust level and its origin.
| Status | Meaning | How agents treat it |
|---|---|---|
| proposed | Recorded, not yet reviewed by a person | Shown and labelled unreviewed. A hint to look harder; never grounds for a blocker |
| accepted | A person confirmed it is true | Authoritative. An accepted exception is not flagged as a defect; a change that contradicts an accepted decision is a finding |
| superseded | Replaced by a newer entry | Hidden from retrieval unless asked for |
| deprecated | No longer applies | Hidden from retrieval unless asked for |
- Source is mandatory. Every entry says where it came from (ticket, PR, incident, person, file). Knowledge without provenance is refused.
- An agent cannot accept its own claim. Recording as
proposedis the default;acceptedrequires your words (user_statement).set_knowledge_statusaccepts, deprecates or supersedes an existing entry. - No match is not "nothing intentional". If retrieval finds nothing, it says nothing is recorded, and invites you to record what you discover.
- Knowledge is easy to add (see Contributing knowledge) and validated when loaded.
How project knowledge is preserved over time
Knowledge that is recorded but not kept alive rots. The design makes it durable:
- It lives in git. Entries have history, blame and pull-request review, exactly like code. A wrong entry is a reviewable diff, not a lost conversation.
- Supersede, don't rewrite history. A changed decision is a new entry that
supersedesthe old one. The old entry is marked superseded and stays readable, so the reasoning chain survives. - Trust and origin travel with the text. Every entry keeps its
status,sourceanddate, so a future reader knows how far to trust it and where to verify it. - Rot is detected. Loading validates the layer: dangling
supersedes, duplicate ids, missing sources and unreviewed (proposed) entries are reported at/sfn-init. - It is used, which keeps it honest. Relevant entries are pulled into
/sfn-specand/sfn-reviewautomatically, so stale or wrong knowledge gets noticed by the people it affects. - History is versioned too. Release notes and the snapshots they compare against live in
.mcp/release-history/, so the evolution of the project is itself recorded. - It is independent of any tool. Entries are plain markdown with frontmatter, readable without this MCP. A different MCP instance, a different AI tool or a new engineer can read them unchanged.
- The agent file stays thin. Because
AGENTS.mdholds only how to think, project history is never trapped in a prompt that can be replaced.
Lessons Learned
Lessons from production incidents, reviews, investigations and historical discoveries are stored in .mcp/lessons-learned/, so the next engineer (or agent) does not pay for them again.
Recorded today
- Device vs Machine terminology. "Device" is a browser installation; "Machine" is a physical endpoint. Naming inconsistency is not automatically a bug. (Stored in
architecture/, because it is also how the domain is modelled.) - Review diff-noise incident. The 3-line change that became a 1,100-line diff (
lessons-learned/line-ending-diff-noise.md).
What belongs here as the project learns
- Historical production findings, and root causes that were not obvious.
- Common false positives: things that look wrong and are intentional.
- Investigation outcomes: what was ruled out, and why.
A good lesson states what happened, what it taught, what to do differently, and the common way people misread it.
Architectural Decisions
Important architectural decisions belong in .mcp/adr/, not in AGENTS.md. An ADR answers four questions:
- What decision was made?
- Why was it made?
- What alternatives were rejected?
- What constraints existed?
ADR ids are numbered automatically (adr-0001-…, adr-0002-…). When a decision changes, write a new ADR that supersedes the old one rather than editing history; the old entry is marked superseded and stays readable.
Work-Item Identity
A ticket reference such as BUG-1230, TASK-1230, STORY-1230, FEATURE-1230 or EPIC-1230 is metadata. It must read the same in Azure Boards, task folders, intent files, branches, commits and PRs.
- The type you give is preserved exactly. It is never replaced by a default ("task") and never overridden by the classification's
task_type. If no type was given, none is invented. resolve_work_item_refreturns the canonical reference, folder name, branch suffix, commit prefix and PR-title prefix, to be used verbatim.- Ticket numbers are unique, so registering a second type for the same number returns
IDENTITY CONFLICTinstead of silently changing it.
What's New in 4.15.1
A patch release. No new tools (122 in all), no breaking changes.
- The editor always uses the model you are logged into.
/sfn-reviewand every judgment tool (verify_findingsincluded) answer through your Claude session, with no API key and no setting that can change that. The shared judgment code no longer reads any engine variable or calls a provider, and a test proves it.SFN_ENGINEandSFN_VERIFY_ENGINEare used only bysfn-ci review, in a pipeline or a hook, where there is no editor. verify_findingswithmode: crosstakes another model's answer asjudgment; without one it is answered by the logged-in model and says it is not an independent check.- The Azure template maps the pipeline secret to
SFN_ANTHROPIC_KEY/SFN_OPENAI_KEY, which the engine accepts as aliases for the provider's own variables. - Test credentials are built at runtime and the "committed secret" eval fixture uses a
{{S}}placeholder filled with a random value when the case is built, so no secret-shaped text is stored in the repository. - Release 4.15.0 was tagged by mistake on the 4.13.0 commit; 4.15.1 supersedes it.
What's New in 4.15.0
A minor release that brings the useful parts of the sfn-code-reviewer into this MCP: 17 new tools (122 in all), an 81-rule catalog, a command line (sfn-ci) and ready-made pipeline templates. No breaking changes.
- Mechanical first.
run_quick_checkruns the pattern half of the rule catalog with no model in about a second, on every push (sfn-ci install-hook, which fails open and never overwrites a hook that is not yours) and in the pipeline./sfn-reviewnow starts from it (STEP 1D): exact findings go in as FACT, pattern leads are read and confirmed or dropped. - The rule catalog (
get_rule_catalog) adds the rules the review lacked: DB-008 to DB-011 (unsafe DDL, FK indexes, migration tests, idempotent backfills), SEC-004, 006, 010, 016, 017, 018 (reads that need a scope, security-code parity, SQL concatenation, flags default off, full-document writes to the identity provider, sign-in blocked before the app's check), CON-006 and CON-011, RUN-004 and RUN-005, DEP-001 to DEP-009, WEB-001 to WEB-011, TST-004 to TST-008. A rule is a question to answer from the code, not a verdict. - Kafka topic table reconciled with the code. The two tables disagreed. Checked against every
@KafkaListenerandsendin the four services: this MCP's table was right, the sfn-code-reviewer's was stale (it lackssfn-policy-api, sayssfn-tenants-apiconsumespolicy-eventswhen that listener is commented out, and givesextension-approval-decidedone consumer instead of two). Both tables now carry a verified date. - Adversarial verification (
verify_findings, PASS 22) tries to refute each finding against the real code. In the editor it is answered by the model you are logged into; for a stronger check you can supply the judgment of another model (mode: cross), which can only lower a severity.merge_review_runsgives consensus across runs. - Delivery.
finalize_review_findingsmakes the result deterministic (stable ids, floors for confirmed critical rules, dated suppressions, noise cap, verdict, fixed / new / still open since the last review, gate).findings_to_sarifandrender_review_reportproduce the SARIF and the self-contained HTML. Pipeline templates for Azure Pipelines and GitHub Actions are inci/: the quick gate needs no secrets; the headless review is off until you turn it on, because it sends the diff to the provider you choose. - The editor always uses the model you are logged into.
/sfn-reviewand every judgment tool use your Claude session, with no API key and no setting that can change that.SFN_ENGINE/SFN_VERIFY_ENGINE(anthropic or openai, keys from the environment only) exist for ONE purpose:sfn-ci, where there is no editor (a pipeline or a hook). A review that cannot run is exit code 2, never green. - Evidence beyond the repository.
snapshot_db_schemaandlookup_db_schemabring the live schema (foreign keys with ON DELETE, real indexes) into DB-004 to DB-009;audit_dependenciesadds the known-vulnerability lookup (OSV, opt-in because it sends package names and versions);check_release_readinesslists what operations must do for a release. - Measuring the reviewer. The eval corpus (12 cases) is scored by
run_quick_evalfor what a pattern can judge; the others are scored from a real review withscore_review_run(load_eval_cases).draft_eval_case_from_fixturns a missed bug into a new case.get_review_metricsshows findings per week, top rules and the rejected rate, never per person. - The dead
scripts/sfn-pr-check(a naive regex script no tool called) is removed;sfn-ci pre-pushreplaces it.
What's New in 4.14.0
A minor release: one new tool (105 in all), no breaking changes.
check_applied_migrations: an applied migration is history. An environment that already ran it never sees an edit, so an edited, renamed or deleted migration leaves environments with different schemas and nothing fails. The tool compares the change with the base branch and reports, with no model and no judgment: an applied migration that was edited, renamed or deleted (BLOCKER), a new migration that reuses a version number already taken (BLOCKER), and one numbered below the head of its series (WARNING). It works for Flyway-style versioned SQL (repeatableR__migrations may change), Rails, Django, Alembic, EF Core (the model snapshot is ignored), Prisma and genericmigrations/folders, compares versions inside one series and never across services, and includes uncommitted and untracked files./sfn-reviewPASS 0 calls it first (new check 0F) and now triggers on a migration file of any framework, not only.sql. This was the one migration rule that the sfn-code-reviewer quick check had and the review did not. The same tool is the building block for a no-model check at push time.AGENTS.mdno longer claims a pre-PR check is "automated inrun_pre_pr_checks": that tool no longer exists. It names/sfn-reviewPASS 0 andcheck_applied_migrationsinstead.
What's New in 4.13.0
A minor release: fourteen new tools (104 in all), no breaking changes. They make the reviewer sharper by replacing guesswork with mechanical evidence, and they work in any language: Java, Kotlin, TypeScript, JavaScript, Python, C#, Go, Ruby, PHP and SQL.
The story, the code and reality
build_claims_ledger: every statement in the story becomes a claim (acceptance, reality, assumption, decision, non-functional), and the tool adds what the story does NOT say: IMPLIED claims (the accepted invariants and decisions in.mcp/that apply, each with its source) and SILENT claims (lifecycle paths that exist for the story's entities and that it never mentions). The reviewer reasons about each claim and cites code with a quote; the tool verifies every citation against the real files and gives each claim a status (VERIFIED, IMPLEMENTED_UNTESTED, CONTRADICTED, UNVERIFIABLE, UNVERIFIED, NO_EVIDENCE). It then maps the diff BACK to the claims: WRITTEN_NOT_BUILT and BUILT_NOT_WRITTEN.build_edge_matrix: not a checklist. Cells come from the project's own memory (accepted invariants, decisions, lessons, known exceptions, each naming its source), from the code (lifecycle paths that never mention the flag, absent paths, authorization decisions elsewhere that read the same field, rules copied across services), from the reviewer's own hypotheses (custom_cells, each with a reason), and last from the generic per-type baseline. They are ranked by risk. Withreason_topthe model reasons from the product rule to the code path on the highest-risk cells (through the server's sampling, or the calling model), and every citation in its verdict is verified: a "holds" with no evidence in the code is deferred, not accepted. High-risk cells need written reasoning and evidence; baseline cells are answered in bulk.check_platform_facts: the facts the review relies on (the topic table, the services, the files named inAGENTS.md) checked against the code in any language. A contradiction always carriesfile:line; what the scan cannot see is UNVERIFIED, never wrong.
Evidence instead of opinion
validate_finding_evidence: every finding must cite code that exists. The file must be inside the workspace, the line must exist, and the quoted code must really be there (a quote found at another line is corrected). A finding whose citation is not in the code is dropped before the report. A finding can also carry a proof by test: a test that fails on the change makes itPROVEN, one that passes makes itREFUTED.check_tenant_flow: data access with no tenant predicate, lookups by id alone, and tenant ids taken from a request with no guard, found by profile for nine languages. It learns which entities are tenant-owned from their definitions and lowers confidence when a global scoping mechanism (Hibernate filters, EF query filters, Prisma extensions, row-level security) exists.check_lifecycle_model: a bounded model checker for lifecycle invariants. The reviewer models the entity's operations; the tool explores every order and, for concurrent actors, every interleaving of a check step and an act step, and returns the shortest sequence that breaks "exactly one active owner". Zombie states are found, not argued.analyze_mutation_report: which changed lines would not be noticed if their logic were wrong. Reads PIT (Java, Kotlin), Stryker (JavaScript, TypeScript, C#), Infection (PHP) and a generic JSON for Python, Go, Rust and Ruby.generate_invariant_checks: turns an invariant into a read-only violation query, the database DDL as a manual-migration draft (partial or filtered unique index, unique, NOT NULL, FK), and a test skeleton in the service's language. Nothing is executed.
Measuring and routing the reviewer
score_review_run: scores real reviews against eval cases and shows recall, precision and a per-pass table with advice (KEEP, REVIEW_COST, DEMOTE), so passes are kept or cut on data.route_review_passes: picks the passes a change needs from its paths and code signals (migrations, entities, data access, HTTP surface, security, messaging, schedulers, config, dependencies, UI, invariant flags). A documentation-only change runs four passes; a risky multi-language change runs all 28. Passes are grouped for parallel specialists, and every skipped pass is reported NOT APPLICABLE with the reason.get_fix_history: the deterministic half of PASS 27: fix-like commits for a file or line range from git, plus the team's rejected patterns and decisions.
The instructions
/sfn-reviewgains STEP 1C (routing) and a language-neutral table that maps each Spring example to Prisma, Django, EF Core, GORM, ActiveRecord and Eloquent; PASS 1, 15, 22, 24, 27 and the zombie-state lens call the new tools.- Two review modes for
/sfn-review: Mode 1, Existing Task Review (a work item whose task folder holds a specification: judged against what was agreed) and Mode 2, Context Discovery Review (no task, specification or acceptance criteria).discover_review_contextdecides the mode deterministically from the work item you give, says why, and never adopts a task silently; a reference whose type conflicts with an existing folder is an identity conflict, not a choice. Mode 2 becomes Mode 1 when the developer confirms a task. - Context discovery mode (Mode 2) for
/sfn-review: a review with no task id, requirements or acceptance criteria no longer starts with questions.discover_review_contextinspects the repository, the task folders, decisions, review history and project knowledge and returns a context completeness report with a coverage score, the hints about the intent, and what the product's own memory says about this diff (the invariants that apply, the authority fields it writes, the lifecycle paths it touches).reason_about_intentthen asks the model to investigate: competing hypotheses, product-aware reading of the diff, its own reads of callers, tests and history. Every citation is verified against the code, the confidence is set by the evidence and not by the claim, and the protocol cuts the questions to what is critical, not inferable and blocking.record_draft_task_contextkeeps a temporary task context (BE-, FE-, FS-, EXT- or INFRA-TASK-Dnnn) with every entry marked CONFIRMED, INFERRED or UNKNOWN. It refuses to store a guess as a confirmed fact, logs the confidence before and after the developer confirms so the progression can be measured, and the next review of the same work finds the draft again. - Context sufficiency protocol (Rule 0b in
AGENTS.md): every command first takes inventory, recovers from the repository, and asks only a targeted confirm-or-correct question about what is critical, not inferable and blocking. Confidence is stated (HIGH, MEDIUM, LOW), and facts, recovered context and assumptions stay apart. It governs missing context, never missing decisions. - The report fixes found in a real 4.12.0 review: a
DIFF-QUALITYlabel, a place for the product and privacy fit, severity set by evidence and not by request, and slots for records written and for a verdict gate that could not run. - PASS 4 no longer carries a remembered Kafka topic list that contradicted
AGENTS.md; it usesextract_event_topics. The middle verdict is "APPROVED WITH CHANGES" everywhere. /sfn-codePhase 3A applies SOLID and DRY in the file's own language and scans the code it wrote withcheck_tenant_flow.tests/instruction-lint.mjslints the instructions for contradictions and drift (pass numbering, report labels, topic facts, tool wiring, agent-file alignment), and the router's pass catalog is checked against the document.
What's New in 4.12.0
A minor release with no new tools (90 in all) and no breaking changes. /sfn-code now enforces code quality while it writes, and /sfn-review checks the same things when it reads, plus a fix-history check and protected severities. /sfn-review now has 28 passes (PASS 0 to PASS 27).
/sfn-code writes better code (Phase 3A)
- SOLID: single responsibility, open/closed, Liskov, interface segregation and dependency inversion, each with its SecuFusion form. A violation in a file the spec authorizes is fixed in place; one that needs another file is recorded as a suggestion in the handoff.
- DRY: search the estate (
find_repeated_outcomes,smart_search) before writing a method, and extract duplicated guards, tenant-id extraction, repository sequences and error strings. - Code placement: new code goes where its kind belongs, never appended to the end of the file by default.
- Formatting: indentation, imports and signatures copied from the nearest neighbour, then
check_diff_qualityafter every file.
/sfn-review reads for the same things, and remembers
- PASS 25, SOLID violation detection: an SRP violation that shares a transaction boundary, or an OCP violation that edits a stable method, is a BLOCKER.
- PASS 26, DRY and simplification: duplicated guards, repeated
getActingTenantId()calls, code appended to the end of the file. - PASS 27, fix-history regression check: finds past fixes for the same file and area (
git log --follow, rejected patterns, decisions) and adds aFIX-HISTORYnote to the card. An exact repeat is a REGRESSION WARNING with a developer decision, and becomes a BLOCKER only onBasis: FACT. - Severity floors and expiring suppressions in PASS 22: a missing tenant predicate, a direct JWT caller read, an unhandled Kafka publish after a committed write, or
defaultUser/isAdmincorruption stays a BLOCKER when it is Class A andBasis: FACT, and cannot be suppressed. A suppression expires 30 days after its recorded date. - New report categories:
SOLID-VIOLATION,DRY-VIOLATION,PLACEMENT,REGRESSION.
Housekeeping
- The coder persona's contradictions with
/sfn-codeare resolved (optimization stays inside the spec, reasoning comments only for non-obvious code, per-AC progress updates,EXEC-Phaselabels). agents/AGENTS.mdand its repo-level copy are repaired from mojibake and back in sync, andcoder.mdis aligned.
What's New in 4.11.0
A review-depth release: /sfn-review gains six passes (PASS 19 to PASS 24), six existing passes are rewritten around SecuFusion's services and invariants, and the report becomes a standardized card format. No new tools and no breaking changes.
Six new passes
- PASS 19 (Spec & Product Cross-Examination): each acceptance criterion traced to
file:method:lineand judged met, partly met, inverted or missed; the PR description is checked against the code. - PASS 20 (Adversarial Edge-Case Simulation): null or empty input, mid-transaction failure, concurrent requests, downstream timeout and a cross-tenant probe, traced through each entry point.
- PASS 21 (Cross-Stack Contract Parity): every consumer of a changed REST shape, status code or Kafka payload, and whether it still works.
- PASS 22 (Ruthless Noise Filter): removes cosmetic, test-covered and pre-existing-code findings before output.
- PASS 23 (Blast-Radius & Side-Effect Awareness): the dependent graph of a change and the platform invariants, including a guard added in one method but bypassed in another.
- PASS 24 (Nice-to-Have & Follow-Up Triage): advisory items that never block a merge.
SecuFusion grounding on existing passes: PASS 2 (N+1 hot paths), PASS 3 (index patterns), PASS 4 (Kafka safety), PASS 5 (authorization, caller resolution, transactions, external calls), PASS 9 (platform-specific suggestions) and PASS 18 (invariants, lock order, test gaps).
Standardized report: header, verdict banner, blockers, warnings, nice-to-have, passed, assumptions and before-you-merge, each finding as a PROBLEM / IMPACT / FIX card, with ADO and PR comment drafts.
What's New in 4.10.0
A minor release: thirteen new tools (90 in all) and no breaking changes to commands or existing tools. /sfn-review stops at dependencies no longer: it argues the business consequence, and it can now be measured against what a client reviewer actually wrote.
A reviewer that argues consequences
- Pessimistic mode for ownership, role, admin, tenancy, permission and lifecycle stories: business terms and invariants first; entity contracts; zombie states, UI failure paths, historical data, copy divergence, support tickets; an authority drift report; a hostile principal architect pass; and a reasoning chain from entity to client impact on every finding.
- Feature model and field impact (
build_feature_model,build_field_impact): the story family, the transitions that exist and the ones with none, and every consumer of a field with derived values traced to the decision they feed. - Four lenses for four observed misses (
check_ui_gating,find_endpoint_consumers,check_service_ownership,trace_parent_cascade). - Memory and honesty: the decision registry and invariant catalog (
check_decision_alignment,get_relevant_invariants),score_review_confidenceso that no findings is not read as trustworthy, and stale-review detection.
Calibration against client reviews
calibrate_reviewseals the reviewer's findings before the client's comments are revealed and grades each comment MATCH, PARTIAL or MISS; a MATCH needs the same entity, business consequence and unsupported state and an equivalent comment. Every miss names the failing reasoning step and the smallest improvement.prepare_unseen_packbuilds the only input an unseen-story review may read, with the code at the commit the client reviewed. Parity figures are claimed only for a blind run on an unseen story.parity/tools/ado-fetch.mjsfetches an Azure DevOps pull request's review threads as the answer key. The read-only token goes into a hidden prompt, is never stored, and never passes through the conversation.
What's New in 4.9.0
A minor release: three new tools (77 in all) and no breaking changes to commands or existing tools. /sfn-review gains three lanes that run in every review, a strict role boundary, and story-scope classification.
Three lanes in every review (each reported in its own section)
- Merge regressions (
check_merge_regressions): functionality accidentally lost while a merge was resolved, found from the merge commit, both parents and the merge base, using git's three-way logic. Reported as POSSIBLE MERGE REGRESSION with severity HIGH / MEDIUM / LOW. It never changes approval unless a finding directly impacts an acceptance criterion. - Silent behavior changes (
check_behavior_changes): authorization, validation, query predicates, filtering, defaults, feature flags, conditionals and time calculations that moved while the code compiled and tests passed. Each real change becomes a BEHAVIOR CHANGE block (old and new behavior, affected users, acceptance-criteria impact, risk, intent explicitly confirmed). Before "intent not confirmed" the reviewer must search the acceptance criteria, story text, ADRs, product decisions and the user's instructions; with the work item, the tool searches the first four and lists possible support. An unconfirmed HIGH change is an in-scope blocker, MEDIUM a warning. - Scope drift (
check_scope_drift): files classified as core, indirectly related or unrelated to the story; the unrelated ones become SCOPE DRIFT blocks with the recommendation to move them to a separate story or explain why they are included. Report only: it never fails a review.
The reviewer is not a maintainer. It detects, explains and reports; it never deletes or restores code, removes methods, chooses develop automatically or rewrites files without a request. When unsure it reports DEVELOPER DECISION REQUIRED with evidence and rationale.
Review stays inside the story. Every finding is Class A (in scope), B (adjacent) or C (future); only Class A decides the verdict. Files outside the plan are now scope drift, not blocking out-of-scope changes.
What's New in 4.8.0
A minor release: no new tools and no breaking changes to commands or parameters.
ADRs are design narratives, not database records
- An ADR opens with
# ADR-NNNN: <Decision Title>and a one-sentence summary, never with metadata. The required structure (Decision Snapshot, Executive Summary, Context, Problem Statement, Investigation Summary, Options Considered, Decision, Consequences, Verification, References) makes the first page answer: what problem, why it mattered, what was chosen, why. - The machine metadata moves to a trailing
<!-- mcp:entry ... -->comment, invisible when rendered. The loader reads both forms, so every existing entry keeps working; only ADRs use the trailing form. record_project_knowledgerefuses an ADR that begins with metadata or lacks the structure, and lists what is missing.set_knowledge_statuskeeps the readable Status line in the Decision Snapshot in step with the recorded status.
Device vs Machine is recorded by default
/sfn-initcallsload_project_knowledge(seed_defaults: true), which records the MCP-shipped Device vs Machine terminology into.mcp/architecture/as aproposedentry with its source. It is skipped when the project already records an equivalent entry, never overwrites or demotes an accepted one, and needs.mcp/to exist.
What's New in 4.7.0
A minor release: one new tool (generate_pr_summary, 74 tools in all) and no breaking changes to commands or parameters.
The PR summary is an engineering change summary, not a file list
pr-summary.mdused to be built from four lists (acceptance criteria, files, decisions, test scenarios). It now has twelve sections that a reviewer who has never seen the work item can follow: the problem, how it was investigated, the root cause, the options evaluated, why the design was selected, how it works, the issues resolved, behavior before and after (including multi-instance behavior), tests executed and results, remaining risks and release considerations, business impact, and the files changed last, as a reference.- It is assembled from recorded state (requirement facts and root cause, the options put to the user, the plan, decisions with rationale, scenarios, recorded test runs, the gate ledger and review verdict). What the record lacks says Not recorded; nothing is invented.
generate_pr_summaryaccepts anarrativefor what only the author knows (options weighed and why each was accepted or rejected, behavior before and after, tests actually run, remaining risks, business impact). It is saved beside the task (pr-narrative.json), shown as Author notes, and kept whenmanage_task action=completere-renders the summary./sfn-reviewwrites the summary before completin
