@elvis1513/auto-coding-skill 2.0.6 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,6 +30,16 @@
30
30
  - UI 组件应拆分为容器、状态/数据适配、纯展示组件;不要在单个页面里混合远程请求、权限、复杂计算和大段渲染。
31
31
  - 跨模块、跨层、数据库、API、部署、权限、并发、缓存、核心页面流的变更,需要最小设计;影响长期结构的决策需要 ADR。
32
32
 
33
+ ## 3.1 Import Boundary Rules
34
+
35
+ `structure.layer_rules` 会做轻量 import 边界检查。默认规则:
36
+
37
+ - Domain / Model 不依赖 Infrastructure、Repository、Client、Controller、Handler、Page、Component、View。
38
+ - Application / Service / Usecase 不依赖 Controller、Handler、Page、Component、View。
39
+ - Shared / Common / Utils / Lib 不依赖业务层、应用层、基础设施层或 UI 入口。
40
+
41
+ 项目可以按技术栈调整路径规则。调整规则时必须保持方向:内层业务规则不反向依赖外层技术细节。
42
+
33
43
  ## 4. 文件和函数规模
34
44
 
35
45
  默认阈值来自 `docs/ENGINEERING.md`:
@@ -65,3 +75,17 @@
65
75
  - P3 可选建议:命名、风格、进一步抽象、审美类优化。
66
76
 
67
77
  “优化完成”只表示当前约定范围闭环,不表示没有任何后续可优化点。新会话必须先读健康基线和 backlog,只报告新增、恶化、未记录 P0/P1,或需要升级优先级的已记录问题。
78
+
79
+ ## 7. Evidence And Gate Profile
80
+
81
+ - `docs/tasks/evidence.jsonl` 记录 doctor、classify、structure-check、light-gate、verify、closure 等结构化证据。
82
+ - `.local/auto-coding-skill/gate-profile.jsonl` 记录门禁命令耗时和失败率,用于优化小步快跑的 gate 范围。
83
+ - Markdown 记录面向人读,JSONL 记录面向工具复盘;两者不互相替代。
84
+
85
+ ## 8. Docs Ledger Health
86
+
87
+ - `docs/tasks/taskbook.md`、`docs/tasks/closure-log.md` 和顶层 `docs/design/T*.md` 是活跃工作账本,不是永久历史仓库。
88
+ - 超过 `docs.active_taskbook_max_lines`、`docs.active_closure_log_max_lines` 或 `docs.active_design_max_files` 后,必须把已关闭历史内容物理归档到 `docs.task_archive_dir` / `docs.design_archive_dir`。
89
+ - 归档必须先运行 `docs-ledger-archive --plan` 并确认只包含已关闭任务、无 active task 冲突的闭环记录和对应顶层 DD,再运行 `docs-ledger-archive --write`。补历史月份时才加 `--period 2026-06`。
90
+ - `docs.archive_index` 只能做导航和检索入口。只有索引、没有物理归档,仍然是不合格的账本瘦身。
91
+ - `doctor` 默认执行 `docs-ledger-check`。迁移期可以临时调高预算或关闭阻塞,但必须在 backlog 中记录恢复条件。
@@ -5,7 +5,7 @@
5
5
  ## 1. Deployment Context
6
6
  - Task ID:
7
7
  - Commit:
8
- - Jenkins Build:
8
+ - CI/Jenkins Build:
9
9
  - Target Env:
10
10
 
11
11
  ## 2. Verification
@@ -6,6 +6,6 @@
6
6
  - 需要额外审计证据的发布
7
7
 
8
8
  默认情况下:
9
- - 小改动直接走 Jenkins 自动构建与自动部署
9
+ - 小改动优先走项目已配置的 CI/Jenkins 自动构建与自动部署;未启用时以本地 gate 和 closure evidence 为准
10
10
  - 主要闭环证据写入 `docs/tasks/closure-log.md`
11
11
  - 只有需要更重的发布审计时,才补本目录文档
@@ -3,7 +3,7 @@
3
3
  > 仅在任务需要独立 review 记录时使用;不是每个小改动的默认强制文档。
4
4
 
5
5
  ## 1. 静态分析结果
