Skip to content

[Feature]: Add Static Site Detection to faf auto - Currently Misidentifies as Libraries #53

@Wolfe-Jam

Description

@Wolfe-Jam

Problem Statement

I run bunx faf in a static website directory and FAF incorrectly
detects it as a "library" with "Unknown" language. This happened
while creating skills.faf.one (similar to foundation.faf.one).

Current behavior:

  • Directory contains: index.html, package.json, CSS/JS files
  • FAF detects: type: library, main_language: Unknown
  • Score stuck at 11% requiring manual intervention

Real example:

mkdir faf-skills-site && cd faf-skills-site
echo "<!DOCTYPE html>..." > index.html
bunx faf
# Result: type: library, main_language: Unknown

This breaks the "7-letter magic" promise because users must manually
 correct basic detection errors through faf go.

Impact: Affects all static sites including documentation sites,
portfolios, landing pages, and FAF's own ecosystem sites.

### Proposed Solution

**Add static site detection logic:**

1. **Detect HTML entry points:**
```javascript
if (exists('index.html') || exists('index.htm')) {
  return {
    type: 'website',
    main_language: 'html',
    stack: {
      frontend: 'vanilla-html',
      backend: 'static',
      runtime: 'browser'
    }
  };
}

2. Add new project types:
- static-site - Plain HTML/CSS/JS
- static-generated - Built with SSG (Jekyll, Hugo, etc.)
- docs-site - Documentation focus

3. Fix stack defaults for static sites:
- Don't use "slotignored" for obvious web fields
- Auto-detect: vanilla-html, vanilla-css, vanilla-js
- Set backend: 'static' not 'slotignored'

Expected behavior after fix:
bunx faf  # in static site directory
# Result: type: website, main_language: html ✅
# Score: Much higher than 11% ✅

This would make FAF properly recognize the large number of static
websites without manual correction.


### Alternatives Considered

_No response_

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions