@elvis1513/auto-coding-skill 0.1.0 → 0.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.
package/README.md CHANGED
@@ -1,98 +1,94 @@
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
26
+ # or
27
+ autocoding init --ai claude
28
+ # or both
36
29
  autocoding init --ai all
37
30
  ```
38
31
 
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):
32
+ 2. Initialize docs/tooling:
45
33
 
46
34
  ```bash
47
- python3 .claude/skills/auto-coding-skill/scripts/ap.py --repo . install
48
- # or
49
35
  python3 .codex/skills/auto-coding-skill/scripts/ap.py --repo . install
36
+ # or
37
+ python3 .claude/skills/auto-coding-skill/scripts/ap.py --repo . install
50
38
  ```
51
39
 
52
- This creates:
40
+ 3. Fill one config file only:
53
41
 
54
- - `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`
42
+ - `docs/project/project-config.md`
43
+
44
+ This file is the single source for:
45
+ - build/test/lint/typecheck/smoke/regression commands
46
+ - deployment info (ip/user/password/service/path/health)
47
+ - docs paths
58
48
 
59
- ## Configure project commands
49
+ Required Python deps:
60
50
 
61
51
  ```bash
62
- cp docs/autocoding/config.example.yaml autocoding.config.yaml
52
+ pip install pyyaml requests
63
53
  ```
64
54
 
65
- Edit at least:
55
+ 4. Let AI execute workflow by docs constraints:
66
56
 
67
- - `commands.build`
68
- - `commands.test`
69
- - `commands.lint`
70
- - `commands.typecheck`
71
- - `commands.smoke`
72
- - `commands.regression`
57
+ - `ENGINEERING.md`
58
+ - `docs/tasks/taskbook.md`
59
+ - `docs/design/**`
60
+ - `docs/interfaces/**`
61
+ - `docs/testing/regression-matrix.md`
62
+ - `docs/bugs/bug-list.md`
63
+ - `docs/tasks/summaries/**`
64
+
65
+ ## AGENTS.md Constraint Example
66
+
67
+ Add this in project `AGENTS.md`:
68
+
69
+ ```md
70
+ ## Mandatory Skill
71
+ - Always use `auto-coding-skill` for every implementation task.
72
+ - Before any code change, read and obey:
73
+ 1) ENGINEERING.md
74
+ 2) docs/project/project-config.md
75
+ 3) docs/tasks/taskbook.md
76
+ - Execute gates using `python3 tools/autopipeline/ap.py`.
77
+ - If any required doc is missing, create/update docs first, then code.
78
+ ```
73
79
 
74
- ## Gate commands
80
+ ## Commands
75
81
 
76
82
  ```bash
77
83
  python3 tools/autopipeline/ap.py run build
78
84
  python3 tools/autopipeline/ap.py run test
85
+ python3 tools/autopipeline/ap.py run lint
79
86
  python3 tools/autopipeline/ap.py verify-api-docs
80
87
  python3 tools/autopipeline/ap.py check-matrix
81
88
  python3 tools/autopipeline/ap.py gen-summary T0001-1
82
89
  python3 tools/autopipeline/ap.py commit-push T0001-1 --msg "T0001-1: <summary>" --require-matrix
83
90
  ```
84
91
 
85
- ## CLI options
86
-
87
- ```bash
88
- autocoding init --ai claude|codex|all [--mode project|global] [--dest <path>] [--force]
89
- ```
90
-
91
- When `--ai all` and `--dest` are both used, output will be:
92
-
93
- - `<dest>/claude`
94
- - `<dest>/codex`
95
-
96
92
  ## Publish
97
93
 
98
94
  ```bash
@@ -102,9 +98,6 @@ npm run release:check
102
98
  npm publish --access public
103
99
  ```
104
100
 
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.
107
-
108
101
  ## License
109
102
 
110
103
  MIT
@@ -1,66 +1,62 @@
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. It initializes docs and enforces taskbook -> design -> implement -> quality gates -> docs -> deploy -> regression -> 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
+ 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 file
36
+
37
+ Fill only this file:
38
+
39
+ - `docs/project/project-config.md`
40
+
41
+ YAML frontmatter in this file contains:
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/project/project-config.md`
52
+ 3) `docs/tasks/taskbook.md`
53
+ 4) `docs/design/**`
54
+ 5) implementation
55
+ 6) run gates via `python3 tools/autopipeline/ap.py`
56
+ 7) update API docs + regression matrix + bug list + summary
57
+ 8) commit/push
62
58
 
63
- ## Common commands
59
+ ## Commands
64
60
 
65
61
  ```bash
66
62
  python3 tools/autopipeline/ap.py run build
@@ -10,31 +10,35 @@
10
10
  ---
11
11
 
12
12
  ## 0. 权威输入与冲突裁决(优先级)
13
- ## 0.1 工程命令配置(必须)
13
+ ## 0.1 项目配置(必须,单一入口)
14
14
 
15
- - 构建/测试/静态分析/回归命令必须由项目提供并配置在:
16
- - `autocoding.config.yaml`(推荐放 repo 根目录),或
17
- - `docs/autocoding/config.yaml`
15
+ - 所有人工维护信息统一放在:`docs/project/project-config.md`
16
+ - 该文件 YAML frontmatter 中必须包含:
17
+ - `commands.*`(build/test/lint/typecheck/smoke/regression)
18
+ - `deployment.*`(ip/用户名/密码/服务名/路径/健康检查等)
19
+ - `docs.*`(任务本、API文档、回归矩阵、Bug清单、总结目录等路径)
18
20
 
19
- 任何 gate 只允许通过这些配置的命令执行(避免把流程绑死在某个脚手架)。
21
+ 任何 gate 只允许使用该文件中的配置执行,禁止在其他 md/yaml 再维护一份配置。
20
22
 
21
23
 
22
24
  1) ENGINEERING.md(本文件)
23
- 2) docs/tasks/taskbook.md
24
- 3) docs/design/**
25
- 4) docs/interfaces/api.md
26
- 5) docs/interfaces/api-change-log.md
27
- 6) docs/requirements/regression-matrix.md(必须 0 FAIL)
28
- 7) docs/bugs/bug-list.md(长期积累,回归必测)
29
- 8) docs/tasks/summaries/**(每任务一份,强制产物)
30
- 9) docs/deployment/**
31
- 10) 代码实现(不得反向覆盖 1~9)
25
+ 2) docs/project/project-config.md
26
+ 3) docs/tasks/taskbook.md
27
+ 4) docs/design/**
28
+ 5) docs/interfaces/api.md
29
+ 6) docs/interfaces/api-change-log.md
30
+ 7) docs/testing/regression-matrix.md(必须 0 FAIL)
31
+ 8) docs/bugs/bug-list.md(长期积累,回归必测)
32
+ 9) docs/tasks/summaries/**(每任务一份,强制产物)
33
+ 10) docs/deployment/**
34
+ 11) 代码实现(不得反向覆盖 1~10)
32
35
 
33
36
  ---
34
37
 
35
38
  ## 1. Gate 流水线(强制、不可跳过)
36
39
 
37
40
  Gate-1 读任务:只从 taskbook 取范围与验收;缺信息先补 taskbook
41
+ Gate-1.5 配置确认:先补齐 `docs/project/project-config.md`;未补齐禁止进入实现
38
42
  Gate-2 写DD:无DD禁止写代码;DD必须含 时序图/ER图/接口时序(Mermaid)
39
43
  Gate-3 实现:严格按DD;接口变更必须同步 API Markdown
40
44
  Gate-4 本地CI:必须通过(ci-local)
@@ -42,7 +46,7 @@ Gate-5 静态分析+Review:静态分析通过;docs/reviews/ 生成记录
42
46
  Gate-6 文档:更新 api.md + 追加 api-change-log.md
43
47
  Gate-7 部署:单机 systemd/jar;允许 root+密码;service目录固定 /usr/lib/systemd/system;只保留1份备份;失败自动回滚
44
48
  Gate-8 重启+健康:restart后必须健康检查通过
45
- Gate-9 全量回归:按 API Markdown 全量回归;回归矩阵全量 PASS(0 fail);发现问题必须写 bug-list 并新增自动化回归用例(纳入 Gate-9)
49
+ Gate-9 全量回归:按 API Markdown 全量回归;回归矩阵(`docs/testing/regression-matrix.md`)全量 PASS(0 fail);发现问题必须写 bug-list 并新增自动化回归用例(纳入 Gate-9)
46
50
  Gate-10 任务总结:必须生成 docs/tasks/summaries/<TASK_ID>.md(可用工具生成初稿)
47
51
  Gate-11 完成:全门禁通过后必须 commit+push(未push=未完成)
48
52
 
@@ -50,10 +54,10 @@ Gate-11 完成:全门禁通过后必须 commit+push(未push=未完成)
50
54
 
51
55
  ## 2. 部署约束(来自你的固定要求)
52
56
 
53
- - 允许 sshpass / 或 python 读取 targets.yaml root 密码(非交互)
57
+ - 允许 sshpass / 或 python `docs/project/project-config.md` 读取 root 密码(非交互)
54
58
  - systemd 目录固定:/usr/lib/systemd/system
55
59
  - 只保留一个最新备份(*.bak / *.tgz.bak),失败自动回滚并重启服务
56
- - 健康检查端点不固定:targets.yaml 配置 base_url + health_path
60
+ - 健康检查端点不固定:`docs/project/project-config.md` deployment.health_* 字段配置
57
61
  - 部署可更新项:app/config/、app/bin/、/usr/lib/systemd/system/*.service、jar
58
62
 
59
63
  ---
@@ -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
+ 部署参数统一读取:`docs/project/project-config.md`
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
@@ -0,0 +1,45 @@
1
+ ---
2
+ project:
3
+ name: "fill-project-name"
4
+ repo_root: "."
5
+
6
+ commands:
7
+ build: "fill-build-command"
8
+ test: "fill-test-command"
9
+ lint: "fill-lint-command"
10
+ typecheck: "fill-typecheck-command"
11
+ format: "fill-format-command"
12
+ smoke: "fill-smoke-command"
13
+ regression: "fill-regression-command"
14
+
15
+ docs:
16
+ taskbook: "docs/tasks/taskbook.md"
17
+ design_dir: "docs/design"
18
+ review_dir: "docs/reviews"
19
+ api_doc: "docs/interfaces/api.md"
20
+ api_change_log: "docs/interfaces/api-change-log.md"
21
+ regression_matrix: "docs/testing/regression-matrix.md"
22
+ bug_list: "docs/bugs/bug-list.md"
23
+ summary_dir: "docs/tasks/summaries"
24
+
25
+ deployment:
26
+ host: "fill-ip-or-domain"
27
+ ssh_port: 22
28
+ username: "fill-username"
29
+ password: "fill-password"
30
+ service_name: "fill-service-name"
31
+ systemd_dir: "/usr/lib/systemd/system"
32
+ remote_app_root: "fill-remote-app-root"
33
+ remote_jar_path: "fill-remote-jar-path"
34
+ remote_config_dir: "fill-remote-config-dir"
35
+ remote_bin_dir: "fill-remote-bin-dir"
36
+ health_base_url: "fill-health-base-url"
37
+ health_path: "/health"
38
+ ---
39
+
40
+ # Project Config(唯一人工维护入口)
41
+
42
+ 规则:
43
+ 1) 所有需要人工维护的项统一写在本文件 frontmatter。
44
+ 2) 其他 docs 不再重复维护配置,统一引用本文件。
45
+ 3) 开发前先补齐本文件,再启动任何 Gate。
@@ -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(来自 docs/project/project-config.md
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
+ - 项目配置:`docs/project/project-config.md`
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
+ - 项目配置:`docs/project/project-config.md`
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
 
@@ -32,7 +32,7 @@ def cmd_install(args: argparse.Namespace) -> None:
32
32
  copy_tree(Path(__file__).resolve().parent / "core.py", tools_dir / "core.py")
33
33
 
34
34
  gi = repo / ".gitignore"
35
- secret_line = "docs/deployment/targets.yaml"
35
+ secret_line = "docs/project/project-config.md"
36
36
  if gi.exists():
37
37
  txt = gi.read_text(encoding="utf-8")
38
38
  if secret_line not in txt:
@@ -41,7 +41,7 @@ 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 docs/project/project-config.md and fill all project/env fields")
45
45
 
46
46
 
47
47
  def _infer_title(repo: Path, task_id: str) -> str:
@@ -60,6 +60,10 @@ def cmd_gen_summary(args: argparse.Namespace) -> None:
60
60
  repo = Path(args.repo).resolve()
61
61
  ensure_git_repo(repo)
62
62
  task_id = args.task_id
63
+ cfg = _load_cfg(repo)
64
+ docs_cfg = (cfg.get("docs") or {})
65
+ api_change_log = str(docs_cfg.get("api_change_log", "docs/interfaces/api-change-log.md"))
66
+ regression_matrix = str(docs_cfg.get("regression_matrix", "docs/testing/regression-matrix.md"))
63
67
 
64
68
  out_dir = repo / "docs" / "tasks" / "summaries"
65
69
  out_dir.mkdir(parents=True, exist_ok=True)
@@ -99,14 +103,14 @@ def cmd_gen_summary(args: argparse.Namespace) -> None:
99
103
  ```
100
104
 
101
105
  ## 3. 接口变更(以 API Markdown 为准)
102
- - 变更记录位置:`docs/interfaces/api-change-log.md`
106
+ - 变更记录位置:`{api_change_log}`
103
107
 
104
108
  ## 5. 质量门禁证据(必须可追溯)
105
109
  - 本地CI:TODO
106
110
  - 静态分析:TODO
107
111
  - Review 文档:TODO
108
112
  - DD 文档:TODO
109
- - 回归矩阵:`docs/requirements/regression-matrix.md`(全量 PASS,0 fail)
113
+ - 回归矩阵:`{regression_matrix}`(全量 PASS,0 fail)
110
114
  """
111
115
 
112
116
  out_file.write_text(content, encoding="utf-8")
@@ -115,7 +119,9 @@ def cmd_gen_summary(args: argparse.Namespace) -> None:
115
119
 
116
120
  def cmd_check_matrix(args: argparse.Namespace) -> None:
117
121
  repo = Path(args.repo).resolve()
118
- matrix = repo / "docs" / "requirements" / "regression-matrix.md"
122
+ cfg = _load_cfg(repo)
123
+ docs_cfg = (cfg.get("docs") or {})
124
+ matrix = Path(repo, str(docs_cfg.get("regression_matrix", "docs/testing/regression-matrix.md")))
119
125
  if not matrix.exists():
120
126
  raise APError(f"Matrix not found: {matrix}")
121
127
 
@@ -157,14 +163,18 @@ def cmd_run(args: argparse.Namespace) -> None:
157
163
  """
158
164
  Run a configured gate command:
159
165
  build | test | lint | typecheck | format | smoke | regression
160
- Commands are read from autocoding.config.yaml (or docs/autocoding/config.yaml).
166
+ Commands are read from docs/project/project-config.md frontmatter.
161
167
  """
162
168
  repo = Path(args.repo).resolve()
163
169
  cfg = _load_cfg(repo)
164
170
  commands = (cfg.get("commands") or {})
165
171
  name = args.name
166
172
  if name not in commands:
167
- raise APError(f"Command not configured: commands.{name}. Edit autocoding.config.yaml. Available: {', '.join(commands.keys()) or '(none)'}")
173
+ raise APError(
174
+ f"Command not configured: commands.{name}. "
175
+ "Edit docs/project/project-config.md. "
176
+ f"Available: {', '.join(commands.keys()) or '(none)'}"
177
+ )
168
178
  cmd = str(commands[name])
169
179
  print(f"[run] {name}: {cmd}")
170
180
  run_shell(cmd, cwd=repo)
@@ -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,18 @@ 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 / "docs" / "project" / "project-config.md",
101
+ repo / "project-config.md",
92
102
  ]
93
103
  for c in candidates:
94
104
  if c.exists():
95
105
  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")
106
+ raise APError(
107
+ "Project config not found. Create docs/project/project-config.md "
108
+ "and put all commands + deployment fields in YAML frontmatter."
109
+ )
101
110
 
102
111
 
103
112
  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 = "docs/project/project-config.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.1",
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 解释