6
- - Command:structure-check / light_gate / diff_check / verify_api_docs / verify_jenkins
6
+ - Command:structure-check / light_gate / diff_check / verify_api_docs / verify_jenkins / verify_jenkins_skipped
7
7
  - Summary:
8
8
  - Issues:
9
9
 
@@ -18,14 +18,16 @@
18
18
  ## 3. 本地轻量校验
19
19
  - light_gate or quick_test/test/build:
20
20
  - structure-check:
21
+ - gate-profile:`.local/auto-coding-skill/gate-profile.jsonl`
22
+ - evidence-log:`docs/tasks/evidence.jsonl`
21
23
  - api docs:
22
- - jenkins:
24
+ - ci/jenkins:
23
25
 
24
26
  ## 4. 按需本地运行验证(如果有)
25
27
  - runtime-up / health:
26
28
 
27
- ## 5. Jenkins 与目标环境
28
- - Jenkins readiness:
29
+ ## 5. CI/Jenkins 与目标环境
30
+ - CI/Jenkins readiness:
29
31
  - Target env verification:
30
32
 
31
33
  ## 6. 风险与结论
@@ -15,6 +15,7 @@
15
15
  | ID | Priority | Status | Scope | Item | Reason | Acceptance | Last reviewed |
16
16
  | --- | --- | --- | --- | --- | --- | --- | --- |
17
17
  | OPT-000 | P2 | open | `<path/module>` | | | | YYYY-MM-DD |
18
+ | LEDGER-000 | P2 | open | `docs/tasks`, `docs/design` | Archive active ledgers when they exceed `docs.active_*` budgets | Keeps project context searchable and prevents giant task/closure/DD files | `ap.py docs-ledger-archive --plan` reviewed, `--write` applied when safe, then `ap.py docs-ledger-check` passes | YYYY-MM-DD |
18
19
 
19
20
  ## Review Rules
20
21
 
@@ -15,6 +15,9 @@
15
15
  | Area | Current state | Accepted because | Review date |
16
16
  | --- | --- | --- | --- |
17
17
  | <module/path> | | | |
18
+ | `docs/tasks/taskbook.md` | active ledger, <= configured line budget | History is archived under `docs/tasks/archives/**` | YYYY-MM-DD |
19
+ | `docs/tasks/closure-log.md` | active closure ledger, <= configured line budget | History is archived under `docs/tasks/archives/**` | YYYY-MM-DD |
20
+ | `docs/design/` | active DDs only, <= configured file budget | Historical DDs are archived under `docs/archive/design/**` | YYYY-MM-DD |
18
21
 
19
22
  ## 2. Closed Optimization Scope
20
23
 
@@ -44,7 +47,7 @@
44
47
  An optimization task is complete when all are true:
45
48
 
46
49
  - The scoped P0/P1/P2 items listed for this task are closed.
47
- - Local gate passed, including structure check when enabled.
50
+ - Local gate passed, including docs ledger and structure checks when enabled.
48
51
  - No new unclassified P0/P1 was introduced.
49
52
  - Remaining P2/P3 items are either in `docs/reviews/optimization-backlog.md` or accepted debt above.
50
53
  - Review output says explicitly whether the project meets this baseline.
@@ -2,9 +2,9 @@
2
2
 
3
3
  规则:
4
4
  1) 每个任务完成后,至少追加一条闭环记录
5
- 2) `dev` 模式记录开发闭环:轻量门禁通过、已提交推送、Jenkins 已由 push 触发但不等待验证
6
- 3) `verify` 模式记录完整闭环:真实提交、Jenkins 构建、目标环境验证结果
7
- 4) Jenkins 失败后再修复的任务,应补充失败原因和修复提交
5
+ 2) `dev` 模式记录开发闭环:轻量门禁通过、已提交推送,CI/Jenkins/目标环境默认不等待验证
6
+ 3) `verify` 模式记录完整闭环:真实提交、已启用的 CI/Jenkins 构建、已启用的目标环境验证结果
7
+ 4) CI/Jenkins 失败后再修复的任务,应补充失败原因和修复提交
8
8
  5) 这里是默认闭环文档;长 summary 只用于高风险或复盘任务
9
9
 
