@elvis1513/auto-coding-skill 0.1.0 → 0.1.2

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.
package/README.md CHANGED
@@ -1,109 +1,115 @@
1
1
  # auto-coding-skill
2
2
 
3
- Portable, framework-agnostic engineering workflow skill for:
3
+ Framework-agnostic engineering workflow skill for:
4
4
 
5
5
  - Claude Code
6
6
  - Codex CLI
7
7
 
8
- It enforces an end-to-end gate:
9
-
10
- Task -> DD -> Implement -> Build/Test -> Static Analysis -> Review -> API Docs (Markdown) -> Deploy -> Smoke -> Full Regression -> Bug Log -> Summary -> Commit -> Push
11
-
12
- ## Install (npm)
8
+ ## Install
13
9
 
14
10
  ```bash
15
11
  npm install -g @elvis1513/auto-coding-skill
16
12
  ```
17
13
 
18
- If npm registry install is not available yet, install directly from GitHub:
14
+ Fallback:
19
15
 
20
16
  ```bash
21
17
  npm install -g git+https://github.com/elvis1513/auto-coding-skill.git
22
18
  ```
23
19
 
24
- ## Quick start (any repo)
20
+ ## Standard Workflow
25
21
 
26
- From your target repo root:
22
+ 1. Install skill into project:
27
23
 
28
24
  ```bash
29
- # install skill files for Claude
30
- autocoding init --ai claude
31
-
32
- # install skill files for Codex
33
25
  autocoding init --ai codex
34
-
35
- # install both
36
- autocoding init --ai all
26
+ # or claude / all
37
27
  ```
38
28
 
39
- Skill install locations:
40
-
41
- - `.claude/skills/auto-coding-skill`
42
- - `.codex/skills/auto-coding-skill`
43
-
44
- Then initialize the project scaffold (run one path that exists):
29
+ 2. Initialize docs and local scripts:
45
30
 
46
31
  ```bash
47
- python3 .claude/skills/auto-coding-skill/scripts/ap.py --repo . install
48
- # or
49
32
  python3 .codex/skills/auto-coding-skill/scripts/ap.py --repo . install
33
+ # or
34
+ python3 .claude/skills/auto-coding-skill/scripts/ap.py --repo . install
50
35
  ```
51
36
 
52
- This creates:
37
+ 3. Fill only one file manually:
38
+
39
+ - `ENGINEERING.md` frontmatter
40
+
41
+ This frontmatter is the only manual config source (commands + deployment + docs paths).
42
+
43
+ 4. Start AI development by constraints:
53
44
 
54
45
  - `ENGINEERING.md`
55
- - `docs/**` (taskbook, DD/review templates, API docs, deployment/runbook, regression matrix, bug list)
56
- - `tools/autopipeline/ap.py` + `tools/autopipeline/core.py`
57
- - `.gitignore` rule: `docs/deployment/targets.yaml`
46
+ - `docs/tasks/taskbook.md`
47
+ - `docs/design/**`
48
+ - `docs/interfaces/**`
49
+ - `docs/testing/regression-matrix.md`
50
+ - `docs/bugs/bug-list.md`
51
+ - `docs/tasks/summaries/**`
52
+
53
+ ## AGENTS.md Constraint Example
54
+
55
+ ```md
56
+ ## Mandatory Skill
57
+ - Always use `auto-coding-skill` for implementation tasks.
58
+ - Before any code change, read and obey:
59
+ 1) ENGINEERING.md
60
+ 2) docs/tasks/taskbook.md
61
+ - Execute gates using `python3 scripts/autopipeline/ap.py`.
62
+ - If required docs are missing, create/update docs first, then code.
63
+ ```
58
64
 
59
- ## Configure project commands
65
+ ## Commands
60
66
 
61
67
  ```bash
62
- cp docs/autocoding/config.example.yaml autocoding.config.yaml
68
+ pip install pyyaml requests
69
+ python3 scripts/autopipeline/ap.py run build
70
+ python3 scripts/autopipeline/ap.py run test
71
+ python3 scripts/autopipeline/ap.py run lint
72
+ python3 scripts/autopipeline/ap.py verify-api-docs
73
+ python3 scripts/autopipeline/ap.py check-matrix
74
+ python3 scripts/autopipeline/ap.py gen-summary T0001-1
75
+ python3 scripts/autopipeline/ap.py commit-push T0001-1 --msg "T0001-1: <summary>" --require-matrix
63
76
  ```
