Adopt the agents/ architecture proven on medellin.co (reference impl): - Move the content engine to a top-level agents/ dir: orchestrators, prompts, config, run.sh, admin console, shared libs. All content-pipeline literals repointed (config paths, scripts, admin, LLM-facing prompts/image.md string, configure.mjs, new-site.sh, astroagent tokenFile, .gitignore runtime block). - Every script carries a parseable @agent-manifest header: name, title, class (content|operational|runtime|plumbing), trigger, model, prompts, skills (MCP), tools, reads/writes tables. 5 content agents + 3 plumbing scripts. - New agents/catalog.mjs generates the catalog from the headers: agents/AGENTS.md (human, grouped by class) + agents/agents.json (machine manifest — a clone diffs it against a source to find missing tools/tables/MCP before running). configure.mjs regenerates the catalog on every identity stamp. No DB table, no watcher. - config.json gains paths.stateDir/newsDir; publish-tick, write-daily, and news-radar read them instead of hardcoding. - Full cut: content-pipeline/ deleted (the seed has no live crons, so no hybrid period needed). Docs updated (AGENTS.md structure + pipeline section, README paths). Clones migrating from content-pipeline/: see medellin.co's .memory/handoffs/agents-directory-migration.md for the cutover playbook (one cron set active at a time; migrate drafts/state after repointing cron). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FMQeUnUrAeexcZ7P2Hxa6G
6.1 KiB
AGENTS.md — SeedProject base
This repository is a cloneable website foundation (the "SeedProject base"). If you are reading this, someone cloned it to build a new site. Your job on a fresh clone is to configure it for this specific site, then build it.
First run — set up this clone
-
Configure identity (interactive):
./scripts/new-site.shIt prompts for the site name, URL, description, author, etc., writes them to
site.config.json, and stamps them across every engine. Non-interactive alternative (use this if you are an autonomous agent — the script above prompts and will block): editsite.config.jsonby hand, then runnode scripts/configure.mjs. -
Build the frontend:
cd app && npm install && npm run build # outputs to ../public -
(Optional) set up the backend — see Backend.
That is the entire "spin up a new site" flow. Everything below is context for working on the site afterward.
The golden rule: one identity source
site.config.json (repo root) is the single source of truth for site identity —
name, URL, description, tagline, author, social, topic, audience, timezone.
- Never hardcode the site name, URL, author, or niche in components, pages, or engine configs.
- To change identity: edit
site.config.json, then runnode scripts/configure.mjs. That regeneratesapp/src/config/site.json(the theme reads it) and updatesagents/config.jsonandastroagent.config.json. - In the Astro theme, read identity from
SITE,authors, etc. exported byapp/src/lib/blog-data.js(which importsapp/src/config/site.json).
Structure
| Path | What it is |
|---|---|
site.config.json |
The one file you edit — site identity |
scripts/new-site.sh |
Fresh-clone setup (prompts → configure) |
scripts/configure.mjs |
Stamp site.config.json into every engine |
app/ |
Astro frontend ("theme"). Build → ../public. See app/AGENTS.md for coding standards. |
api/ |
SeedProject PHP backend, served at /api (see below) |
agents/ |
LLM agents: orchestrators + prompts + config. Catalog: agents/AGENTS.md (generated) |
public/ |
Build output (git-ignored) |
Backend (api/)
The PHP backend is served at /api on the same domain; the static frontend calls it
same-origin (fetch("/api/...")). Setup:
cd api && composer install
php console app:install --db-host=localhost --db-name=NAME --db-user=USER --db-pass=PASS \
--url=<site-url> --name="<Site Name>"
php console db:migrate --status
php console app:installwritesapi/config.php(git-ignored), imports the schema, and runs migrations.- Endpoints:
GET /api/health(public),GET /api/admin/ping(bearerADMIN_TOKEN). - New schema: add
api/db/migrations/NNN_name.sql, apply withphp console db:migrate. - Web-server setup (aliasing
/api→api/with PHP-FPM + front-controller rewrite): seeapi/.memory/foundation.md.
Content pipeline & authoring
agents/runs the autonomous content system. Each agent script carries an@agent-manifestheader (class, trigger, model, prompts, skills, tools, tables);node agents/catalog.mjsregenerates the catalog (agents/AGENTS.md+agents/agents.json— the machine manifest a clone can diff to find missing deps).configure.mjsstamps the site name/topic/audience/author intoagents/config.jsonand regenerates the catalog; runtime state (drafts/,state/,logs/) is git-ignored and regenerates per site.- ⚠️ NOT yet niche-generic — do not trust the pipeline output as-is. The prompts and
some scripts (
agents/prompts/*.system.md,agents/scripts/*.mjs) still contain wording from the original site (a Medellín restaurant publication) and do not read the niche from config. Running the pipeline before genericizing it will produce off-niche content. Fix: make those files readconfig.site.{name,topic,audience}. See Status & known gaps. - astroagent is the in-site authoring console; its identity is in
astroagent.config.json. - To add a post by hand: create
app/src/content/blog/<slug>/index.mdxfollowing the schema inapp/src/content.config.js(copy the samplewelcomepost as a template).
Local development
- Frontend:
cd app && npm run dev(Astro dev server) — enough for theme/content work. - The
/apibackend does NOT work underastro dev. It needs a real web server (Apache/nginx + PHP-FPM) with/apialiased toapi/, plusphp console app:install. The/api-health-testpage therefore only returns data on a deployed instance, not in dev.
Status & known gaps
Read this before relying on any subsystem:
- ✅ Frontend theme — fully config-driven;
npm run buildproduces a clean site. - ✅ Setup —
new-site.sh/configure.mjswork. - ⚠️
/apiFoundation — code is written and code-verified (composer,php console, autoload, graceful CLI failures), but the live DB + HTTP round-trip is UNVERIFIED (never run on a served instance with a real database). - ⚠️ Content pipeline — prompts/scripts are still niche-specific (Medellín
restaurants) AND the whole pipeline is JSON-file-based (
config.json,calendar.json, the*-queue/*-scanfiles,state/,drafts/). It is slated for a DB-managed rewrite (that state moves into MySQL via the/apibackend). Do NOT invest in genericizing the current JSON pipeline — genericize the prompts as part of the DB rewrite. Treat the pipeline as niche-specific placeholder scaffolding until then.
Guardrails
- Never commit secrets.
**/.env,api/config.php,api/system/.installedare git-ignored — keep it that way. Dependencies (node_modules/,api/vendor/) and build output (public/) are git-ignored too and are installed/generated per clone. - Keep the theme reusable and identity config-driven (see the golden rule).
- Verify any change still builds:
cd app && npm run build.
More
- Human quick-start:
README.md - Backend design + implementation plan:
api/.memory/foundation.md,api/.memory/foundation-plan.md