agentsclimarketplace

Api shape verification

Skill lubochka/xiigen-mvp-engine/.agents/skills/api-shape-verification

Self-building AI code generation engine that generates application flows instead of implementing them. AGPL-3.0.

Install
npx -y skills add lubochka/xiigen-mvp-engine --skill api-shape-verification

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 13 days oldThe repository was created 13 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.1 KB, as published. Nobody here has run it

API Shape Verification Skill

For every import in a planned test file, verifies the export shape, parameter types, and return type from the actual source file before any test code is written. Front-loads API discovery to G0 instead of find-and-fix during execution.

When to Invoke

  • At G0, after infrastructure discovery identifies the source files to be imported
  • Before writing any test file that imports from engine source files
  • After any session that had WF discovery rate > 120% (indicates API assumptions were wrong)

Verification Protocol

For each planned import:

# Step 1: Find the export — do NOT assume function vs const
grep -n "export.*SymbolName\|SymbolName" source_file.ts | head -10

# Step 2: For methods/functions — confirm param order and types
grep -n "async SymbolName\|SymbolName(" source_file.ts | head -5

# Step 3: For getters — confirm getter vs method
grep -n "get SymbolName\b" source_file.ts | head -5

Stronger TS tooling (preferred over grep when available). grep finds the declaration; these confirm the resolved shape the compiler actually sees:

# Compiler-truth check: does the symbol type-check the way the plan assumes?
npx tsc --noEmit                 # whole-project type check (catches wrong return wrappers)

# IDE "Go to Definition" / hover, or ts-morph for programmatic shape extraction:
#   project.getSourceFile('src/foo.ts').getClass('FlowGenerator')
#          .getMethod('generate').getReturnType().getText()
#   → e.g. "Promise<DataProcessResult<FlowResult>>"  (confirms async + wrapper)

Verify the contract wrapper that ACTUALLY exists — do not invent C# wrappers. mvp returns through typed TS unions / Promise<DataProcessResult<T>>, not OperationResult<T>/Task<T>. When the boundary is HTTP, the contract is a zod schema, not the bare type — confirm the schema and the inferred type agree:

grep -n "z\.object\|z\.infer\|\.parse(\|\.safeParse(" source_file.ts | head -10
# A handler may type its arg as `Foo` but validate with `FooSchema` — verify
# `z.infer<typeof FooSchema>` matches the type the test/caller will pass.

Verification Table

Produce this table before writing any test code:

SymbolSource FileExport ShapeParamsReturn TypeNotesVerified
FlowGeneratorengine/flow-generator.tsclass{aiProvider}instanceconstructor options
generatemethod on FlowGeneratorasync method(contract, tenantId)Promise<DataProcessResult>order matters
generationHistorymethod on FlowGeneratorgetternoneArray<Record<string,unknown>>NOT a method call
createT44Contractengine-contracts/sample-contracts.ts?()EngineContractgrep to confirm

Rules

  1. Never use ^export function — misses export const, export class, default exports, arrow functions
  2. Use grep "export.*SymbolName" without anchors to catch all export forms
  3. If symbol not found in the named file: search the barrel index (index.ts) for re-exports
  4. If shape differs from plan: create a FIX-AT-WRITE entry with the real shape
  5. If symbol not found at all: STOP — do not write the test, report to Luba
  6. Complete the full verification table before writing the first line of test code

XIIGen Discovery History

SessionWF FixesTypeRoot Cause
S2 WF-1useFlowDefinition initial stateAPI assumptionPlan assumed eager load
S2 WF-2useModelPerformance import pathAPI assumptionWrong file extension
S3 WF-2getQueueDepth sync vs asyncAPI assumptionPlan assumed async
S3 WF-3ElasticsearchProvider constructorAPI assumptionWrong second arg type
S3 WF-5dequeue second param typeAPI assumptionPlan used string not number
S3 WF-6getSecret return envelopeAPI assumptionPlan accessed wrong field

All 6 were API shape discoveries. This skill would have caught them at G0.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.