بنقرة واحدة
deploy-pipeline
Full production deployment pipeline for AlloFlow — push, build, stamp, deploy, verify
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Full production deployment pipeline for AlloFlow — push, build, stamp, deploy, verify
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Development patterns for the AlloFlow monolith (AlloFlowANTI.txt) - auditing, refactoring, feature addition, debugging, and safe editing of the ~29K-line single-file React application
Safe editing and deployment of the CDN-loaded JavaScript feature modules (stem_lab, word_sounds, behavior_lens, report_writer, and ~250 others)
How to extract a React component from AlloFlowANTI.txt into a standalone CDN-loaded module — JSX transpilation, dependency injection, IIFE wrapping, and registration
Safe editing and validation of ui_strings.js — prevents JSON parse errors, verifies key coverage, handles nested section structure
How to safely extract an inline STEM Lab tool from stem_lab_module.js into a standalone plugin file using window.StemLab.registerTool
| name | deploy-pipeline |
| description | Full production deployment pipeline for AlloFlow — push, build, stamp, deploy, verify |
./deploy.shThe supported, one-shot deploy is the repo-root script:
./deploy.sh "commit message"
It runs a 10-step pipeline: a pre-flight render gate (Step 0.6 — runs
check_render_refs, check_keyless_map, check_stem_render, check_sel_render,
check_module_render, check_aria_handler; the same blockers as
npm run verify:gate), then commit → push → build.js --mode=prod --force →
mirror link files → npm run build (prismflow-deploy) → stamp SW →
firebase deploy → Codeberg mirror → post-deploy verification against
Firebase (prismflow-911fe.web.app) and the Cloudflare CDN
(alloflow-cdn.pages.dev).
Run npm run verify:gate yourself first if you want to catch render-crash
regressions before committing. The manual steps below are the fallback.
# Full deploy from scratch (from repo root):
git push origin main
node build.js --mode=prod
cd prismflow-deploy
npm run build
node -e "const fs=require('fs');const ts=Date.now();const f='build/sw.js';let c=fs.readFileSync(f,'utf-8');c=c.replace('__BUILD_TS__',String(ts));fs.writeFileSync(f,c,'utf-8');console.log('SW stamped:',ts)"
npx firebase deploy --only hosting
git add -A
git commit -m "description"
git push origin main
Verify: git log --oneline -1 shows your commit on origin/main
node build.js --mode=prod
What it does:
AlloFlowANTI.txt (the source of truth)prismflow-deploy/src/App.jsx, rewriting pluginCdnBase + module URLs
to the hashless Cloudflare base (alloflow-cdn.pages.dev/<file>) and stamping
a ?v=<short-hash> cache-busterVerify: Output shows Auto-detected git hash: {HASH} matching your latest commit
cd prismflow-deploy
npm run build
Verify: Exit code 0, no compilation errors
node -e "const fs=require('fs');const ts=Date.now();const f='build/sw.js';let c=fs.readFileSync(f,'utf-8');c=c.replace('__BUILD_TS__',String(ts));fs.writeFileSync(f,c,'utf-8');console.log('SW stamped:',ts)"
Why: Forces client browsers to invalidate their SW cache and fetch new assets.
npx firebase deploy --only hosting
Verify: Output shows ✓ Deploy complete! with hosting URL
[AlloFlow] UI_STRINGS loaded: X top-level keys[CDN] <Name> logs and confirm window.AlloModules.<Name>
is defined for the modules you touched?v=<short-hash> on CDN URLs matches your push (deploy.sh Step 10
does this automatically)| Error | Fix |
|---|---|
build.js can't find AlloFlowANTI.txt | Run from repo root |
npm run build fails with compilation error | Fix the error in AlloFlowANTI.txt, re-run build.js |
| Firebase deploy fails with auth error | Run npx firebase login |
SW stamp fails (__BUILD_TS__ not found) | The build already ran once — rebuild first |
| CDN shows stale content after deploy | Cloudflare Pages rebuilds async (~1-2 min) on push to main; hard-refresh and confirm the ?v= hash matches HEAD |
AlloFlowANTI.txt → everything flows from thisprismflow-deploy/src/App.jsx directly — it's generatedalloflow-cdn.pages.dev); pushing to main triggers a
Cloudflare rebuild (~1-2 min). A ?v=<short-hash> query param busts caches.main