Risk profiles and relevance: sisi risk, the design section retired, hooks print only what a session can act on, recipes matched by structured tags, a recipe for features
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
commit
8f36c5b527
25 files changed
+1434
-857
No files matched your search
+2
-11
@@ -7,17 +7,8 @@ commands mentioned here.
|
||||
## 1. Choose the approach from the goal {#choose-the-approach}
|
||||
|
||||
Before sizeable work, think from the goal and the human's standing principles (`sisi oracle`)
|
||||
to what they imply. Fill the contract's `design` section first (`sisi design` prints the
|
||||
principles and the questions):
|
||||
|
||||
- what the goal and the principles imply that the request did not spell out;
|
||||
- what the environment, the tool or the existing system already provides - use that instead
|
||||
of building it, and give evidence it exists;
|
||||
- at least two other approaches, one line each on cost and risk;
|
||||
- the one chosen, and why it is the one the human would pick;
|
||||
- for each principle, the objection the human would raise and how the design answers it, or
|
||||
why it does not apply;
|
||||
- an independent attack on the design as the human would make it, and what changed.
|
||||
to what they imply: what the request did not spell out, and what the environment, the tool or
|
||||
the existing system already provides - use that instead of building it.
|
||||
|
||||
Why: the human should never have to state a consequence of something they already said. A
|
||||
well-built answer to the wrong approach wastes everything spent building it.
|
||||
|
||||
@@ -0,0 +1,241 @@
|
||||
{
|
||||
"agent-tool-surface": {
|
||||
"kinds": [
|
||||
"general"
|
||||
],
|
||||
"tags": [
|
||||
"agent",
|
||||
"mcp",
|
||||
"tool surface",
|
||||
"functions an agent calls"
|
||||
]
|
||||
},
|
||||
"bugfix": {
|
||||
"kinds": [
|
||||
"general"
|
||||
],
|
||||
"tags": [
|
||||
"bug",
|
||||
"defect",
|
||||
"broken",
|
||||
"wrong behaviour",
|
||||
"crash fix",
|
||||
"off-by-one",
|
||||
"does not work"
|
||||
]
|
||||
},
|
||||
"cli-tool": {
|
||||
"kinds": [
|
||||
"general"
|
||||
],
|
||||
"tags": [
|
||||
"command line",
|
||||
"shell tool",
|
||||
"cli",
|
||||
"arguments",
|
||||
"exit codes"
|
||||
]
|
||||
},
|
||||
"concurrent-code": {
|
||||
"kinds": [
|
||||
"concurrency"
|
||||
],
|
||||
"tags": [
|
||||
"concurrency"
|
||||
]
|
||||
},
|
||||
"config-or-infra-change": {
|
||||
"kinds": [
|
||||
"general"
|
||||
],
|
||||
"tags": [
|
||||
"ci",
|
||||
"build files",
|
||||
"deploy",
|
||||
"deployment",
|
||||
"configuration",
|
||||
"infrastructure",
|
||||
"container"
|
||||
]
|
||||
},
|
||||
"data-migration": {
|
||||
"kinds": [
|
||||
"migration"
|
||||
],
|
||||
"tags": [
|
||||
"migration"
|
||||
]
|
||||
},
|
||||
"dependency-upgrade": {
|
||||
"kinds": [
|
||||
"general"
|
||||
],
|
||||
"tags": [
|
||||
"upgrade dependency",
|
||||
"new version of a library",
|
||||
"toolchain upgrade",
|
||||
"bump",
|
||||
"dependency",
|
||||
"upgrade"
|
||||
]
|
||||
},
|
||||
"docs-change": {
|
||||
"kinds": [
|
||||
"general"
|
||||
],
|
||||
"tags": [
|
||||
"documentation",
|
||||
"readme",
|
||||
"guide",
|
||||
"runbook",
|
||||
"docs"
|
||||
]
|
||||
},
|
||||
"feature": {
|
||||
"kinds": [
|
||||
"general"
|
||||
],
|
||||
"tags": [
|
||||
"new capability",
|
||||
"new feature",
|
||||
"add printing",
|
||||
"printing",
|
||||
"paper size",
|
||||
"map printing",
|
||||
"add support"
|
||||
]
|
||||
},
|
||||
"native-gui-change": {
|
||||
"kinds": [
|
||||
"ui"
|
||||
],
|
||||
"tags": [
|
||||
"desktop app",
|
||||
"mobile app",
|
||||
"native window",
|
||||
"widget"
|
||||
]
|
||||
},
|
||||
"new-library": {
|
||||
"kinds": [
|
||||
"general"
|
||||
],
|
||||
"tags": [
|
||||
"new library",
|
||||
"new package",
|
||||
"public interface",
|
||||
"module other code uses"
|
||||
]
|
||||
},
|
||||
"new-product": {
|
||||
"kinds": [
|
||||
"general"
|
||||
],
|
||||
"tags": [
|
||||
"new product",
|
||||
"whole new app",
|
||||
"from scratch",
|
||||
"new service for users"
|
||||
]
|
||||
},
|
||||
"numeric-or-financial-core": {
|
||||
"kinds": [
|
||||
"money"
|
||||
],
|
||||
"tags": [
|
||||
"money"
|
||||
]
|
||||
},
|
||||
"parser-or-codec": {
|
||||
"kinds": [
|
||||
"parsing"
|
||||
],
|
||||
"tags": [
|
||||
"parsing"
|
||||
]
|
||||
},
|
||||
"performance-work": {
|
||||
"kinds": [
|
||||
"general"
|
||||
],
|
||||
"tags": [
|
||||
"performance",
|
||||
"slow",
|
||||
"faster",
|
||||
"speed up"
|
||||
]
|
||||
},
|
||||
"refactor": {
|
||||
"kinds": [
|
||||
"general"
|
||||
],
|
||||
"tags": [
|
||||
"refactor",
|
||||
"restructure",
|
||||
"tidy up",
|
||||
"rename internals",
|
||||
"without changing behaviour",
|
||||
"change the structure",
|
||||
"without changing what it does"
|
||||
]
|
||||
},
|
||||
"release": {
|
||||
"kinds": [
|
||||
"general"
|
||||
],
|
||||
"tags": [
|
||||
"release",
|
||||
"tag",
|
||||
"publish",
|
||||
"ship it",
|
||||
"version",
|
||||
"write the release",
|
||||
"tag the version",
|
||||
"new release",
|
||||
"tag it",
|
||||
"tag and changelog"
|
||||
]
|
||||
},
|
||||
"security-fix": {
|
||||
"kinds": [
|
||||
"general"
|
||||
],
|
||||
"tags": [
|
||||
"security",
|
||||
"vulnerability",
|
||||
"injection"
|
||||
]
|
||||
},
|
||||
"service-api": {
|
||||
"kinds": [
|
||||
"general"
|
||||
],
|
||||
"tags": [
|
||||
"http api",
|
||||
"server endpoints",
|
||||
"rest api",
|
||||
"service"
|
||||
]
|
||||
},
|
||||
"storage-engine": {
|
||||
"kinds": [
|
||||
"general"
|
||||
],
|
||||
"tags": [
|
||||
"storage",
|
||||
"database layer",
|
||||
"persistent format",
|
||||
"crash recovery"
|
||||
]
|
||||
},
|
||||
"web-ui-change": {
|
||||
"kinds": [
|
||||
"ui"
|
||||
],
|
||||
"tags": [
|
||||
"ui",
|
||||
"web page",
|
||||
"browser"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"profiles": ["trivial", "isolated", "logic", "integration", "data", "critical", "release"],
|
||||
"requirements": {
|
||||
"trivial": {"contract": false, "checks": "the diff; a targeted check when one exists", "requirement_model": false, "risk_note": false, "independent_evidence": false, "retro": "only on an anomaly (two send-backs, or a human correction)"},
|
||||
"isolated": {"contract": true, "checks": "at least one that is not vacuous", "requirement_model": false, "risk_note": false, "independent_evidence": false, "retro": "yes"},
|
||||
"logic": {"contract": true, "checks": "as isolated, each with covers", "requirement_model": false, "risk_note": false, "independent_evidence": false, "retro": "yes"},
|
||||
"integration": {"contract": true, "checks": "as logic, plus invariants", "requirement_model": true, "risk_note": true, "independent_evidence": false, "retro": "yes"},
|
||||
"data": {"contract": true, "checks": "as integration", "requirement_model": true, "risk_note": true, "independent_evidence": true, "retro": "yes"},
|
||||
"critical": {"contract": true, "checks": "as integration", "requirement_model": true, "risk_note": true, "independent_evidence": true, "retro": "yes"},
|
||||
"release": {"contract": true, "checks": "every check (--all)", "requirement_model": true, "risk_note": true, "independent_evidence": true, "retro": "yes"}
|
||||
},
|
||||
"patterns": [
|
||||
{"glob": "**/migrations/**", "profile": "data", "reason": "database migration changes stored data shape"},
|
||||
{"glob": "**/migration/**", "profile": "data", "reason": "data migration code"},
|
||||
{"glob": "**/*.sql", "profile": "data", "reason": "SQL changes stored data or schema"},
|
||||
{"glob": "**/schema/**", "profile": "data", "reason": "schema definition"},
|
||||
{"glob": "**/*.schema.*", "profile": "data", "reason": "schema definition"},
|
||||
{"glob": "**/alembic/**", "profile": "data", "reason": "database migration history"},
|
||||
{"glob": "**/db/**", "profile": "data", "reason": "persistence layer"},
|
||||
{"glob": "**/storage/**", "profile": "data", "reason": "persistence layer"},
|
||||
{"glob": "**/persist*/**", "profile": "data", "reason": "persistence layer"},
|
||||
{"glob": "**/auth/**", "profile": "critical", "reason": "authorization or authentication code"},
|
||||
{"glob": "**/*auth*", "profile": "critical", "reason": "authorization or authentication code"},
|
||||
{"glob": "**/*secret*", "profile": "critical", "reason": "secret handling"},
|
||||
{"glob": "**/*crypto*", "profile": "critical", "reason": "cryptography"},
|
||||
{"glob": "**/*encrypt*", "profile": "critical", "reason": "cryptography"},
|
||||
{"glob": "**/*payment*", "profile": "critical", "reason": "payments move money"},
|
||||
{"glob": "**/*billing*", "profile": "critical", "reason": "billing moves money"},
|
||||
{"glob": "**/*mutex*", "profile": "critical", "reason": "concurrency primitive"},
|
||||
{"glob": "**/*semaphore*", "profile": "critical", "reason": "concurrency primitive"},
|
||||
{"glob": "**/*lock*", "profile": "critical", "reason": "concurrency primitive"},
|
||||
{"glob": "**/hooks/**", "profile": "critical", "reason": "hook wiring runs on every session"},
|
||||
{"glob": "**/*hook*", "profile": "critical", "reason": "hook wiring runs automatically"},
|
||||
{"glob": "**/install*", "profile": "critical", "reason": "installer changes the user's machine"},
|
||||
{"glob": "install*", "profile": "critical", "reason": "installer changes the user's machine"},
|
||||
{"glob": "**/setup.py", "profile": "critical", "reason": "installer runs at install time"},
|
||||
{"glob": "**/PKGBUILD", "profile": "critical", "reason": "package build script runs as root tooling"},
|
||||
{"glob": "VERSION", "profile": "release", "reason": "version marker for a release"},
|
||||
{"glob": "**/release/**", "profile": "release", "reason": "release machinery"},
|
||||
{"glob": "**/*release*", "profile": "release", "reason": "release machinery"},
|
||||
{"glob": "**/api/**", "profile": "integration", "reason": "public interface surface"},
|
||||
{"glob": "**/public/**", "profile": "integration", "reason": "public interface surface"},
|
||||
{"glob": "include/**", "profile": "integration", "reason": "public headers are an interface"},
|
||||
{"glob": "**/parser/**", "profile": "logic", "reason": "parsing logic has a broad input space"},
|
||||
{"glob": "**/*pars*", "profile": "logic", "reason": "parsing logic has a broad input space"},
|
||||
{"glob": "**/*lexer*", "profile": "logic", "reason": "lexing logic has a broad input space"},
|
||||
{"glob": "**/*codec*", "profile": "logic", "reason": "encode/decode logic"},
|
||||
{"glob": "**/money/**", "profile": "logic", "reason": "money arithmetic must be exact"},
|
||||
{"glob": "**/*money*", "profile": "logic", "reason": "money arithmetic must be exact"},
|
||||
{"glob": "**/*rounding*", "profile": "logic", "reason": "rounding rules decide money"},
|
||||
{"glob": "**/*pricing*", "profile": "logic", "reason": "pricing arithmetic"},
|
||||
{"glob": "**/algo*/**", "profile": "logic", "reason": "algorithmic logic"},
|
||||
{"glob": "**/*algorithm*", "profile": "logic", "reason": "algorithmic logic"},
|
||||
{"glob": "**/*state-machine*", "profile": "logic", "reason": "state machine transitions"},
|
||||
{"glob": "**/*statemachine*", "profile": "logic", "reason": "state machine transitions"},
|
||||
{"glob": "**/*.md", "profile": "trivial", "reason": "documentation only"},
|
||||
{"glob": "**/*.txt", "profile": "trivial", "reason": "plain text only"},
|
||||
{"glob": "**/*.rst", "profile": "trivial", "reason": "documentation only"},
|
||||
{"glob": "docs/**", "profile": "trivial", "reason": "documentation only"},
|
||||
{"glob": "**/*.css", "profile": "trivial", "reason": "styling only"},
|
||||
{"glob": "**/*.scss", "profile": "trivial", "reason": "styling only"},
|
||||
{"keyword": "migration", "profile": "data", "reason": "diff mentions a data migration"},
|
||||
{"keyword": "schema change", "profile": "data", "reason": "diff changes a schema"},
|
||||
{"keyword": "alter table", "profile": "data", "reason": "diff alters stored data"},
|
||||
{"keyword": "password", "profile": "critical", "reason": "diff handles credentials"},
|
||||
{"keyword": "secret", "profile": "critical", "reason": "diff handles secrets"},
|
||||
{"keyword": "encrypt", "profile": "critical", "reason": "diff uses cryptography"},
|
||||
{"keyword": "authorize", "profile": "critical", "reason": "diff makes authorization decisions"},
|
||||
{"keyword": "authentication", "profile": "critical", "reason": "diff handles authentication"},
|
||||
{"keyword": "payment", "profile": "critical", "reason": "diff moves money"},
|
||||
{"keyword": "mutex", "profile": "critical", "reason": "diff uses a concurrency primitive"},
|
||||
{"keyword": "release candidate", "profile": "release", "reason": "diff prepares a release"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,316 @@
|
||||
{
|
||||
"groups": [
|
||||
{
|
||||
"tag": "concurrency",
|
||||
"kinds": [
|
||||
"concurrency"
|
||||
],
|
||||
"sections": [
|
||||
"concurrency"
|
||||
],
|
||||
"terms": [
|
||||
"race condition",
|
||||
"data race",
|
||||
"race",
|
||||
"deadlock",
|
||||
"thread",
|
||||
"threads",
|
||||
"threaded",
|
||||
"parallel",
|
||||
"concurrent",
|
||||
"concurrency",
|
||||
"async",
|
||||
"asynchronous",
|
||||
"shared state",
|
||||
"shared memory",
|
||||
"lock contention",
|
||||
"synchronisation",
|
||||
"synchronization",
|
||||
"goroutine",
|
||||
"goroutines",
|
||||
"interleaving",
|
||||
"flaky under load",
|
||||
"shared",
|
||||
"at once",
|
||||
"at the same time",
|
||||
"losing each other",
|
||||
"background jobs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "parsing",
|
||||
"kinds": [
|
||||
"parsing"
|
||||
],
|
||||
"sections": [
|
||||
"many-inputs"
|
||||
],
|
||||
"terms": [
|
||||
"parser",
|
||||
"parsing",
|
||||
"parse",
|
||||
"malformed",
|
||||
"csv",
|
||||
"tsv",
|
||||
"delimited",
|
||||
"invalid input",
|
||||
"hostile input",
|
||||
"corrupt input",
|
||||
"strange input",
|
||||
"codec",
|
||||
"serialise",
|
||||
"serialize",
|
||||
"deserialise",
|
||||
"deserialize",
|
||||
"lexer",
|
||||
"file format",
|
||||
"spreadsheet file"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "fuzzing",
|
||||
"kinds": [],
|
||||
"sections": [
|
||||
"many-inputs"
|
||||
],
|
||||
"terms": [
|
||||
"fuzz",
|
||||
"fuzzing",
|
||||
"fuzzer",
|
||||
"random inputs",
|
||||
"generated inputs",
|
||||
"inputs i did not think of",
|
||||
"any input",
|
||||
"crash on input",
|
||||
"hang on input"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "property",
|
||||
"kinds": [],
|
||||
"sections": [
|
||||
"many-inputs",
|
||||
"prove"
|
||||
],
|
||||
"terms": [
|
||||
"property",
|
||||
"properties",
|
||||
"for every input",
|
||||
"for all inputs",
|
||||
"holds for",
|
||||
"invariant holds",
|
||||
"law holds",
|
||||
"generated cases"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "money",
|
||||
"kinds": [
|
||||
"money"
|
||||
],
|
||||
"sections": [],
|
||||
"terms": [
|
||||
"money",
|
||||
"rounding",
|
||||
"round",
|
||||
"price",
|
||||
"pricing",
|
||||
"prices",
|
||||
"tax",
|
||||
"currency",
|
||||
"cents",
|
||||
"invoice",
|
||||
"invoices",
|
||||
"financial",
|
||||
"ledger",
|
||||
"interest",
|
||||
"charges",
|
||||
"charge",
|
||||
"amounts",
|
||||
"totals",
|
||||
"balance"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "state-machine",
|
||||
"kinds": [
|
||||
"state-machine"
|
||||
],
|
||||
"sections": [
|
||||
"design"
|
||||
],
|
||||
"terms": [
|
||||
"state machine",
|
||||
"states",
|
||||
"transitions",
|
||||
"workflow states",
|
||||
"lifecycle states",
|
||||
"status machine"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "migration",
|
||||
"kinds": [
|
||||
"migration"
|
||||
],
|
||||
"sections": [],
|
||||
"terms": [
|
||||
"migration",
|
||||
"migrate",
|
||||
"migrating",
|
||||
"schema change",
|
||||
"old data",
|
||||
"existing records",
|
||||
"upgrade data",
|
||||
"stored data"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "ui",
|
||||
"kinds": [
|
||||
"ui"
|
||||
],
|
||||
"sections": [
|
||||
"real-world",
|
||||
"regression"
|
||||
],
|
||||
"terms": [
|
||||
"screen",
|
||||
"button",
|
||||
"component",
|
||||
"color",
|
||||
"colour",
|
||||
"accent",
|
||||
"dark mode",
|
||||
"browser",
|
||||
"web page",
|
||||
"interface look",
|
||||
"looks",
|
||||
"visual",
|
||||
"window",
|
||||
"dialog",
|
||||
"widget",
|
||||
"keyboard",
|
||||
"screen reader",
|
||||
"accessibility",
|
||||
"form"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "security",
|
||||
"kinds": [],
|
||||
"sections": [
|
||||
"safety"
|
||||
],
|
||||
"terms": [
|
||||
"vulnerability",
|
||||
"injection",
|
||||
"access control",
|
||||
"leaked secret",
|
||||
"unsafe deserialisation",
|
||||
"exploit",
|
||||
"attacker",
|
||||
"permission check",
|
||||
"way in",
|
||||
"get in",
|
||||
"without logging in"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "performance",
|
||||
"kinds": [],
|
||||
"sections": [],
|
||||
"terms": [
|
||||
"slow",
|
||||
"fast",
|
||||
"faster",
|
||||
"performance",
|
||||
"latency",
|
||||
"speed",
|
||||
"build is slow",
|
||||
"takes too long",
|
||||
"sluggish"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "regression",
|
||||
"kinds": [],
|
||||
"sections": [
|
||||
"regression"
|
||||
],
|
||||
"terms": [
|
||||
"nothing else changed",
|
||||
"still works",
|
||||
"as before",
|
||||
"regression",
|
||||
"broke before",
|
||||
"existing behaviour",
|
||||
"identically",
|
||||
"nothing else broke",
|
||||
"worked before",
|
||||
"tidy-up",
|
||||
"tidy up"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "service",
|
||||
"kinds": [],
|
||||
"sections": [
|
||||
"real-world"
|
||||
],
|
||||
"terms": [
|
||||
"service",
|
||||
"endpoint",
|
||||
"endpoints",
|
||||
"caller",
|
||||
"callers"
|
||||
]
|
||||
},
|
||||
{
|
||||
"tag": "dependency",
|
||||
"kinds": [],
|
||||
"sections": [],
|
||||
"terms": [
|
||||
"major version",
|
||||
"next major version",
|
||||
"toolchain upgrade",
|
||||
"new version of a library"
|
||||
]
|
||||
}
|
||||
],
|
||||
"languages": {
|
||||
"python": [
|
||||
"python"
|
||||
],
|
||||
"rust": [
|
||||
"rust"
|
||||
],
|
||||
"go": [
|
||||
"go",
|
||||
"golang"
|
||||
],
|
||||
"java": [
|
||||
"java"
|
||||
],
|
||||
"javascript": [
|
||||
"javascript",
|
||||
"node"
|
||||
],
|
||||
"typescript": [
|
||||
"typescript"
|
||||
],
|
||||
"c": [
|
||||
"c"
|
||||
],
|
||||
"cpp": [
|
||||
"c++",
|
||||
"cpp"
|
||||
],
|
||||
"kotlin": [
|
||||
"kotlin"
|
||||
],
|
||||
"haskell": [
|
||||
"haskell"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user