64
77
 
65
- Edit at least:
66
-
67
- - `commands.build`
68
- - `commands.test`
69
- - `commands.lint`
70
- - `commands.typecheck`
71
- - `commands.smoke`
72
- - `commands.regression`
78
+ ## Release New Version
73
79
 
74
- ## Gate commands
80
+ 1. Bump version (cannot republish an existing version):
75
81
 
76
82
  ```bash
77
- python3 tools/autopipeline/ap.py run build
78
- python3 tools/autopipeline/ap.py run test
79
- python3 tools/autopipeline/ap.py verify-api-docs
80
- python3 tools/autopipeline/ap.py check-matrix
81
- python3 tools/autopipeline/ap.py gen-summary T0001-1
82
- python3 tools/autopipeline/ap.py commit-push T0001-1 --msg "T0001-1: <summary>" --require-matrix
83
+ npm version patch
84
+ # or: npm version minor
85
+ # or: npm version major
83
86
  ```
84
87
 
85
- ## CLI options
88
+ 2. Login and pre-check:
86
89
 
87
90
  ```bash
88
- autocoding init --ai claude|codex|all [--mode project|global] [--dest <path>] [--force]
91
+ npm login
92
+ npm whoami
93
+ npm run release:check
89
94
  ```
90
95
 
91
- When `--ai all` and `--dest` are both used, output will be:
96
+ 3. Publish:
92
97
 
93
- - `<dest>/claude`
94
- - `<dest>/codex`
98
+ ```bash
99
+ npm publish --access public --otp <6-digit-otp>
100
+ ```
95
101
 
96
- ## Publish
102
+ 4. Verify release:
97
103
 
98
104
  ```bash
99
- npm login
100
- npm whoami
101
- npm run release:check
102
- npm publish --access public
105
+ npm view @elvis1513/auto-coding-skill version
103
106
  ```
104
107
 
105
- Optional automation: this repo includes `/Users/elvis/Product/auto-coding-skill/.github/workflows/npm-publish.yml`.
106
- Set GitHub secret `NPM_TOKEN`, then publish a GitHub Release to auto-publish npm.
108
+ 5. Update installed clients:
109
+
110
+ ```bash
111
+ npm install -g @elvis1513/auto-coding-skill@latest
112
+ ```
107
113
 
108
114
  ## License
109
115
 
@@ -1,73 +1,68 @@
1
1
  ---
2
2
  name: auto-coding-skill
3
- description: Framework-agnostic engineering workflow skill for Claude Code and Codex CLI. Use it to scaffold docs and enforce gates from task intake to design, implementation, test, review, API docs, deployment, regression, summary, commit and push.
3
+ description: Use for strict project engineering workflow in Claude/Codex. Initialize docs, fill ENGINEERING.md frontmatter once, then execute design->implement->gates->summary->commit/push.
4
4
  ---
5
5
 
6
- # Auto Coding Skill (Claude + Codex Only)
7
-
8
- This skill is portable across projects and does not depend on any specific scaffold.
6
+ # Auto Coding Skill (Claude + Codex)
9
7
 
10
8
  ## Supported clients
11
9
 
12
10
  - Claude Code
13
11
  - Codex CLI
14
12
 
15
- ## Workflow gates
16
-
17
- Taskbook -> DD -> Implement -> Build/Test -> Static Analysis -> Review -> API Docs -> Deploy -> Smoke -> Regression Matrix (0 fail) -> Summary -> Commit -> Push
13
+ ## Entry
18
14
 
19
- ## Install into a target repo
20
-
21
- From the target repo root:
15
+ 1) Install skill files into target repo:
22
16
 
23
17
  ```bash
24
- # Claude Code
25
- autocoding init --ai claude
26
-
27
- # Codex CLI
28
18
  autocoding init --ai codex
29
-
30
- # Both
31
- autocoding init --ai all
19
+ # or claude / all
32
20
  ```
33
21
 
34
- ## Initialize project scaffold
35
-
36
- Run one of the following (depending on where the skill was installed):
22
+ 2) Initialize docs/tooling:
37
23
 
38
24
  ```bash
39
- python3 .claude/skills/auto-coding-skill/scripts/ap.py --repo . install
40
- # or
41
25
  python3 .codex/skills/auto-coding-skill/scripts/ap.py --repo . install
26
+ # or .claude path
42
27
  ```
