12-Factor App Compliance Analysis
You are performing a comprehensive compliance analysis against the 12-Factor App methodology for building SaaS applications.
Use the 12-factor-apps skill to guide this analysis.
Target Codebase
Path: $ARGUMENTS (default: current working directory)
Analysis Scope
Evaluate all 12 factors:
- 1. Codebase - One codebase tracked in revision control, many deploys
- Dependencies - Explicitly declare and isolate dependencies
- Config - Store config in the environment
- Backing Services - Treat backing services as attached resources
- Build, Release, Run - Strictly separate build and run stages
- Processes - Execute the app as one or more stateless processes
- Port Binding - Export services via port binding
- Concurrency - Scale out via the process model
- Disposability - Maximize robustness with fast startup and graceful shutdown
- Dev/Prod Parity - Keep development, staging, and production as similar as possible
- Logs - Treat logs as event streams
- Admin Processes - Run admin/management tasks as one-off processes
Workflow
- 1. Use the skill - Read the
12-factor-apps skill for search patterns - Run searches - Use grep patterns from the skill for each factor
- Evaluate compliance - Strong/Partial/Weak per factor
- Document evidence - File:line references for findings
- Identify gaps - What's missing vs. 12-Factor ideal
- Provide recommendations - Actionable improvements
Output Format
Executive Summary
| Factor | Status | Key Finding |
|---|
| I. Codebase | Strong/Partial/Weak | [Summary] |
| II. Dependencies |
Strong/Partial/Weak | [Summary] |
| ... | ... | ... |
Overall: X Strong, Y Partial, Z Weak
Detailed Findings
For each factor with gaps:
- - Current State: What exists
- Evidence: File:line references
- Gap: What's missing
- Recommendation: How to improve
Priority Recommendations
- 1. High Priority - Critical gaps affecting scalability/reliability
- Medium Priority - Improvements for better compliance
- Low Priority - Nice-to-have optimizations
Rules
- - Use the skill's search patterns systematically
- Provide file:line evidence for all findings
- Be honest about compliance levels (don't inflate)
- Focus on actionable recommendations
- Reference the official 12-Factor App methodology
12要素应用合规性分析
您正在根据12要素应用方法论对SaaS应用的构建进行全面的合规性分析。
使用12-factor-apps技能指导本次分析。
目标代码库
路径: $ARGUMENTS(默认:当前工作目录)
分析范围
评估全部12个要素:
- 1. 代码库 - 一个代码库在版本控制中追踪,多个部署
- 依赖关系 - 显式声明并隔离依赖关系
- 配置 - 将配置存储在环境中
- 后端服务 - 将后端服务视为附加资源
- 构建、发布、运行 - 严格分离构建和运行阶段
- 进程 - 以一个或多个无状态进程执行应用
- 端口绑定 - 通过端口绑定导出服务
- 并发 - 通过进程模型进行水平扩展
- 易处理性 - 通过快速启动和优雅关闭最大化健壮性
- 开发/生产环境一致性 - 尽可能保持开发、预发布和生产环境相似
- 日志 - 将日志视为事件流
- 管理进程 - 将管理/维护任务作为一次性进程运行
工作流程
- 1. 使用技能 - 阅读12-factor-apps技能以获取搜索模式
- 执行搜索 - 使用技能中每个要素的grep模式
- 评估合规性 - 每个要素分为强/部分/弱
- 记录证据 - 发现结果的文件:行引用
- 识别差距 - 与12要素理想状态的缺失项
- 提供建议 - 可操作的改进方案
输出格式
执行摘要
| 要素 | 状态 | 关键发现 |
|---|
| I. 代码库 | 强/部分/弱 | [摘要] |
| II. 依赖关系 |
强/部分/弱 | [摘要] |
| ... | ... | ... |
总体: X个强,Y个部分,Z个弱
详细发现
针对每个存在差距的要素:
- - 当前状态: 现有情况
- 证据: 文件:行引用
- 差距: 缺失内容
- 建议: 改进方法
优先级建议
- 1. 高优先级 - 影响可扩展性/可靠性的关键差距
- 中优先级 - 提升合规性的改进方案
- 低优先级 - 锦上添花的优化项
规则
- - 系统性地使用技能的搜索模式
- 为所有发现结果提供文件:行证据
- 诚实地评估合规性等级(不夸大)
- 聚焦可操作的建议
- 参考官方12要素应用方法论