mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
feat(capture): write AGENTS.md alongside CLAUDE.md + skill refinements from regression tests
Capture pipeline:
- agentPromptGenerator now writes AGENTS.md + CLAUDE.md (drop legacy
.cursorrules), matching the dual-file convention already used by the
_shared templates in hyperframes init. AGENTS.md is picked up natively by
Cursor, Codex, Gemini CLI, Windsurf, Aider, and Jules; CLAUDE.md covers
Claude Code. Both files share the same content — a capture data inventory
that points agents to the website-to-hyperframes skill.
website-to-hyperframes skill refinements (derived from 8-site regression test):
- Drop slash-command phrasing throughout SKILL.md and step-6-build.md so the
skill works identically across Claude Code (slash), Cursor (auto-discover
by description), and other agents.
- Remove stale HANDOFF.md references from SKILL.md step-7 summary and
reference table — matches the intent of the prior step-7 cleanup.
- step-5-vo: specify narration.txt filename convention (pronunciation-
substituted spoken text; distinct from SCRIPT.md the creative doc).
- step-6 self-review adds three rules derived from actual lint warnings
observed across the 8 regression runs:
- Every <template> root needs data-start + data-duration (catches
root_composition_missing_data_start/duration, seen in 4/8 runs).
- Caption exits need a hard tl.set kill after tl.to(opacity:0), or
per-word karaoke tweens can leave captions stuck on screen
(caption_exit_missing_hard_kill).
- No duplicate media nodes with identical src + start + duration, or
the compiler discovers them twice (duplicate_media_discovery_risk).
Housekeeping:
- .gitignore: add cursor-tests/, basecamp-video/, projects/, videos/ —
local regression-test scratch dirs that should never be committed.
- Remove two broken symlinks from .claude/skills/ that pointed to paths
which never existed in the repo (.claude/skills/ is already gitignored).
Made-with: Cursor
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
/**
|
||||
* Generate CLAUDE.md (and .cursorrules) for captured website projects.
|
||||
* Generate AGENTS.md and CLAUDE.md for captured website projects.
|
||||
*
|
||||
* Writes the same content to both filenames so any AI agent auto-discovers it:
|
||||
* - AGENTS.md — universal convention (Cursor, Codex, Gemini CLI, Windsurf, Aider, Jules)
|
||||
* - CLAUDE.md — Claude Code convention
|
||||
*
|
||||
* This file generates a DATA INVENTORY that tells the AI agent what files
|
||||
* exist and what they contain. The actual workflow lives in the
|
||||
* /website-to-hyperframes skill — this file points agents there.
|
||||
* website-to-hyperframes skill — this file points agents there.
|
||||
*/
|
||||
|
||||
import { writeFileSync } from "node:fs";
|
||||
@@ -32,8 +36,8 @@ export function generateAgentPrompt(
|
||||
hasShaders,
|
||||
detectedLibraries,
|
||||
);
|
||||
writeFileSync(join(outputDir, "AGENTS.md"), prompt, "utf-8");
|
||||
writeFileSync(join(outputDir, "CLAUDE.md"), prompt, "utf-8");
|
||||
writeFileSync(join(outputDir, ".cursorrules"), prompt, "utf-8");
|
||||
}
|
||||
|
||||
function buildPrompt(
|
||||
@@ -104,7 +108,7 @@ function buildPrompt(
|
||||
|
||||
Source: ${url}
|
||||
|
||||
To create a video from this capture, use the \`/website-to-hyperframes\` skill.
|
||||
To create a video from this capture, use the \`website-to-hyperframes\` skill.
|
||||
|
||||
## What's in This Capture
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Project scaffolding helpers for the website capture pipeline.
|
||||
*
|
||||
* Handles .env file loading and HyperFrames project scaffold generation
|
||||
* (index.html, meta.json, CLAUDE.md).
|
||||
* (index.html, meta.json, AGENTS.md, CLAUDE.md).
|
||||
*/
|
||||
|
||||
import { existsSync, writeFileSync, readFileSync } from "node:fs";
|
||||
@@ -44,10 +44,10 @@ export function loadEnvFile(startDir: string): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the project scaffold files: index.html, meta.json, and CLAUDE.md.
|
||||
* Generate the project scaffold files: index.html, meta.json, AGENTS.md, CLAUDE.md.
|
||||
*
|
||||
* Only creates files that don't already exist (index.html, meta.json).
|
||||
* Always generates CLAUDE.md via agentPromptGenerator.
|
||||
* Always (re)generates AGENTS.md + CLAUDE.md via agentPromptGenerator.
|
||||
*/
|
||||
export async function generateProjectScaffold(
|
||||
outputDir: string,
|
||||
@@ -78,7 +78,7 @@ export async function generateProjectScaffold(
|
||||
);
|
||||
}
|
||||
|
||||
// Generate CLAUDE.md + .cursorrules (AI agent instructions — always, regardless of API keys)
|
||||
// Generate AGENTS.md + CLAUDE.md (AI agent instructions — always, regardless of API keys)
|
||||
try {
|
||||
const { generateAgentPrompt } = await import("./agentPromptGenerator.js");
|
||||
generateAgentPrompt(
|
||||
@@ -92,8 +92,8 @@ export async function generateProjectScaffold(
|
||||
catalogedAssets,
|
||||
detectedLibraries,
|
||||
);
|
||||
progress("agent", "CLAUDE.md generated");
|
||||
progress("agent", "AGENTS.md + CLAUDE.md generated");
|
||||
} catch (err) {
|
||||
warnings.push(`CLAUDE.md generation failed: ${err}`);
|
||||
warnings.push(`AGENTS.md/CLAUDE.md generation failed: ${err}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user