fcode-code-validation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFactorial Code — App validation
Factorial Code — 应用验证
A pre-flight for the platform's own release validation (its criteria are in
references/journey.md §8), run locally before the release is
requested, adding the review dimensions a human gatekeeper would: forms and
lifecycle, i18n, logging hygiene, security, email abuse.
fcode-amaIt serves two audiences with the same procedure: an app developer
self-checking before requesting a release, and a platform reviewer gating
one. Either way the input is a workspace ("team") slug and the output is
in the cloned workspace plus a ✅/❌ verdict in
chat.
APP_VALIDATION_REPORT.mdThis skill owns only the procedure, the check catalog, the severities, and
the report format. Every rule it checks is owned by another skill and
cited on the catalog row — read the owner when a finding needs context.
平台自身发布验证的预检流程(其标准见
references/journey.md §8),在请求发布前于本地运行,
并加入人工审核者会关注的审查维度:表单与生命周期、i18n、日志规范、
安全性、邮件滥用。
fcode-ama它面向两类受众,并采用同一套流程:请求发布前进行自检的应用开发者,
以及为发布把关的平台审核者。无论哪种情况,输入都是工作区("team")slug,输出都是
克隆工作区中的 ,并在
聊天中给出 ✅/❌ 结论。
APP_VALIDATION_REPORT.md本 skill 仅负责流程、检查清单、严重级别和报告格式。它检查的每一条规则均由其他 skill 负责,
并在检查清单的对应条目中注明——当某项发现需要更多上下文时,
应阅读负责该规则的 skill。
Gotchas
易错点
- This review is read-only. The only permitted writes are the clone
itself and . Never
APP_VALIDATION_REPORT.md, neverfcode push, never--force/settings:versions:create, never edit workspace files, neversettings:aliases:setthe report.fcode add - Never during the review. Processes may call real APIs with credentials inherited from parent workspaces (
fcode run). This is a static review of code and config.fcode-core-concepts - The clone slug is an encoded token, not the app's UUID from the browser URL — copy it from the app's "How to build locally" guide on its Development tab (see
dev-…). A UUID-shaped slug will not clone.fcode-cli - Any Blocker → ❌. Warnings and Suggestions never flip the verdict.
- Ambiguity blocks the review. If the user names a development team
with several apps, or it's unclear which workspace (/
dev-/deploy-) to review, list the candidates and ask before cloning.prod-is the normal review target.dev- - placeholders in pulled variables are normal — a masked secret is never a finding, and the review never needs real secret values. Never ask for them.
******** - A failing usually means UUID confusion or missing access — point at the access flow in
fcode clone; don't retry blindly.fcode-ama - A mixed JS/Python workspace is fine — review each process with its own language's rules and note the mix in the report header.
- Review only what the workspace owns. Inherited resources — modules,
processes, and variables from parents,
parentTeams,variables.inherited.env— were already validated when their owning workspace was published. Don't audit their content; findings may only concern how this workspace uses them.i18n/<locale>.inherited.yaml
- 本次审查为只读。 唯一允许的写入操作是创建克隆以及写入
。绝不执行
APP_VALIDATION_REPORT.md,绝不执行fcode push,绝不执行--force/settings:versions:create,绝不编辑 工作区文件,也绝不对报告执行settings:aliases:set。fcode add - 审查期间绝不执行 。 进程可能会使用从父工作区继承的凭据调用真实 API (
fcode run)。这是对代码和配置的静态审查。fcode-core-concepts - 克隆所用的 slug 是编码后的 token,而不是浏览器 URL 中该应用的 UUID—— 应从应用 Development 选项卡中的 "How to build locally" 指南复制(见
dev-…)。 形似 UUID 的 slug 将无法完成克隆。fcode-cli - 只要出现一个 Blocker,结论即为 ❌。 Warning 和 Suggestion 永远不会改变结论。
- 存在歧义会阻塞审查。 如果用户指定了一个包含多个应用的开发团队,或不清楚要审查
哪个工作区(/
dev-/deploy-),应列出候选项并在克隆前询问。prod-是 常规审查目标。dev- - 拉取到的变量中出现 占位符属于正常情况——被遮蔽的 secret 绝不应作为发现项,审查过程也永远不需要真实的 secret 值。 绝不向用户索要这些值。
******** - 失败通常意味着混淆了 UUID 或缺少访问权限——应指向
fcode clone中的访问流程;不要盲目重试。fcode-ama - 混合使用 JS/Python 的工作区没有问题——应依据每种语言各自的规则审查每个进程, 并在报告标头中注明这种混合情况。
- 仅审查工作区自身拥有的内容。 继承的资源——来自 父级的模块、 进程和变量,以及
parentTeams、variables.inherited.env——已在其所属工作区发布时完成验证。 不要审计其内容;发现项只能涉及 此工作区如何使用这些资源。i18n/<locale>.inherited.yaml
Severity model
严重级别模型
| Severity | Meaning | Effect on verdict |
|---|---|---|
| Blocker | Breaks at runtime, mishandles credentials, exposes the platform's mail domain to abuse, or fails a criterion the platform release gate checks | Any one → ❌ |
| Warning | Violates a documented rule; expect reviewer pushback or future breakage | Advisory |
| Suggestion | Improvement aligned with platform conventions | Advisory |
| 严重级别 | 含义 | 对结论的影响 |
|---|---|---|
| Blocker | 导致运行时故障、不当处理凭据、造成平台邮件域名可被滥用,或未满足平台发布门禁检查的标准 | 任意一个 → ❌ |
| Warning | 违反已记录的规则;预计审核者会提出异议,或未来可能发生故障 | 仅供建议 |
| Suggestion | 与平台惯例一致的改进项 | 仅供建议 |
Procedure
流程
- Resolve the workspace. Confirm the slug is the encoded token (see Gotchas) and which workspace kind it is; disambiguate with the user when needed. Record the kind in the report header.
- Acquire. Missing CLI: ask the user, then
— the one permitted install. Fresh copy:
pnpm install -g @factorialco/fcode-cli. Already cloned:fcode clone <workspace-slug> --skipSkillsSetup; on divergence neverfcode pull— ask whether to review the local state as-is and record the answer in the report header.--force - Inventory (read-only). Detect the language per process (vs
index.js). List processes, modules,main.pys, and webhook/form settings from eachappRole; readprocesses/<slug>/metadata.json, the three variables files,settings.json, andvariables.meta.json. Runi18n/,fcode status,fcode variables:status, andfcode settings:status. Separate owned from inherited as you go — the catalog applies to owned resources only (see Gotchas).fcode i18n:status - Run the check catalog. Read and evaluate every check against the inventory, recording
references/checks.mdevidence. Whether step 2 was a fresh clone or a pre-existing local workspace decides if the STRUCT layout checks run fully or are marked "N/A — fresh clone".file:line - Classify. Apply each catalog row's severity; deviate only where the row allows it, and say why in the finding.
- Write the report to following
<workspace>/APP_VALIDATION_REPORT.md, overwriting any previous run.references/report-template.md - Print the verdict in chat: the ✅/❌ line, per-severity counts, and the Blocker titles.
- 确定工作区。 确认 slug 是编码后的 token(见 "易错点"),并确认工作区类型;如有需要,向用户澄清。将类型记录在报告标头中。
- 获取工作区。 缺少 CLI:先询问用户,然后
——这是唯一允许的安装操作。 全新副本:
pnpm install -g @factorialco/fcode-cli。已克隆:fcode clone <workspace-slug> --skipSkillsSetup;如出现分歧,绝不使用fcode pull——应询问用户是否按当前本地状态进行审查, 并将答复记录在报告标头中。--force - 盘点(只读)。根据每个进程检测语言(对比
index.js)。从每个main.py列出进程、模块、processes/<slug>/metadata.json以及 webhook/form 设置;读取appRole、 三个变量文件、settings.json和variables.meta.json。运行i18n/、fcode status、fcode variables:status和fcode settings:status。 在此过程中区分自有资源与继承资源——检查清单 仅适用于自有资源(见"易错点")。fcode i18n:status - 运行检查清单。 读取 ,根据盘点结果评估 每项检查,并记录
references/checks.md证据。 第 2 步获取的是全新克隆还是预先存在的本地工作区,决定 STRUCT 布局检查是 完整运行还是标记为 "N/A — fresh clone"。file:line - 分类。 应用每个检查清单条目指定的严重级别;仅在该条目明确允许时偏离, 并在发现项中说明原因。
- 编写报告,写入 ,遵循
<workspace>/APP_VALIDATION_REPORT.md,覆盖上一次运行生成的报告。references/report-template.md - 在聊天中打印结论:✅/❌ 行、各严重级别的数量以及 Blocker 标题。
Check categories
检查类别
STRUCTLANGFORMI18NSECMAILREUSELOGLIFERELreferences/checks.mdSTRUCTLANGFORMI18NSECMAILREUSELOGLIFERELreferences/checks.md