@roomi-fields/grillhouse 0.0.0-stage → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +9 -0
- package/METACADRE.md +41 -0
- package/agents/developpeur.md +10 -0
- package/agents/explorateur.md +9 -0
- package/agents/questionneur.md +11 -0
- package/agents/referent-technique.md +9 -0
- package/agents/regulateur.md +11 -0
- package/agents/relecteur.md +9 -0
- package/agents/testwriter.md +10 -0
- package/bin/grillhouse.mjs +125 -0
- package/cadre/templates/projet/.claude/settings.json +30 -0
- package/cadre/templates/projet/.editorconfig +47 -0
- package/cadre/templates/projet/.env.example +57 -0
- package/cadre/templates/projet/.eslintrc.cjs +56 -0
- package/cadre/templates/projet/.github/workflows/ci.yml +66 -0
- package/cadre/templates/projet/.mcp.json +13 -0
- package/cadre/templates/projet/.prettierrc +11 -0
- package/cadre/templates/projet/CHANGELOG.md +61 -0
- package/cadre/templates/projet/CLAUDE.md +46 -0
- package/cadre/templates/projet/CONTRIBUTING.md +243 -0
- package/cadre/templates/projet/CREDITS.md +41 -0
- package/cadre/templates/projet/README.md +152 -0
- package/cadre/templates/projet/_gitignore +91 -0
- package/cadre/templates/projet/_npmignore +46 -0
- package/cadre/templates/projet/deployment/README.md +98 -0
- package/cadre/templates/projet/deployment/docs/01-INSTALL.md +145 -0
- package/cadre/templates/projet/deployment/docs/02-CONFIGURATION.md +117 -0
- package/cadre/templates/projet/deployment/docs/03-API.md +264 -0
- package/cadre/templates/projet/deployment/docs/04-TROUBLESHOOTING.md +262 -0
- package/cadre/templates/projet/deployment/scripts/install.ps1 +100 -0
- package/cadre/templates/projet/deployment/scripts/start.ps1 +61 -0
- package/cadre/templates/projet/deployment/scripts/stop.ps1 +37 -0
- package/cadre/templates/projet/deployment/scripts/test.ps1 +118 -0
- package/cadre/templates/projet/docs/agents/issue-tracker.md +44 -0
- package/cadre/templates/projet/ecosystem.config.cjs +73 -0
- package/cadre/templates/projet/package.json +90 -0
- package/cadre/templates/projet/pitmaster/SUIVI.md +22 -0
- package/cadre/templates/projet/src/config.ts +68 -0
- package/cadre/templates/projet/src/errors.ts +102 -0
- package/cadre/templates/projet/src/index.ts +46 -0
- package/cadre/templates/projet/src/services/.gitkeep +8 -0
- package/cadre/templates/projet/src/types/index.ts +24 -0
- package/cadre/templates/projet/src/utils/logger.ts +106 -0
- package/cadre/templates/projet/tests/integration/.gitkeep +7 -0
- package/cadre/templates/projet/tests/unit/config.spec.ts +68 -0
- package/cadre/templates/projet/tests/unit/errors.spec.ts +132 -0
- package/cadre/templates/projet/tests/unit/types.spec.ts +73 -0
- package/cadre/templates/projet/tsconfig.eslint.json +9 -0
- package/cadre/templates/projet/tsconfig.json +41 -0
- package/cadre/templates/projet/tsdoc.json +6 -0
- package/cadre/templates/projet/vitest.config.ts +44 -0
- package/cadre/templates/turbo/paquets.json +29 -0
- package/cadre/templates/turbo/sans-paquets.json +28 -0
- package/charte.md +107 -0
- package/docs/ARCHITECTURE.md +90 -0
- package/hooks/crochet.mjs +33 -0
- package/hooks/hooks.json +58 -0
- package/hooks/register.tsx +558 -0
- package/package.json +75 -4
- package/scripts/avancement.mjs +244 -0
- package/scripts/bilan.mjs +523 -0
- package/scripts/branche-de-nuit.mjs +59 -0
- package/scripts/cadre.mjs +109 -0
- package/scripts/circuit.mjs +4375 -0
- package/scripts/code-mort.mjs +371 -0
- package/scripts/composants-affectes.mjs +598 -0
- package/scripts/consommateurs-arbitres.mjs +192 -0
- package/scripts/consommateurs.mjs +310 -0
- package/scripts/crochet.mjs +24 -0
- package/scripts/crochets.mjs +135 -0
- package/scripts/dernier-vert.mjs +208 -0
- package/scripts/dette.mjs +181 -0
- package/scripts/droits.mjs +354 -0
- package/scripts/enveloppe/codes.mjs +17 -0
- package/scripts/enveloppe/composant.mjs +11 -0
- package/scripts/enveloppe/enveloppe.mjs +628 -0
- package/scripts/enveloppe/lancer.sh +311 -0
- package/scripts/etapes.mjs +323 -0
- package/scripts/etat-du-circuit.mjs +104 -0
- package/scripts/frontieres.mjs +456 -0
- package/scripts/gardes-du-cadre.mjs +72 -0
- package/scripts/greffons.mjs +338 -0
- package/scripts/grillhouse-maj.mjs +514 -0
- package/scripts/index-interfaces.mjs +293 -0
- package/scripts/init.mjs +117 -0
- package/scripts/integration/file-attente.mjs +61 -0
- package/scripts/integration/file.mjs +494 -0
- package/scripts/integration/integrer.mjs +381 -0
- package/scripts/integration/rejeu.mjs +139 -0
- package/scripts/integration/verdict.mjs +13 -0
- package/scripts/interfaces-contre-code.mjs +547 -0
- package/scripts/ligne-etat/defaut.sh +110 -0
- package/scripts/ligne-etat/ligne-etat.mjs +93 -0
- package/scripts/migrations/0.23.0-charte-importee.mjs +47 -0
- package/scripts/migrations/0.23.0-config-vitest.mjs +105 -0
- package/scripts/migrations/0.23.0-crochets-de-seance.mjs +55 -0
- package/scripts/migrations/0.23.0-marche-du-projet.mjs +82 -0
- package/scripts/migrations.mjs +43 -0
- package/scripts/nuit.sh +269 -0
- package/scripts/paquets.mjs +79 -0
- package/scripts/poussee-cles.mjs +46 -0
- package/scripts/preparation.mjs +84 -0
- package/scripts/references-par-les-types.mjs +420 -0
- package/scripts/registre.mjs +336 -0
- package/scripts/resultats.mjs +580 -0
- package/scripts/resumes.mjs +57 -0
- package/scripts/retirer-copie.sh +127 -0
- package/scripts/session-start.sh +203 -0
- package/scripts/sortie.mjs +155 -0
- package/scripts/sous-modules.sh +316 -0
- package/scripts/structure-guard.sh +27 -0
- package/scripts/superviseur.mjs +102 -0
- package/scripts/tableau.mjs +1886 -0
- package/scripts/tests.mjs +236 -0
- package/scripts/ticket.sh +23 -0
- package/scripts/turbo-des-paquets.mjs +899 -0
- package/scripts/un-commit-par-ticket.mjs +212 -0
- package/scripts/verifier.mjs +469 -0
- package/scripts/verrou-de-fichier.mjs +130 -0
- package/scripts/verrou-de-machine.mjs +211 -0
- package/scripts/verrous/commande.mjs +180 -0
- package/scripts/verrous/ticket-du-sous-agent.mjs +39 -0
- package/scripts/verrous/verrou.mjs +165 -0
- package/scripts/vitest-config/avancement.mjs +39 -0
- package/scripts/vitest-config/avancement.reporter.mjs +56 -0
- package/scripts/vitest-config/base-de-passe.mjs +128 -0
- package/scripts/vitest-config/base.d.ts +6 -0
- package/scripts/vitest-config/base.mjs +87 -0
- package/scripts/vitest-config/changements.mjs +173 -0
- package/scripts/vitest-config/cibles.mjs +207 -0
- package/scripts/vitest-config/duree.reporter.mjs +98 -0
- package/scripts/vitest-config/machine.setup.mjs +14 -0
- package/scripts/vitest-config/mesure.d.ts +6 -0
- package/scripts/vitest-config/mesure.mjs +13 -0
- package/scripts/vitest-config/mesure.setup.mjs +12 -0
- package/scripts/vitest-config/pression.mjs +90 -0
- package/scripts/vitest-config/resultats.mjs +23 -0
- package/scripts/vitest-config/resultats.setup.mjs +19 -0
- package/scripts/vitest.nuit.config.mjs +26 -0
- package/skills/developpeur/SKILL.md +175 -0
- package/skills/explorateur/SKILL.md +84 -0
- package/skills/grill/SKILL.md +238 -0
- package/skills/grill/references/releve-structurel.md +38 -0
- package/skills/mesure/SKILL.md +168 -0
- package/skills/pitmaster/SKILL.md +382 -0
- package/skills/pitmaster/references/cadre.md +119 -0
- package/skills/pitmaster/references/consigne-agent.md +308 -0
- package/skills/pitmaster/references/erreurs.md +25 -0
- package/skills/pitmaster/references/tour.md +124 -0
- package/skills/questionneur/SKILL.md +64 -0
- package/skills/redacteur/SKILL.md +84 -0
- package/skills/redacteur/references/documents-d-un-composant.md +105 -0
- package/skills/referent-technique/SKILL.md +145 -0
- package/skills/regulateur/SKILL.md +220 -0
- package/skills/release/SKILL.md +134 -0
- package/skills/release/scripts/update-version.cjs +92 -0
- package/skills/relecteur/SKILL.md +152 -0
- package/skills/relecteur/references/LICENSE-MIT +30 -0
- package/skills/relecteur/references/SOURCE.md +8 -0
- package/skills/relecteur/references/claims-check.md +14 -0
- package/skills/relecteur/references/deletion-check.md +14 -0
- package/skills/relecteur/references/edge-case-hunter.md +80 -0
- package/skills/relecteur/references/verification-gap.md +113 -0
- package/skills/testwriter/SKILL.md +187 -0
- package/types/index.d.ts +56 -0
- package/README.md +0 -3
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release
|
|
3
|
+
description: Automates the complete release process for npm packages. This skill should be used when the user requests to publish a new version, bump version numbers, sync versions across files, update changelog, build, tag, and publish to npm and GitHub.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Release Management Skill
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
This skill automates the complete release workflow for npm packages, ensuring consistent versioning, changelog updates, and proper publication to npm and GitHub.
|
|
11
|
+
|
|
12
|
+
## Project Structure
|
|
13
|
+
|
|
14
|
+
Files that may need version updates:
|
|
15
|
+
- `package.json` - Source of truth for version (ALWAYS update first)
|
|
16
|
+
- `README.md` - Version badges, installation commands
|
|
17
|
+
- `CHANGELOG.md` - Release history
|
|
18
|
+
|
|
19
|
+
## Pre-Release Checklist
|
|
20
|
+
|
|
21
|
+
Before starting a release:
|
|
22
|
+
1. Ensure all tests pass: `npm test`
|
|
23
|
+
2. Ensure code is formatted: `npm run format:check`
|
|
24
|
+
3. Ensure linting passes: `npm run lint`
|
|
25
|
+
4. Ensure build succeeds: `npm run build`
|
|
26
|
+
5. Ensure working directory is clean: `git status`
|
|
27
|
+
6. Ensure you're on the main branch: `git branch --show-current`
|
|
28
|
+
|
|
29
|
+
## Release Workflow
|
|
30
|
+
|
|
31
|
+
### 1. Determine Version Bump
|
|
32
|
+
|
|
33
|
+
Follow semantic versioning (SemVer):
|
|
34
|
+
- **MAJOR** (x.0.0): Breaking changes, incompatible API changes
|
|
35
|
+
- **MINOR** (0.x.0): New features, backward compatible
|
|
36
|
+
- **PATCH** (0.0.x): Bug fixes, backward compatible
|
|
37
|
+
|
|
38
|
+
### 2. Update Version in package.json
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# For patch release
|
|
42
|
+
npm version patch --no-git-tag-version
|
|
43
|
+
|
|
44
|
+
# For minor release
|
|
45
|
+
npm version minor --no-git-tag-version
|
|
46
|
+
|
|
47
|
+
# For major release
|
|
48
|
+
npm version major --no-git-tag-version
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 3. Update CHANGELOG.md
|
|
52
|
+
|
|
53
|
+
Add a new section at the top of CHANGELOG.md:
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
## [X.Y.Z] - YYYY-MM-DD
|
|
57
|
+
|
|
58
|
+
### Added
|
|
59
|
+
- New features
|
|
60
|
+
|
|
61
|
+
### Changed
|
|
62
|
+
- Changes in existing functionality
|
|
63
|
+
|
|
64
|
+
### Fixed
|
|
65
|
+
- Bug fixes
|
|
66
|
+
|
|
67
|
+
### Removed
|
|
68
|
+
- Removed features
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 4. Update Version References
|
|
72
|
+
|
|
73
|
+
Search and update version strings in:
|
|
74
|
+
- README.md (installation commands, badges)
|
|
75
|
+
- Any hardcoded version strings in source code
|
|
76
|
+
|
|
77
|
+
### 5. Build and Test
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm run build
|
|
81
|
+
npm test
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 6. Commit and Tag
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
git add package.json package-lock.json CHANGELOG.md README.md # the files this release changed, named
|
|
88
|
+
git commit -m "chore: release vX.Y.Z"
|
|
89
|
+
git tag -a vX.Y.Z -m "Release vX.Y.Z"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 7. Push to GitHub
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
git push origin HEAD
|
|
96
|
+
git push origin vX.Y.Z
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 8. Publish to npm
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
npm publish --access public
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 9. Create GitHub Release
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
gh release create vX.Y.Z --title "vX.Y.Z" --notes-from-tag
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Troubleshooting
|
|
112
|
+
|
|
113
|
+
### npm publish fails
|
|
114
|
+
- Check you're logged in: `npm whoami`
|
|
115
|
+
- Check package name is available
|
|
116
|
+
- Verify you have publish rights to the scope
|
|
117
|
+
|
|
118
|
+
### Tag already exists
|
|
119
|
+
- Delete local tag: `git tag -d vX.Y.Z`
|
|
120
|
+
- Delete remote tag: `git push origin :refs/tags/vX.Y.Z`
|
|
121
|
+
|
|
122
|
+
### Version mismatch
|
|
123
|
+
- Always update package.json first
|
|
124
|
+
- Use the version sync script to update all references
|
|
125
|
+
|
|
126
|
+
## Scripts
|
|
127
|
+
|
|
128
|
+
### update-version.cjs
|
|
129
|
+
|
|
130
|
+
Use this script to automatically update version references across the project:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
node "${CLAUDE_PLUGIN_ROOT}/skills/release/scripts/update-version.cjs"
|
|
134
|
+
```
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version Update Script
|
|
3
|
+
*
|
|
4
|
+
* Automatically updates version strings across the project.
|
|
5
|
+
* Reads the version from package.json and updates all configured files.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* node <the plugin grillhouse>/skills/release/scripts/update-version.cjs
|
|
9
|
+
*
|
|
10
|
+
* Customize the FILES_TO_UPDATE array for your project structure.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const fs = require('fs');
|
|
14
|
+
const path = require('path');
|
|
15
|
+
|
|
16
|
+
// Read version from package.json (source of truth)
|
|
17
|
+
const packageJsonPath = path.join(__dirname, '..', '..', '..', '..', 'package.json');
|
|
18
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
19
|
+
const version = packageJson.version;
|
|
20
|
+
|
|
21
|
+
console.log(`Updating version references to: ${version}`);
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Files to update with version patterns
|
|
25
|
+
*
|
|
26
|
+
* Each entry has:
|
|
27
|
+
* - file: relative path from project root
|
|
28
|
+
* - patterns: array of { search: RegExp, replace: string template }
|
|
29
|
+
*
|
|
30
|
+
* In replace strings, use $VERSION as placeholder for the version number
|
|
31
|
+
*/
|
|
32
|
+
const FILES_TO_UPDATE = [
|
|
33
|
+
{
|
|
34
|
+
file: 'README.md',
|
|
35
|
+
patterns: [
|
|
36
|
+
// npm install command with version
|
|
37
|
+
{
|
|
38
|
+
search: /@your-scope\/project-name@[\d.]+/g,
|
|
39
|
+
replace: '@your-scope/project-name@$VERSION',
|
|
40
|
+
},
|
|
41
|
+
// Version badge
|
|
42
|
+
{
|
|
43
|
+
search: /version-[\d.]+-blue/g,
|
|
44
|
+
replace: 'version-$VERSION-blue',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
// Add more files as needed for your project
|
|
49
|
+
// {
|
|
50
|
+
// file: 'src/config.ts',
|
|
51
|
+
// patterns: [
|
|
52
|
+
// {
|
|
53
|
+
// search: /VERSION\s*=\s*['"][\d.]+['"]/g,
|
|
54
|
+
// replace: 'VERSION = \'$VERSION\'',
|
|
55
|
+
// },
|
|
56
|
+
// ],
|
|
57
|
+
// },
|
|
58
|
+
];
|
|
59
|
+
|
|
60
|
+
// Process each file
|
|
61
|
+
const projectRoot = path.join(__dirname, '..', '..', '..', '..');
|
|
62
|
+
|
|
63
|
+
for (const config of FILES_TO_UPDATE) {
|
|
64
|
+
const filePath = path.join(projectRoot, config.file);
|
|
65
|
+
|
|
66
|
+
if (!fs.existsSync(filePath)) {
|
|
67
|
+
console.log(`Skipping ${config.file} (file not found)`);
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
let content = fs.readFileSync(filePath, 'utf8');
|
|
72
|
+
let updated = false;
|
|
73
|
+
|
|
74
|
+
for (const pattern of config.patterns) {
|
|
75
|
+
const newContent = content.replace(pattern.search, pattern.replace.replace('$VERSION', version));
|
|
76
|
+
|
|
77
|
+
if (newContent !== content) {
|
|
78
|
+
content = newContent;
|
|
79
|
+
updated = true;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (updated) {
|
|
84
|
+
fs.writeFileSync(filePath, content, 'utf8');
|
|
85
|
+
console.log(`Updated: ${config.file}`);
|
|
86
|
+
} else {
|
|
87
|
+
console.log(`No changes: ${config.file}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
console.log('\nVersion update complete!');
|
|
92
|
+
console.log(`\nDon't forget to update CHANGELOG.md manually with release notes.`);
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: relecteur
|
|
3
|
+
description: "Le relecteur : relire en adversaire le lot d'un ticket (tests et code) avant son commit. Chargé par l'agent relecteur, que le circuit du ticket lance après sa passe finale ; rend un verdict, que le circuit écrit au ticket, sans rien écrire dans le code."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Relecteur — relire un lot avant son commit
|
|
7
|
+
|
|
8
|
+
Tu relis le lot d'un ticket : les tests (testwriter) et le code (développeur), livrés dans la même
|
|
9
|
+
copie. Tu ne corriges rien : ton verdict est ta fiche, que le circuit du ticket
|
|
10
|
+
(`packages/grillhouse/scripts/circuit.mjs`) lit et écrit au ticket : sur `ACCEPTÉ`, il commite le lot ; sur `RENDU`, il
|
|
11
|
+
relance l'agent que nomme chaque constat bloquant.
|
|
12
|
+
|
|
13
|
+
## Au démarrage
|
|
14
|
+
|
|
15
|
+
1. Lis le `CADRE.md` et l'`ARCHITECTURE.md` des composants que le lot touche. `${CLAUDE_PLUGIN_ROOT}/METACADRE.md` dit
|
|
16
|
+
les intentions du cadre : tu le lis quand un lot semble tenir la lettre d'une règle contre son
|
|
17
|
+
but.
|
|
18
|
+
2. Lis les fichiers du lot que ta consigne nomme, dans la copie du ticket : chacun par
|
|
19
|
+
`git -C <copie> diff HEAD -- <fichier>`, un fichier neuf en entier. Ne lis pas encore les critères : ta
|
|
20
|
+
consigne n'en porte aucun, et le fichier d'affirmations qu'elle nomme attend l'étape des
|
|
21
|
+
affirmations ; tes deux premières passes partent du code seul. Le ticket ne se lit pas par bd,
|
|
22
|
+
que ta séance n'ouvre pas : ta consigne et ce fichier le portent. Tu juges sur le plan, la
|
|
23
|
+
description que ce fichier porte, où une décision du responsable est versée ; tu ne cherches
|
|
24
|
+
aucune décision dans les commentaires. Ainsi le récit du ticket n'oriente pas ta
|
|
25
|
+
lecture.
|
|
26
|
+
3. Tes commandes s'écrivent sous la forme que nomme cette compétence, chacune seule, depuis la
|
|
27
|
+
copie, sans préfixe ni redirection hors d'elle. La copie se lit par git :
|
|
28
|
+
`git -C <copie> status --short`, `git -C <copie> diff HEAD -- <fichier>`,
|
|
29
|
+
`git -C <copie> log --oneline -n <n>`, `git -C <copie> ls-files <chemin>`,
|
|
30
|
+
`git -C <copie> grep -n <motif> -- <chemin>`. Ainsi chaque commande passe tes droits.
|
|
31
|
+
|
|
32
|
+
## La relecture bornée
|
|
33
|
+
|
|
34
|
+
Quand ta consigne porte « LA RELECTURE D'AVANT » (un `RENDU` d'avant), tu relis la seule
|
|
35
|
+
différence du lot depuis elle, comme Gerrit fait relire la différence entre deux jeux de
|
|
36
|
+
correctifs : le circuit garde le lot que chaque relecture a lu, et ta consigne nomme la commande
|
|
37
|
+
de la différence (`git diff <lot d'avant> <lot d'aujourd'hui>`, dans la copie), ses fichiers et
|
|
38
|
+
les constats d'avant.
|
|
39
|
+
|
|
40
|
+
1. Chaque constat d'avant se juge levé ou non, sa preuve tirée de la différence, dans `suivi`
|
|
41
|
+
(son titre, `levé` ou `non levé`, la preuve). Un constat non levé revient dans `constats`,
|
|
42
|
+
bloquant, au même destinataire.
|
|
43
|
+
2. Les six passes portent sur la différence : un constat bloquant neuf que le correctif crée,
|
|
44
|
+
dans les lignes qu'il change, rend le lot.
|
|
45
|
+
3. Un défaut hors de la différence et des constats d'avant est une remarque, et ne rend pas le
|
|
46
|
+
lot. Ainsi la boucle des relectures ne s'étend jamais, et chaque tour converge.
|
|
47
|
+
|
|
48
|
+
Tu joues toujours toutes les gardes sur la copie. Sans « LA RELECTURE D'AVANT », tu relis le lot
|
|
49
|
+
entier.
|
|
50
|
+
|
|
51
|
+
## Les six passes
|
|
52
|
+
|
|
53
|
+
Chaque passe suit son fichier de `references/` à la lettre, dans cet ordre.
|
|
54
|
+
|
|
55
|
+
1. **Les cas limites** (`references/edge-case-hunter.md`) : chaque chemin du diff qui manque de
|
|
56
|
+
traitement. Pour l'étape des affirmations, le fichier d'affirmations est celui que ta consigne
|
|
57
|
+
nomme (« LE FICHIER D'AFFIRMATIONS »), la description du ticket que le circuit y a écrite.
|
|
58
|
+
2. **Les trous de vérification** (`references/verification-gap.md`) : chaque comportement changé
|
|
59
|
+
qu'un test ne protège pas réellement.
|
|
60
|
+
3. **Le cadre** : chaque règle du `CADRE.md`, de l'architecture et de la spécification que le
|
|
61
|
+
ticket cite est tenue ; le code traite la classe de problèmes, à l'adresse que nomme la section
|
|
62
|
+
« Architecture », et non le seul cas signalé. Un lot rend aussi sur une forme recopiée, un mot
|
|
63
|
+
que le domaine ne connaît pas, un chemin que le plan écarte, un document du responsable
|
|
64
|
+
changé sans son mot, ou un banc qui ne mesure pas le cas de son ticket sur l'entrée que le cas
|
|
65
|
+
nomme. Ainsi le correctif va du plus large vers le plus spécifique.
|
|
66
|
+
4. **Les entrées** : chaque fonction de l'interface du composant reçoit les types que la section
|
|
67
|
+
« Reçoit » du cadre nomme, jamais une table ou un registre entier. Les faits que le composant
|
|
68
|
+
reçoit de ses fournisseurs se lisent par `npx grillhouse index-interfaces --publie <composant>`
|
|
69
|
+
(depuis la copie) : chacun arrive tel que son fournisseur le publie, et un calcul du lot qui en
|
|
70
|
+
refait un est un constat. Ainsi le composant ne peut pas refaire le calcul d'un voisin.
|
|
71
|
+
5. **L'existant** : cette notion existe-t-elle déjà ailleurs dans le projet, dans ce composant ou un
|
|
72
|
+
autre ? Tu cherches dans tout le dépôt, par l'index (`rtfm_search`, `codegraph explore`). Ainsi le produit garde un seul calcul par notion.
|
|
73
|
+
6. **Les critères** : chaque critère d'acceptation du ticket a son test, qui échoue sans le code ;
|
|
74
|
+
le code ne fait rien que les critères ne disent. Tu lances les tests par `npm test --
|
|
75
|
+
<fichiers>` (chemins depuis la racine du dépôt) ; une sortie relue du cache de Turborepo (« cache hit, replaying logs ») vaut un
|
|
76
|
+
lancement, tu ne la rejoues pas pour la croire. Un test mis en quarantaine (`it.skip`,
|
|
77
|
+
`it.fails`) nomme le ticket qui le corrige, sinon le lot est rendu. Un banc de temps ou un test
|
|
78
|
+
de nuit du lot se joue en nommant son fichier ; son « à repasser » (code 75) se rejoue au
|
|
79
|
+
repos et ne vaut jamais un vert. Tu joues aussi toutes les
|
|
80
|
+
gardes sur la copie, par `npm run verifier -- --gardes` (celles du cadre et celles du projet) ;
|
|
81
|
+
une garde rouge rend le lot, sa sortie en preuve. Ainsi le lot fait ce qui a été décidé, et
|
|
82
|
+
seulement cela, et un refus des gardes se voit avant l'intégration.
|
|
83
|
+
|
|
84
|
+
**Tu attends au premier plan ce que tu lances** : ta séance n'a aucune tâche de fond, et elle finit
|
|
85
|
+
avec ta fiche. Ainsi le circuit reprend dès ta fiche rendue.
|
|
86
|
+
|
|
87
|
+
## Le verdict
|
|
88
|
+
|
|
89
|
+
Une passe en trouve, tu cherches une entrée voisine qui casse le correctif : un constat se prouve
|
|
90
|
+
par son exemple. Ainsi le verdict repose sur des pièces.
|
|
91
|
+
|
|
92
|
+
Ton verdict est ta fiche, que ton schéma décrit et qui finit ta séance : `verdict` `ACCEPTÉ`
|
|
93
|
+
ou `RENDU`, et chaque constat de `constats`, son adresse (`titre`), son genre (`genre`) et sa
|
|
94
|
+
preuve (`corps`). Le circuit l'écrit au ticket, sur plusieurs lignes, son premier mot le verdict,
|
|
95
|
+
que le script d'intégration et le tableau lisent, puis tes remarques. Tu n'écris rien au ticket
|
|
96
|
+
toi-même.
|
|
97
|
+
|
|
98
|
+
**Un constat bloquant tient un critère du plan ou une règle du cadre**, que son champ `regle`
|
|
99
|
+
nomme (« critère 2 », ou le document et sa règle) ; tout autre constat est une remarque (`genre`
|
|
100
|
+
`remarque`), que le circuit écrit au ticket sans relancer personne. Seuls les constats bloquants
|
|
101
|
+
rendent le lot : `RENDU` en porte au moins un, `ACCEPTÉ` aucun, et ton schéma refuse une autre
|
|
102
|
+
fiche. Un constat répond à un besoin réel de l'usage actuel ; un cas seulement possible n'en
|
|
103
|
+
devient pas un constat bloquant, comme il ne devient pas un critère du ticket (un paquet gelé qui
|
|
104
|
+
changerait, une entrée qu'aucun appelant ne donne). Ainsi seul ce que le ticket ou le cadre
|
|
105
|
+
exige rend le lot, comme une relecture mûre n'exige rien dont le changement n'a pas besoin.
|
|
106
|
+
|
|
107
|
+
**Chaque constat bloquant nomme son destinataire** : `role` `testwriter` quand le constat vise un
|
|
108
|
+
test qui manque ou qui ne mord pas, `developpeur` quand il vise le code, et `composant` l'un de
|
|
109
|
+
ceux du titre (son chemin ou le nom de son paquet), celui où la correction s'écrit. Le circuit relance ces
|
|
110
|
+
agents depuis le premier composant nommé, le constat pour rapport. Un constat qui met en cause le
|
|
111
|
+
critère lui-même, et non le lot, porte à la place `critere_en_cause` (son numéro) : le circuit
|
|
112
|
+
s'arrête, et le régulateur tranche. Ainsi chaque constat arrive à l'agent qui le corrige.
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"verdict": "RENDU",
|
|
117
|
+
"constats": [
|
|
118
|
+
{
|
|
119
|
+
"titre": "packages/forms/src/index.mjs:12",
|
|
120
|
+
"genre": "bloquant",
|
|
121
|
+
"regle": "critère 2",
|
|
122
|
+
"role": "developpeur",
|
|
123
|
+
"composant": "000-forms",
|
|
124
|
+
"corps": "Preuve : mesure(0) rend NaN."
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Une remarque qui sort des critères du ticket entre dans `decouvertes` (son sujet, son exemple et
|
|
131
|
+
son adresse) : le circuit la consigne dans un ticket fermé sous le ticket. Tu ne cherches ni ne
|
|
132
|
+
crées aucun ticket : ta fiche suffit. Ainsi le ticket garde ses critères, et la remarque attend le
|
|
133
|
+
mot du responsable.
|
|
134
|
+
|
|
135
|
+
Tu relis le message de commit comme le code : le circuit l'écrit une fois, depuis l'état final,
|
|
136
|
+
du titre du ticket, des critères du plan et des `ecarts` des fiches, chaque `sujet` une fois, de la
|
|
137
|
+
dernière fiche qui le porte. Un écart que le commit doit nommer (un écart voulu, une référence
|
|
138
|
+
changée) entre dans `ecarts`, sous son sujet, avec sa cause ; un sujet qu'une fiche d'avant porte
|
|
139
|
+
se reprend tel quel, et ta valeur, mesurée sur l'état final, remplace la sienne ; pour un critère
|
|
140
|
+
qui exige qu'un écart se nomme au commit,
|
|
141
|
+
l'écart entre dans tes `ecarts`, jamais dans une remarque. Ainsi le commit nomme chaque écart que
|
|
142
|
+
le ticket exige.
|
|
143
|
+
|
|
144
|
+
Tu ranges chaque mot qu'une garde de vocabulaire du projet signale sur une ligne que le lot touche,
|
|
145
|
+
même un mot qui y était déjà. Un usage légitime (un champ homonyme, un nom de l'API) entre au
|
|
146
|
+
registre des exceptions du projet, dans le lot, par un constat adressé à l'agent qui l'écrit ;
|
|
147
|
+
seul un vrai mot du langage écrit en dur monte au responsable, par ta `question` (le mot, sa ligne,
|
|
148
|
+
ta recommandation) : le circuit s'arrête avant le commit. Le `CONTEXTE` de ta consigne porte la
|
|
149
|
+
réponse à une question d'avant. Ainsi chaque mot signalé se range dans le lot, et seul le
|
|
150
|
+
responsable tranche le langage.
|
|
151
|
+
|
|
152
|
+
Ta fiche rendue, tu t'arrêtes : le circuit la recueille à la fin de ta séance.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 BMad Code, LLC
|
|
4
|
+
|
|
5
|
+
This project incorporates contributions from the open source community.
|
|
6
|
+
See [CONTRIBUTORS.md](CONTRIBUTORS.md) for contributor attribution.
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
SOFTWARE.
|
|
25
|
+
|
|
26
|
+
TRADEMARK NOTICE:
|
|
27
|
+
BMad™, BMad Method™, and BMad Core™ are trademarks of BMad Code, LLC, covering all
|
|
28
|
+
casings and variations (including BMAD, bmad, BMadMethod, BMAD-METHOD, etc.). The use of
|
|
29
|
+
these trademarks in this software does not grant any rights to use the trademarks
|
|
30
|
+
for any other purpose. See [TRADEMARK.md](TRADEMARK.md) for detailed guidelines.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Provenance
|
|
2
|
+
|
|
3
|
+
`edge-case-hunter.md`, `deletion-check.md`, `claims-check.md` and `verification-gap.md` come from
|
|
4
|
+
https://github.com/bmad-code-org/BMAD-METHOD (commit bda3c5929f672019b90f39a3ea27259d35d00974,
|
|
5
|
+
`skills/bmad-build/`), under the MIT licence reproduced in `LICENSE-MIT`.
|
|
6
|
+
|
|
7
|
+
One change: `claims-check.md` reads the ticket's `## Architecture` and `## Critères d'acceptation` sections, where
|
|
8
|
+
the original reads a plan's `## Intent` and `## Tasks & Acceptance`.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Claims Check
|
|
2
|
+
|
|
3
|
+
Final pass for the Edge Case Hunter. Read the claims file named in the message that launched you now, for the first time; the path tracing is finished and the claims cannot steer it retroactively.
|
|
4
|
+
|
|
5
|
+
It is the plan the change was built from. Read only its `## Architecture` and `## Critères d'acceptation` sections — the claims live there; ignore the rest of the file. The plan is the change's own account of itself: testimony, not evidence — a claim repeated in a code comment is still the same claim, not confirmation. Extract each checkable claim — what the change does, what it preserves, ordering, arithmetic, and parity with existing code ("exactly as X does") — then try to falsify each one against the code you have already traced. Where your trace is not enough to decide, read the code that decides it: the compared-to function, the actual callee, the state the claim assumes.
|
|
6
|
+
|
|
7
|
+
Append one finding per falsified claim to the same JSON array, with the four standard fields plus:
|
|
8
|
+
|
|
9
|
+
- `kind`: `"claim"`
|
|
10
|
+
- `confidence`: `"high"`, `"medium"`, or `"low"`
|
|
11
|
+
|
|
12
|
+
For a claim finding the standard fields read as: `location` = where the code contradicts the claim; `trigger_condition` = the claim, quoted or tightly paraphrased; `guard_snippet` = what the code actually does; `potential_consequence` = what goes wrong for someone who believed the claim.
|
|
13
|
+
|
|
14
|
+
Verified claims produce nothing. Add nothing if nothing is falsified.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Deletion Check
|
|
2
|
+
|
|
3
|
+
Secondary pass for the Edge Case Hunter — runs only when the diff removed meaningful code. Subordinate to the edge-case pass; findings are usually few or none.
|
|
4
|
+
|
|
5
|
+
For each chunk of removed or replaced code (ignore pure renames and whitespace), ask: did it carry behavior or a contract that the change neither re-established nor intentionally retired? Add a finding for any resulting regression, orphaned reference, or newly-dead code. Skip anything already covered by your edge-case findings.
|
|
6
|
+
|
|
7
|
+
Append each finding to the same JSON array as the edge-case findings, with the four standard fields plus:
|
|
8
|
+
|
|
9
|
+
- `kind`: `"deletion"`
|
|
10
|
+
- `confidence`: `"high"`, `"medium"`, or `"low"` — these are inferences; rate them
|
|
11
|
+
|
|
12
|
+
For a deletion finding the standard fields read as: `location` = the removed item; `trigger_condition` = the behavior or contract it enforced; `guard_snippet` = where or how to re-establish it; `potential_consequence` = the regression or orphan.
|
|
13
|
+
|
|
14
|
+
Add nothing if nothing qualifies.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Edge Case Hunter Review
|
|
2
|
+
|
|
3
|
+
**Goal:** You are a pure path tracer. Never comment on whether code is good or bad; only list missing handling.
|
|
4
|
+
When a diff is provided, scan only the diff hunks and list boundaries that are directly reachable from the changed lines and lack an explicit guard in the diff.
|
|
5
|
+
When no diff is provided (full file or function), treat the entire provided content as the scope.
|
|
6
|
+
Ignore the rest of the codebase unless the provided content explicitly references external functions.
|
|
7
|
+
A brief secondary deletion check runs as Step 4 when the diff removes code.
|
|
8
|
+
A claims check runs as Step 5.
|
|
9
|
+
|
|
10
|
+
**Inputs:**
|
|
11
|
+
- **content** — Content to review, or a path to read it from: diff, full file, or function
|
|
12
|
+
- **also_consider** (optional) — Areas to keep in mind during review alongside normal edge-case analysis
|
|
13
|
+
- **claims_file** — Path to the plan this change was built from. Do NOT read it before Step 5: the path tracing in Steps 2–3 must finish before the claims are seen.
|
|
14
|
+
|
|
15
|
+
**MANDATORY: Execute steps in the Execution section IN EXACT ORDER. DO NOT skip steps or change the sequence. When a halt condition triggers, follow its specific instruction exactly. Each action within a step is a REQUIRED action to complete that step.**
|
|
16
|
+
|
|
17
|
+
**Your method is exhaustive path enumeration — mechanically walk every branch, not hunt by intuition. Report ONLY paths and conditions that lack handling — discard handled ones silently. Do NOT editorialize or add filler. Do not assign severity labels, rankings, or priority levels.**
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## EXECUTION
|
|
21
|
+
|
|
22
|
+
### Step 1: Receive Content
|
|
23
|
+
|
|
24
|
+
- Take the content to review from the parent message that launched you — inline, or by reading the file it points to (never from this instruction file)
|
|
25
|
+
- If no content is supplied, or it is empty, unreadable, or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
|
|
26
|
+
- Identify content type (diff, full file, or function) to determine scope rules
|
|
27
|
+
|
|
28
|
+
### Step 2: Exhaustive Path Analysis
|
|
29
|
+
|
|
30
|
+
**Walk every branching path and boundary condition within scope — report only unhandled ones.**
|
|
31
|
+
|
|
32
|
+
- If `also_consider` input was provided, incorporate those areas into the analysis
|
|
33
|
+
- Walk all branching paths: control flow (conditionals, loops, error handlers, early returns) and domain boundaries (where values, states, or conditions transition). Derive the relevant edge classes from the content itself — don't rely on a fixed checklist. Examples: missing else/default, unguarded inputs, off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, timeout gaps
|
|
34
|
+
- Consider implicit branches: the diff special-cases or changes the handling of one or more members of a fixed set of values — enums, status codes, sentinels, type tags, flags, value ranges. The rest of the set is implicit branches (e.g. the diff changes the `RED` and `YELLOW` cases of a `RED`/`YELLOW`/`GREEN` enum; `GREEN` is the implicit branch)
|
|
35
|
+
- Consider handle lifetime: when the changed code re-checks, re-fetches, or re-validates something it already held — a handle, index, id, pointer — the re-check exists because an intervening call can invalidate it. Identify that call, what it does to the thing held, and what the changed code silently skips when the re-check fails
|
|
36
|
+
- For each call site the diff adds or changes — in test files as well as production code — read the callee's declaration and check the call against it: argument count, order, types, and defaults. Report any mismatch
|
|
37
|
+
- For each path: determine whether the content handles it
|
|
38
|
+
- Collect only the unhandled paths as findings — discard handled ones silently
|
|
39
|
+
|
|
40
|
+
### Step 3: Validate Completeness
|
|
41
|
+
|
|
42
|
+
- Revisit every edge class from Step 2 — e.g., missing else/default, null/empty inputs, off-by-one loops, arithmetic overflow, implicit type coercion, race conditions, timeout gaps
|
|
43
|
+
- Add any newly found unhandled paths to findings; discard confirmed-handled ones
|
|
44
|
+
|
|
45
|
+
### Step 4: Deletion Check
|
|
46
|
+
|
|
47
|
+
If the diff removed or replaced meaningful code (ignore pure renames and whitespace): load `references/deletion-check.md` and follow it.
|
|
48
|
+
|
|
49
|
+
### Step 5: Claims Check
|
|
50
|
+
|
|
51
|
+
Load `references/claims-check.md` and follow it.
|
|
52
|
+
|
|
53
|
+
### Step 6: Present Findings
|
|
54
|
+
|
|
55
|
+
Output all findings as a single JSON array following the Output Format specification exactly.
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## OUTPUT FORMAT
|
|
59
|
+
|
|
60
|
+
Return ONLY a valid JSON array of objects. Each edge-case finding contains exactly these four fields:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
[{
|
|
64
|
+
"location": "file:start-end (or file:line when single line, or file:hunk when exact line unavailable)",
|
|
65
|
+
"trigger_condition": "one-line description (max 15 words)",
|
|
66
|
+
"guard_snippet": "minimal code sketch that closes the gap (single-line escaped string, no raw newlines or unescaped quotes)",
|
|
67
|
+
"potential_consequence": "what could actually go wrong (max 15 words)"
|
|
68
|
+
}]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
No extra text, no explanations, no markdown wrapping. An empty array `[]` is valid when nothing is found. Deletion findings from Step 4 and claim findings from Step 5, if any, go in the same array with the extra fields defined in `references/deletion-check.md` and `references/claims-check.md`.
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## HALT CONDITIONS
|
|
75
|
+
|
|
76
|
+
- If no content is supplied, or it is empty, unreadable, or cannot be decoded as text, return `[{"location":"N/A","trigger_condition":"Input empty or undecodable","guard_snippet":"Provide valid content to review","potential_consequence":"Review skipped — no analysis performed"}]` and stop
|
|
77
|
+
|
|
78
|
+
## CONTENT SOURCE
|
|
79
|
+
|
|
80
|
+
"Review content:" in the message that launched you gives the content itself or a path to read it from. Read the file when it is a path; either way that is the content under review, and this instruction file never is.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Verification Gap Review
|
|
2
|
+
|
|
3
|
+
**Goal:** Find changed behavior that could break without reliable verification catching it. Ask one question — "if the behavior this change is supposed to produce broke where it's actually used, would verification fail?" Do not hunt for correctness bugs, but report genuine problems you notice while tracing verification.
|
|
4
|
+
|
|
5
|
+
The main verification gap shapes are:
|
|
6
|
+
|
|
7
|
+
1. **Regression gap:** the changed code regresses where it's used, and no test covering that use would fail.
|
|
8
|
+
2. **Missing-adoption gap:** a place that should now use the new behavior doesn't; it handles the same case its own way, or not at all, and no test would flag the omission.
|
|
9
|
+
3. **Broken-verification gap:** a test appears to cover the changed behavior, but would not actually protect it because it is skipped, flaky, not run in the normal verification path, or too weak to observe the regression.
|
|
10
|
+
|
|
11
|
+
## Evidence Rules
|
|
12
|
+
|
|
13
|
+
- Read a test before claiming what it covers, runs, asserts, or misses.
|
|
14
|
+
- Before claiming no test exists, search the whole repo by the symbol under test and by import references; expected file locations are not enough.
|
|
15
|
+
- Never assert what you did not verify. If a finding cannot be grounded, drop it.
|
|
16
|
+
- In a finding, say what you actually checked — "none of the tests I read cover this" — and show how far you looked. Say a test doesn't exist anywhere only when the symbol/import-reference search actually shows that.
|
|
17
|
+
- Do not assign severity, confidence, priority, or ranking.
|
|
18
|
+
|
|
19
|
+
## Review Sequence
|
|
20
|
+
|
|
21
|
+
### Step 1: Screen for behavioral change
|
|
22
|
+
|
|
23
|
+
Screen each part of the change separately. If a part is non-behavioral, skip it. Call a part non-behavioral only when the changed code does not alter return values, thrown errors, caller-visible side effects, or observable state (including iteration order and emitted messages). Once a part meets that test, move on; do not inspect callers or tests for extra confirmation.
|
|
24
|
+
|
|
25
|
+
Common non-behavioral examples: formatting, comments, whitespace; pure renames; trivial getters/setters and pass-throughs; type-only or compiler-enforced changes with no runtime effect; etc.
|
|
26
|
+
|
|
27
|
+
Only outcomes produced by deterministic code are worth automatically testing; tests are useless on static source text and brittle on LLM output. Skip those parts.
|
|
28
|
+
|
|
29
|
+
If every part is skipped, output the clean result (see Output Format).
|
|
30
|
+
|
|
31
|
+
### Step 2: Find the behavior that changed
|
|
32
|
+
|
|
33
|
+
Identify what behavior changed compared to the previous version: output, side effect, branch, error path, schema/event shape, config default, validation/authorization rule, external contract, etc. If the change affects more than one behavior, handle each separately.
|
|
34
|
+
|
|
35
|
+
Treat broad-impact changes as behavioral even when no single changed line looks important: dependency, toolchain, build/config, data-file, etc.
|
|
36
|
+
|
|
37
|
+
### Step 3: Trace where that behavior is used
|
|
38
|
+
|
|
39
|
+
Trace the changed behavior to the places that observe it. Start with direct callers and registered entry points (routes, commands, DI), contract consumers (schemas, events, APIs, database readers), and reverse-dependency info if already available.
|
|
40
|
+
|
|
41
|
+
Follow a path only while the changed behavior is reachable and unverified. Stop when a test at that boundary would fail, the consumer does not observe the changed behavior, or the next hop is guesswork (dynamic dispatch, reflection, outside-repo consumers, etc.). Prefer the nearest observable boundary, often one to three hops away, especially across contract, integration, or service edges. If there are more than five similar consumers, group obvious repeats and check representative paths; expand only when a consumer observes the behavior differently.
|
|
42
|
+
|
|
43
|
+
### Step 4: Qualify the consumer, then check its test
|
|
44
|
+
|
|
45
|
+
For each consumer, name the smallest realistic regression this consumer would observe: invert the branch, drop the default, omit the field, return the old error code, skip the integration call, etc. This is the Demonstration. If no such regression exists, drop the path; untested downstream code is not a finding.
|
|
46
|
+
|
|
47
|
+
A `Missing-adoption gap` qualifies not by the adoption failure alone but by a supersession signal: the change gives clear evidence the new behavior is meant to replace the local one — PR intent, naming or docs, a replaced sibling site, deleted duplicate logic, or a test defining the new rule — and the local site shares the same observable contract. Without a supersession signal and a shared observable contract, it is a refactor suggestion, not a verification-gap finding. Once both hold, check whether any test for that site would flag the non-adoption; missing coverage of the non-adoption is the gap itself, not a disqualifier.
|
|
48
|
+
|
|
49
|
+
Find and read the relevant test. Ask whether the Demonstration would make an assertion fail.
|
|
50
|
+
|
|
51
|
+
- If yes, the behavior is verified. No finding.
|
|
52
|
+
- For a regression-style Demonstration: if no test runs the path, the test is skipped/flaky/not run normally, or the test runs the code without checking the changed result, report a `Regression gap` or `Broken-verification gap`.
|
|
53
|
+
- For a qualifying Missing-adoption case: if none of the site tests you found assert it adopts the new behavior, report a `Missing-adoption gap`.
|
|
54
|
+
|
|
55
|
+
A test counts only if it runs normally and an assertion observes the changed output, branch, or contract. These do not count: no execution; source-text assertions that match a file's wording instead of running it; success/no-throw/snapshot-only checks; mock/log-call checks; human-only checks; tests that mock away the integration; e2e tests that pass through without checking the changed output; stale assertions or fixtures.
|
|
56
|
+
|
|
57
|
+
For example, `expect(x ?? DEFAULT).toBe(DEFAULT)` passes when `x` is missing.
|
|
58
|
+
|
|
59
|
+
Common patterns:
|
|
60
|
+
|
|
61
|
+
- **Caller-path gap** — helper test covers the branch, but caller values skip it.
|
|
62
|
+
- **Contract drift** — payload/schema/event changes must be verified at the consumer.
|
|
63
|
+
- **Migration compatibility** — tests only create new-format rows or fresh schemas.
|
|
64
|
+
- **Phantom exception** — handled partial-failure path has no test.
|
|
65
|
+
- **Missing-adoption gap** — sibling site should use the new rule/helper and does not.
|
|
66
|
+
- **Removed verification** — deleted test or weakened assertion leaves behavior unpinned; removing a source-text assertion is not this, since it never counted.
|
|
67
|
+
|
|
68
|
+
### Step 5: Confirm each finding is real
|
|
69
|
+
|
|
70
|
+
Before writing a finding, re-open the specific tests or search results the finding relies on. Verify the Demonstration would not make any test you checked fail, or that the absence claim is backed by the symbol/import-reference search. Do not claim more than you verified; drop any finding you cannot ground.
|
|
71
|
+
|
|
72
|
+
Explain why the test misses the bug using what the test sets up and checks.
|
|
73
|
+
|
|
74
|
+
Do not report: compiler/type-checker-enforced cases; behavior already verified by an integration, contract, or e2e test; implementation-detail or mock-only tests; low coverage or a missing test file by itself; legacy untested code the change did not affect.
|
|
75
|
+
|
|
76
|
+
Report genuine problems you noticed while tracing verification, even if they are not verification gaps. Put them under `Other findings` in the output. This permits reporting what you already reached, not extra hunting. A claim that code misbehaves is a defect, not a gap — it goes under `Other findings` for standard triage, however you found it.
|
|
77
|
+
|
|
78
|
+
## OUTPUT FORMAT
|
|
79
|
+
|
|
80
|
+
Emit each verification-gap finding as one block. No general advice, no severity or confidence. Triage trusts a gap finding as filed and does not re-verify it, so each block must stand on its own evidence.
|
|
81
|
+
|
|
82
|
+
```markdown
|
|
83
|
+
### <one-line title naming the gap>
|
|
84
|
+
|
|
85
|
+
- **Changed surface:** the exact behavior or contract that changed — `file:line`.
|
|
86
|
+
- **Impacted consumer or site:** named concretely with `file:line` (e.g. "the `createInvoice` mutation used by the billing dashboard at `billing/dashboard.ts:88`," not "callers of this function").
|
|
87
|
+
- **Existing test evidence:**
|
|
88
|
+
- `Regression gap`: what the relevant test actually asserts, with `file:line`; or, if none, the symbol/import-reference searches run and their result.
|
|
89
|
+
- `Missing-adoption gap`: tests for the impacted site, and whether any assert it adopts the new behavior.
|
|
90
|
+
- `Broken-verification gap`: the apparent test or verification path, and why it does not count.
|
|
91
|
+
- **Missing verification:** the precise assertion or check that's absent.
|
|
92
|
+
- **Demonstration:**
|
|
93
|
+
- `Regression gap` / `Broken-verification gap`: the concrete regression that would ship undetected, and why the tests you checked would not fail.
|
|
94
|
+
- `Missing-adoption gap`: the case the site mishandles by not adopting the new behavior, and that none of the tests you read assert adoption.
|
|
95
|
+
- **Consequence:** the concrete thing that ships wrong — a regression the checked evidence would not catch, or a site that should use the new behavior and doesn't.
|
|
96
|
+
- **Disposition:** `patch` — name the test to add, fit to the repo's own way of verifying (don't impose a generic test pyramid) — or `defer` when the gap is real but not worth closing as part of this change, with one sentence of why.
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
If you noticed genuine non-gap problems while tracing verification, append:
|
|
100
|
+
|
|
101
|
+
```markdown
|
|
102
|
+
## Other findings
|
|
103
|
+
|
|
104
|
+
- <description only; no severity, confidence, priority, or ranking>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
When you find no verification gaps and no other findings, output exactly this single line, not an empty response:
|
|
108
|
+
|
|
109
|
+
`No verification gaps found.`
|
|
110
|
+
|
|
111
|
+
## CONTENT SOURCE
|
|
112
|
+
|
|
113
|
+
"Review content:" in the message that launched you gives the content itself or a path to read it from. Read the file when it is a path; either way that is the content under review, and this instruction file never is. If no content is supplied, or the file it points to is missing, empty, or unreadable, say exactly that and stop — never report a clean review for content you could not read.
|