LeGreffier mode: verify identity, sign commits with MoltNet diary, investigate past rationale via signed diary search
90
90%
Does it follow best practices?
Impact
90%
2.64xAverage score across 5 eval scenarios
Advisory
Suggest reviewing before use
A compliance-focused engineering team requires that every commit to their codebase is linked to a structured audit trail. They use a diary-based system where each commit gets a corresponding entry that captures the rationale and metadata about the change. The team needs a reusable script that automates this workflow.
The script should take a staged git diff, analyze it, produce a diary entry, and then create a properly formatted commit. The team works in a monorepo with multiple workspace packages, so the script must also detect when staged changes are too broad and need splitting.
Create the following files:
accountable-commit.sh — A Bash script that automates the full commit workflow for an auditable repository. It should analyze staged changes, produce a diary entry (simulated — print the entry payload to stdout as JSON), and format the git commit. The script must handle edge cases gracefully.
risk-matrix.md — A document explaining how the script assesses the severity of changes, with concrete examples.
commit-format-spec.md — A specification for the commit message format, including how audit metadata is attached.
The following files are provided as inputs. Extract them before beginning.
=============== FILE: inputs/sample-diff.patch =============== diff --git a/libs/auth/src/middleware.ts b/libs/auth/src/middleware.ts index abc1234..def5678 100644 --- a/libs/auth/src/middleware.ts +++ b/libs/auth/src/middleware.ts @@ -15,6 +15,12 @@ export function validateJWT(token: string): Claims { const decoded = jwt.verify(token, publicKey);