@laitszkin/apollo-toolkit 3.8.4 → 3.9.0
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/CHANGELOG.md +5 -0
- package/align-project-documents/SKILL.md +49 -121
- package/analyse-app-logs/scripts/__pycache__/filter_logs_by_time.cpython-312.pyc +0 -0
- package/analyse-app-logs/scripts/__pycache__/log_cli_utils.cpython-312.pyc +0 -0
- package/analyse-app-logs/scripts/__pycache__/search_logs.cpython-312.pyc +0 -0
- package/commit-and-push/SKILL.md +52 -75
- package/develop-new-features/SKILL.md +53 -113
- package/docs-to-voice/scripts/__pycache__/docs_to_voice.cpython-312.pyc +0 -0
- package/enhance-existing-features/SKILL.md +59 -125
- package/generate-spec/SKILL.md +86 -195
- package/generate-spec/scripts/__pycache__/create-specscpython-312.pyc +0 -0
- package/implement-specs/SKILL.md +47 -43
- package/implement-specs-with-subagents/SKILL.md +69 -165
- package/implement-specs-with-worktree/SKILL.md +53 -102
- package/katex/scripts/__pycache__/render_katex.cpython-312.pyc +0 -0
- package/maintain-project-constraints/SKILL.md +53 -105
- package/maintain-skill-catalog/SKILL.md +46 -42
- package/open-github-issue/scripts/__pycache__/open_github_issue.cpython-312.pyc +0 -0
- package/package.json +1 -1
- package/read-github-issue/scripts/__pycache__/find_issues.cpython-312.pyc +0 -0
- package/read-github-issue/scripts/__pycache__/read_issue.cpython-312.pyc +0 -0
- package/resolve-review-comments/scripts/__pycache__/review_threads.cpython-312.pyc +0 -0
- package/review-spec-related-changes/SKILL.md +49 -82
- package/solve-issues-found-during-review/SKILL.md +46 -106
- package/text-to-short-video/scripts/__pycache__/enforce_video_aspect_ratio.cpython-312.pyc +0 -0
- package/version-release/SKILL.md +52 -88
package/CHANGELOG.md
CHANGED
|
@@ -34,6 +34,11 @@ All notable changes to this repository are documented in this file.
|
|
|
34
34
|
### Added
|
|
35
35
|
- (None yet)
|
|
36
36
|
|
|
37
|
+
## [v3.9.0] - 2026-05-05
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
- Refine agent-facing descriptions and workflow copy across planning, review, and submission skills (`commit-and-push`, `version-release`, `generate-spec`, `implement-specs*`, `develop-new-features`, `enhance-existing-features`, `review-spec-related-changes`, `solve-issues-found-during-review`, `maintain-skill-catalog`, `align-project-documents`, `maintain-project-constraints`); keep CI-visible contract wording aligned with `test/skill-workflows.test.js`.
|
|
41
|
+
|
|
37
42
|
## [v3.8.4] - 2026-05-04
|
|
38
43
|
|
|
39
44
|
### Changed
|
|
@@ -1,158 +1,86 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: align-project-documents
|
|
3
|
-
description:
|
|
3
|
+
description: >-
|
|
4
|
+
Regenerate standardized tree `docs/features` (BDD zero code paths), `docs/architecture` (macro layer rules), `docs/principles` (evidence-backed conventions) after reading the ENTIRE production codebase—legacy scattered Markdown must migrate or be removed before finish then invoke **`maintain-project-constraints`** so AGENTS/CLAUDE indexes match disk.
|
|
5
|
+
Use for repo-wide doc realignments (“rebuild project docs from code”)—skip for single-file README nitpicks unless user explicitly requests full regeneration.
|
|
6
|
+
Violation examples: features mentioning `src/foo.ts`… acceptable feature: “Given signed-in user When export Then CSV downloads”… architecture stays stable if module renamed internally…
|
|
4
7
|
---
|
|
5
8
|
|
|
6
9
|
# Align Project Documents
|
|
7
10
|
|
|
8
11
|
## Dependencies
|
|
9
12
|
|
|
10
|
-
- Required: `maintain-project-constraints` to refresh `AGENTS.md
|
|
13
|
+
- Required: `maintain-project-constraints` after `docs/` work to refresh `AGENTS.md`/`CLAUDE.md` and the doc index.
|
|
11
14
|
- Conditional: none.
|
|
12
15
|
- Optional: none.
|
|
13
|
-
- Fallback:
|
|
16
|
+
- Fallback: If `maintain-project-constraints` cannot run, **MUST NOT** pretend the constraints files are refreshed—report the gap.
|
|
14
17
|
|
|
15
|
-
##
|
|
18
|
+
## Non-negotiables
|
|
16
19
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
20
|
+
- **MUST** read the **entire** codebase (all meaningful source/config/test entrypoints—not a single-folder sample) **before** writing category docs; code is sole truth—existing prose is corroborating only.
|
|
21
|
+
- **MUST NOT** ship `docs/features/` bullets that cite file paths, function names, or implementation detail—user-facing **BDD** only (`Given` / `When` / `Then`).
|
|
22
|
+
- **`docs/architecture/`** stays **macro** (layers, boundaries, data-flow direction)—**MUST NOT** document code that will rot on every refactor.
|
|
23
|
+
- **`docs/principles/`** **MUST** remain traceable to **concrete** repo patterns (with examples)—not aspirational platitudes without evidence.
|
|
24
|
+
- **MUST** create or refresh `docs/features/`, `docs/architecture/`, `docs/principles/` with categorized files; **MUST** remove or migrate stale non-conforming docs (**MUST NOT** leave mixed legacy layout alongside new structure indefinitely).
|
|
25
|
+
- **MUST** invoke **`maintain-project-constraints`** after category docs stabilize so `AGENTS.md`/`CLAUDE.md` indexes match disk.
|
|
26
|
+
- Default doc **language**: match user preference or repo’s dominant README/docs language consistently per run.
|
|
21
27
|
|
|
22
|
-
##
|
|
28
|
+
## Standards (summary)
|
|
23
29
|
|
|
24
|
-
|
|
30
|
+
- **Evidence**: Paths and reads logged while building claims; contradictory old docs flagged, not blindly merged.
|
|
31
|
+
- **Execution**: Whole repo read → ingest old docs → write three pillars → prune → constraints refresh.
|
|
32
|
+
- **Quality**: Features user-only; architecture stable abstractions; principles evidence-backed.
|
|
33
|
+
- **Output**: Standardized tree + synced agent constraint files.
|
|
25
34
|
|
|
26
|
-
## Target
|
|
35
|
+
## Target structure
|
|
27
36
|
|
|
28
37
|
```
|
|
29
38
|
docs/
|
|
30
|
-
├── features/ —
|
|
31
|
-
├── architecture/ —
|
|
32
|
-
└── principles/ —
|
|
39
|
+
├── features/ — User-facing capability, BDD only (no code paths)
|
|
40
|
+
├── architecture/ — Layers/modules, boundaries, integration contracts (macro)
|
|
41
|
+
└── principles/ — Style, tooling, conventions with codebase examples
|
|
33
42
|
```
|
|
34
43
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
- Describe what the system does from a user's perspective.
|
|
38
|
-
- Never reference specific code paths, file names, or implementation details.
|
|
39
|
-
- Use BDD (Behavior-Driven Development) phrasing: "Given ... When ... Then ...".
|
|
40
|
-
- Group features by functional category; each category gets its own markdown file.
|
|
41
|
-
- File titles must clearly convey which functional area or module they cover.
|
|
42
|
-
|
|
43
|
-
Example feature description:
|
|
44
|
-
|
|
45
|
-
```markdown
|
|
46
|
-
# 用戶認證與授權
|
|
47
|
-
|
|
48
|
-
## 登入
|
|
49
|
-
|
|
50
|
-
- **Given** 用戶擁有有效的帳號密碼
|
|
51
|
-
- **When** 用戶提交登入表單
|
|
52
|
-
- **Then** 系統驗證憑證並返回存取令牌,用戶進入主頁面
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### docs/architecture/
|
|
56
|
-
|
|
57
|
-
- Extract macro-level design principles from the codebase.
|
|
58
|
-
- Group principles by module or architectural layer; each module gets its own markdown file.
|
|
59
|
-
- Every principle must be sufficiently abstract to avoid becoming stale after minor code changes.
|
|
60
|
-
- Focus on module responsibilities, boundary rules, data flow direction, and integration contracts — not on specific implementation details.
|
|
61
|
-
|
|
62
|
-
Example architecture principle:
|
|
63
|
-
|
|
64
|
-
```markdown
|
|
65
|
-
# API 層設計原則
|
|
66
|
-
|
|
67
|
-
## 路由與處理器分離
|
|
68
|
-
|
|
69
|
-
路由定義與請求處理邏輯存放在不同模組中。路由層只負責 URL 映射與中介軟體綁定,
|
|
70
|
-
處理器層負責請求解析、業務邏輯調用與回應組裝。
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### docs/principles/
|
|
74
|
-
|
|
75
|
-
- Extract code style, naming conventions, and development constraints from the codebase.
|
|
76
|
-
- Categorize into separate markdown files (e.g., naming conventions, dependency management, error handling patterns).
|
|
77
|
-
- Each principle must be traceable to concrete examples in the codebase.
|
|
78
|
-
|
|
79
|
-
Example principle:
|
|
80
|
-
|
|
81
|
-
```markdown
|
|
82
|
-
# 命名約定
|
|
83
|
-
|
|
84
|
-
## 檔案命名
|
|
85
|
-
|
|
86
|
-
- TypeScript 模組檔案使用 kebab-case:`user-service.ts`
|
|
87
|
-
- React 元件檔案使用 PascalCase:`UserProfile.tsx`
|
|
88
|
-
- 測試檔案與被測檔案同名,加上 `.test` 後綴:`user-service.test.ts`
|
|
89
|
-
```
|
|
44
|
+
Extended rules and checklist: `references/templates/standardized-docs-template.md`.
|
|
90
45
|
|
|
91
46
|
## Workflow
|
|
92
47
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
- Read every source file in the repository to build a complete mental model.
|
|
96
|
-
- Pay special attention to:
|
|
97
|
-
- Entry points (CLI commands, server startup, job runners)
|
|
98
|
-
- Public-facing interfaces (API routes, CLI commands, UI pages)
|
|
99
|
-
- Module boundaries and dependency directions
|
|
100
|
-
- Configuration files, environment variables, and external service integrations
|
|
101
|
-
- Test files that document expected behavior
|
|
102
|
-
- Record concrete file paths as evidence for every claim that will appear in documentation.
|
|
103
|
-
|
|
104
|
-
### 2) Read existing project documentation as reference
|
|
48
|
+
**Chain-of-thought:** **`Pause →`** after each major phase; ambiguity on “user-visible” vs “internal” ⇒ re-read callers before classifying.
|
|
105
49
|
|
|
106
|
-
|
|
107
|
-
- Extract factual claims that can be cross-referenced with the codebase.
|
|
108
|
-
- Note gaps where documentation is missing or outdated.
|
|
109
|
-
- Treat existing docs as secondary sources; code is always the primary source of truth.
|
|
50
|
+
### 1) Read entire codebase
|
|
110
51
|
|
|
111
|
-
|
|
52
|
+
- Cover entrypoints (CLI/server/workers), public surfaces, boundaries, configs, integrations, tests as behavior specs.
|
|
53
|
+
- Keep an **evidence notebook** (paths) for principles and architecture—not for features text.
|
|
54
|
+
- **Pause →** Did I skip generated/vendor/`node_modules`/binary blobs incorrectly included as “must read”?
|
|
55
|
+
- **Pause →** Can I name the **top five** externally visible behaviors from code alone?
|
|
112
56
|
|
|
113
|
-
|
|
114
|
-
- For each category, classify findings from the codebase and write focused markdown files.
|
|
115
|
-
- Titles must be descriptive and immediately tell the reader what the file covers.
|
|
116
|
-
- Write in the user's language unless the repository clearly uses a different documentation language.
|
|
57
|
+
### 2) Read existing prose
|
|
117
58
|
|
|
118
|
-
|
|
119
|
-
-
|
|
120
|
-
- Group into functional categories (e.g., authentication, data export, notifications).
|
|
121
|
-
- Write BDD scenarios for each feature using Given/When/Then.
|
|
122
|
-
- Each file covers one functional category.
|
|
59
|
+
- List `README.md`, `docs/**`, `CONTRIBUTING.md`, etc.; extract facts that code confirms; flag obsolete sections.
|
|
60
|
+
- **Pause →** Where did I treat Markdown as authoritative over a contradicted implementation?
|
|
123
61
|
|
|
124
|
-
|
|
125
|
-
- Identify major modules or layers from the codebase directory structure and import graph.
|
|
126
|
-
- For each module, extract the design principles that govern its structure and boundaries.
|
|
127
|
-
- Keep principles at the macro level; avoid principles that would need updating for minor code changes.
|
|
128
|
-
- Each file covers one module or architectural layer.
|
|
62
|
+
### 3) Generate three pillars
|
|
129
63
|
|
|
130
|
-
**
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
-
|
|
64
|
+
- **features/**: categories → one markdown per category → BDD scenarios only.
|
|
65
|
+
- **architecture/**: one file per layer/module cluster → boundaries and flows, stable wording.
|
|
66
|
+
- **principles/**: split files (`naming-conventions.md`, etc.) → each point ties to observable repo habit.
|
|
67
|
+
- **Pause →** Random feature paragraph: grep for `./src` or `` ` `` — if found, rewrite for user observable outcome only.
|
|
134
68
|
|
|
135
|
-
### 4) Remove
|
|
69
|
+
### 4) Remove non-conforming legacy
|
|
136
70
|
|
|
137
|
-
-
|
|
138
|
-
- Remove any documentation file whose content has been fully migrated into the new structure.
|
|
139
|
-
- Keep only files that belong to the new structure or have not yet been migrated.
|
|
140
|
-
- When in doubt, preserve the file and note it as a candidate for later migration.
|
|
71
|
+
- Delete or migrate files fully superseded; if uncertain, **keep** file list in report as migration backlog — **do not** silently duplicate two competing truths forever.
|
|
141
72
|
|
|
142
|
-
### 5)
|
|
73
|
+
### 5) Refresh constraints
|
|
143
74
|
|
|
144
|
-
-
|
|
145
|
-
- `maintain-project-constraints` will read the codebase (or the newly generated docs), extract macro business goals, write them to `AGENTS.md`/`CLAUDE.md`, and maintain the project document index.
|
|
75
|
+
- Run **`maintain-project-constraints`** so Commands / Business Goals / Doc Index mirror new files.
|
|
146
76
|
|
|
147
|
-
|
|
77
|
+
### 6) Gates before finish
|
|
148
78
|
|
|
149
|
-
-
|
|
150
|
-
- Every architecture principle is macro-level and resilient to minor code changes.
|
|
151
|
-
- Every code principle is traceable to concrete examples in the codebase.
|
|
152
|
-
- All generated files have descriptive, scannable titles.
|
|
153
|
-
- No stale documentation remains that duplicates or contradicts the new structure.
|
|
154
|
-
- `maintain-project-constraints` has been run and `AGENTS.md`/`CLAUDE.md` is up to date.
|
|
79
|
+
- No code paths in features; architecture still macro after imagined small refactor; principles cite real examples; index lists every file under the three dirs; constraints skill executed.
|
|
155
80
|
|
|
156
|
-
##
|
|
81
|
+
## Sample hints
|
|
157
82
|
|
|
158
|
-
-
|
|
83
|
+
- **Feature OK**: “Given a signed-in user When they export Then a CSV download starts” — no `handlers/export.rs` references.
|
|
84
|
+
- **Feature bad**: “Call `ExportService.run` …” — violates Non-negotiables (implementation leak).
|
|
85
|
+
- **Architecture OK**: “API layer handles I/O only; domain module owns business rules” — stable across internal renames.
|
|
86
|
+
- **Principle OK**: “TypeScript files use kebab-case — see `src/user-profile/`” — traceable pattern.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/commit-and-push/SKILL.md
CHANGED
|
@@ -1,94 +1,71 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: commit-and-push
|
|
3
|
-
description:
|
|
3
|
+
description: >-
|
|
4
|
+
Commit and push only (no semver): inspect staged vs unstaged, classify scopes, run mandated reviews (`review-change-set`, conditional `discover-edge-cases`/`harden-app-security`), **`submission-readiness-check`** BEFORE final commit honoring `CHANGELOG.md` Unreleased + `archive-specs` redirections, preserve intentional staging splits, forbid UI git stubs, VERIFY remote hashes post-push **`version-release` elsewhere**.
|
|
5
|
+
Use for “please commit”, “submit”, “push branch” lacking explicit semver/tag language **STOP** tagging here… BAD skip readiness red… GOOD staged subset untouched unrelated dirty files changelog mirrors diff… hashes `git rev-parse HEAD` versus upstream… archive specs before commit flagged…
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# Commit and Push
|
|
7
9
|
|
|
8
10
|
## Dependencies
|
|
9
11
|
|
|
10
|
-
- Required:
|
|
11
|
-
- Conditional:
|
|
12
|
+
- Required: **`submission-readiness-check`** immediately before the **final** commit.
|
|
13
|
+
- Conditional: **`archive-specs`** when readiness (or completed specs) requires doc conversion or categorized `docs/` alignment; **`review-change-set`** for every **code-affecting** scope; **`discover-edge-cases`** and **`harden-app-security`** become **required** when classification/risk indicates (same scope)—treat as blocking, not polish.
|
|
12
14
|
- Optional: none.
|
|
13
|
-
- Fallback:
|
|
15
|
+
- Fallback: Any **required** dependency unavailable ⇒ **MUST** stop and report—**MUST NOT** “light” commit.
|
|
14
16
|
|
|
15
|
-
##
|
|
17
|
+
## Non-negotiables
|
|
16
18
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
19
|
+
- **MUST** use real `git` mutations (`git add`, `git commit`, `git push`, `git stash`, etc.); **MUST NOT** treat UI tokens (`::git-commit`, IDE buttons) as proof of history.
|
|
20
|
+
- **MUST** run **`submission-readiness-check`** before final commit; unresolved readiness (e.g. stale/missing `CHANGELOG.md` **Unreleased**, doc drift) **blocks** commit.
|
|
21
|
+
- Code-affecting: **`review-change-set` MANDATORY**; unresolved confirmed findings **block**. When risk profile matches, **`discover-edge-cases`** / **`harden-app-security`** equally blocking.
|
|
22
|
+
- **`archive-specs`**: when readiness says convert/archive or `docs/` mismatch—**MUST** run **before** final commit, not as a vague follow-up.
|
|
23
|
+
- **MUST** reconcile **staged vs unstaged** with user intent—**MUST NOT** broaden scope by auto-staging unrelated files when user staged a subset.
|
|
24
|
+
- **`CHANGELOG.md` `Unreleased`**: for code-affecting or user-visible docs, **MUST** reflect this change before commit; reopen diff after edits to match commit scope.
|
|
25
|
+
- **MUST** resolve **target branch** per user (or current if explicit) before rewriting history; protect unrelated dirty work (`stash` etc.); **no** force-push unless user explicitly requests.
|
|
26
|
+
- After **push**, **MUST** verify remote tip matches local `HEAD` (`git rev-parse` / `@{u}` / `ls-remote`) before claiming success.
|
|
27
|
+
- **MUST NOT** run version bump, tag, or GitHub release (**use `version-release`**).
|
|
28
|
+
- Clean worktree requests: **MUST** inspect `HEAD`, upstream, last commit—**MUST NOT** fabricate “pushed” when already satisfied or impossible.
|
|
21
29
|
|
|
22
|
-
|
|
30
|
+
**Repository regression checks (verbatim requirements):** Treat root `CHANGELOG.md` `Unreleased` coverage as mandatory for code-affecting or user-visible changes. Re-open the final `CHANGELOG.md` diff after readiness updates. **`review-change-set` is required for code-affecting changes**; Run `review-change-set` for every code-affecting change before continuing; treat unresolved review findings as blocking. Any conditional gate whose trigger is confirmed by this classification becomes mandatory before commit. Treat every scenario-matched gate as blocking before commit. **`discover-edge-cases` and `harden-app-security` are important review gates**—when their scenario is met, treat them as blocking review gates, not optional polish.
|
|
31
|
+
|
|
32
|
+
## Standards (summary)
|
|
23
33
|
|
|
24
|
-
|
|
34
|
+
- **Evidence**: `git status`/`diff`; classification drives gates; changelog diff matches commit.
|
|
35
|
+
- **Execution**: Inspect → classify → (deps) → readiness → commit → push verify.
|
|
36
|
+
- **Quality**: No gate bypass; sequential git ops; preserve intentional commit boundaries.
|
|
37
|
+
- **Output**: Conventional commit message + confirmed remote + note stash/scope if any.
|
|
38
|
+
|
|
39
|
+
## References
|
|
25
40
|
|
|
26
41
|
- `references/commit-messages.md`
|
|
27
42
|
- `references/branch-naming.md`
|
|
28
43
|
|
|
29
44
|
## Workflow
|
|
30
45
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
- Consolidate and resolve all confirmed findings before continuing.
|
|
58
|
-
- Re-run relevant tests when runtime logic changes.
|
|
59
|
-
5. Run shared submission readiness
|
|
60
|
-
- Execute `$submission-readiness-check` after code/doc scans are complete and before the final commit.
|
|
61
|
-
- Let it decide whether completed plan sets should be converted, whether project docs need alignment through `archive-specs`, and whether `CHANGELOG.md` is blocking submission.
|
|
62
|
-
- Do not continue to commit while `submission-readiness-check` reports unresolved readiness blockers.
|
|
63
|
-
- Treat root `CHANGELOG.md` `Unreleased` coverage as mandatory for code-affecting or user-visible changes: if the current work is not reflected there yet, update it before committing instead of merely noting the gap.
|
|
64
|
-
- Re-open the final `CHANGELOG.md` diff after readiness updates and confirm the `Unreleased` bullets describe the same scope as the commit you are about to create.
|
|
65
|
-
- When readiness indicates doc conversion or project-doc drift, run `archive-specs` before the final commit instead of duplicating documentation alignment work locally.
|
|
66
|
-
6. Commit
|
|
67
|
-
- Preserve user staging intent where possible.
|
|
68
|
-
- If the user explicitly asks for separate commits, or the staged set is already a deliberate subset of the worktree, keep those scopes separated and do not auto-stage the remaining diff unless the user expands the requested scope.
|
|
69
|
-
- If the user later broadens the requested scope, restate the new grouping, verify it against the actual staged/unstaged surfaces, and only then create the additional commit(s).
|
|
70
|
-
- Use actual `git add` / `git commit` operations; do not emit UI git directives as a stand-in for repository mutations.
|
|
71
|
-
- Write a concise Conventional Commit message using `references/commit-messages.md`.
|
|
72
|
-
7. Push
|
|
73
|
-
- Push commit(s) to the intended branch.
|
|
74
|
-
- Do not overlap `git commit`, `git push`, branch switching, or post-push sync operations; wait for each mutation to finish before starting the next one.
|
|
75
|
-
- After pushing, verify the remote branch tip matches the local `HEAD`, for example by comparing `git rev-parse HEAD` with the target branch hash from `git rev-parse @{u}` or `git ls-remote --heads <remote> <branch>`.
|
|
76
|
-
- If the push result is ambiguous, out of order, or the hashes do not match, rerun the missing git step sequentially and re-check before reporting success.
|
|
77
|
-
- Confirm the local branch state matches the user's requested destination when post-push synchronization was requested.
|
|
78
|
-
- When the user explicitly asks to merge work back from a temporary worktree and delete that worktree, do the final verification on the authoritative target branch first, then remove the temporary worktree and prune stale worktree records before reporting completion.
|
|
79
|
-
- Do not claim success based on emitted UI directives or optimistic status text alone; remote-hash verification is the required evidence.
|
|
80
|
-
|
|
81
|
-
## Notes
|
|
82
|
-
|
|
83
|
-
- Never run version bump, tag creation, or changelog release steps in this skill.
|
|
84
|
-
- Treat every scenario-matched gate as blocking before commit, not as an optional reminder to maybe do later.
|
|
85
|
-
- Never skip `review-change-set` for code-affecting changes, and do not continue past review while confirmed findings remain unresolved.
|
|
86
|
-
- Never downgrade `discover-edge-cases` or `harden-app-security` to optional follow-up when the change risk says they apply.
|
|
87
|
-
- Never claim the repository is ready to commit while root `CHANGELOG.md` `Unreleased` is missing the current change or still describes superseded work.
|
|
88
|
-
- Never fabricate a commit/push result when the worktree is already clean; either identify the exact existing commit/upstream state that satisfies the user's request or say that no matching new submission exists.
|
|
89
|
-
- Never treat `::git-stage`, `::git-commit`, `::git-push`, or similar UI helpers as proof that repository history was mutated; rely on actual git command results plus local/remote hash checks.
|
|
90
|
-
- Never delete a temporary worktree before the target branch has been updated, tested, and verified to contain the intended final content.
|
|
91
|
-
- Never auto-stage or auto-merge unrelated unstaged changes into a commit when the user or current index state already defines narrower commit boundaries.
|
|
92
|
-
- If release/version/tag work is requested, use `version-release` instead.
|
|
93
|
-
- If a new branch is required, follow `references/branch-naming.md`.
|
|
94
|
-
- A pushed implementation can still leave an active spec set behind; commit completion and spec archival are separate decisions.
|
|
46
|
+
**Chain-of-thought:** **`Pause →`** guards skipping a gate or mis-sizing scope.
|
|
47
|
+
|
|
48
|
+
1. **Inspect** — `git status -sb`; `git diff --stat`; `git diff --cached --stat`; `git diff --cached --name-only`. If clean: `git log -1 --stat`, upstream tracking, whether work already pushed.
|
|
49
|
+
- **Pause →** Is the user’s intended commit **exactly** the staged set, or full worktree—I must not mix them silently?
|
|
50
|
+
|
|
51
|
+
2. **Classify** — Tag mentally: `code-affecting` | `docs-only` | `repo-specs-present` | `repo-specs-ready-for-conversion` | `project-doc-structure-mismatch` (per `archive-specs` needs). Active specs with unfinished same-change work stay active.
|
|
52
|
+
- **Pause →** Which conditional skills just became **mandatory**—did I list them explicitly?
|
|
53
|
+
|
|
54
|
+
3. **Branch target** — Honor user branch; if switch needed, protect unrelated changes; cherry-pick/replay off wrong branch safely; worktree cases: identify authoritative target **before** replay.
|
|
55
|
+
- **Pause →** Am I about to merge noise because diff > issue scope—should I stop and narrow first?
|
|
56
|
+
|
|
57
|
+
4. **Code-affecting gates** — `review-change-set` always; add `discover-edge-cases` / `harden-app-security` when risk/trigger says so; fix or document blockers; re-test material logic.
|
|
58
|
+
|
|
59
|
+
5. **Readiness** — Run **`submission-readiness-check`**; if it routes to **`archive-specs`**, run that **now**; fix `Unreleased` bullets; recheck changelog vs staged intent.
|
|
60
|
+
- **Pause →** Could I commit while readiness still red—**why not**?
|
|
61
|
+
|
|
62
|
+
6. **Commit** — Respect staging; separate commits if user asked; Conventional message per `references/commit-messages.md`.
|
|
63
|
+
|
|
64
|
+
7. **Push** — Sequential; verify remote hash; sync local branch after if user asked; worktree cleanup **only after** target branch verified good.
|
|
65
|
+
- **Pause →** What two hashes prove remote == local?
|
|
66
|
+
|
|
67
|
+
## Sample hints
|
|
68
|
+
|
|
69
|
+
- **Scope**: Staged `foo.ts` only; unstaged `bar.ts` unrelated → commit **must not** pick up `bar.ts` without user scope change.
|
|
70
|
+
- **Changelog**: Code change with no `Unreleased` bullet → **blocking** until added.
|
|
71
|
+
- **Push proof**: “Pushed” means e.g. local `abc123` equals `origin/feature` `abc123`, not “command sent.”
|
|
@@ -1,134 +1,74 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: develop-new-features
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
`
|
|
7
|
-
implements the approved feature with focused validation.
|
|
8
|
-
Use when users ask to design or implement new features, change product
|
|
9
|
-
behavior, request a planning-first process, or ask for a greenfield feature.
|
|
10
|
-
Once the approved spec set exists and implementation begins, complete all
|
|
11
|
-
planned tasks and applicable checklist items before yielding unless the user
|
|
12
|
-
changes scope or an external blocker prevents safe completion.
|
|
13
|
-
Tests must not stop at happy-path validation: for business-logic changes
|
|
14
|
-
require property-based testing unless explicitly `N/A` with reason, design
|
|
15
|
-
adversarial/regression/authorization/idempotency/concurrency coverage where
|
|
16
|
-
relevant, use mocks for external services in logic chains, and verify
|
|
17
|
-
meaningful business outcomes rather than smoke-only success.
|
|
4
|
+
Net-new or materially new product behavior: **`generate-spec`** is mandatory (clarify → approve → only then code) with **`test-case-strategy`** backing every serious logic change—property tests required unless documented `N/A`, add adversarial/auth/idempotency/concurrency/mocks for external services, cap each spec at three modules and split coordinated batches via `coordination.md`, finish every approved `tasks.md`/`checklist.md` item or document deferrals.
|
|
5
|
+
Use when users ask for “new feature”, “greenfield slice”, “plan-first delivery”. Reroute typo-only UI, bug restores, or internal refactors without product impact to **`enhance-existing-features`** / **`systematic-debug`**.
|
|
6
|
+
Bad: editing `src/api.ts` before approval exists… Good: spec records risk → tests map to requirement IDs… Typo fix in footer copy → wrong skill…
|
|
18
7
|
---
|
|
19
8
|
|
|
20
9
|
# Develop New Features
|
|
21
10
|
|
|
22
11
|
## Dependencies
|
|
23
12
|
|
|
24
|
-
- Required: `generate-spec` for
|
|
13
|
+
- Required: `generate-spec` for shared planning artifacts and `test-case-strategy` for risk-driven test selection, oracles, and unit drift checks before coding.
|
|
25
14
|
- Conditional: none.
|
|
26
15
|
- Optional: none.
|
|
27
|
-
- Fallback:
|
|
16
|
+
- Fallback: **`generate-spec`** **or** **`test-case-strategy`** missing ⇒ **stop** (no improvised planning/tests).
|
|
28
17
|
|
|
29
|
-
##
|
|
18
|
+
## Non-negotiables
|
|
30
19
|
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
20
|
+
- This skill applies to **non-trivial new behavior / greenfield**. **MUST NOT** activate for: pure bug restore; style/copy-only tweaks; trivial one-pocket config/constants; internal-only refactors/no visible behavior—these routes belong to **`enhance-existing-features`**, **`systematic-debug`**, etc., **without** new specs here.
|
|
21
|
+
- **When this skill applies**, **`generate-spec` is mandatory** before product code: create/update plans, BDD reqs, contracts, design, optional batch **`coordination.md`**, obtain **explicit approval**, then implement.
|
|
22
|
+
- **≤3 modules** per spec set; wider work ⇒ multiple **independent** spec sets under batch + **`coordination.md`** (no hidden cross-deps).
|
|
23
|
+
- **MUST NOT** modify product code **before** approval.
|
|
24
|
+
- Post-approval: **all** in-scope **`tasks.md`/`checklist.md`** items complete unless deferral/blocker documented in artifacts.
|
|
25
|
+
- **`test-case-strategy`**: risk-first; property-based logic **required** unless documented **`N/A`**; adversarial/auth/idempotency/concurrency where relevant; mocks for externals in logic chains; oracles tied to requirements.
|
|
26
|
+
- Backfill all plan files + coordination when batch; no fake-completed template branches.
|
|
35
27
|
|
|
36
|
-
##
|
|
28
|
+
## Standards (summary)
|
|
37
29
|
|
|
38
|
-
|
|
30
|
+
- **Evidence**: Official docs + repo architecture pass before plan lock.
|
|
31
|
+
- **Execution**: Route-out trivial work → spec → implement → test → backfill.
|
|
32
|
+
- **Quality**: Plans trace to tests; minimal speculative code.
|
|
33
|
+
- **Output**: Approved scope shipped + honest plan status.
|
|
39
34
|
|
|
40
35
|
## Workflow
|
|
41
36
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
### 2)
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
### 3) Explore architecture and reuse opportunities
|
|
77
|
-
|
|
78
|
-
- Trace entrypoints, module boundaries, data flow, and integration points relevant to the new behavior.
|
|
79
|
-
- Identify reusable components, patterns, and configuration paths before adding new code.
|
|
80
|
-
- Keep a concise map of likely files to modify so implementation stays scoped.
|
|
81
|
-
|
|
82
|
-
### 4) Implement after approval
|
|
83
|
-
|
|
84
|
-
- Reuse existing patterns and abstractions when possible.
|
|
85
|
-
- Keep changes focused and avoid speculative scope expansion.
|
|
86
|
-
- Update environment examples only when new inputs are actually required.
|
|
87
|
-
- Once approval is granted and implementation starts, treat every unchecked in-scope item in `tasks.md` and every applicable item in `checklist.md` as required work for this run.
|
|
88
|
-
- Do not stop after a partial implementation, partial test pass, or partial doc backfill when work remains in the approved plan.
|
|
89
|
-
- Only pause before completion if:
|
|
90
|
-
- the user changes scope or explicitly asks to stop
|
|
91
|
-
- a new clarification invalidates the approved plan and requires renewed approval
|
|
92
|
-
- an external blocker (missing credentials, unavailable dependency, access restriction, broken upstream system) prevents safe completion
|
|
93
|
-
- When blocked, record the exact unfinished items and blocker in the plan artifacts before yielding.
|
|
94
|
-
|
|
95
|
-
### 5) Testing coverage (required)
|
|
96
|
-
|
|
97
|
-
Use `$test-case-strategy` for every non-trivial change.
|
|
98
|
-
|
|
99
|
-
- Start from risk inventory and requirement IDs, not from the happy path.
|
|
100
|
-
- Define test oracles before implementation and map them to `spec.md`, `tasks.md`, and `checklist.md`.
|
|
101
|
-
- For each atomic task that changes non-trivial local logic, define a focused unit drift check or record the smallest replacement verification with a concrete `N/A` reason.
|
|
102
|
-
- Add unit, regression, property-based, integration, E2E, adversarial, mock/fake, rollback, or no-partial-write coverage only when the risk profile warrants it.
|
|
103
|
-
- Each planned test must have a meaningful oracle: exact business output, persisted state, emitted side effects, or intentional lack of side effects.
|
|
104
|
-
- Run relevant tests when possible and fix failures.
|
|
105
|
-
|
|
106
|
-
### 6) Completion updates
|
|
107
|
-
|
|
108
|
-
- Backfill `spec.md`, `tasks.md`, `checklist.md`, `contract.md`, and `design.md` through `$generate-spec` workflow after implementation and testing.
|
|
109
|
-
- If the feature used a parallel batch, also backfill `coordination.md` with any final shared preparation, cutover, or ownership changes that emerged during execution.
|
|
110
|
-
- In `spec.md`, mark each approved requirement with its actual completion state, such as completed, partially completed, deferred, or not implemented, plus brief evidence or rationale where needed.
|
|
111
|
-
- Mark every completed task in `tasks.md`.
|
|
112
|
-
- In `checklist.md`, update only the items that are actually applicable to the approved scope and executed validation.
|
|
113
|
-
- In `contract.md`, keep the final external dependency contract records aligned with the implementation and verified upstream constraints.
|
|
114
|
-
- In `design.md`, keep the final architecture/design description aligned with the implementation that actually shipped.
|
|
115
|
-
- Do not mark template alternatives, unused example rows, or non-applicable decision branches as completed just to make the file look fully checked.
|
|
116
|
-
- Rewrite, remove, or leave `N/A` on template-only sections so the final checklist reflects the real work rather than the starter template.
|
|
117
|
-
- Explicitly label any truly remaining applicable item as deferred or blocked with the reason.
|
|
118
|
-
- Report the implemented scope, test execution, and any concrete `N/A` reasons.
|
|
119
|
-
|
|
120
|
-
## Working Rules
|
|
121
|
-
|
|
122
|
-
- By default, write planning docs in the user's language.
|
|
123
|
-
- Keep implementation traceable to approved requirement IDs and planned risks.
|
|
124
|
-
- Keep each spec set limited to at most three modules; split larger changes into independent, non-conflicting, non-dependent spec sets before approval.
|
|
125
|
-
- When multiple spec sets are used for one feature batch, keep cross-spec rules in `coordination.md` rather than repeating them in every `design.md`.
|
|
126
|
-
- Prefer realism over rigid templates: add or remove test coverage only when the risk profile justifies it.
|
|
127
|
-
- Every planned test should justify a distinct risk; remove shallow duplicates that only prove the code "still runs".
|
|
128
|
-
- Treat starter template alternatives as mutually exclusive options, not as boxes that all need to be checked.
|
|
129
|
-
- If a spec set exists and approval has been granted, do not yield with unfinished in-scope tasks or checklist items unless the user approves a deferment or an external blocker makes completion impossible.
|
|
37
|
+
**Chain-of-thought:** If request is maintenance-sized, **`Pause →`** “Should I reroute?” before spending tokens on **`generate-spec`**.
|
|
38
|
+
|
|
39
|
+
### 1) Docs & routing
|
|
40
|
+
|
|
41
|
+
- Stack/deps discovery; verify using official sources.
|
|
42
|
+
- **Pause →** Is this truly greenfield/feature vs fix/polish—if latter, bail to other skill?
|
|
43
|
+
|
|
44
|
+
### 2) `generate-spec`
|
|
45
|
+
|
|
46
|
+
- Full workflow: dirs `docs/plans/{YYYY-MM-DD}/…`, batch/coord flags, clarification, **`MUST`** approval before code.
|
|
47
|
+
- **Pause →** Did I secretly start coding “just the types”—**hard violation**?
|
|
48
|
+
|
|
49
|
+
### 3) Architecture map
|
|
50
|
+
|
|
51
|
+
- Reuse seams; list likely files **after** approval to stay honest to plan.
|
|
52
|
+
|
|
53
|
+
### 4) Implement (post-approval)
|
|
54
|
+
|
|
55
|
+
- Execute tasks/checklist exhaustively unless blocker recorded with user-visible deferrals.
|
|
56
|
+
|
|
57
|
+
### 5) Testing
|
|
58
|
+
|
|
59
|
+
- **`test-case-strategy`** mapping requirement IDs ↔ tests; drift checks/`N/A` discipline; run and fix reds.
|
|
60
|
+
|
|
61
|
+
### 6) Completion
|
|
62
|
+
|
|
63
|
+
- Backfill **`generate-spec`**-style across **`spec/tasks/checklist/contract/design`** (+ **`coordination.md`**); requirement-level status in **`spec.md`**; strip template illusions; final report with scope + tests + `N/A`.
|
|
64
|
+
|
|
65
|
+
## Sample hints
|
|
66
|
+
|
|
67
|
+
- **Wrong skill**: “Fix typo in footer string” ⇒ not here.
|
|
68
|
+
- **Right skill**: “Add export-to-CSV for dashboard” ⇒ **`generate-spec`** then code + property tests on CSV invariants maybe.
|
|
69
|
+
- **Split**: Touches CLI + server + terraform module boundaries—three modules cap ⇒ **two spec dirs** coordinated.
|
|
130
70
|
|
|
131
71
|
## References
|
|
132
72
|
|
|
133
|
-
-
|
|
134
|
-
-
|
|
73
|
+
- **`generate-spec`**: planning/backfill authority
|
|
74
|
+
- **`test-case-strategy`**: breadth/depth of tests
|
|
Binary file
|