@elvis1513/auto-coding-skill 0.1.2 → 0.1.3

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
@@ -22,8 +22,8 @@ npm install -g git+https://github.com/elvis1513/auto-coding-skill.git
22
22
  1. Install skill into project:
23
23
 
24
24
  ```bash
25
- autocoding init --ai codex
26
- # or claude / all
25
+ autocoding init --ai all
26
+ # or: --ai codex / --ai claude
27
27
  ```
28
28
 
29
29
  2. Initialize docs and local scripts:
@@ -36,13 +36,13 @@ python3 .claude/skills/auto-coding-skill/scripts/ap.py --repo . install
36
36
 
37
37
  3. Fill only one file manually:
38
38
 
39
- - `ENGINEERING.md` frontmatter
39
+ - `docs/ENGINEERING.md` frontmatter
40
40
 
41
41
  This frontmatter is the only manual config source (commands + deployment + docs paths).
42
42
 
43
43
  4. Start AI development by constraints:
44
44
 
45
- - `ENGINEERING.md`
45
+ - `docs/ENGINEERING.md`
46
46
  - `docs/tasks/taskbook.md`
47
47
  - `docs/design/**`
48
48
  - `docs/interfaces/**`
@@ -56,12 +56,71 @@ This frontmatter is the only manual config source (commands + deployment + docs
56
56
  ## Mandatory Skill
57
57
  - Always use `auto-coding-skill` for implementation tasks.
58
58
  - Before any code change, read and obey:
59
- 1) ENGINEERING.md
59
+ 1) docs/ENGINEERING.md
60
60
  2) docs/tasks/taskbook.md
61
61
  - Execute gates using `python3 scripts/autopipeline/ap.py`.
62
62
  - If required docs are missing, create/update docs first, then code.
63
63
  ```
64
64
 
65
+ ## Docs Structure and Recording Rules
66
+
67
+ ### 1) docs/ENGINEERING.md
68
+ - Purpose: single source of project config + engineering gate rules.
69
+ - How to record:
70
+ - Fill YAML frontmatter once (project/commands/deployment/docs fields).
71
+ - Keep all environment info here only (ip/username/password/service/path/health).
72
+ - Do not duplicate config in other docs.
73
+
74
+ ### 2) docs/deployment/
75
+ - Files:
76
+ - `docs/deployment/deploy-runbook.md`: deployment procedure and validation checklist.
77
+ - `docs/deployment/deploy-records/<TASK_ID>-YYYYMMDD.md`: per-deploy execution record.
78
+ - How to record:
79
+ - In deploy record, write target host, service, artifact, remote path, backup, systemctl status, smoke/regression evidence.
80
+
81
+ ### 3) docs/design/
82
+ - Files:
83
+ - `docs/design/<TASK_ID>-<slug>.md` (from DD template).
84
+ - Purpose:
85
+ - Detailed design before coding (scope,方案、时序图、ER图、接口编排、测试策略、回滚).
86
+ - How to record:
87
+ - One task/subtask one DD file.
88
+ - Status changes: Draft -> Reviewed -> Approved.
89
+
90
+ ### 4) docs/interfaces/
91
+ - Files:
92
+ - `docs/interfaces/api.md`: authoritative API documentation (current contract).
93
+ - `docs/interfaces/api-change-log.md`: append-only API changes per task.
94
+ - How to record:
95
+ - API changes must update both files in the same task.
96
+ - `api.md` records latest endpoint contract.
97
+ - `api-change-log.md` appends task-level delta (新增/修改/废弃/兼容策略/影响面).
98
+
99
+ ### 5) docs/reviews/
100
+ - Files:
101
+ - `docs/reviews/<TASK_ID>-<timestamp>.md` (from review template).
102
+ - Purpose:
103
+ - Gate review evidence: static checks, code quality, test quality, risks.
104
+ - How to record:
105
+ - Record commands used (lint/typecheck from docs/ENGINEERING.md frontmatter) and conclusion (Pass/Blocked).
106
+
107
+ ### 6) docs/tasks/
108
+ - Files:
109
+ - `docs/tasks/taskbook.md`: master task ledger (all tasks appended here).
110
+ - `docs/tasks/summaries/<TASK_ID>.md`: end-of-task summary artifact.
111
+ - How to record:
112
+ - `taskbook.md` stores task scope/acceptance/subtasks/evidence links.
113
+ - `summaries/<TASK_ID>.md` stores final objective result, change overview, gate evidence, risks, follow-ups.
114
+
115
+ ### 7) docs/testing/
116
+ - Files:
117
+ - `docs/testing/regression-matrix.md`
118
+ - Purpose:
119
+ - Full regression matrix; must be 0 FAIL.
120
+ - How to record:
121
+ - Add/maintain rows by regression ID (R-xxx), area, steps/command, expected, status, evidence.
122
+ - If any FAIL exists, gate fails.
123
+
65
124
  ## Commands
66
125
 
67
126
  ```bash