43
28
 
44
- This will create `ENGINEERING.md`, `docs/**`, `tools/autopipeline/ap.py`, and update `.gitignore` with `docs/deployment/targets.yaml`.
45
-
46
- ## Configure project commands
47
-
48
- Copy and edit config:
29
+ 3) Install runtime deps:
49
30
 
50
31
  ```bash
51
- cp docs/autocoding/config.example.yaml autocoding.config.yaml
32
+ pip install pyyaml requests
52
33
  ```
53
34
 
54
- Set at least:
35
+ ## Single manual config source
36
+
37
+ Fill only:
38
+
39
+ - `ENGINEERING.md` frontmatter
40
+
41
+ This contains all manual fields:
42
+ - `commands.*`
43
+ - `deployment.*`
44
+ - `docs.*`
45
+
46
+ Do not duplicate config in other md/yaml files.
47
+
48
+ ## Execution order
55
49
 
56
- - `commands.build`
57
- - `commands.test`
58
- - `commands.lint`
59
- - `commands.typecheck`
60
- - `commands.smoke`
61
- - `commands.regression`
50
+ 1) `ENGINEERING.md`
51
+ 2) `docs/tasks/taskbook.md`
52
+ 3) `docs/design/**`
53
+ 4) implementation
54
+ 5) run gates via `python3 scripts/autopipeline/ap.py`
55
+ 6) update API docs + regression matrix + bug list + summary
56
+ 7) commit/push
62
57
 
63
- ## Common commands
58
+ ## Commands
64
59
 
65
60
  ```bash
66
- python3 tools/autopipeline/ap.py run build
67
- python3 tools/autopipeline/ap.py run test
68
- python3 tools/autopipeline/ap.py run lint
69
- python3 tools/autopipeline/ap.py verify-api-docs
70
- python3 tools/autopipeline/ap.py check-matrix
71
- python3 tools/autopipeline/ap.py gen-summary T0001-1
72
- python3 tools/autopipeline/ap.py commit-push T0001-1 --msg "T0001-1: <summary>" --require-matrix
61
+ python3 scripts/autopipeline/ap.py run build
62
+ python3 scripts/autopipeline/ap.py run test
63
+ python3 scripts/autopipeline/ap.py run lint
64
+ python3 scripts/autopipeline/ap.py verify-api-docs
65
+ python3 scripts/autopipeline/ap.py check-matrix
66
+ python3 scripts/autopipeline/ap.py gen-summary T0001-1
67
+ python3 scripts/autopipeline/ap.py commit-push T0001-1 --msg "T0001-1: <summary>" --require-matrix
73
68
  ```
@@ -1,3 +1,42 @@
1
+ ---
2
+ project:
3
+ name: ""
4
+ repo_root: "."
5
+
6
+ commands:
7
+ build: ""
8
+ test: ""
9
+ lint: ""
10
+ typecheck: ""
11
+ format: ""
12
+ smoke: ""
13
+ regression: ""
14
+
15
+ deployment:
16
+ host: ""
17
+ ssh_port: 22
18
+ username: ""
19
+ password: ""
20
+ service_name: ""
21
+ systemd_dir: "/usr/lib/systemd/system"
22
+ remote_app_root: ""
23
+ remote_jar_path: ""
24
+ remote_config_dir: ""
25
+ remote_bin_dir: ""
26
+ health_base_url: ""
27
+ health_path: ""
28
+
29
+ docs:
30
+ taskbook: "docs/tasks/taskbook.md"
31
+ design_dir: "docs/design"
32
+ review_dir: "docs/reviews"
33
+ api_doc: "docs/interfaces/api.md"
34
+ api_change_log: "docs/interfaces/api-change-log.md"
35
+ regression_matrix: "docs/testing/regression-matrix.md"
36
+ bug_list: "docs/bugs/bug-list.md"
37
+ summary_dir: "docs/tasks/summaries"
38
+ ---
39
+
1
40
  # ENGINEERING.md — AutoPipeline Gates (Source of Truth)
2
41
 
3
42
  目标:把一次任务固化为不可跳过的流水线:
@@ -5,26 +44,25 @@
5
44
  部署(systemd/jar) → 重启验证 → 按API Markdown全量回归 + 回归矩阵0fail →
6
45
  记录Bug并新增自动化回归 → 任务总结落盘 → commit → push
