agentme 0.36.0 → 0.37.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/.filedist-package.yml +1 -1
- package/.xdrs/agentme/bdrs/index.md +2 -1
- package/.xdrs/agentme/bdrs/operations/{401-epic-feature-story-planning.md → 401-plan-epic-feature-story.md} +2 -2
- package/.xdrs/agentme/bdrs/operations/402-digital-product-roles.md +15 -19
- package/.xdrs/agentme/bdrs/operations/403-product-team-composition.md +3 -0
- package/.xdrs/agentme/bdrs/operations/404-team-roles-and-specialists.md +61 -82
- package/.xdrs/agentme/bdrs/operations/405-digital-product-roles-raci.md +131 -0
- package/.xdrs/agentme/bdrs/principles/002-okr-framework.md +1 -1
- package/.xdrs/agentme/bdrs/principles/003-product-delivery-value-flow.md +3 -2
- package/.xdrs/agentme/edrs/application/101-javascript-project-tooling.md +1 -1
- package/.xdrs/agentme/edrs/application/102-golang-project-tooling.md +1 -1
- package/.xdrs/agentme/edrs/application/103-python-project-tooling.md +1 -1
- package/.xdrs/agentme/edrs/application/127-external-system-adapter-skills.md +2 -0
- package/.xdrs/agentme/edrs/application/skills/{251-azure-devops-connector → azure-devops-connector}/SKILL.md +40 -9
- package/.xdrs/agentme/edrs/application/skills/{251-azure-devops-connector → azure-devops-connector}/SKILL.test.md +2 -2
- package/.xdrs/agentme/edrs/application/skills/{051-create-golang-project → create-golang-project}/SKILL.md +55 -2
- package/.xdrs/agentme/edrs/application/skills/create-golang-project/SKILL.test.md +72 -0
- package/.xdrs/agentme/edrs/application/skills/{050-create-javascript-project → create-javascript-project}/SKILL.md +57 -25
- package/.xdrs/agentme/edrs/application/skills/create-javascript-project/SKILL.test.md +72 -0
- package/.xdrs/agentme/edrs/application/skills/{052-create-python-project → create-python-project}/SKILL.md +36 -2
- package/.xdrs/agentme/edrs/application/skills/create-python-project/SKILL.test.md +79 -0
- package/.xdrs/agentme/edrs/application/skills/{250-github-connector → github-connector}/SKILL.md +39 -8
- package/.xdrs/agentme/edrs/application/skills/{250-github-connector → github-connector}/SKILL.test.md +2 -2
- package/.xdrs/agentme/edrs/application/skills/{200-run-skill-tests → run-skill-tests}/SKILL.md +39 -5
- package/.xdrs/agentme/edrs/application/skills/{200-run-skill-tests → run-skill-tests}/SKILL.test.md +8 -8
- package/.xdrs/agentme/edrs/application/skills/{010-select-relevant-xdrs → select-relevant-xdrs}/SKILL.md +36 -2
- package/.xdrs/agentme/edrs/application/skills/select-relevant-xdrs/SKILL.test.md +73 -0
- package/.xdrs/agentme/edrs/governance/502-contributing-guide-requirements.md +1 -1
- package/.xdrs/agentme/edrs/index.md +16 -11
- package/.xdrs/agentme/edrs/operations/402-dora-metrics-framework.md +82 -0
- package/.xdrs/agentme/edrs/operations/403-dora-deployment-frequency.md +37 -0
- package/.xdrs/agentme/edrs/operations/404-dora-lead-time-for-changes.md +41 -0
- package/.xdrs/agentme/edrs/operations/405-dora-change-failure-rate.md +42 -0
- package/.xdrs/agentme/edrs/operations/406-dora-time-to-restore-service.md +42 -0
- package/.xdrs/agentme/edrs/platform/301-monorepo-structure.md +1 -1
- package/.xdrs/agentme/edrs/platform/skills/{053-monorepo-setup → monorepo-setup}/SKILL.md +50 -16
- package/.xdrs/agentme/edrs/platform/skills/monorepo-setup/SKILL.test.md +80 -0
- package/.xdrs/agentme/edrs/principles/012-continuous-xdr-enrichment.md +1 -1
- package/.xdrs/agentme/edrs/principles/017-skill-testing.md +4 -4
- package/.xdrs/agentme/edrs/principles/articles/001-continuous-xdr-improvement.md +1 -1
- package/.xdrs/agentme/edrs/principles/skills/{150-refine-plan-mode → refine-plan-mode}/SKILL.md +43 -17
- package/.xdrs/agentme/edrs/principles/skills/{150-refine-plan-mode → refine-plan-mode}/SKILL.test.md +3 -3
- package/.xdrs/agentme/edrs/principles/skills/{151-refine-user-story → refine-user-story}/SKILL.md +42 -15
- package/.xdrs/agentme/edrs/principles/skills/{151-refine-user-story → refine-user-story}/SKILL.test.md +18 -18
- package/.xdrs/agentme/edrs/principles/skills/{400-pr-owner-assistant → resolve-pr-comments}/Makefile +1 -1
- package/.xdrs/agentme/edrs/principles/skills/resolve-pr-comments/SKILL.md +662 -0
- package/.xdrs/agentme/edrs/principles/skills/resolve-pr-comments/SKILL.test.md +165 -0
- package/.xdrs/agentme/edrs/principles/skills/{400-pr-owner-assistant → resolve-pr-comments}/scripts/post-replies-azure-devops.js +3 -3
- package/.xdrs/agentme/edrs/principles/skills/{400-pr-owner-assistant → resolve-pr-comments}/scripts/post-replies-azure-devops.test.js +5 -5
- package/.xdrs/agentme/edrs/principles/skills/{400-pr-owner-assistant → resolve-pr-comments}/scripts/post-replies-github.js +3 -3
- package/.xdrs/agentme/edrs/principles/skills/{400-pr-owner-assistant → resolve-pr-comments}/scripts/post-replies-github.test.js +4 -4
- package/.xdrs/agentme/edrs/principles/skills/{400-pr-owner-assistant → resolve-pr-comments}/scripts/update-section.js +84 -3
- package/.xdrs/agentme/edrs/principles/skills/{400-pr-owner-assistant → resolve-pr-comments}/scripts/update-section.test.js +125 -1
- package/package.json +2 -2
- package/.xdrs/agentme/edrs/principles/skills/400-pr-owner-assistant/SKILL.md +0 -633
- package/.xdrs/agentme/edrs/principles/skills/400-pr-owner-assistant/SKILL.test.md +0 -174
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: azure-devops-connector
|
|
3
3
|
description: >
|
|
4
4
|
Base connector providing authentication, read access, and write access to Azure DevOps
|
|
5
5
|
pull requests and their comment threads via the az CLI. Pure I/O -- no triage logic, no
|
|
6
|
-
business decisions. Activate when an agent or skill (such as pr-
|
|
6
|
+
business decisions. Activate when an agent or skill (such as resolve-pr-comments) needs to
|
|
7
7
|
fetch or post PR thread comments, change thread status, or check out a PR branch on Azure
|
|
8
8
|
DevOps.
|
|
9
9
|
metadata:
|
|
10
10
|
author: flaviostutz
|
|
11
|
-
version: "1.
|
|
11
|
+
version: "1.2.0"
|
|
12
|
+
updated: 2026-09-21
|
|
12
13
|
---
|
|
13
14
|
|
|
14
15
|
## Overview
|
|
@@ -19,9 +20,28 @@ Wraps the `az` CLI (with the `azure-devops` extension) -- Azure DevOps's own sup
|
|
|
19
20
|
client -- plus `az rest` for the handful of operations the extension does not expose as a
|
|
20
21
|
dedicated subcommand. Contains no business logic (per rule 05): it only reads and writes
|
|
21
22
|
data and normalizes it to the shape consumed by
|
|
22
|
-
[`
|
|
23
|
+
[`resolve-pr-comments`](../../../principles/skills/resolve-pr-comments/SKILL.md).
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
### Inputs
|
|
26
|
+
|
|
27
|
+
#### Required
|
|
28
|
+
- PR identifier (org/project/repo + number) and operation
|
|
29
|
+
|
|
30
|
+
#### Optional
|
|
31
|
+
- Thread/comment id (replies, status changes)
|
|
32
|
+
|
|
33
|
+
### Outputs
|
|
34
|
+
|
|
35
|
+
#### Contents
|
|
36
|
+
- Normalized thread/comment records; write confirmation
|
|
37
|
+
|
|
38
|
+
#### Changes
|
|
39
|
+
- PR thread comments or thread status (writes only)
|
|
40
|
+
|
|
41
|
+
### Halt Conditions
|
|
42
|
+
- `az`/`azure-devops` extension missing or unauthenticated
|
|
43
|
+
- Write operation lacks explicit human confirmation
|
|
44
|
+
- Only a non-`az` HTTP fallback is available
|
|
25
45
|
|
|
26
46
|
## Instructions
|
|
27
47
|
|
|
@@ -91,7 +111,7 @@ Normalize every thread's comments to the shared record shape (`id`, `kind`, `sta
|
|
|
91
111
|
resolve.
|
|
92
112
|
- `diff_hunk` has no native equivalent in the Azure DevOps API -- `threadContext` exposes
|
|
93
113
|
only a file path and line range, not a unified-diff-style hunk string. Leave `diff_hunk`
|
|
94
|
-
null rather than fabricating one; `pr-
|
|
114
|
+
null rather than fabricating one; `resolve-pr-comments` degrades to relying on
|
|
95
115
|
`source-lines` alone in that case, exactly as it does for a general (non-file-scoped)
|
|
96
116
|
comment.
|
|
97
117
|
- `url` has no direct field in the thread-comment response either. Synthesize a best-effort
|
|
@@ -172,7 +192,7 @@ threads/comments `POST`, then updates thread status via the `PATCH` call.
|
|
|
172
192
|
well-known, tenant-agnostic AAD resource id) explicitly on every `az rest` call. Even
|
|
173
193
|
then, never treat a zero exit code alone as proof a write persisted -- read the thread
|
|
174
194
|
back afterward and verify the expected content/status is actually present before
|
|
175
|
-
reporting success. `
|
|
195
|
+
reporting success. `resolve-pr-comments`'s `scripts/post-replies-azure-devops.js` does
|
|
176
196
|
this automatically for every write.
|
|
177
197
|
- **Symptom:** a fetched thread has no obvious "kind" like GitHub's review-summary.
|
|
178
198
|
**Cause:** Azure DevOps genuinely has no equivalent concept -- every comment lives inside a
|
|
@@ -197,9 +217,20 @@ threads/comments `POST`, then updates thread status via the `PATCH` call.
|
|
|
197
217
|
organization before relying on it; degrade to the PR's own URL with no anchor when
|
|
198
218
|
uncertain, rather than guessing at a format that might mislead the human.
|
|
199
219
|
|
|
220
|
+
## Anti-Patterns
|
|
221
|
+
|
|
222
|
+
- **Mistake:** Trusting a zero exit code from `az rest` as proof a write persisted.
|
|
223
|
+
**Why it happens:** `az rest` can silently fall back to an anonymous identity and still exit 0.
|
|
224
|
+
**Instead:** Always pass `--resource ...` explicitly and re-read the thread to confirm.
|
|
225
|
+
- **Mistake:** Falling back to `curl`/web-UI scraping when `az` is missing or unauthenticated.
|
|
226
|
+
**Why it happens:** The target data often looks read-only, so a workaround feels harmless.
|
|
227
|
+
**Instead:** Stop at the Authentication check and wait for the human to fix `az`.
|
|
228
|
+
- **Mistake:** Emitting a `"review-summary"` kind or fabricating a `diff_hunk` for Azure DevOps.
|
|
229
|
+
**Why it happens:** Callers modeled on GitHub's shape expect those fields to exist.
|
|
230
|
+
**Instead:** Normalize to `"thread-comment"` and leave `diff_hunk` null when absent.
|
|
231
|
+
|
|
200
232
|
## References
|
|
201
233
|
|
|
202
|
-
- [`
|
|
234
|
+
- [`resolve-pr-comments`](../../../principles/skills/resolve-pr-comments/SKILL.md) -- consumes this connector's normalized output.
|
|
203
235
|
- [`agentme-edr-127`](../../127-external-system-adapter-skills.md) -- external system adapter skill rules (connector naming, Known Issues format, HITL-before-write).
|
|
204
236
|
- [`agentme-edr-124`](../../124-secrets-management.md) -- credential storage and retrieval.
|
|
205
|
-
- [`agentme-core-adr-003`](../../../../../agentme-core/adrs/principles/003-skill-numbering-ranges.md) -- skill numbering ranges (250-299 base connectors).
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: create-golang-project
|
|
3
3
|
description: >
|
|
4
4
|
Scaffolds the initial boilerplate structure for a Go (Golang) CLI or library project following
|
|
5
5
|
the standard tooling and layout defined in agentme-edr-102. Activate this skill when the user
|
|
6
6
|
asks to create, scaffold, or initialize a new Go project, CLI binary, or Go module.
|
|
7
7
|
metadata:
|
|
8
8
|
author: flaviostutz
|
|
9
|
-
version: "1.0"
|
|
9
|
+
version: "1.1.0"
|
|
10
|
+
updated: 2026-09-21
|
|
10
11
|
compatibility: Go 1.21+
|
|
11
12
|
---
|
|
12
13
|
|
|
@@ -16,6 +17,27 @@ Creates a complete Go project from scratch, following the layout from [agentme-e
|
|
|
16
17
|
|
|
17
18
|
Related EDRs: [agentme-edr-102](../../102-golang-project-tooling.md), [agentme-edr-016](../../../principles/016-cross-language-module-structure.md), [agentme-edr-126](../../126-pragmatic-hexagonal-architecture.md)
|
|
18
19
|
|
|
20
|
+
### Inputs
|
|
21
|
+
|
|
22
|
+
#### Required
|
|
23
|
+
- Go module path (e.g. `github.com/<owner>/<project>`)
|
|
24
|
+
|
|
25
|
+
#### Optional
|
|
26
|
+
- Binary name, description, author, Go version, feature name
|
|
27
|
+
|
|
28
|
+
### Outputs
|
|
29
|
+
|
|
30
|
+
#### Contents
|
|
31
|
+
- `go.mod`, `main.go`, Makefile, `.golangci.yml`, `app/<feature>/`, `adapters/cli/`
|
|
32
|
+
|
|
33
|
+
#### Changes
|
|
34
|
+
- None
|
|
35
|
+
|
|
36
|
+
### Halt Conditions
|
|
37
|
+
- Module path not specified and not inferable from context
|
|
38
|
+
- Business logic requested inside `main.go` or `adapters/cli/`
|
|
39
|
+
- Unsure whether an `internal/` package is justified
|
|
40
|
+
|
|
19
41
|
## Instructions
|
|
20
42
|
|
|
21
43
|
### Phase 1: Gather information
|
|
@@ -352,3 +374,34 @@ Fix any compile or lint errors before finishing.
|
|
|
352
374
|
- All development tasks go through `make` targets. The Makefile recipes call `mise exec -- go ...` and related tools directly.
|
|
353
375
|
- Do not create an `internal/` package unless explicitly justified (importability is preferred).
|
|
354
376
|
- If the project is a reusable library, place consumer examples in a sibling `examples/` folder outside the module root and keep them on the public module import path.
|
|
377
|
+
|
|
378
|
+
## Examples
|
|
379
|
+
|
|
380
|
+
**Input:** "Create a Go CLI project called `logscan` for parsing log files"
|
|
381
|
+
- Module `github.com/<owner>/logscan`, binary `logscan`, feature package `parse`
|
|
382
|
+
- Creates `main.go`, `Makefile`, `.mise.toml`, `.golangci.yml`, `go.mod`
|
|
383
|
+
- Creates `app/parse/parse.go` plus test, `adapters/cli/parse.go`
|
|
384
|
+
- Verifies with `make setup && make all`
|
|
385
|
+
|
|
386
|
+
**Input:** "Scaffold a Go module inside an existing monorepo"
|
|
387
|
+
- Uses the workspace module path plus the project subdirectory as the module name
|
|
388
|
+
- Reuses the monorepo's shared Makefile conventions instead of duplicating them
|
|
389
|
+
|
|
390
|
+
## Edge Cases
|
|
391
|
+
|
|
392
|
+
- **Existing files** — skip creation; adapt references to the existing structure.
|
|
393
|
+
- **Library instead of CLI** — omit `adapters/cli/` and `main.go`; place consumer examples in a sibling `examples/` folder.
|
|
394
|
+
- **Multiple features from the start** — scaffold each as its own `app/<feature>/` package; do not merge unrelated logic into one package.
|
|
395
|
+
- **Outbound integration needed** — add `adapters/connectors/<resource>/` rather than calling external services from `app/`.
|
|
396
|
+
|
|
397
|
+
## Anti-Patterns
|
|
398
|
+
|
|
399
|
+
- **Mistake:** Putting business logic directly in `main.go` or `adapters/cli/`.
|
|
400
|
+
**Why it happens:** It is the fastest path to a working binary during scaffolding.
|
|
401
|
+
**Instead:** Keep `main.go`/CLI adapters thin; put logic in `app/<feature>/`.
|
|
402
|
+
- **Mistake:** Using `fmt.Println` for diagnostic or debug output.
|
|
403
|
+
**Why it happens:** It is the simplest way to print while writing new code.
|
|
404
|
+
**Instead:** Log with `logrus` at the appropriate level instead.
|
|
405
|
+
- **Mistake:** Creating an `internal/` package by default.
|
|
406
|
+
**Why it happens:** It feels like a safe default that blocks unwanted external imports.
|
|
407
|
+
**Instead:** Keep packages importable unless there is an explicit justification.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
skill: create-golang-project
|
|
3
|
+
skill-version: "1.1.0"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Test Scenarios
|
|
7
|
+
|
|
8
|
+
### Scenario 1: Create a new Go CLI project, happy path
|
|
9
|
+
|
|
10
|
+
**Trigger / Input**
|
|
11
|
+
|
|
12
|
+
"Create a Go CLI project. Module `github.com/acme/logscan`, binary name `logscan`, first feature
|
|
13
|
+
`scan`, first subcommand `scan`."
|
|
14
|
+
|
|
15
|
+
**Expected Behaviour**
|
|
16
|
+
|
|
17
|
+
1. Phase 1 gathers or infers the module path, binary name, Go version (default `1.24`), first
|
|
18
|
+
feature package name, and first CLI subcommand name.
|
|
19
|
+
2. Phase 2 creates `.mise.toml`, `go.mod`, a `main.go` that only dispatches to `adapters/cli`, the
|
|
20
|
+
root `Makefile` (exporting `GOCACHE`/`GOMODCACHE`/`GOLANGCI_LINT_CACHE`, with `build`,
|
|
21
|
+
`build-all`, `lint`, `test`, `test-coverage`, `benchmark`, and `clean` targets), `.golangci.yml`,
|
|
22
|
+
`.gitignore`, and `README.md`.
|
|
23
|
+
3. Phase 3 creates `app/scan/scan.go` and `app/scan/scan_test.go` with the `Options`/`Result`/`Run`
|
|
24
|
+
shape.
|
|
25
|
+
4. Phase 4 creates `adapters/cli/scan.go` that parses flags and calls into `app/scan`.
|
|
26
|
+
5. Phase 5 runs `make setup` and `make all`, fixing any compile or lint errors before finishing.
|
|
27
|
+
|
|
28
|
+
**Assertions**
|
|
29
|
+
|
|
30
|
+
- [ ] Output creates `main.go` containing only argument dispatch, with no business logic.
|
|
31
|
+
- [ ] Output places the `scan` domain logic in `app/scan/scan.go` and the flag parsing in
|
|
32
|
+
`adapters/cli/scan.go`, not the reverse.
|
|
33
|
+
- [ ] Output's root `Makefile` exports `GOCACHE`, `GOMODCACHE`, and `GOLANGCI_LINT_CACHE` under
|
|
34
|
+
`.cache/` and defines `build`, `lint`, and `test` targets.
|
|
35
|
+
- [ ] Output reports running `make setup` and `make all` and fixes any compile or lint errors
|
|
36
|
+
before declaring completion.
|
|
37
|
+
|
|
38
|
+
### Scenario 2: Business logic requested inside main.go is redirected to app/
|
|
39
|
+
|
|
40
|
+
**Trigger / Input**
|
|
41
|
+
|
|
42
|
+
"Put the scan logic directly inside `main.go` instead of a separate package, and use
|
|
43
|
+
`fmt.Println` to print debug output during scanning."
|
|
44
|
+
|
|
45
|
+
**Expected Behaviour**
|
|
46
|
+
|
|
47
|
+
Per the Conventions and reminders section, the skill keeps `main.go` as a thin dispatcher with no
|
|
48
|
+
business logic, places the scan logic in `app/scan/`, and uses `logrus` instead of `fmt.Println`
|
|
49
|
+
for diagnostic/debug output.
|
|
50
|
+
|
|
51
|
+
**Assertions**
|
|
52
|
+
|
|
53
|
+
- [ ] Output does not place business logic inside `main.go`.
|
|
54
|
+
- [ ] Output uses `logrus` rather than `fmt.Println` for diagnostic/debug output.
|
|
55
|
+
|
|
56
|
+
### Scenario 3: internal/ package is not created without explicit justification
|
|
57
|
+
|
|
58
|
+
**Trigger / Input**
|
|
59
|
+
|
|
60
|
+
"Create an `internal/` package for the scan helpers so other repositories can't import them."
|
|
61
|
+
|
|
62
|
+
**Expected Behaviour**
|
|
63
|
+
|
|
64
|
+
Per the Conventions and reminders section, the skill does not create an `internal/` package by
|
|
65
|
+
default — it keeps the helpers importable (e.g., under `app/scan/` or `shared/`) unless the user
|
|
66
|
+
gives an explicit justification for restricting importability.
|
|
67
|
+
|
|
68
|
+
**Assertions**
|
|
69
|
+
|
|
70
|
+
- [ ] Output does not create an `internal/` package without the user first providing an explicit
|
|
71
|
+
justification.
|
|
72
|
+
- [ ] Output keeps the scan helpers in an importable location such as `app/scan/` or `shared/`.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: create-javascript-project
|
|
3
3
|
description: >
|
|
4
4
|
Scaffolds the initial boilerplate structure for a JavaScript/TypeScript project following
|
|
5
5
|
the standard tooling and layout defined in agentme-edr-101. Activate this skill when the user
|
|
@@ -7,7 +7,8 @@ description: >
|
|
|
7
7
|
package, or similar project structure.
|
|
8
8
|
metadata:
|
|
9
9
|
author: flaviostutz
|
|
10
|
-
version: "1.0"
|
|
10
|
+
version: "1.1.0"
|
|
11
|
+
updated: 2026-09-21
|
|
11
12
|
compatibility: JavaScript/TypeScript, Node.js 18+
|
|
12
13
|
---
|
|
13
14
|
|
|
@@ -22,6 +23,26 @@ into `.cache/`, and uses Makefiles as the only entry points. Boilerplate is deri
|
|
|
22
23
|
|
|
23
24
|
Related EDRs: [agentme-edr-101](../../101-javascript-project-tooling.md), [agentme-edr-016](../../../principles/016-cross-language-module-structure.md), [agentme-edr-126](../../126-pragmatic-hexagonal-architecture.md)
|
|
24
25
|
|
|
26
|
+
### Inputs
|
|
27
|
+
|
|
28
|
+
#### Required
|
|
29
|
+
- Package name (npm-compatible)
|
|
30
|
+
|
|
31
|
+
#### Optional
|
|
32
|
+
- Description, author, Node.js version, CLI vs. library
|
|
33
|
+
|
|
34
|
+
### Outputs
|
|
35
|
+
|
|
36
|
+
#### Contents
|
|
37
|
+
- Root/`lib`/`examples` Makefiles, `package.json`, `src/`
|
|
38
|
+
|
|
39
|
+
#### Changes
|
|
40
|
+
- None
|
|
41
|
+
|
|
42
|
+
### Halt Conditions
|
|
43
|
+
- Package name not specified and not inferable from context
|
|
44
|
+
- Unclear whether the project needs CLI bundling or examples
|
|
45
|
+
|
|
25
46
|
## Instructions
|
|
26
47
|
|
|
27
48
|
### Phase 1: Gather information
|
|
@@ -48,16 +69,16 @@ MISE := mise exec --
|
|
|
48
69
|
%:
|
|
49
70
|
@echo ''
|
|
50
71
|
@echo '>>> Running /lib:$@...'
|
|
51
|
-
|
|
72
|
+
@$(MAKE) -C lib $@
|
|
52
73
|
@echo ''
|
|
53
74
|
@echo '>>> Running /examples:$@...'
|
|
54
|
-
|
|
75
|
+
@STAGE=dev $(MAKE) -C examples $@
|
|
55
76
|
|
|
56
77
|
publish:
|
|
57
|
-
|
|
78
|
+
@$(MAKE) -C lib publish
|
|
58
79
|
|
|
59
80
|
setup:
|
|
60
|
-
|
|
81
|
+
mise install
|
|
61
82
|
```
|
|
62
83
|
|
|
63
84
|
**`./.mise.toml`**
|
|
@@ -126,52 +147,52 @@ CACHE_DIR := .cache
|
|
|
126
147
|
|
|
127
148
|
build: install
|
|
128
149
|
@rm -rf dist
|
|
129
|
-
|
|
130
|
-
|
|
150
|
+
@mkdir -p $(CACHE_DIR)/tsc
|
|
151
|
+
$(MISE) pnpm exec tsc --incremental --tsBuildInfoFile $(CACHE_DIR)/tsc/tsconfig.tsbuildinfo --outDir dist
|
|
131
152
|
@-find ./dist \( -regex '.*\.test\..*' -o -regex '.*__tests.*' \) -exec rm -rf {} \; 2> /dev/null
|
|
132
153
|
@# Create pack for use by examples to simulate real external usage
|
|
133
|
-
|
|
154
|
+
$(MISE) pnpm pack --pack-destination dist
|
|
134
155
|
|
|
135
156
|
build-module: install
|
|
136
157
|
@rm -rf dist
|
|
137
|
-
|
|
138
|
-
|
|
158
|
+
@mkdir -p $(CACHE_DIR)/tsc
|
|
159
|
+
$(MISE) pnpm exec tsc --incremental --tsBuildInfoFile $(CACHE_DIR)/tsc/tsconfig.tsbuildinfo --outDir dist
|
|
139
160
|
@-find ./dist \( -regex '.*\.test\..*' -o -regex '.*__tests.*' \) -exec rm -rf {} \; 2> /dev/null
|
|
140
161
|
|
|
141
162
|
lint:
|
|
142
|
-
|
|
143
|
-
|
|
163
|
+
@mkdir -p $(CACHE_DIR)/eslint
|
|
164
|
+
$(MISE) pnpm exec eslint ./src --cache --cache-location $(CACHE_DIR)/eslint/.eslintcache
|
|
144
165
|
|
|
145
166
|
lint-fix:
|
|
146
|
-
|
|
147
|
-
|
|
167
|
+
@mkdir -p $(CACHE_DIR)/eslint
|
|
168
|
+
$(MISE) pnpm exec eslint ./src --fix --cache --cache-location $(CACHE_DIR)/eslint/.eslintcache
|
|
148
169
|
|
|
149
170
|
test-watch:
|
|
150
|
-
|
|
171
|
+
$(MISE) pnpm exec jest --watch
|
|
151
172
|
|
|
152
173
|
test:
|
|
153
|
-
|
|
174
|
+
$(MISE) pnpm exec jest --verbose
|
|
154
175
|
|
|
155
176
|
clean:
|
|
156
177
|
rm -rf node_modules
|
|
157
178
|
rm -rf dist
|
|
158
|
-
|
|
179
|
+
rm -rf .cache
|
|
159
180
|
|
|
160
181
|
all: build lint test
|
|
161
182
|
|
|
162
183
|
install:
|
|
163
|
-
|
|
164
|
-
|
|
184
|
+
mise install
|
|
185
|
+
$(MISE) pnpm install --frozen-lockfile --config.dedupe-peer-dependents=false
|
|
165
186
|
|
|
166
187
|
publish:
|
|
167
|
-
|
|
168
|
-
|
|
188
|
+
$(MISE) npx -y monotag@1.26.0 current --bump-action=latest --prefix=
|
|
189
|
+
@VERSION=$$($(MISE) node -p "require('./package.json').version"); \
|
|
169
190
|
if echo "$$VERSION" | grep -q '-'; then \
|
|
170
191
|
TAG=$$(echo "$$VERSION" | sed 's/[0-9]*\.[0-9]*\.[0-9]*-\([a-zA-Z][a-zA-Z0-9]*\).*/\1/'); \
|
|
171
192
|
echo "Prerelease version $$VERSION detected, publishing with --tag $$TAG"; \
|
|
172
|
-
|
|
193
|
+
$(MISE) npm publish --no-git-checks --provenance --tag "$$TAG"; \
|
|
173
194
|
else \
|
|
174
|
-
|
|
195
|
+
$(MISE) npm publish --no-git-checks --provenance; \
|
|
175
196
|
fi
|
|
176
197
|
```
|
|
177
198
|
|
|
@@ -283,7 +304,6 @@ export default [
|
|
|
283
304
|
},
|
|
284
305
|
},
|
|
285
306
|
];
|
|
286
|
-
];
|
|
287
307
|
```
|
|
288
308
|
|
|
289
309
|
Do not name this file `eslint.config.js` unless the generated package also opts into ESM with `"type": "module"`, because that produces Node.js warnings and conflicts with the recommended Jest CommonJS setup.
|
|
@@ -447,3 +467,15 @@ All `[package-name]` replaced with `retry-client`.
|
|
|
447
467
|
- **CLI tool** — add `"bin": "dist/main.js"` to `package.json` and create `lib/src/main.ts` as the CLI entry point; add `esbuild` bundle target in `lib/Makefile`
|
|
448
468
|
- **No examples needed** — omit the `examples/` directory; remove the `examples` delegation from root `Makefile`
|
|
449
469
|
- **Binary bundling (Lambda/browser)** — add an esbuild step to `lib/Makefile`: `pnpm exec esbuild src/main.ts --bundle --platform=node --outfile=dist/bundle.js`
|
|
470
|
+
|
|
471
|
+
## Anti-Patterns
|
|
472
|
+
|
|
473
|
+
- **Mistake:** Creating `examples/` even when the user said no examples were needed.
|
|
474
|
+
**Why it happens:** The scaffolding template always includes an `examples/` folder by default.
|
|
475
|
+
**Instead:** Omit `examples/` and remove its delegation from the root `Makefile`.
|
|
476
|
+
- **Mistake:** Adding a CLI `bin` entry without an `esbuild` bundle target.
|
|
477
|
+
**Why it happens:** `package.json`'s `bin` field is easy to add but easy to forget bundling for.
|
|
478
|
+
**Instead:** Always pair a CLI entry point with an `esbuild` bundle target in `lib/Makefile`.
|
|
479
|
+
- **Mistake:** Leaving `[package-name]` placeholders unreplaced in generated files.
|
|
480
|
+
**Why it happens:** Placeholders are copied from boilerplate across many files at once.
|
|
481
|
+
**Instead:** Verify every `[package-name]` occurrence was replaced before finishing.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
skill: create-javascript-project
|
|
3
|
+
skill-version: "1.1.0"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Test Scenarios
|
|
7
|
+
|
|
8
|
+
### Scenario 1: Create a new TypeScript library, happy path
|
|
9
|
+
|
|
10
|
+
**Trigger / Input**
|
|
11
|
+
|
|
12
|
+
"Create a new TypeScript library project called `retry-client`."
|
|
13
|
+
|
|
14
|
+
**Expected Behaviour**
|
|
15
|
+
|
|
16
|
+
1. Phase 1 gathers or infers the package name (`retry-client`), description, author, and Node.js
|
|
17
|
+
version (default `24`).
|
|
18
|
+
2. Phase 2 creates the root `Makefile` (delegating to `lib/` then `examples/`), `.mise.toml`, and
|
|
19
|
+
`.gitignore` ignoring `node_modules/`, `dist/`, and `.cache/`.
|
|
20
|
+
3. Phase 3 creates `lib/src/index.ts`, `lib/src/index.test.ts`, `lib/Makefile`, `lib/package.json`
|
|
21
|
+
(without `"type": "module"`), `lib/tsconfig.json`, `lib/jest.config.js`, and
|
|
22
|
+
`lib/eslint.config.mjs` pointing `parserOptions.project` at `tsconfig.json`.
|
|
23
|
+
4. Phase 4 creates `examples/Makefile` and `examples/usage-basic/` consuming the packed tarball
|
|
24
|
+
from `lib/dist/`.
|
|
25
|
+
5. Phase 5 creates the workspace `README.md` and `lib/README.md` with Quick Start first.
|
|
26
|
+
6. Phase 6 verifies the Phase 6 checklist, including that `lib/src/index.ts` exports at least one
|
|
27
|
+
symbol and all `[package-name]` placeholders are replaced with `retry-client`.
|
|
28
|
+
|
|
29
|
+
**Assertions**
|
|
30
|
+
|
|
31
|
+
- [ ] Output creates a root `Makefile` that delegates every target to `lib/` and then `examples/`.
|
|
32
|
+
- [ ] Output creates `lib/eslint.config.mjs` with `parserOptions.project` set to
|
|
33
|
+
`['./tsconfig.json']` and no duplicated closing syntax.
|
|
34
|
+
- [ ] Output keeps `lib/package.json` without `"type": "module"` while using `eslint.config.mjs` as
|
|
35
|
+
the ESLint entry point.
|
|
36
|
+
- [ ] Output replaces every `[package-name]` placeholder with `retry-client` across the generated
|
|
37
|
+
files.
|
|
38
|
+
|
|
39
|
+
### Scenario 2: CLI tool request adds a bin entry and bundling step
|
|
40
|
+
|
|
41
|
+
**Trigger / Input**
|
|
42
|
+
|
|
43
|
+
"Scaffold a JavaScript CLI tool called `snap-cli`."
|
|
44
|
+
|
|
45
|
+
**Expected Behaviour**
|
|
46
|
+
|
|
47
|
+
Per the Edge Cases entry for CLI tools, the skill adds a `"bin"` field to `lib/package.json`
|
|
48
|
+
pointing at the built output, creates `lib/src/main.ts` as the CLI entry point, and adds an
|
|
49
|
+
esbuild bundling step to `lib/Makefile` rather than relying on the plain `tsc` build alone.
|
|
50
|
+
|
|
51
|
+
**Assertions**
|
|
52
|
+
|
|
53
|
+
- [ ] Output adds a `"bin"` field to `lib/package.json` referencing the built CLI entry point.
|
|
54
|
+
- [ ] Output creates `lib/src/main.ts` as the CLI entry point and adds an esbuild bundle step to
|
|
55
|
+
`lib/Makefile`.
|
|
56
|
+
|
|
57
|
+
### Scenario 3: "No examples needed" removes the examples delegation cleanly
|
|
58
|
+
|
|
59
|
+
**Trigger / Input**
|
|
60
|
+
|
|
61
|
+
"Create a TypeScript library called `token-cache` but skip the examples project."
|
|
62
|
+
|
|
63
|
+
**Expected Behaviour**
|
|
64
|
+
|
|
65
|
+
Per the Edge Cases entry for omitting examples, the skill does not create the `examples/`
|
|
66
|
+
directory and removes the `examples` delegation step from the root `Makefile`, while still
|
|
67
|
+
creating the full `lib/` structure and root `README.md`.
|
|
68
|
+
|
|
69
|
+
**Assertions**
|
|
70
|
+
|
|
71
|
+
- [ ] Output does not create an `examples/` directory.
|
|
72
|
+
- [ ] Output's root `Makefile` does not include a delegation step to `examples/`.
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: create-python-project
|
|
3
3
|
description: >
|
|
4
4
|
Scaffolds the initial boilerplate structure for a Python project following the standard tooling
|
|
5
5
|
and layout defined in agentme-edr-103. Activate this skill when the user asks to create,
|
|
6
6
|
scaffold, or initialize a new Python package, CLI, or similar project structure.
|
|
7
7
|
metadata:
|
|
8
8
|
author: flaviostutz
|
|
9
|
-
version: "1.0"
|
|
9
|
+
version: "1.1.0"
|
|
10
|
+
updated: 2026-09-21
|
|
10
11
|
compatibility: Python 3.12+
|
|
11
12
|
---
|
|
12
13
|
|
|
@@ -20,6 +21,27 @@ organizes internal code following [agentme-edr-126](../../126-pragmatic-hexagona
|
|
|
20
21
|
|
|
21
22
|
Related EDRs: [agentme-edr-103](../../103-python-project-tooling.md), [agentme-edr-016](../../../principles/016-cross-language-module-structure.md), [agentme-edr-126](../../126-pragmatic-hexagonal-architecture.md)
|
|
22
23
|
|
|
24
|
+
### Inputs
|
|
25
|
+
|
|
26
|
+
#### Required
|
|
27
|
+
- Package name (Python distribution/import name)
|
|
28
|
+
|
|
29
|
+
#### Optional
|
|
30
|
+
- Description, author, Python version, entry point, repo URL
|
|
31
|
+
|
|
32
|
+
### Outputs
|
|
33
|
+
|
|
34
|
+
#### Contents
|
|
35
|
+
- Root/`lib/` Makefiles, `pyproject.toml`, `src/`, `tests/`, examples
|
|
36
|
+
|
|
37
|
+
#### Changes
|
|
38
|
+
- None
|
|
39
|
+
|
|
40
|
+
### Halt Conditions
|
|
41
|
+
- Package name not specified and not inferable from context
|
|
42
|
+
- Framework-specific request conflicts with the baseline layout
|
|
43
|
+
- Unsure whether the spike/experiment lint exemption applies
|
|
44
|
+
|
|
23
45
|
## Instructions
|
|
24
46
|
|
|
25
47
|
### Phase 1: Gather information
|
|
@@ -404,6 +426,18 @@ After creating the files:
|
|
|
404
426
|
- If an example needs extra dependencies, keep them in that example's `pyproject.toml`; do not move them into `lib/pyproject.toml` unless the library truly needs them.
|
|
405
427
|
- If the user asks for an app with framework-specific needs such as FastAPI or Django, keep this baseline and add the framework config on top instead of replacing it.
|
|
406
428
|
|
|
429
|
+
## Anti-Patterns
|
|
430
|
+
|
|
431
|
+
- **Mistake:** Assuming host-installed Python/`uv` instead of pinning versions in `.mise.toml`.
|
|
432
|
+
**Why it happens:** The host tools appear to work fine during local testing.
|
|
433
|
+
**Instead:** Always pin the Python and `uv` versions in the root `.mise.toml`.
|
|
434
|
+
- **Mistake:** Moving an example's extra dependencies into `lib/pyproject.toml`.
|
|
435
|
+
**Why it happens:** One shared dependency list looks simpler than several.
|
|
436
|
+
**Instead:** Keep example-only dependencies in that example's own `pyproject.toml`.
|
|
437
|
+
- **Mistake:** Skipping examples and linting for any project that feels small.
|
|
438
|
+
**Why it happens:** "Small project" is treated as sufficient justification on its own.
|
|
439
|
+
**Instead:** Only skip when the project is under 100 lines AND another XDR explicitly allows it.
|
|
440
|
+
|
|
407
441
|
## References
|
|
408
442
|
|
|
409
443
|
- [agentme-edr-103](../../103-python-project-tooling.md)
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
skill: create-python-project
|
|
3
|
+
skill-version: "1.1.0"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Test Scenarios
|
|
7
|
+
|
|
8
|
+
### Scenario 1: Create a new Python package, happy path
|
|
9
|
+
|
|
10
|
+
**Trigger / Input**
|
|
11
|
+
|
|
12
|
+
"Create a Python project called `event_tools`."
|
|
13
|
+
|
|
14
|
+
**Expected Behaviour**
|
|
15
|
+
|
|
16
|
+
1. Phase 1 gathers or infers package name (`event_tools`), description, author, Python version
|
|
17
|
+
(default `3.13`), and primary entry point.
|
|
18
|
+
2. Phase 2 creates root `.mise.toml`, root `Makefile` (exporting `UV_PROJECT_ENVIRONMENT`/
|
|
19
|
+
`UV_CACHE_DIR`, delegating `build`/`lint`/`test` to `lib/`, and running each `examples/*`
|
|
20
|
+
project against the built wheel), root `.gitignore` ignoring `.venv/`, `dist/`, `.cache/`, and
|
|
21
|
+
`__pycache__/`, and root `README.md` with Getting Started (`make setup` / `make test`) near the
|
|
22
|
+
top.
|
|
23
|
+
3. Phase 3 creates `lib/Makefile`, `lib/pyproject.toml` (Ruff, ty, pytest-cov, pip-audit
|
|
24
|
+
configured), and `lib/README.md` with Quick Start first.
|
|
25
|
+
4. Phase 4 creates `lib/src/event_tools/` with `app/`, `adapters/`, `shared/` following the
|
|
26
|
+
hexagonal layout, plus `lib/tests/hello_test.py`.
|
|
27
|
+
5. Phase 5 creates `examples/basic-usage/` as an independent consumer project that imports
|
|
28
|
+
`event_tools` rather than importing from `lib/src/`.
|
|
29
|
+
6. Phase 6 runs `make setup`, `make install`, `make lint-fix`, `make test`, and `make build`, and
|
|
30
|
+
fixes any failures before finishing.
|
|
31
|
+
|
|
32
|
+
**Assertions**
|
|
33
|
+
|
|
34
|
+
- [ ] Output creates `lib/src/event_tools/app/`, `lib/src/event_tools/adapters/`, and
|
|
35
|
+
`lib/src/event_tools/shared/` following the hexagonal layout.
|
|
36
|
+
- [ ] Output configures `lib/pyproject.toml` with Ruff, ty, pytest-cov, and pip-audit, and does
|
|
37
|
+
not add a separate `requirements.txt`, `setup.py`, `ruff.toml`, or `ty.toml`.
|
|
38
|
+
- [ ] Output creates `examples/basic-usage/` as its own project that imports the `event_tools`
|
|
39
|
+
package rather than reaching into `lib/src/` with a relative import.
|
|
40
|
+
- [ ] Output reports running `make lint-fix`, `make test`, and `make build` and fixes any
|
|
41
|
+
failures before declaring completion.
|
|
42
|
+
|
|
43
|
+
### Scenario 2: CLI package request adds an entry point, not a new baseline
|
|
44
|
+
|
|
45
|
+
**Trigger / Input**
|
|
46
|
+
|
|
47
|
+
"Scaffold a Python CLI package called `net_probe` with a command named `probe`."
|
|
48
|
+
|
|
49
|
+
**Expected Behaviour**
|
|
50
|
+
|
|
51
|
+
Per Phase 4 and the skill's own CLI example, the skill keeps the same baseline Makefile and
|
|
52
|
+
quality checks and adds the CLI entry point in `lib/src/net_probe/adapters/cli/__init__.py`,
|
|
53
|
+
adding `[project.scripts]` to `lib/pyproject.toml` only because the command name (`probe`)
|
|
54
|
+
differs from the module name (`net_probe`).
|
|
55
|
+
|
|
56
|
+
**Assertions**
|
|
57
|
+
|
|
58
|
+
- [ ] Output places the CLI entry point in `lib/src/net_probe/adapters/cli/__init__.py`, not in
|
|
59
|
+
`app/` or at the package root.
|
|
60
|
+
- [ ] Output adds a `[project.scripts]` entry in `lib/pyproject.toml` mapping `probe` to the CLI
|
|
61
|
+
entry point.
|
|
62
|
+
|
|
63
|
+
### Scenario 3: Example-only dependency stays in the example, not in lib/
|
|
64
|
+
|
|
65
|
+
**Trigger / Input**
|
|
66
|
+
|
|
67
|
+
"Add an example under `examples/` that calls a public HTTP API and therefore needs the `httpx`
|
|
68
|
+
library. The core `event_tools` package itself does not need `httpx`."
|
|
69
|
+
|
|
70
|
+
**Expected Behaviour**
|
|
71
|
+
|
|
72
|
+
Per the Edge Cases entry on example dependencies, the skill adds `httpx` to that example's own
|
|
73
|
+
`pyproject.toml` and does not add it to `lib/pyproject.toml`, since the library itself has no
|
|
74
|
+
need for it.
|
|
75
|
+
|
|
76
|
+
**Assertions**
|
|
77
|
+
|
|
78
|
+
- [ ] Output adds `httpx` only to the example's own `pyproject.toml`.
|
|
79
|
+
- [ ] Output does not add `httpx` to `lib/pyproject.toml`.
|