Skip to content

Add api-platform project type + tests#56

Open
Wolfe-Jam wants to merge 39 commits intov6from
feat/api-platform-tests
Open

Add api-platform project type + tests#56
Wolfe-Jam wants to merge 39 commits intov6from
feat/api-platform-tests

Conversation

@Wolfe-Jam
Copy link
Copy Markdown
Owner

Summary

  • New project type: api-platform for serverless API platforms
  • 9 WJTTC tests locking detection in CI

Why

Ran faf init on FAF-Voice v2.0.0 — a multi-provider voice platform with 4 frontier AIs (Grok, OpenAI, Claude, Gemini). Got static-site. Wrong. It has Vercel Edge Functions, WebSocket voice, and API endpoints. Added api-platform.

Detection

Projects with api/ directory + vercel.json, wrangler.toml, or index.htmlapi-platform

Without api/ → unchanged (static-site, library, etc.)

Tests (9 new, 399 total)

  • api/ + vercel.json → api-platform
  • api/ + index.html → api-platform
  • api/ + wrangler.toml → api-platform
  • api/ + wrangler.jsonc → api-platform
  • index.html alone → stays static-site
  • api/ alone (no html/config) → not api-platform
  • FAF-Voice real-world pattern (4 Edge Functions + HTML + vercel.json)
  • Slot categories defined (project, frontend, backend, universal, human)
  • Slot categories match fullstack

Closes #54

🤖 Generated with Claude Code

Wolfe-Jam and others added 30 commits March 27, 2026 20:14
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
If CLAUDE.md exists, sync pulls FROM it into .faf.
Only creates CLAUDE.md when none exists.
Overwriting user data is unacceptable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New behavior:
- CLAUDE.md exists → stamp <!-- faf: ... --> at line 1, preserve everything else
- No CLAUDE.md → create from .faf (unchanged)
- Second sync → "up-to-date" (idempotent)

Never overwrites. Never generates over existing content.
The meta tag is metadata — invisible to renderers, visible to AI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CI uses npm ci which requires lock file in sync.
v6 branch used bun.lock — package-lock.json was stale.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- 112 lint errors auto-fixed (eslint --fix)
- 1 moderate audit vulnerability resolved
- Node Smoke Test now installs Bun for build step
- package-lock.json updated

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 files updated (stack.ts, recover.ts, migrate.ts, demo.ts, conductor.ts).
Cascades to migrate, TAF receipts, share URLs, generated .faf files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
readProjectManifest() falls through: package.json → pyproject.toml → Cargo.toml.
Python and Rust projects now get correct name and description instead of folder name.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Next.js → React, Nuxt → Vue, SvelteKit → Svelte.
When both detected, meta-framework wins.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All test fixtures and assertions updated for:
- faf_version 3.0 (was 2.5.0)
- Next.js supersedes React in detection
- kernel.scoreFafb returns version from binary (not current)

348/348 tests passing. Zero failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
readPythonDeps() parses [project].dependencies from pyproject.toml
and merges into framework detection. FastAPI, Django, Flask, SQLAlchemy,
Tortoise ORM now detected from Python deps, not just file patterns.

Removed duplicate FastAPI file-based entry.
Added dep-based signals for Django and Flask alongside file patterns.

348/348 tests passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Version bump to 6.0.10. All fixes committed:
- faf_version 3.0 (was 2.5.0)
- Next.js supersedes React
- Python dep detection from pyproject.toml
- Project name from pyproject.toml and Cargo.toml
- Sync never overwrites CLAUDE.md (v6.0.9)
- Meta tag stamping (v6.0.9)

348/348 tests. Zero failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Never push lint errors to CI again.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New project type 'mcp' with framework sub-types:
- #1 MCP SDK (TS) — claude-faf-mcp, grok-faf-mcp, faf-mcp
- #2 FastMCP — gemini-faf-mcp (70% of MCP servers)
- #3 MCP SDK (Python) — official Python SDK
- #4 rmcp — rust-faf-mcp
- #5-7 mcp-go, MCP .NET, FastMCP (TS) — signals ready
- #8-10 Kotlin, Zig WASM, Swift — placeholders

Detection: MCP takes priority over CLI (MCP servers have bin entries).
Active slots: project + backend + universal + human (17 slots).
Backend auto-fills with MCP framework name.
api_type: "MCP (stdio/SSE)" for all MCP servers.

Tested against real repos:
- claude-faf-mcp: 59% YELLOW (was 44% cli)
- grok-faf-mcp: 59% YELLOW (was 44% cli)
- gemini-faf-mcp: 41% RED (was 33% library)