@@ -75,9 +134,16 @@ python3 scripts/autopipeline/ap.py gen-summary T0001-1
75
134
  python3 scripts/autopipeline/ap.py commit-push T0001-1 --msg "T0001-1: <summary>" --require-matrix
76
135
  ```
77
136
 
78
- ## Release New Version
137
+ ## Publish (NPM)
138
+
139
+ 1. Sync assets and basic check:
140
+
141
+ ```bash
142
+ npm run sync-assets
143
+ npm test
144
+ ```
79
145
 
80
- 1. Bump version (cannot republish an existing version):
146
+ 2. Bump version (required before every publish):
81
147
 
82
148
  ```bash
83
149
  npm version patch
@@ -85,7 +151,9 @@ npm version patch
85
151
  # or: npm version major
86
152
  ```
87
153
 
88
- 2. Login and pre-check:
154
+ `npm version` will update `package.json` and create a git tag.
155
+
156
+ 3. Login and run release check:
89
157
 
90
158
  ```bash
91
159
  npm login
@@ -93,24 +161,36 @@ npm whoami
93
161
  npm run release:check
94
162
  ```
95
163
 
96
- 3. Publish:
164
+ 4. Publish package:
97
165
 
98
166
  ```bash
167
+ npm publish --access public
168
+ # if your account requires 2FA OTP:
99
169
  npm publish --access public --otp <6-digit-otp>
100
170
  ```
101
171
 
102
- 4. Verify release:
172
+ 5. Verify and update clients:
103
173
 
104
174
  ```bash
105
175
  npm view @elvis1513/auto-coding-skill version
106
- ```
107
-
108
- 5. Update installed clients:
109
-
110
- ```bash
111
176
  npm install -g @elvis1513/auto-coding-skill@latest