7
46
 
8
- 规则:任一步骤失败或缺产物,禁止进入下一步;**未 push 视为任务未完成**,禁止开始下一个任务/子任务。
47
+ 规则:任一步骤失败或缺产物,禁止进入下一步;未 push 视为任务未完成,禁止开始下一个任务/子任务。
9
48
 
10
49
  ---
11
50
 
12
- ## 0. 权威输入与冲突裁决(优先级)
13
- ## 0.1 工程命令配置(必须)
51
+ ## 0. 配置填写(必须)
14
52
 
15
- - 构建/测试/静态分析/回归命令必须由项目提供并配置在:
16
- - `autocoding.config.yaml`(推荐放 repo 根目录),或
17
- - `docs/autocoding/config.yaml`
53
+ 先填写本文件 frontmatter 中的所有空值(例如 ip/用户名/密码/服务名/路径/命令)。
54
+ 禁止在其他 md/yaml 重复维护这些配置。
18
55
 
19
- 任何 gate 只允许通过这些配置的命令执行(避免把流程绑死在某个脚手架)。
56
+ ---
20
57
 
58
+ ## 1. 权威输入与冲突裁决(优先级)
21
59
 
22
60
  1) ENGINEERING.md(本文件)
23
61
  2) docs/tasks/taskbook.md