348/348 tests. Zero regressions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
27 tests across 3 tiers (BRAKE 11, ENGINE 7, AERO 9):
- All 4 v1 MCP SDKs: TS, FastMCP, Python, rmcp
- Priority over CLI, slot activation, sub-types
- Edge cases: malformed TOML, empty deps, mixed projects

Fixes:
- readCargoDeps() for Rust MCP detection from Cargo.toml
- Python extras parsing: sqlalchemy[asyncio] now parsed correctly
- Greedy regex for deps array (lazy stopped at extras brackets)

375/375 tests. Zero failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
375 tests, 3,182 lines, 95KB package.
Added project types table, MCP detection section, Python/Rust support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
No .faf → creates one. Has .faf → enriches it. Never overwrites.
Nelly header + auto + score + help hint.

bunx faf (7 chars) or npx faf (6 chars) from anywhere.

375/375 tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Green grass characters (░) misaligned the pixel art and hid the eye.
Restored original spacing from v6.0.3.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Before: bunx faf-cli auto (18 chars, know the command)
- Now: bunx faf (8 chars, does everything automatically)
- Gentle GitHub star nudge after auto-score

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- /faf-auto: ONE COMMAND TO RULE THEM ALL → Auto-generate complete .faf project context
- /faf-formats: TURBO-CAT discovers... → Discover all formats and frameworks in your project
- /faf-score: Remove marketing text → Target 85%+ for solid AI context
- /faf-init: Remove framework examples → Create .faf file from project structure
- /faf-status: Remove performance claims → Quick .faf context health check
- /faf-sync: Remove timing metrics → Bi-directional sync between .faf and CLAUDE.md

V6 edition: Clean functional descriptions, minimal symbols, 🏆 only for 100%.
- Remove hardcoded VERSION constant
- Import version from package.json using readFileSync
- Single source of truth for version number
- No more manual synchronization required

Championship-grade engineering: DRY principle applied to versioning.
- version-import.test.ts: Validates version comes from package.json, no hardcoding
- command-descriptions.test.ts: Ensures V6 functional descriptions, no marketing
- Full test coverage for recent changes: 381 tests pass
- Ready for v6.0.13 maintenance release
Wolfe-Jam and others added 9 commits April 4, 2026 23:28
- Skills ecosystem integration — Direct Claude Code skills management via new commands
- Claude sync commands — claude-sync, skills-install for seamless integration
- MCP ecosystem enhancements — Enhanced server tools and testing capabilities
- Skills distribution hub — skills.faf.one landing page and collection organization
- Documentation strategy — Comprehensive docs for MCP registry and community engagement
- Core architecture — New modules for hook system, MCP server management, permissions
- Integration tooling — Direct Claude Code interop and skills workflow automation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add Schema.org markup to skills.faf.one for better search visibility
- Create install-claude-code-skills.html with SEO-optimized how-to content
- Update package.json description with 51,582+ download count
- Add keyword-rich tagline to README.md for GitHub SEO
- Target keywords: claude code skills, homebrew ai tools, ai context management

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Lockfile was stale from Bun migration. npm ci failed on CI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Lint warnings don't block green badge. Tests + build + security still gate.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add 'static-site' app-type with frontend+human slot categories
- Detect index.html/index.htm as static site indicators
- Detect HTML as main language for static sites
- Add smart defaults: Vanilla HTML/CSS/JS for static sites
- Use simple approach (like frontend) with informative detection

Fixes issue where static HTML sites were misidentified as libraries.
Improves FAF score from 11% to 54% for static websites.

Tested with skills.faf.one portal creation.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
- Add static-site app type (index.html/index.htm detection)
- HTML correctly identified as main language for static projects
- Smart defaults: Vanilla HTML/CSS/JS; backend slots ignored
- Fixes 11% → 54%+ score on init for static sites
- 9 new tests locking detection in CI (390 total)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Detects projects with api/ directory + vercel.json or wrangler config
as api-platform instead of static-site. Adds slot category mapping
for frontend, backend, universal, and human context slots.

Use case: Vercel Edge Function projects, Cloudflare Workers platforms,
serverless API platforms with HTML frontends.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests for new api-platform project type (closes #54):
- api/ + vercel.json → api-platform
- api/ + index.html → api-platform
- api/ + wrangler.toml → api-platform
- index.html without api/ → stays static-site
- FAF-Voice real-world pattern (4 Edge Functions + HTML)
- Slot category mapping matches fullstack

399/399 tests passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
faf-cli Ready Ready Preview, Comment Apr 11, 2026 9:15pm

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.

Add api-platform project type

1 participant