goga-accept-manifest-review
Identity
The Agent verifies each Cell's CODEMANIFEST against its implementation during acceptance: code vs requirements, requirements vs code, manifest accuracy.
Core Principle
The Agent compares CODEMANIFEST with the actual implementation, updates the manifest as needed, and records any unresolvable discrepancies.
User Interaction Rule
Always provide response options. When addressing the User, always offer 2–4 concrete choices.
Algorithm
Step 1. Load Context
- Load the Acceptance Scope Report.
- Invoke skill
goga-lang-disp to retrieve language conventions for the target language.
- Load the DSL specification:
- Invoke skill
goga-cell to understand CODEMANIFEST DSL syntax, structural rules, and semantics.
- Invoke skill
goga-cookbook to understand principles for working with Cell and CODEMANIFEST files.
- Invoke skill
goga-codemanifest-base to retrieve baseline Usages and Annotations.
Step 2. Pre-flight Check
- Run the linter:
goga lint.
- Record all errors as CRITICAL. Resolve them before proceeding.
Step 3. Per-Cell Review
Process each Cell listed in the Acceptance Scope Report:
Sub-step 1. Load Data
- Read the Cell's CODEMANIFEST.
- Parse all entities, methods, properties, imports, usages, annotations, re-exports, and locations per the goga-cell and goga-cookbook skill definitions.
- Enumerate all source files (exclude
.usages/, build artifacts, and test files).
- Read every source file at its declared
location.
- Verify the Facade file exists.
Sub-step 2. Code Analysis
Question: Does the code satisfy the CODEMANIFEST requirements, baseline practices, and language conventions?
Run the drift comparison: goga drift <cell-path>.
- Exit 0 — the declared and code-derived views agree.
- Exit 1 — discrepancies found (JSON report on stdout): every entry becomes a finding —
schema_only → Analysis 1 (missing implementation, CRITICAL), codegraph_only → Sub-step 3 classification. Resolve every entry before the contract comparison.
- Exit 2 — comparison could not run: record CRITICAL, resolve the cause before continuing.
Once the drift comparison exits 0, run the contract comparison: goga contract <cell-path>.
For each Entity, compare:
- Constructor Signature: CODEMANIFEST vs implementation.
- Methods: CODEMANIFEST vs implementation — per method.
- Properties: CODEMANIFEST vs implementation — per property.
For each Routine:
- Signature match: contract result — CODEMANIFEST vs implementation.
- Facade export: is the Routine exported through the Facade.
Check Facade exposure — every Entity must be present in the Facade.
Check code compliance with baseline Usages and Annotations from skill goga-codemanifest-base.
Check code compliance with language conventions from skill goga-lang-disp.
Additional checks:
- Location: the file at
<cell-path>/<location> must exist.
Sub-step 3. CODEMANIFEST Completeness Analysis
Question: Is all meaningful code reflected in the CODEMANIFEST?
For every code element absent from CODEMANIFEST, classify criticality:
HIGH — must be added:
- Undeclared public Entity (class with state or behavior).
- Undeclared public Routine (transformer function, factory, validator).
- Re-exported types not declared via Embedding.
- Unreported Mutations (
Object::Target).
MEDIUM — must be added:
- Missing methods or properties on a declared Entity.
- Signature inaccuracies (parameters, return values, semantic labels).
- Used Imports not declared.
LOW — no action required:
- Private members, internal implementation details.
- Helper functions not included in the Facade.
- Stylistic annotation improvements.
Annotation quality checks:
- Each Annotation starts with a clear purpose statement.
- Every parameter is documented as
parameter_name: description.
- Non-trivial logic includes an
Algorithm: section.
- Constraints are described under
Requirements:.
- No TBD, TODO, or vague wording.
Sub-step 4. Algorithm Comparison
For each Entity and Routine, compare Annotations against the implementation along these axes:
- Behavior: does the code perform what the Annotation describes.
- Algorithm: steps, order, conditions, branching.
- Operational Flow: inputs, outputs, side effects.
- Guarantees: post-conditions, invariants, constraints.
- Engineering Practices: error handling, logging, validation.
For each discrepancy:
- CODEMANIFEST inaccurate, code correct → update CODEMANIFEST.
- Code incorrect, CODEMANIFEST accurate → create a Task.
- Both partially inaccurate → propose edits for both sides, request User confirmation.
Step 4. Baseline Usages and Annotations Audit
For each Cell, verify against goga-codemanifest-base:
- Retrieve baseline Usages from
goga-codemanifest-base.
- Verify every baseline Usage appears in the CODEMANIFEST
Usages directive.
- Retrieve baseline Annotations from
goga-codemanifest-base.
- Verify every baseline Annotation appears in the CODEMANIFEST
Annotations directive.
- Auto-add any missing baseline Usages or Annotations.
Step 5. Classify Findings
For each finding:
Assign a severity:
- CRITICAL: Facade violation, missing implementation, CODEMANIFEST syntax error, implementation contradicts a correct manifest.
- WARNING: inaccurate description, missing parameter in Annotation, stale manifest algorithm.
- INFO: writing-quality improvement recommendation.
Propose a concrete action:
- Analysis 1 (code fails requirements) → create a Task describing the discrepancy.
- Analysis 2 (requirements diverge from code) → edit CODEMANIFEST.
- Algorithm mismatch → update manifest if implementation is correct, or create a Task.
Request User confirmation for all CRITICAL and WARNING findings.
Step 6. Execute Approved Actions
For each approved action:
- Code fails requirements → create a Task with discrepancy details.
- Requirements diverge from code → apply CODEMANIFEST edits.
- Manifest is stale → update CODEMANIFEST and record the reason.
- Implementation is incorrect → record CRITICAL, create a Task.
Step 7. Validate Updates
- Run:
goga lint.
- Fix any syntax errors.
- Repeat until the linter passes with zero errors.
STOP if:
- CRITICAL violations exist in any Cell.
- The drift comparison could not run (exit 2).
- Implementation contradicts manifest and manifest is correct.
- CODEMANIFEST linter errors are present.
- Facade exposure violations are detected.
Output Format
Fill in every section. Empty sections are prohibited.
# Manifest Review Report
## Linter Results
[Table: Cell | Linter Status | Errors (if any)]
## Drift Results
[Table: Cell | Exit Code | Entries (kind, types) | Triage]
## Analysis 1 — Code vs Requirements
[Table: Cell | Signature Match | Method Coverage | Property Coverage | Facade | Status]
## Analysis 2 — Requirements vs Code
[Table: Cell | Undocumented Entities | Description Accuracy | Annotation Quality | Status]
## Algorithm Consistency
[Per Cell: manifest algorithm vs implementation — match / discrepancy]
## Operational Flow Consistency
[Per Cell: manifest flow vs implementation — match / discrepancy]
## Guarantee Verification
[Per Cell: manifest guarantees vs implementation — preserved / violated]
## Practice Consistency
[Per Cell: manifest practices vs implementation — match / discrepancy]
## Baseline Usages/Annotations Audit
[Table: Cell | Baseline Usages present? | Baseline Annotations present?]
## Findings
[Table: Cell | Analysis | Finding | Severity (CRITICAL/WARNING/INFO) | Proposed Action]
## Applied Updates
[Table: Cell | Updated Section | Previous Value | New Value | Reason]
## Critical Discrepancies
[List of CRITICAL items. Empty if none.]
## Overall Status
[CONSISTENT / INCONSISTENT — with justification]
1---2name: goga-accept-manifest-review3description: Verify each Cell's CODEMANIFEST against the implementation4metadata:5 source: https://skillmd.com/skills/qarium/goga-accept-manifest-review6---78# goga-accept-manifest-review910## Identity1112The Agent verifies each Cell's CODEMANIFEST against its implementation during acceptance: code vs requirements, requirements vs code, manifest accuracy.1314## Core Principle1516The Agent **compares** CODEMANIFEST with the actual implementation, **updates** the manifest as needed, and **records** any unresolvable discrepancies.1718### User Interaction Rule1920**Always provide response options.** When addressing the User, always offer 2–4 concrete choices.2122---2324## Algorithm2526### Step 1. Load Context27281. Load the Acceptance Scope Report.292. Invoke skill `goga-lang-disp` to retrieve language conventions for the target language.303. Load the DSL specification:31 - Invoke skill `goga-cell` to understand CODEMANIFEST DSL syntax, structural rules, and semantics.32 - Invoke skill `goga-cookbook` to understand principles for working with Cell and CODEMANIFEST files.334. Invoke skill `goga-codemanifest-base` to retrieve baseline Usages and Annotations.3435### Step 2. Pre-flight Check36371. Run the linter: `goga lint`.382. Record all errors as CRITICAL. Resolve them before proceeding.3940### Step 3. Per-Cell Review4142Process each Cell listed in the Acceptance Scope Report:4344#### Sub-step 1. Load Data45461. Read the Cell's CODEMANIFEST.472. Parse all entities, methods, properties, imports, usages, annotations, re-exports, and locations per the goga-cell and goga-cookbook skill definitions.483. Enumerate all source files (exclude `.usages/`, build artifacts, and test files).494. Read every source file at its declared `location`.505. Verify the Facade file exists.5152#### Sub-step 2. Code Analysis5354**Question: Does the code satisfy the CODEMANIFEST requirements, baseline practices, and language conventions?**55561. Run the drift comparison: `goga drift <cell-path>`.57 - Exit 0 — the declared and code-derived views agree.58 - Exit 1 — discrepancies found (JSON report on stdout): every entry becomes a finding — `schema_only` → Analysis 1 (missing implementation, CRITICAL), `codegraph_only` → Sub-step 3 classification. Resolve every entry before the contract comparison.59 - Exit 2 — comparison could not run: record CRITICAL, resolve the cause before continuing.60612. Once the drift comparison exits 0, run the contract comparison: `goga contract <cell-path>`.62633. For each Entity, compare:64 - **Constructor Signature**: CODEMANIFEST vs implementation.65 - **Methods**: CODEMANIFEST vs implementation — per method.66 - **Properties**: CODEMANIFEST vs implementation — per property.674. For each Routine:68 - **Signature match**: contract result — CODEMANIFEST vs implementation.69 - **Facade export**: is the Routine exported through the Facade.705. Check Facade exposure — every Entity must be present in the Facade.716. Check code compliance with baseline Usages and Annotations from skill `goga-codemanifest-base`.727. Check code compliance with language conventions from skill `goga-lang-disp`.7374Additional checks:75- **Location**: the file at `<cell-path>/<location>` must exist.7677#### Sub-step 3. CODEMANIFEST Completeness Analysis7879**Question: Is all meaningful code reflected in the CODEMANIFEST?**8081For every code element absent from CODEMANIFEST, classify criticality:8283**HIGH** — must be added:84- Undeclared public Entity (class with state or behavior).85- Undeclared public Routine (transformer function, factory, validator).86- Re-exported types not declared via Embedding.87- Unreported Mutations (`Object::Target`).8889**MEDIUM** — must be added:90- Missing methods or properties on a declared Entity.91- Signature inaccuracies (parameters, return values, semantic labels).92- Used Imports not declared.9394**LOW** — no action required:95- Private members, internal implementation details.96- Helper functions not included in the Facade.97- Stylistic annotation improvements.9899Annotation quality checks:100- Each Annotation starts with a clear purpose statement.101- Every parameter is documented as `parameter_name`: description.102- Non-trivial logic includes an `Algorithm:` section.103- Constraints are described under `Requirements:`.104- No TBD, TODO, or vague wording.105106#### Sub-step 4. Algorithm Comparison107108For each Entity and Routine, compare Annotations against the implementation along these axes:109- **Behavior**: does the code perform what the Annotation describes.110- **Algorithm**: steps, order, conditions, branching.111- **Operational Flow**: inputs, outputs, side effects.112- **Guarantees**: post-conditions, invariants, constraints.113- **Engineering Practices**: error handling, logging, validation.114115For each discrepancy:116- **CODEMANIFEST inaccurate, code correct** → update CODEMANIFEST.117- **Code incorrect, CODEMANIFEST accurate** → create a Task.118- **Both partially inaccurate** → propose edits for both sides, request User confirmation.119120### Step 4. Baseline Usages and Annotations Audit121122For each Cell, verify against `goga-codemanifest-base`:1231. Retrieve baseline Usages from `goga-codemanifest-base`.1242. Verify every baseline Usage appears in the CODEMANIFEST `Usages` directive.1253. Retrieve baseline Annotations from `goga-codemanifest-base`.1264. Verify every baseline Annotation appears in the CODEMANIFEST `Annotations` directive.1275. **Auto-add** any missing baseline Usages or Annotations.128129### Step 5. Classify Findings130131For each finding:1321331. Assign a severity:134 - **CRITICAL**: Facade violation, missing implementation, CODEMANIFEST syntax error, implementation contradicts a correct manifest.135 - **WARNING**: inaccurate description, missing parameter in Annotation, stale manifest algorithm.136 - **INFO**: writing-quality improvement recommendation.1371382. Propose a concrete action:139 - Analysis 1 (code fails requirements) → create a Task describing the discrepancy.140 - Analysis 2 (requirements diverge from code) → edit CODEMANIFEST.141 - Algorithm mismatch → update manifest if implementation is correct, or create a Task.1421433. Request User confirmation for all CRITICAL and WARNING findings.144145### Step 6. Execute Approved Actions146147For each approved action:1481491. **Code fails requirements** → create a Task with discrepancy details.1502. **Requirements diverge from code** → apply CODEMANIFEST edits.1513. **Manifest is stale** → update CODEMANIFEST and record the reason.1524. **Implementation is incorrect** → record CRITICAL, create a Task.153154### Step 7. Validate Updates1551561. Run: `goga lint`.1572. Fix any syntax errors.1583. Repeat until the linter passes with zero errors.159160STOP if:161- CRITICAL violations exist in any Cell.162- The drift comparison could not run (exit 2).163- Implementation contradicts manifest and manifest is correct.164- CODEMANIFEST linter errors are present.165- Facade exposure violations are detected.166167---168169## Output Format170171Fill in every section. Empty sections are prohibited.172173```md174# Manifest Review Report175176## Linter Results177[Table: Cell | Linter Status | Errors (if any)]178179## Drift Results180[Table: Cell | Exit Code | Entries (kind, types) | Triage]181182## Analysis 1 — Code vs Requirements183[Table: Cell | Signature Match | Method Coverage | Property Coverage | Facade | Status]184185## Analysis 2 — Requirements vs Code186[Table: Cell | Undocumented Entities | Description Accuracy | Annotation Quality | Status]187188## Algorithm Consistency189[Per Cell: manifest algorithm vs implementation — match / discrepancy]190191## Operational Flow Consistency192[Per Cell: manifest flow vs implementation — match / discrepancy]193194## Guarantee Verification195[Per Cell: manifest guarantees vs implementation — preserved / violated]196197## Practice Consistency198[Per Cell: manifest practices vs implementation — match / discrepancy]199200## Baseline Usages/Annotations Audit201[Table: Cell | Baseline Usages present? | Baseline Annotations present?]202203## Findings204[Table: Cell | Analysis | Finding | Severity (CRITICAL/WARNING/INFO) | Proposed Action]205206## Applied Updates207[Table: Cell | Updated Section | Previous Value | New Value | Reason]208209## Critical Discrepancies210[List of CRITICAL items. Empty if none.]211212## Overall Status213[CONSISTENT / INCONSISTENT — with justification]214```