112
177
  ```
113
178
 
179
+ ### Common Publish Errors
180
+
181
+ - `403 You cannot publish over the previously published versions`
182
+ - Cause: same version already exists.
183
+ - Fix: run `npm version patch` (or `minor`/`major`) then publish again.
184
+ - `403 Two-factor authentication ... is required to publish`
185
+ - Cause: publish requires 2FA.
186
+ - Fix: use `npm publish --access public --otp <6-digit-otp>`.
187
+ - `404 Not Found` when install
188
+ - Cause: package not published successfully, or scope/name mismatch.
189
+ - Fix: verify with `npm view @elvis1513/auto-coding-skill version` first.
190
+ - `Access token expired or revoked`
191
+ - Cause: npm auth token expired.
192
+ - Fix: run `npm login` again and retry publish/install.
193
+
114
194
  ## License
115
195
 
116
196
  MIT
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: auto-coding-skill
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.
3
+ description: Use for strict project engineering workflow in Claude/Codex. Initialize docs, fill docs/ENGINEERING.md frontmatter once, then execute design->implement->gates->summary->commit/push.
4
4
  ---
5
5
 
6
6
  # Auto Coding Skill (Claude + Codex)
@@ -36,7 +36,7 @@ pip install pyyaml requests
36
36
 
37
37
  Fill only:
38
38
 
39
- - `ENGINEERING.md` frontmatter
39
+ - `docs/ENGINEERING.md` frontmatter
40
40
 
41
41
  This contains all manual fields:
42
42
  - `commands.*`
@@ -47,7 +47,7 @@ Do not duplicate config in other md/yaml files.
47
47
 
48
48
  ## Execution order
49
49
 
50
- 1) `ENGINEERING.md`
50
+ 1) `docs/ENGINEERING.md`
51
51
  2) `docs/tasks/taskbook.md`
52
52
  3) `docs/design/**`
53
53
  4) implementation
@@ -37,7 +37,7 @@ docs:
37
37
  summary_dir: "docs/tasks/summaries"
38
38
  ---
39
39
 
40
- # ENGINEERING.md — AutoPipeline Gates (Source of Truth)
40
+ # docs/ENGINEERING.md — AutoPipeline Gates (Source of Truth)
41
41
 
42
42
  目标:把一次任务固化为不可跳过的流水线:
43
43
  读任务 → 写DD → 实现 → 本地测试通过 → 静态分析+Review落盘 → 更新API Markdown+接口变更清单 →
@@ -50,14 +50,14 @@ docs:
50
50
 
51
51
  ## 0. 配置填写(必须)
52
52
 
53
- 先填写本文件 frontmatter 中的所有空值(例如 ip/用户名/密码/服务名/路径/命令)。
53
+ 先填写 `docs/ENGINEERING.md` frontmatter 中的所有空值(例如 ip/用户名/密码/服务名/路径/命令)。
54
54
  禁止在其他 md/yaml 重复维护这些配置。
55
55
 
56
56
  ---
57
57
 
58
58
  ## 1. 权威输入与冲突裁决(优先级)
59
59
 
60
- 1) ENGINEERING.md(本文件)
60
+ 1) docs/ENGINEERING.md(本文件)
61
61
  2) docs/tasks/taskbook.md
62
62
  3) docs/design/**
63
63
  4) docs/interfaces/api.md
@@ -1 +1 @@
1
- Follow ENGINEERING.md strictly. Source of truth: ENGINEERING.md.
1
+ Follow docs/ENGINEERING.md strictly. Source of truth: docs/ENGINEERING.md.
@@ -1 +1 @@
1
- Follow ENGINEERING.md strictly. Source of truth: ENGINEERING.md.
1
+ Follow docs/ENGINEERING.md strictly. Source of truth: docs/ENGINEERING.md.
@@ -1,6 +1,6 @@
1
1
  # Deploy Runbook(单机 systemd / jar)
2
2
 
3
- 部署参数统一读取:`ENGINEERING.md` frontmatter
3
+ 部署参数统一读取:`docs/ENGINEERING.md` frontmatter
4
4
  - deployment.host / deployment.ssh_port / deployment.username / deployment.password
5
5
  - deployment.service_name / deployment.systemd_dir
6
6
  - deployment.remote_app_root / deployment.remote_jar_path / deployment.remote_config_dir / deployment.remote_bin_dir
@@ -1,7 +1,7 @@
1
1
  # Review — <Task ID> — YYYY-MM-DD HH:MM
2
2
 
3
3
  ## 1. 静态分析结果(必须)
4
- - Command:lint + typecheck(来自 ENGINEERING.md frontmatter)
4
+ - Command:lint + typecheck(来自 docs/ENGINEERING.md frontmatter)
5
5
  - Summary:
6
6
  - Issues:
7
7
  - Resolved/Deferred(deferred 必须给出后续任务):
@@ -28,7 +28,7 @@
28
28
  - 回滚方式:
29
29
 
30
30
  ## 5. 质量门禁证据(必须可追溯)
31
- - 项目配置:`ENGINEERING.md`(frontmatter)
31
+ - 项目配置:`docs/ENGINEERING.md`(frontmatter)
32
32
  - 本地CI:`ci-local`
33
33
  - 静态分析:`static`
34
34
  - Review 文档:`docs/reviews/<TASK_ID>-<timestamp>.md`
@@ -18,7 +18,7 @@
18
18
  - [ ] T0001-2 <subtask>
19
19
 
20
20
  ### 证据(完成后填写)
21
- - 项目配置:`ENGINEERING.md`(frontmatter)
21
+ - 项目配置:`docs/ENGINEERING.md`(frontmatter)
22
22
  - DD:`docs/design/T0001-<slug>.md`
23
23
  - Review:`docs/reviews/T0001-YYYYMMDD-HHMM.md`
24
24
  - API 文档:`docs/interfaces/api.md`
@@ -21,7 +21,7 @@ def cmd_install(args: argparse.Namespace) -> None:
21
21
  templates = _skill_root() / "data" / "templates"
22
22
 
23
23
  copy_tree(templates / "docs", repo / "docs")
24
- copy_tree(templates / "ENGINEERING.md", repo / "ENGINEERING.md")
24
+ copy_tree(templates / "ENGINEERING.md", repo / "docs" / "ENGINEERING.md")
25
25
 
26
26
  if args.bridges:
27
27
  copy_tree(templates / "bridges", repo)
@@ -32,7 +32,7 @@ def cmd_install(args: argparse.Namespace) -> None:
32
32
  copy_tree(Path(__file__).resolve().parent / "core.py", scripts_dir / "core.py")
33
33
 
34
34
  gi = repo / ".gitignore"
35
- secret_line = "ENGINEERING.md"
35
+ secret_line = "docs/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,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: edit ENGINEERING.md frontmatter and fill all project/env fields")
44
+ print("[install] Next: edit docs/ENGINEERING.md frontmatter and fill all project/env fields")
45
45
 
46
46
 
47
47
  def _infer_title(taskbook: Path, task_id: str) -> str:
@@ -164,7 +164,7 @@ def cmd_run(args: argparse.Namespace) -> None:
164
164
  """
165
165
  Run a configured gate command:
166
166
  build | test | lint | typecheck | format | smoke | regression
167
- Commands are read from ENGINEERING.md frontmatter.
167
+ Commands are read from docs/ENGINEERING.md frontmatter.
168
168
  """
169
169
  repo = Path(args.repo).resolve()
170
170
  cfg = _load_cfg(repo)
@@ -173,7 +173,7 @@ def cmd_run(args: argparse.Namespace) -> None:
173
173
  if name not in commands:
174
174
  raise APError(
175
175
  f"Command not configured: commands.{name}. "
176
- "Edit ENGINEERING.md frontmatter. "
176
+ "Edit docs/ENGINEERING.md frontmatter. "
177
177
  f"Available: {', '.join(commands.keys()) or '(none)'}"
178
178
  )
179
179
  cmd = str(commands[name])
@@ -97,13 +97,13 @@ def http_get_status(url: str, timeout_s: int = 5) -> int:
97
97
  def find_config(repo: Path) -> Path:
98
98
  """Find single source project config file."""
99
99
  candidates = [
100
- repo / "ENGINEERING.md",
100
+ repo / "docs" / "ENGINEERING.md",
101
101
  ]
102
102
  for c in candidates:
103
103
  if c.exists():
104
104
  return c
105
105
  raise APError(
106
- "Project config not found. Create ENGINEERING.md "
106
+ "Project config not found. Create docs/ENGINEERING.md "
107
107
  "and put commands + deployment fields in YAML frontmatter."
108
108
  )
109
109
 
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 = "ENGINEERING.md";
67
+ const line = "docs/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.2",
3
+ "version": "0.1.3",
4
4
  "description": "CLI installer for auto-coding-skill (Claude Code + Codex CLI).",
5
5
  "type": "module",
6
6
  "bin": {