Chorus
view release on metacpan or search on metacpan
agent/skills/chorus-strengthen.md view on Meta::CPAN
---
## Phase 4 â Produce the gap report
Display a structured report:
```
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
chorus-strengthen <sandbox-name>
<N> gap(s) detected across <M> project file(s)
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
```
For each gap, one entry:
```
ââ Gap #N â <gap-type> âââââââââââââââââââââââââââââââââââââ
Element : <id> (<type_element>) in <projet-file>
Expected : <CONFORME|NON_CONFORME>
Got : <CONFORME|NON_CONFORME|unprocessed>
Rule fired : <R0N-slug> â "<rule name>" (or: none)
Agent : <agent-slug>
Hypothesis : <concise description of the probable cause>
e.g. "Threshold for slot 'hauteur_libre' is set to 2.50 m
in R02 but the corpus §4.2 states 2.40 m for class C."
Corpus ref : §<N> â <section title> â <document>
(or: unknown â needs manual verification)
Suggested fix:
â YAML: adjust CONDITION/threshold in <R0N-slug>.yml
â OR: add new rule R<NN>-<slug>.yml covering this case
â OR: Feed: add 'besoin_<slug>' to %SLOTS_REQUIS for type <X>
```
After all gaps:
```
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Summary by gap type
Rule too strict : N gap(s) â thresholds or CONDITION to relax
Rule too permissive: N gap(s) â missing rules or thresholds to tighten
Feed gap : N gap(s) â %SLOTS_REQUIS or Feed logic to extend
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
```
---
## Phase 5 â Enrichment roadmap
### 5.1 Group gaps by corrective action
Group all gaps into three buckets:
| Bucket | Content | Action |
|---|---|---|
| **A â Corpus clarification** | Gaps where the normative source is unclear or ambiguous | Need to re-read the original corpus §, possibly extract a correction text |
| **B â Rule adjustment** | Gaps where the corpus reference is known and the fix is a threshold / CONDITION change | Direct YAML edit (does not require `chorus-feed --enrich`) |
| **C â Missing coverage** | Gaps where the KB has no rule at all for this case | New rule needed â `chorus-feed --enrich` with a targeted corpus fragment |
### 5.2 Enrichment corpus recommendation
For bucket **C** (missing coverage), produce a recommendation:
```
Recommended enrichment corpus
ââââââââââââââââââââââââââââââ
For each missing-coverage gap, draft the normative text fragment that covers it.
This text should be passed to:
chorus-feed <sandbox-name> <corpus-correctif.txt> --enrich
Suggested corpus-correctif.txt content:
âââââââââââââââââââââââââââââââââââââââââ
[Gap #N â <type>/<slot>]
<Normative extract or paraphrase covering the missing rule.
Include: element type, triggering condition, threshold value, rejection reason.>
[Gap #M â <type>/<slot>]
<...>
âââââââââââââââââââââââââââââââââââââââââ
After running chorus-feed --enrich, re-run:
chorus-check <sandbox-name> --all
chorus-strengthen <sandbox-name> â to verify convergence
```
### 5.3 Convergence loop reminder
```
Reinforcement loop:
chorus-create-project <sb> --batch â (once, or if suite is stale)
â
chorus-strengthen <sb> â identify gaps
â
[edit YAML directly] â bucket B fixes
chorus-feed <sb> corpus-correctif.txt --enrich â bucket C new rules
â
chorus-check <sb> --all â verify
â
chorus-strengthen <sb> â check convergence
â
â
CONVERGED â all projects pass, 0 discordances
```
---
## Separation of responsibilities
| | `chorus-feed` | `chorus-create-project` | `chorus-check` | `chorus-strengthen` |
|---|---|---|---|---|
| **Reads** | corpus | sandbox org KB | org KB + YAML | pipeline output + org KB |
| **Produces** | KB org, YAML, Helpers.pm | `projet-*.json` | Feed.pm, Agent shells, Expert.pm, run.pl | gap report + enrichment roadmap |
| **Modifies KB** | â
| â | â | â |
| **Modifies YAML** | â
| â | â | â |
| **Triggered by** | new standard | coverage need | project to validate | failed `chorus-check --all` |
( run in 0.934 second using v1.01-cache-2.11-cpan-8dfa8b56332 )