24
62
  3) docs/design/**
25
63
  4) docs/interfaces/api.md
26
64
  5) docs/interfaces/api-change-log.md
27
- 6) docs/requirements/regression-matrix.md(必须 0 FAIL)
65
+ 6) docs/testing/regression-matrix.md(必须 0 FAIL)
28
66
  7) docs/bugs/bug-list.md(长期积累,回归必测)
29
67
  8) docs/tasks/summaries/**(每任务一份,强制产物)
30
68
  9) docs/deployment/**
@@ -32,32 +70,22 @@
32
70
 
33
71
  ---
34
72
 
35
- ## 1. Gate 流水线(强制、不可跳过)
73
+ ## 2. Gate 流水线(强制、不可跳过)
36
74
 
37
75
  Gate-1 读任务:只从 taskbook 取范围与验收;缺信息先补 taskbook
38
76
  Gate-2 写DD:无DD禁止写代码;DD必须含 时序图/ER图/接口时序(Mermaid)
39
77
  Gate-3 实现:严格按DD;接口变更必须同步 API Markdown
40
- Gate-4 本地CI:必须通过(ci-local
78
+ Gate-4 本地CI:必须通过(commands.build / commands.test
41
79
  Gate-5 静态分析+Review:静态分析通过;docs/reviews/ 生成记录
42
80
  Gate-6 文档:更新 api.md + 追加 api-change-log.md
43
- Gate-7 部署:单机 systemd/jar;允许 root+密码;service目录固定 /usr/lib/systemd/system;只保留1份备份;失败自动回滚
81
+ Gate-7 部署:单机 systemd/jarservice目录固定 /usr/lib/systemd/system;失败自动回滚
44
82
  Gate-8 重启+健康:restart后必须健康检查通过
45
- Gate-9 全量回归:按 API Markdown 全量回归;回归矩阵全量 PASS(0 fail);发现问题必须写 bug-list 并新增自动化回归用例(纳入 Gate-9)
46
- Gate-10 任务总结:必须生成 docs/tasks/summaries/<TASK_ID>.md(可用工具生成初稿)
47
- Gate-11 完成:全门禁通过后必须 commit+push(未push=未完成)
48
-
49
- ---
50
-
51
- ## 2. 部署约束(来自你的固定要求)
52
-
53
- - 允许 sshpass / 或 python 读取 targets.yaml 的 root 密码(非交互)
54
- - systemd 目录固定:/usr/lib/systemd/system
55
- - 只保留一个最新备份(*.bak / *.tgz.bak),失败自动回滚并重启服务
56
- - 健康检查端点不固定:targets.yaml 配置 base_url + health_path
57
- - 部署可更新项:app/config/、app/bin/、/usr/lib/systemd/system/*.service、jar
83
+ Gate-9 全量回归:按 API Markdown 全量回归;回归矩阵全量 PASS(0 fail);发现问题必须写 bug-list 并新增自动化回归用例
84
+ Gate-10 任务总结:必须生成 docs/tasks/summaries/<TASK_ID>.md
85
+ Gate-11 完成:全门禁通过后必须 commit+push
58
86
 
59
87
  ---
60
88
 
61
- ## 3. Repo 工具入口(建议)
89
+ ## 3. Repo 工具入口
62
90
 
63
- 统一用 `python3 tools/autopipeline/ap.py <command>` 执行。
91
+ 统一用 `python3 scripts/autopipeline/ap.py <command>` 执行。
@@ -1,11 +1,10 @@
1
1
  # Deploy Runbook(单机 systemd / jar)
2
2
 
3
- targets.yaml 必填:
4
- - target.host/user/password/ssh_port
5
- - service.name(systemd service 文件名)
6
- - service.systemd_dir(固定:/usr/lib/systemd/system)
7
- - paths.remote_*(远端目录与 jar 路径)
8
- - health.base_url + health_path(可配置)
3
+ 部署参数统一读取:`ENGINEERING.md` frontmatter
4
+ - deployment.host / deployment.ssh_port / deployment.username / deployment.password
5
+ - deployment.service_name / deployment.systemd_dir
6
+ - deployment.remote_app_root / deployment.remote_jar_path / deployment.remote_config_dir / deployment.remote_bin_dir
7
+ - deployment.health_base_url / deployment.health_path
9
8
 
10
9
  部署后必须:
11
10
  - smoke-test
@@ -1,10 +1,10 @@
1
1
  # Review — <Task ID> — YYYY-MM-DD HH:MM
2
2
 
3
3
  ## 1. 静态分析结果(必须)
4
- - Command:lint + typecheck(来自 autocoding.config.yaml
4
+ - Command:lint + typecheck(来自 ENGINEERING.md frontmatter
5
5
  - Summary:
6
6
  - Issues:
7
- - Resolved/Deferred(deferred 必须 ADR):
7
+ - Resolved/Deferred(deferred 必须给出后续任务):
8
8
 
9
9
  ## 2. 代码质量
10
10
  ## 3. 测试质量(含新增回归用例)
@@ -28,11 +28,12 @@
28
28
  - 回滚方式:
29
29
 
30
30
  ## 5. 质量门禁证据(必须可追溯)
31
+ - 项目配置:`ENGINEERING.md`(frontmatter)
31
32
  - 本地CI:`ci-local`
32
33
  - 静态分析:`static`
33
34
  - Review 文档:`docs/reviews/<TASK_ID>-<timestamp>.md`
34
35
  - API 文档:`docs/interfaces/api.md`
35
- - 回归矩阵:`docs/requirements/regression-matrix.md`(全量 PASS,0 fail)
36
+ - 回归矩阵:`docs/testing/regression-matrix.md`(全量 PASS,0 fail)
36
37
 
37
38
  ## 6. Bug 清单与回归用例
38
39
  - 新增/确认的 Bug(写入 `docs/bugs/bug-list.md`):
@@ -18,13 +18,14 @@
18
18
  - [ ] T0001-2 <subtask>
19
19
 
20
20
  ### 证据(完成后填写)
21
+ - 项目配置:`ENGINEERING.md`(frontmatter)
21
22
  - DD:`docs/design/T0001-<slug>.md`
22
23
  - Review:`docs/reviews/T0001-YYYYMMDD-HHMM.md`
23
24
  - API 文档:`docs/interfaces/api.md`
24
25
  - API Change Log:`docs/interfaces/api-change-log.md`
25
26
  - 本地CI:粘贴摘要或给出文件路径
26
27
  - 部署记录(如部署):`docs/deployment/deploy-records/T0001-YYYYMMDD.md`
27
- - 回归矩阵:`docs/requirements/regression-matrix.md`(全量PASS)
28
+ - 回归矩阵:`docs/testing/regression-matrix.md`(全量PASS)
28
29
  - Bug清单(如有):`docs/bugs/bug-list.md`
29
30
  - 任务总结(强制):`docs/tasks/summaries/T0001.md`
30
31
 
@@ -26,13 +26,13 @@ def cmd_install(args: argparse.Namespace) -> None:
26
26
  if args.bridges:
27
27
  copy_tree(templates / "bridges", repo)
28
28
 
29
- tools_dir = repo / "tools" / "autopipeline"
30
- tools_dir.mkdir(parents=True, exist_ok=True)
31
- copy_tree(Path(__file__).resolve(), tools_dir / "ap.py")
32
- copy_tree(Path(__file__).resolve().parent / "core.py", tools_dir / "core.py")
29
+ scripts_dir = repo / "scripts" / "autopipeline"
30
+ scripts_dir.mkdir(parents=True, exist_ok=True)
31
+ copy_tree(Path(__file__).resolve(), scripts_dir / "ap.py")
32
+ copy_tree(Path(__file__).resolve().parent / "core.py", scripts_dir / "core.py")
33
33
 
34
34
  gi = repo / ".gitignore"
35
- secret_line = "docs/deployment/targets.yaml"
35
+ secret_line = "ENGINEERING.md"
36
36
  if gi.exists():
37
37
  txt = gi.read_text(encoding="utf-8")
38
38
  if secret_line not in txt:
@@ -41,11 +41,10 @@ def cmd_install(args: argparse.Namespace) -> None:
41
41
  gi.write_text(secret_line + "\n", encoding="utf-8")
42
42
 
43
43
  print(f"[install] OK: scaffold installed into {repo}")
44
- print("[install] Next: cp docs/deployment/targets.example.yaml docs/deployment/targets.yaml (fill secrets locally)")
44
+ print("[install] Next: edit ENGINEERING.md frontmatter and fill all project/env fields")
45
45
 
46
46
 
47
- def _infer_title(repo: Path, task_id: str) -> str:
48
- taskbook = repo / "docs" / "tasks" / "taskbook.md"
47
+ def _infer_title(taskbook: Path, task_id: str) -> str:
49
48
  if not taskbook.exists():
50
49
  return "<Title>"
51
50
  for line in taskbook.read_text(encoding="utf-8").splitlines():
@@ -60,14 +59,20 @@ def cmd_gen_summary(args: argparse.Namespace) -> None:
60
59
  repo = Path(args.repo).resolve()
61
60
  ensure_git_repo(repo)
62
61
  task_id = args.task_id
62
+ cfg = _load_cfg(repo)
63
+ docs_cfg = (cfg.get("docs") or {})
64
+ taskbook = Path(repo, str(docs_cfg.get("taskbook", "docs/tasks/taskbook.md")))
65
+ summary_dir = Path(repo, str(docs_cfg.get("summary_dir", "docs/tasks/summaries")))
66
+ api_change_log = str(docs_cfg.get("api_change_log", "docs/interfaces/api-change-log.md"))
67
+ regression_matrix = str(docs_cfg.get("regression_matrix", "docs/testing/regression-matrix.md"))
63
68
 
64
- out_dir = repo / "docs" / "tasks" / "summaries"
69
+ out_dir = summary_dir
65
70
  out_dir.mkdir(parents=True, exist_ok=True)
66
71
  out_file = out_dir / f"{task_id}.md"
67
72
  if out_file.exists() and not args.force:
68
73
  raise APError(f"Summary already exists: {out_file} (use --force to overwrite)")
69
74
 
70
- title = _infer_title(repo, task_id)
75
+ title = _infer_title(taskbook, task_id)
71
76
  date = _dt.date.today().isoformat()
72
77
 
73
78
  staged = run(["git", "diff", "--cached", "--name-only"], cwd=repo, check=False).stdout.strip()
@@ -99,14 +104,14 @@ def cmd_gen_summary(args: argparse.Namespace) -> None:
99
104
  ```
100
105
 
101
106
  ## 3. 接口变更(以 API Markdown 为准)
102
- - 变更记录位置:`docs/interfaces/api-change-log.md`
107
+ - 变更记录位置:`{api_change_log}`
103
108
 
104
109
  ## 5. 质量门禁证据(必须可追溯)
105
110
  - 本地CI:TODO
106
111
  - 静态分析:TODO
107
112
  - Review 文档:TODO
108
113
  - DD 文档:TODO
109
- - 回归矩阵:`docs/requirements/regression-matrix.md`(全量 PASS,0 fail)
114
+ - 回归矩阵:`{regression_matrix}`(全量 PASS,0 fail)
110
115
  """
111
116
 
112
117
  out_file.write_text(content, encoding="utf-8")
@@ -115,7 +120,9 @@ def cmd_gen_summary(args: argparse.Namespace) -> None:
115
120
 
116
121
  def cmd_check_matrix(args: argparse.Namespace) -> None:
117
122
  repo = Path(args.repo).resolve()
118
- matrix = repo / "docs" / "requirements" / "regression-matrix.md"
123
+ cfg = _load_cfg(repo)
124
+ docs_cfg = (cfg.get("docs") or {})
125
+ matrix = Path(repo, str(docs_cfg.get("regression_matrix", "docs/testing/regression-matrix.md")))
119
126
  if not matrix.exists():
120
127
  raise APError(f"Matrix not found: {matrix}")
121
128
 
@@ -157,14 +164,18 @@ def cmd_run(args: argparse.Namespace) -> None:
157
164
  """
158
165
  Run a configured gate command:
159
166
  build | test | lint | typecheck | format | smoke | regression
160
- Commands are read from autocoding.config.yaml (or docs/autocoding/config.yaml).
167
+ Commands are read from ENGINEERING.md frontmatter.
161
168
  """
162
169
  repo = Path(args.repo).resolve()
163
170
  cfg = _load_cfg(repo)
164
171
  commands = (cfg.get("commands") or {})
165
172
  name = args.name
166
173
  if name not in commands:
167
- raise APError(f"Command not configured: commands.{name}. Edit autocoding.config.yaml. Available: {', '.join(commands.keys()) or '(none)'}")
174
+ raise APError(
175
+ f"Command not configured: commands.{name}. "
176
+ "Edit ENGINEERING.md frontmatter. "
177
+ f"Available: {', '.join(commands.keys()) or '(none)'}"
178
+ )
168
179
  cmd = str(commands[name])
169
180
  print(f"[run] {name}: {cmd}")
170
181
  run_shell(cmd, cwd=repo)
@@ -187,15 +198,18 @@ def cmd_verify_api_docs(args: argparse.Namespace) -> None:
187
198
  def cmd_commit_push(args: argparse.Namespace) -> None:
188
199
  repo = Path(args.repo).resolve()
189
200
  ensure_git_repo(repo)
201
+ cfg = _load_cfg(repo)
202
+ docs_cfg = (cfg.get("docs") or {})
203
+ summary_dir = Path(repo, str(docs_cfg.get("summary_dir", "docs/tasks/summaries")))
190
204
 
191
205
  task_id = args.task_id
192
206
  msg = args.msg
193
207
 
194
- summary = repo / "docs" / "tasks" / "summaries" / f"{task_id}.md"
208
+ summary = summary_dir / f"{task_id}.md"
195
209
  if not summary.exists():
196
210
  raise APError(
197
211
  f"Task summary missing: {summary}\n"
198
- f"Generate: python3 tools/autopipeline/ap.py gen-summary {task_id}"
212
+ f"Generate: python3 scripts/autopipeline/ap.py gen-summary {task_id}"
199
213
  )
200
214
 
201
215
  if args.require_matrix:
@@ -5,6 +5,7 @@
5
5
  from __future__ import annotations
6
6
 
7
7
  import os
8
+ import re
8
9
  import shutil
9
10
  import subprocess
10
11
  from pathlib import Path
@@ -48,8 +49,18 @@ def load_yaml(path: Path) -> Dict[str, Any]:
48
49
  raise APError(
49
50
  "PyYAML not installed. Install dependencies with: pip install pyyaml requests"
50
51
  )
51
- with path.open("r", encoding="utf-8") as f:
52
- data = yaml.safe_load(f)
52
+ if path.suffix.lower() in {".md", ".markdown"}:
53
+ text = path.read_text(encoding="utf-8")
54
+ m = re.match(r"^---\s*\n(.*?)\n---\s*(\n|$)", text, flags=re.DOTALL)
55
+ if not m:
56
+ raise APError(
57
+ f"Config markdown frontmatter not found: {path}\n"
58
+ "Expected YAML frontmatter wrapped by '---' at top of file."
59
+ )
60
+ data = yaml.safe_load(m.group(1))
61
+ else:
62
+ with path.open("r", encoding="utf-8") as f:
63
+ data = yaml.safe_load(f)
53
64
  return data or {}
54
65
 
55
66
 
@@ -84,20 +95,17 @@ def http_get_status(url: str, timeout_s: int = 5) -> int:
84
95
 
85
96
 
86
97
  def find_config(repo: Path) -> Path:
87
- """Find autocoding config file (repo root preferred)."""
98
+ """Find single source project config file."""
88
99
  candidates = [
89
- repo / "autocoding.config.yaml",
90
- repo / "docs" / "autocoding" / "config.yaml",
91
- repo / "docs" / "autocoding" / "config.yml",
100
+ repo / "ENGINEERING.md",
92
101
  ]
93
102
  for c in candidates:
94
103
  if c.exists():
95
104
  return c
96
- # fall back to example if exists (for first-time users)
97
- ex = repo / "docs" / "autocoding" / "config.example.yaml"
98
- if ex.exists():
99
- return ex
100
- raise APError("autocoding config not found. Create autocoding.config.yaml (recommended) or docs/autocoding/config.yaml. Template: docs/autocoding/config.example.yaml")
105
+ raise APError(
106
+ "Project config not found. Create ENGINEERING.md "
107
+ "and put commands + deployment fields in YAML frontmatter."
108
+ )
101
109
 
102
110
 
103
111
  def run_shell(command: str, cwd: Optional[Path] = None) -> None:
package/cli/src/index.js CHANGED
@@ -64,7 +64,7 @@ function resolveTargetDir(ai, mode, destOverride){
64
64
 
65
65
  function ensureGitignore(projectDir){
66
66
  const gi = path.join(projectDir, ".gitignore");
67
- const line = "docs/deployment/targets.yaml";
67
+ const line = "ENGINEERING.md";
68
68
  if (!exists(gi)) {
69
69
  fs.writeFileSync(gi, `${line}\n`, "utf-8");
70
70
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elvis1513/auto-coding-skill",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "CLI installer for auto-coding-skill (Claude Code + Codex CLI).",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,9 +0,0 @@
1
- # ADR NNNN — <Title>
2
- - 状态:Proposed | Accepted | Rejected | Deprecated
3
- - 日期:YYYY-MM-DD
4
- ## Context
5
- ## Decision
6
- ## Alternatives
7
- ## Consequences
8
- ## Rollback
9
- ## Follow-ups
@@ -1,35 +0,0 @@
1
- # Project-specific gate commands.
2
- # This file is intentionally NOT a “universal standard” — you MUST adapt commands to each repo.
3
- # You can copy this to repo root as `autocoding.config.yaml` (recommended).
4
-
5
- commands:
6
- # Build / packaging must succeed (no errors)
7
- build: "npm run build"
8
-
9
- # Tests must be 0 fail
10
- test: "npm test"
11
-
12
- # TS/JS static analysis (recommend both)
13
- lint: "npm run lint"
14
- typecheck: "npm run typecheck"
15
-
16
- # Optional
17
- format: "npm run format"
18
-
19
- # Post-deploy smoke check (can call curl or a node script)
20
- smoke: "node ./scripts/smoke.mjs"
21
-
22
- # Full regression (can be API regression, e2e, integration, etc.)
23
- regression: "npm run test:regression"
24
-
25
- docs:
26
- # authoritative API doc (Markdown)
27
- api_doc: "docs/interfaces/api.md"
28
- api_change_log: "docs/interfaces/api-change-log.md"
29
- taskbook: "docs/tasks/taskbook.md"
30
- regression_matrix: "docs/requirements/regression-matrix.md"
31
- bug_list: "docs/bugs/bug-list.md"
32
-
33
- deployment:
34
- targets_file: "docs/deployment/targets.yaml"
35
- systemd_dir: "/usr/lib/systemd/system"
@@ -1,23 +0,0 @@
1
- target:
2
- host: "192.168.1.10"
3
- user: "root"
4
- password: "CHANGE_ME"
5
- ssh_port: 22
6
-
7
- service:
8
- name: "myapp.service"
9
- systemd_dir: "/usr/lib/systemd/system"
10
- local_file: "app/systemd/myapp.service"
11
-
12
- paths:
13
- remote_app_root: "/opt/app/myapp"
14
- remote_jar_path: "/opt/app/myapp/app.jar"
15
- remote_config_dir: "/opt/app/myapp/config"
16
- remote_bin_dir: "/opt/app/myapp/bin"
17
-
18
- artifact:
19
- local_path: ""
20
-
21
- health:
22
- base_url: "http://127.0.0.1:8080"
23
- health_path: "/health"
@@ -1,5 +0,0 @@
1
- # Security Baseline(最低门槛)
2
-
3
- - secrets 不入库:targets.yaml(本地)或环境变量
4
- - 写接口必须:输入校验、审计日志、反滥用
5
- - 依赖审计:高危依赖必须处理或 ADR 解释