10
10
  ---
@@ -12,13 +12,14 @@
12
12
  ## <TASK_ID> — <Title> — YYYY-MM-DD HH:MM
13
13
  - Task: <TASK_ID>
14
14
  - Commit: <commit sha>
15
- - Jenkins Build: <build url>
16
- - Target Env: <env name / health url / page path>
15
+ - CI/Jenkins Build: <build url or skipped by verification.jenkins_required=false>
16
+ - Target Env: <env name / health url / page path or skipped by verification.target_env_required=false>
17
17
  - Verification: <health / key api / key page / business path>
18
18
  - Structure Check: <passed / blocked / skipped with reason>
19
+ - Evidence Log: `docs/tasks/evidence.jsonl`
19
20
  - Result: DEV-CLOSED / PASS / FAIL / PARTIAL
20
21
  - Follow-up: <none or todo>
21
- - Jenkins Failure: <optional>
22
+ - CI/Jenkins Failure: <optional>
22
23
  - Fix Commit: <optional>
23
24
 
24
25
  ---
@@ -19,9 +19,11 @@
19
19
  - 兼容性影响:
20
20
 
21
21
  ## 3. 质量证据
22
- - 本地轻量校验:light_gate or quick_test/test/build / api docs / jenkins / diff-check
22
+ - 本地轻量校验:light_gate or quick_test/test/build / api docs / ci/jenkins / diff-check
23
23
  - 结构检查:structure-check
24
- - Jenkins Build:
24
+ - 结构化证据:`docs/tasks/evidence.jsonl`
25
+ - 门禁画像:`.local/auto-coding-skill/gate-profile.jsonl`
26
+ - CI/Jenkins Build:
25
27
  - 目标环境验证:
26
28
  - 闭环记录:`docs/tasks/closure-log.md`
27
29
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  规则:
4
4
  1) 所有任务都写在本文件(持续续写,不另起零散任务文件)
5
- 2) 普通小改动只要求最小设计记录;跨模块、接口、数据库、部署、Jenkins、关键页面流程变更才补 DD
6
- 3) 每个任务最终必须有闭环证据:提交、Jenkins、目标环境验证、结果、遗留问题
5
+ 2) 普通小改动只要求最小设计记录;跨模块、接口、数据库、部署、CI/Jenkins、关键页面流程变更才补 DD
6
+ 3) 每个任务最终必须有闭环证据:提交、已启用的 CI/Jenkins 状态、已启用的目标环境验证、结果、遗留问题
7
7
  4) 长 summary 不是默认强制产物;只有高风险或需要完整复盘时再补
8
8
 
9
9
  ---
@@ -13,8 +13,9 @@
13
13
  - 范围(In scope):
14
14
  - 非目标(Out of scope):
15
15
  - 是否高风险(Yes/No):
16
- - 高风险分类(如有):DB / Auth / Payment / Jenkins / Gateway / Upload / Prod Config
17
- - 影响面(API / DB / Jenkins / Page / Config / Deploy):
16
+ - 高风险分类(如有):DB / Auth / Payment / CI / Jenkins / Gateway / Upload / Prod Config
17
+ - 影响面(API / DB / CI / Jenkins / Page / Config / Deploy):
18
+ - 分类结果(`ap.py classify --scope auto`:risk / gate / needs):
18
19
  - 结构落位(Domain / Application / Infrastructure / Interface / Shared / Tooling / N/A):
19
20
  - 复用检查(已有 helper / 组件 / 脚本 / 库):
20
21
  - 是否需要 ADR(Yes/No):
@@ -26,8 +27,8 @@
26
27
  ### 默认证据(完成后填写)
27
28
  - 项目配置:`docs/ENGINEERING.md`
28
29
  - 提交:<commit sha>
29
- - Jenkins Build:<build url>
30
- - 目标环境验证:<health/api/page/business path>
30
+ - CI/Jenkins Build:<build url or skipped by verification.jenkins_required=false>
31
+ - 目标环境验证:<health/api/page/business path or skipped by verification.target_env_required=false>
31
32
  - 闭环记录:`docs/tasks/closure-log.md`
32
33
 
33
34
  ### 按需补充证据(仅在需要时填写)