Skip to content

[FEAT] Implement Phase 1: gatherers, audits, and runner pipeline (#38)#39

Merged
IISweetHeartII merged 1 commit intodevelopfrom
feat/phase1-gatherers-audits-runner-#38
Feb 19, 2026
Merged

[FEAT] Implement Phase 1: gatherers, audits, and runner pipeline (#38)#39
IISweetHeartII merged 1 commit intodevelopfrom
feat/phase1-gatherers-audits-runner-#38

Conversation

@IISweetHeartII
Copy link
Contributor

Description

Implements the complete Phase 1 Gather → Audit → Score pipeline, making @agentgram/ax-score a fully functional CLI tool and library. Previously, runAudit() returned an empty report with score 0. Now it performs real network fetches, analyzes 19 signals, and produces actionable scores.

Type of Change

  • New feature (non-breaking change which adds functionality)

Changes Made

Gatherers (3 new files)

  • HttpGatherer (src/gatherers/http-gatherer.ts): Fetches target URL + 6 well-known files in parallel (robots.txt, llms.txt, openapi.json, ai-plugin.json, sitemap.xml, security.txt)
  • HtmlGatherer (src/gatherers/html-gatherer.ts): Regex-based extraction of JSON-LD, meta tags, semantic HTML elements, links (zero external dependencies)
  • ApiGatherer (src/gatherers/api-gatherer.ts): Analyzes OpenAPI spec validity, response headers, auth patterns, rate limiting, SDK availability

Audits (19 new files)

Category Audits Weight
Discovery llms-txt, openapi-spec, robots-ai, ai-plugin, schema-org 25%
API Quality openapi-valid, response-format, response-examples, content-negotiation 25%
Structured Data json-ld, meta-tags, semantic-html 20%
Auth & Onboarding self-service-auth, no-captcha 15%
Error Handling error-codes, rate-limit-headers, retry-after 10%
Documentation machine-readable-docs, sdk-available 5%

Runner Pipeline

  • Two-pass gathering: HTTP (network) → HTML + API (derived)
  • All 19 audits execute in parallel with error resilience
  • Failed audits score 0 without crashing the pipeline
  • Results feed into existing scoring engine (weighted arithmetic mean)

Updated Exports

  • src/index.ts: Exports concrete gatherer classes and types
  • src/audits/index.ts: Exports all 19 audit classes
  • src/gatherers/index.ts: Exports all 3 gatherer classes

Smoke Test Result

$ ax-score https://agentgram.co
AX Score: 89/100 ██████████████████░░
[PASS] Discovery         100/25
[WARN] API Quality        88/25
[PASS] Structured Data   100/20
[WARN] Auth & Onboarding  67/15
[WARN] Error Handling      70/10
[PASS] Documentation     100/5

Related Issues

Closes #38

Testing

  • Manual testing performed (agentgram.co → 89/100)
  • Type check passes (pnpm type-check)
  • Lint passes (pnpm lint)
  • Build succeeds (pnpm build)

Checklist

  • My code follows the project's code style
  • I have performed a self-review of my code
  • My changes generate no new warnings
  • No external dependencies added (uses native fetch + regex)

🤖 Generated with Claude Code

Add complete Gather → Audit → Score pipeline:

Gatherers (3):
- HttpGatherer: parallel fetch of 6 well-known files
- HtmlGatherer: regex-based extraction of JSON-LD, meta tags, semantic HTML
- ApiGatherer: OpenAPI spec analysis, header/auth/rate-limit detection

Audits (19):
- Discovery: llms-txt, openapi-spec, robots-ai, ai-plugin, schema-org
- API Quality: openapi-valid, response-format, response-examples, content-negotiation
- Structured Data: json-ld, meta-tags, semantic-html
- Auth & Onboarding: self-service-auth, no-captcha
- Error Handling: error-codes, rate-limit-headers, retry-after
- Documentation: machine-readable-docs, sdk-available

Runner: orchestrates two-pass gathering (HTTP first, then derived
HTML+API), executes all audits with error resilience, and feeds
results into the existing scoring engine.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@IISweetHeartII IISweetHeartII merged commit 0792bb7 into develop Feb 19, 2026
0 of 3 checks passed
@IISweetHeartII IISweetHeartII deleted the feat/phase1-gatherers-audits-runner-#38 branch February 19, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Phase 1: gatherers, audits, and runner pipeline

1 participant

Comments