agentme 0.6.0 → 0.7.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.
@@ -23,14 +23,14 @@ Clear, consistent tooling and layout enable fast onboarding, reliable CI pipelin
23
23
 
24
24
  | Tool | Purpose |
25
25
  |------|---------|
26
- | **Mise** | Tool version management for Node.js, pnpm, and project CLIs |
26
+ | **Mise** | Mandatory tool version management and command runner for Node.js, pnpm, and project CLIs |
27
27
  | **pnpm** | Package manager — strict linking, workspace support, fast installs |
28
28
  | **tsc** | TypeScript compilation — type checking, declaration generation |
29
29
  | **esbuild** | Bundling — fast bundling for distribution or single-binary outputs |
30
30
  | **eslint** | Linting — code style and quality enforcement |
31
31
  | **jest** | Testing — unit and integration test runner |
32
32
 
33
- All commands are run exclusively through Makefiles, not through `package.json` scripts. The repository root must define a `.mise.toml` that pins at least Node.js and pnpm, and Makefile targets must run through `mise exec --` or an activated Mise shell.
33
+ All commands are run exclusively through Makefiles, not through `package.json` scripts. The repository root MUST define a `.mise.toml` that pins at least Node.js and pnpm. Contributors and CI MUST bootstrap with `make setup` or `mise install`, then invoke routine work with `make <target>`. Each Makefile recipe MUST execute the underlying tool through `mise exec -- <tool> ...`, following [agentme-edr-017](../devops/017-tool-execution-and-scripting.md). Calling project tools directly in docs, CI, or daily workflows instead of `make <target>` is not allowed.
34
34
 
35
35
  #### ESLint
36
36
 
@@ -74,35 +74,35 @@ When `tsconfig.json` extends `@tsconfig/node24/tsconfig.json`, the default `modu
74
74
  └── tests_benchmark/ # optional benchmark harnesses
75
75
  ```
76
76
 
77
- The root `Makefile` delegates every target to `/lib` then `/examples` in sequence and is expected to execute module commands inside the repository's Mise-managed environment.
77
+ The root `Makefile` delegates every target to `/lib` then `/examples` in sequence. Parent Makefiles should call child Makefiles directly, and each module Makefile is responsible for running its actual tool commands through `mise exec --`.
78
78
 
79
79
  When a repository contains multiple JavaScript/TypeScript packages, each package MUST live in its own module folder such as `lib/my-package/` or `services/my-service/`, each with its own `Makefile`, `README.md`, `dist/`, and `.cache/`.
80
80
 
81
81
  Persistent caches MUST live under `.cache/`. Recommended locations are Jest `cacheDirectory`, ESLint `--cache-location`, TypeScript `tsBuildInfoFile`, and coverage outputs.
82
82
 
83
- The commands below assume they are invoked through `mise exec -- make <target>` or from an activated Mise shell.
83
+ Contributors and CI MUST invoke the commands below as `make <target>`. The Makefile recipes themselves MUST call the underlying tools through `mise exec -- <tool> ...`.
84
84
 
85
85
  #### lib/Makefile targets
86
86
 
87
87
  | Target | Description |
88
88
  |--------|-------------|
89
- | `install` | `pnpm install --frozen-lockfile` |
90
- | `build` | compile with `tsc`, strip test files from `dist/`, then `pnpm pack` for local use by examples |
91
- | `build-module` | compile with `tsc` only (no pack) |
92
- | `lint` | `pnpm exec eslint ./src` |
93
- | `lint-fix` | `pnpm exec eslint ./src --fix` |
94
- | `test` | `pnpm exec jest --verbose` |
95
- | `test-watch` | `pnpm exec jest --watch` |
89
+ | `install` | `mise exec -- pnpm install --frozen-lockfile` |
90
+ | `build` | `mise exec -- pnpm exec tsc ...`, strip test files from `dist/`, then `mise exec -- pnpm pack` for local use by examples |
91
+ | `build-module` | `mise exec -- pnpm exec tsc ...` only (no pack) |
92
+ | `lint` | `mise exec -- pnpm exec eslint ./src` |
93
+ | `lint-fix` | `mise exec -- pnpm exec eslint ./src --fix` |
94
+ | `test` | `mise exec -- pnpm exec jest --verbose` |
95
+ | `test-watch` | `mise exec -- pnpm exec jest --watch` |
96
96
  | `clean` | remove `node_modules/`, `dist/`, and `.cache/` |
97
97
  | `all` | `build lint test` |
98
- | `publish` | version-bump with `monotag`, then `npm publish --provenance` |
98
+ | `publish` | `mise exec -- npx -y monotag ...`, then `mise exec -- npm publish --provenance` |
99
99
 
100
100
  #### lib/package.json key fields
101
101
 
102
102
  - `"main"`: `dist/index.js`
103
103
  - `"types"`: `dist/index.d.ts`
104
104
  - `"files"`: `["dist/**", "package.json", "README.md"]`
105
- - `"scripts"`: empty all commands are driven by the Makefile
105
+ - `"scripts"`: empty by default. If reverse compatibility requires scripts, each script must be a direct one-line delegation to one Makefile target.
106
106
 
107
107
  #### examples/
108
108
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: agentme-edr-010-go-project-tooling-and-structure
3
- description: Defines the standard Go project toolchain, layout, and Makefile workflow for agentme-based projects. Use when scaffolding or reviewing Go projects.
3
+ description: Defines the standard Go project toolchain, layout, and Makefile workflow using Mise for agentme-based projects. Use when scaffolding or reviewing Go projects.
4
4
  ---
5
5
 
6
6
  # agentme-edr-010: Go project tooling and structure
@@ -13,7 +13,7 @@ What tooling and project structure should Go projects follow to ensure consisten
13
13
 
14
14
  ## Decision Outcome
15
15
 
16
- **Use the standard Go toolchain (`go build`, `go test`) with `golangci-lint`, module-root folder responsibilities from [agentme-edr-016](../principles/016-cross-language-module-structure.md), feature packages in subdirectories, a `cli/` package for command wiring, and a Makefile as the single entry point for all development tasks.**
16
+ **Use a Mise-managed Go toolchain with `go build`, `go test`, and `golangci-lint`, module-root folder responsibilities from [agentme-edr-016](../principles/016-cross-language-module-structure.md), feature packages in subdirectories, a `cli/` package for command wiring, and a Makefile as the single entry point for all development tasks.**
17
17
 
18
18
  A predictable layout and minimal external tooling keep Go projects approachable, fast to build, and easy to distribute as cross-platform binaries.
19
19
 
@@ -23,18 +23,19 @@ A predictable layout and minimal external tooling keep Go projects approachable,
23
23
 
24
24
  | Tool | Purpose |
25
25
  |------|---------|
26
+ | **Mise** | Mandatory tool version management and command runner for Go, `golangci-lint`, and project CLIs |
26
27
  | **go toolchain** | Compilation, testing, formatting (`go build`, `go test`, `go fmt`, `go vet`, `go mod`) |
27
28
  | **golangci-lint** | Linting — aggregates many linters in one fast run; configured via `.golangci.yml` |
28
29
  | **monotag** | Version tagging from git history for the `publish` target |
29
30
 
30
- All commands are run exclusively through the Makefile, never ad-hoc.
31
- When the repository has a root `.mise.toml`, `go`, `golangci-lint`, and any other Go-related CLIs used by the project **MUST** be pinned there and resolved from the Mise-managed environment rather than the host machine.
31
+ All commands are run exclusively through the Makefile, never ad-hoc. The project root **MUST** define a `.mise.toml` that pins `go`, `golangci-lint`, and any other Go-related CLIs used by the project. Contributors and CI **MUST** bootstrap with `make setup` or `mise install`, then invoke routine work with `make <target>`. Each Makefile recipe **MUST** execute the underlying tool through `mise exec -- <tool> ...`, following [agentme-edr-017](../devops/017-tool-execution-and-scripting.md).
32
32
  Direct installation of project-required Go CLIs with `go install ...@latest` as a repair step is **NOT** allowed unless an XDR for that repository explicitly permits it.
33
33
 
34
34
  #### Project structure
35
35
 
36
36
  ```
37
37
  / # project root or Go module root inside a monorepo
38
+ ├── .mise.toml # pinned Go, golangci-lint, and related CLIs
38
39
  ├── Makefile # build, lint, test, publish, and utility targets
39
40
  ├── README.md # module README with usage and development commands
40
41
  ├── .gitignore # MUST ignore dist/ and .cache/
@@ -74,36 +75,36 @@ Direct installation of project-required Go CLIs with `go install ...@latest` as
74
75
  - Module path: `github.com/<owner>/<project>` (or the relevant VCS path for the project)
75
76
  - Use the latest stable Go version (e.g. `go 1.24`).
76
77
  - Separate `require` blocks: direct dependencies first, then `// indirect` dependencies.
77
- - If the repository uses Mise, the Go version declared in `go.mod` and the Go version pinned in `.mise.toml` **MUST** stay aligned.
78
+ - The Go version declared in `go.mod` and the Go version pinned in `.mise.toml` **MUST** stay aligned.
78
79
 
79
80
  #### Makefile targets
80
81
 
81
82
  | Target | Description |
82
83
  |--------|-------------|
83
84
  | `all` | Default; runs `build lint test` in sequence |
84
- | `build` | `go mod download && go build -o dist/<binary>` with Go caches redirected into `.cache/` |
85
+ | `build` | `mise exec -- go mod download && mise exec -- go build -o dist/<binary>` with Go caches redirected into `.cache/` |
85
86
  | `build-all` | Cross-compile for all target platforms (darwin/linux/windows × amd64/arm64) |
86
87
  | `build-arch-os` | Compile for a specific `OS` and `ARCH` environment variable pair; output to `dist/${OS}-${ARCH}/<binary>` |
87
- | `install` | `go mod download` |
88
- | `lint` | `golangci-lint run ./...` with its cache redirected into `.cache/` |
89
- | `lint-fix` | `golangci-lint run --fix ./...` with its cache redirected into `.cache/` |
90
- | `test` | `go test -cover ./...` — runs all tests with coverage and stores disposable outputs under `.cache/` |
91
- | `test-unit` | `go test -cover ./...` — alias for unit tests only (same here; integration tests get a separate tag) |
92
- | `coverage` | `go tool cover -func .cache/coverage.out` — displays coverage summary |
88
+ | `install` | `mise exec -- go mod download` |
89
+ | `lint` | `mise exec -- golangci-lint run ./...` with its cache redirected into `.cache/` |
90
+ | `lint-fix` | `mise exec -- golangci-lint run --fix ./...` with its cache redirected into `.cache/` |
91
+ | `test` | `mise exec -- go test -cover ./...` — runs all tests with coverage and stores disposable outputs under `.cache/` |
92
+ | `test-unit` | `mise exec -- go test -cover ./...` — alias for unit tests only (same here; integration tests get a separate tag) |
93
+ | `coverage` | `mise exec -- go tool cover -func .cache/coverage.out` — displays coverage summary |
93
94
  | `clean` | Remove `dist/` and `.cache/` |
94
- | `start` | `go run ./ <default-args>` — launch the binary locally for dev use |
95
- | `publish` | Tag with `monotag`, then push tag + binaries to GitHub Releases |
95
+ | `start` | `mise exec -- go run ./ <default-args>` — launch the binary locally for dev use |
96
+ | `publish` | Tag with `mise exec -- npx -y monotag ...`, then push tag + binaries to GitHub Releases |
96
97
 
97
- When the repository uses Mise, the intended invocation pattern is:
98
+ The required invocation pattern is:
98
99
 
99
100
  ```sh
100
- mise install
101
- mise exec -- make build
102
- mise exec -- make test
103
- mise exec -- make lint
101
+ make setup
102
+ make build
103
+ make test
104
+ make lint
104
105
  ```
105
106
 
106
- Using `make build`, `make test`, or `make lint` from an already activated Mise shell is equivalent.
107
+ The Makefile recipes themselves must use `mise exec --` for the underlying tool commands.
107
108
 
108
109
  #### Cross-platform binary distribution
109
110
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: agentme-edr-014-python-project-tooling-and-structure
3
- description: Defines the standard Python project toolchain, layout, and Makefile workflow using uv, ruff, pyright, pytest, and pip-audit. Use when scaffolding or reviewing Python projects.
3
+ description: Defines the standard Python project toolchain, layout, and Makefile workflow using Mise, uv, ruff, pyright, pytest, and pip-audit. Use when scaffolding or reviewing Python projects.
4
4
  ---
5
5
 
6
6
  # agentme-edr-014: Python project tooling and structure
@@ -13,7 +13,7 @@ What tooling and project structure should Python projects follow to ensure consi
13
13
 
14
14
  ## Decision Outcome
15
15
 
16
- **Use a uv-managed Python project with `pyproject.toml`, `ruff`, `pyright`, `pytest`, `pytest-cov`, `pip-audit`, and a layout that follows [agentme-edr-016](../principles/016-cross-language-module-structure.md): a module root under `lib/`, runnable consumer examples in sibling `examples/`, and standardized `dist/` and `.cache/` locations.**
16
+ **Use a Mise-managed Python and uv toolchain with `pyproject.toml`, `ruff`, `pyright`, `pytest`, `pytest-cov`, `pip-audit`, and a layout that follows [agentme-edr-016](../principles/016-cross-language-module-structure.md): a module root under `lib/`, runnable consumer examples in sibling `examples/`, and standardized `dist/` and `.cache/` locations.**
17
17
 
18
18
  A single dependency manager, isolated package internals under `lib/`, and a standard Makefile contract keep Python projects predictable for contributors and CI while keeping the repository root clean.
19
19
 
@@ -23,6 +23,7 @@ A single dependency manager, isolated package internals under `lib/`, and a stan
23
23
 
24
24
  | Tool | Purpose |
25
25
  |------|---------|
26
+ | **Mise** | Mandatory tool version management and command runner for Python, uv, and project CLIs |
26
27
  | **uv** | Dependency management, lockfile management, virtualenv sync, build, publish |
27
28
  | **pyproject.toml** | Single source of truth for package metadata and tool configuration |
28
29
  | **ruff** | Formatting, import sorting, linting, and common code-quality checks |
@@ -33,7 +34,7 @@ A single dependency manager, isolated package internals under `lib/`, and a stan
33
34
 
34
35
  All routine commands must run through the project `Makefile`, never by calling `uv`, `ruff`, `pytest`, or `pyright` directly in docs, CI, or daily development workflows.
35
36
 
36
- When the repository defines a root `.mise.toml`, Python and uv must be pinned there and commands should run through `mise exec --` or an activated Mise shell.
37
+ The repository root MUST define a `.mise.toml` that pins Python and uv. Contributors and CI MUST bootstrap with `make setup` or `mise install`, then invoke routine work with `make <target>`. Each Makefile recipe MUST execute the underlying tool through `mise exec -- <tool> ...`, following [agentme-edr-017](../devops/017-tool-execution-and-scripting.md). Using routine project CLI commands directly outside the Makefile contract is not allowed.
37
38
 
38
39
  The root `.venv/` is the canonical environment location for both the library and all examples. Subdirectory commands must set `UV_PROJECT_ENVIRONMENT` to the workspace root `.venv/` instead of creating nested virtual environments.
39
40
 
@@ -43,7 +44,7 @@ Persistent caches must live under `.cache/`, preferably the module `lib/.cache/`
43
44
 
44
45
  ```text
45
46
  /
46
- ├── .mise.toml # optional but required when the repo uses Mise
47
+ ├── .mise.toml # required; pins Python and uv
47
48
  ├── .gitignore
48
49
  ├── .cache/ # optional shared uv cache at repo level
49
50
  ├── .venv/ # shared uv environment for lib/ and examples/
@@ -101,7 +102,7 @@ Pytest coverage must fail below 80% line and branch coverage, following [agentme
101
102
 
102
103
  #### Makefile targets
103
104
 
104
- The commands below assume invocation through `mise exec -- make <target>` when the repository uses Mise, or plain `make <target>` inside an activated project environment.
105
+ Contributors and CI MUST invoke the commands below as `make <target>`. The Makefile recipes themselves MUST call the underlying tools through `mise exec -- <tool> ...`.
105
106
 
106
107
  #### Root `Makefile`
107
108
 
@@ -109,6 +110,7 @@ The root `Makefile` is the only contract for CI and contributors. It delegates l
109
110
 
110
111
  | Target | Description |
111
112
  |--------|-------------|
113
+ | `setup` | Run `mise install`, then `lib/install` to create or update the shared root `.venv/` |
112
114
  | `install` | Run `lib/install` to create or update the shared root `.venv/` |
113
115
  | `build` | Run `lib/build` |
114
116
  | `lint` | Run `lib/lint` |
@@ -123,17 +125,17 @@ The root `Makefile` is the only contract for CI and contributors. It delegates l
123
125
 
124
126
  | Target | Description |
125
127
  |--------|-------------|
126
- | `install` | `uv sync --project . --frozen --all-extras --dev` using the shared root `.venv/` |
127
- | `build` | `uv sync --project . --frozen --all-extras --dev && uv build --project . --out-dir dist` |
128
- | `lint` | `uv run --project . ruff format --check . && uv run --project . ruff check . && uv run --project . pyright && uv run --project . pip-audit`, with caches redirected into `.cache/` |
129
- | `lint-fix` | `uv run --project . ruff format . && uv run --project . ruff check . --fix && uv run --project . pyright && uv run --project . pip-audit`, with caches redirected into `.cache/` |
130
- | `test-unit` | `uv run --project . pytest --cov=src/<package_name> --cov-branch --cov-report=term-missing --cov-fail-under=80`, with pytest and coverage outputs stored under `.cache/` |
128
+ | `install` | `mise exec -- uv sync --project . --frozen --all-extras --dev` using the shared root `.venv/` |
129
+ | `build` | `mise exec -- uv sync --project . --frozen --all-extras --dev && mise exec -- uv build --project . --out-dir dist` |
130
+ | `lint` | `mise exec -- uv run --project . ruff format --check . && mise exec -- uv run --project . ruff check . && mise exec -- uv run --project . pyright && mise exec -- uv run --project . pip-audit`, with caches redirected into `.cache/` |
131
+ | `lint-fix` | `mise exec -- uv run --project . ruff format . && mise exec -- uv run --project . ruff check . --fix && mise exec -- uv run --project . pyright && mise exec -- uv run --project . pip-audit`, with caches redirected into `.cache/` |
132
+ | `test-unit` | `mise exec -- uv run --project . pytest --cov=src/<package_name> --cov-branch --cov-report=term-missing --cov-fail-under=80`, with pytest and coverage outputs stored under `.cache/` |
131
133
  | `clean` | Remove `dist/` and `.cache/` inside `lib/` |
132
134
  | `all` | `build lint test-unit` |
133
- | `update-lockfile` | `uv lock --project . --upgrade` |
134
- | `run` | `uv run --project . python -m <package_name>` or the project CLI entry point |
135
+ | `update-lockfile` | `mise exec -- uv lock --project . --upgrade` |
136
+ | `run` | `mise exec -- uv run --project . python -m <package_name>` or the project CLI entry point |
135
137
  | `dev` | Same as `run`, optionally with repository-specific dev defaults |
136
- | `publish` | `uv publish --project .` after versioning and packaging are complete |
138
+ | `publish` | `mise exec -- uv publish --project .` after versioning and packaging are complete |
137
139
 
138
140
  The root `Makefile` must remain the only contract for CI and contributors, in line with [agentme-edr-008](../devops/008-common-targets.md).
139
141
 
@@ -39,7 +39,7 @@ Related EDRs: [agentme-edr-003](../../003-javascript-project-tooling.md), [agent
39
39
 
40
40
  **`./Makefile`**
41
41
 
42
- Delegates every make target to `/lib` then `/examples` in sequence:
42
+ Delegates every make target to `/lib` then `/examples` in sequence. Child Makefiles own the actual `mise exec -- <tool>` calls:
43
43
 
44
44
  ```makefile
45
45
  SHELL := /bin/bash
@@ -47,13 +47,13 @@ MISE := mise exec --
47
47
  %:
48
48
  @echo ''
49
49
  @echo '>>> Running /lib:$@...'
50
- @$(MISE) $(MAKE) -C lib $@
50
+ @$(MAKE) -C lib $@
51
51
  @echo ''
52
52
  @echo '>>> Running /examples:$@...'
53
- @STAGE=dev $(MISE) $(MAKE) -C examples $@
53
+ @STAGE=dev $(MAKE) -C examples $@
54
54
 
55
55
  publish:
56
- @$(MISE) $(MAKE) -C lib publish
56
+ @$(MAKE) -C lib publish
57
57
 
58
58
  setup:
59
59
  mise install
@@ -35,6 +35,16 @@ Ask for (or infer from context):
35
35
 
36
36
  ### Phase 2: Create root files
37
37
 
38
+ **`./.mise.toml`** (replace `[go-version]` and `[golangci-lint-version]`):
39
+
40
+ ```toml
41
+ [tools]
42
+ go = "[go-version]"
43
+ golangci-lint = "[golangci-lint-version]"
44
+ ```
45
+
46
+ Pin any additional project CLIs used by the Makefile here as well. Use an explicit `golangci-lint` version rather than `latest`.
47
+
38
48
  **`go.mod`** (replace `[module]`, `[go-version]`):
39
49
 
40
50
  ```
@@ -81,6 +91,7 @@ func main() {
81
91
 
82
92
  ```makefile
83
93
  SHELL := /bin/bash
94
+ MISE := mise exec --
84
95
 
85
96
  BINARY := [binary]
86
97
  CACHE_DIR := .cache
@@ -90,10 +101,14 @@ export GOLANGCI_LINT_CACHE := $(abspath $(CACHE_DIR)/golangci-lint)
90
101
 
91
102
  all: build lint test
92
103
 
104
+ setup:
105
+ mise install
106
+ $(MAKE) install
107
+
93
108
  build: install
94
109
  @mkdir -p dist
95
110
  @mkdir -p $(GOCACHE) $(GOMODCACHE)
96
- go build -o dist/$(BINARY) .
111
+ $(MISE) go build -o dist/$(BINARY) .
97
112
 
98
113
  build-all: build-arch-os-darwin-amd64 build-arch-os-darwin-arm64 build-arch-os-linux-amd64 build-arch-os-linux-arm64 build-arch-os-windows-amd64
99
114
  @echo "All platform builds complete"
@@ -119,36 +134,36 @@ build-arch-os:
119
134
  @echo "Compiling $(BINARY) for ${OS}-${ARCH}..."
120
135
  @mkdir -p dist/${OS}-${ARCH}
121
136
  @mkdir -p $(GOCACHE) $(GOMODCACHE)
122
- go mod download
123
- GOOS=${OS} GOARCH=${ARCH} CGO_ENABLED=0 go build -a -o dist/${OS}-${ARCH}/$(BINARY) .
137
+ $(MISE) go mod download
138
+ GOOS=${OS} GOARCH=${ARCH} CGO_ENABLED=0 $(MISE) go build -a -o dist/${OS}-${ARCH}/$(BINARY) .
124
139
  @echo "Done"
125
140
 
126
141
  install:
127
- go mod download
142
+ $(MISE) go mod download
128
143
 
129
144
  lint:
130
- golangci-lint run ./...
145
+ $(MISE) golangci-lint run ./...
131
146
 
132
147
  lint-fix:
133
- golangci-lint run --fix ./...
148
+ $(MISE) golangci-lint run --fix ./...
134
149
 
135
150
  test:
136
- go test -cover ./...
151
+ $(MISE) go test -cover ./...
137
152
 
138
153
  test-coverage:
139
154
  @mkdir -p $(CACHE_DIR)
140
- go test -coverprofile=$(CACHE_DIR)/coverage.out ./...
141
- go tool cover -func $(CACHE_DIR)/coverage.out
155
+ $(MISE) go test -coverprofile=$(CACHE_DIR)/coverage.out ./...
156
+ $(MISE) go tool cover -func $(CACHE_DIR)/coverage.out
142
157
 
143
158
  benchmark:
144
- go test -bench . -benchmem -count 5 ./...
159
+ $(MISE) go test -bench . -benchmem -count 5 ./...
145
160
 
146
161
  clean:
147
162
  rm -rf dist
148
163
  rm -rf .cache
149
164
 
150
165
  start:
151
- go run ./ [subcommand]
166
+ $(MISE) go run ./ [subcommand]
152
167
  ```
153
168
 
154
169
  **`.golangci.yml`**:
@@ -190,6 +205,7 @@ coverage.out
190
205
 
191
206
  ## Development
192
207
 
208
+ make setup
193
209
  make build # compile binary to dist/
194
210
  make lint # run golangci-lint with cache in .cache/
195
211
  make test # run tests with coverage artifacts in .cache/
@@ -300,7 +316,7 @@ func Run(args []string) {
300
316
  After creating all files, run the following in the project root:
301
317
 
302
318
  ```bash
303
- go mod tidy
319
+ make setup
304
320
  make all
305
321
  ```
306
322
 
@@ -316,6 +332,6 @@ Fix any compile or lint errors before finishing.
316
332
  - All tests co-located (`*_test.go` next to the file under test).
317
333
  - Use `tests_integration/` for integration flows and `tests_benchmark/` when benchmarks need dedicated harnesses or datasets.
318
334
  - Log with `logrus`; never use `fmt.Println` for diagnostic/debug output.
319
- - All development tasks go through `make` targets never run `go` directly for routine ops.
335
+ - All development tasks go through `make` targets. The Makefile recipes call `mise exec -- go ...` and related tools directly.
320
336
  - Do not create an `internal/` package unless explicitly justified (importability is preferred).
321
337
  - 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.
@@ -13,10 +13,10 @@ compatibility: Python 3.12+
13
13
 
14
14
  ## Overview
15
15
 
16
- Creates a complete Python project from scratch using `uv`, `pyproject.toml`, Ruff, Pyright,
17
- Pytest, and Makefiles. The default layout keeps the library self-contained under `lib/`, uses a
18
- shared root `.venv/`, redirects persistent caches into `.cache/`, and places runnable consumer
19
- projects under the sibling `examples/` folder.
16
+ Creates a complete Python project from scratch using Mise, `uv`, `pyproject.toml`, Ruff,
17
+ Pyright, Pytest, and Makefiles. The default layout keeps the library self-contained under `lib/`,
18
+ uses a shared root `.venv/`, redirects persistent caches into `.cache/`, and places runnable
19
+ consumer projects under the sibling `examples/` folder.
20
20
 
21
21
  Related EDRs: [agentme-edr-014](../../014-python-project-tooling.md), [agentme-edr-016](../../../principles/016-cross-language-module-structure.md)
22
22
 
@@ -39,16 +39,31 @@ Ask for or infer from context:
39
39
 
40
40
  Create these files first.
41
41
 
42
+ **`./.mise.toml`**
43
+
44
+ ```toml
45
+ [tools]
46
+ python = "3.13"
47
+ uv = "latest"
48
+ ```
49
+
50
+ Replace `3.13` with the chosen Python version and pin any additional project CLIs used by the project here.
51
+
42
52
  **`./Makefile`**
43
53
 
44
54
  ```makefile
45
55
  SHELL := /bin/bash
56
+ MISE := mise exec --
46
57
  ROOT_DIR := $(abspath .)
47
58
  export UV_PROJECT_ENVIRONMENT := $(ROOT_DIR)/.venv
48
59
  export UV_CACHE_DIR := $(ROOT_DIR)/.cache/uv
49
60
 
50
61
  all: build lint test
51
62
 
63
+ setup:
64
+ mise install
65
+ $(MAKE) install
66
+
52
67
  install:
53
68
  $(MAKE) -C lib install
54
69
 
@@ -70,9 +85,9 @@ test-examples: build
70
85
  @for dir in examples/*; do \
71
86
  if [ -f "$$dir/pyproject.toml" ]; then \
72
87
  echo ">>> Running $$dir"; \
73
- UV_PROJECT_ENVIRONMENT="$(UV_PROJECT_ENVIRONMENT)" UV_CACHE_DIR="$(UV_CACHE_DIR)" uv sync --project "$$dir" --frozen || exit 1; \
74
- UV_PROJECT_ENVIRONMENT="$(UV_PROJECT_ENVIRONMENT)" UV_CACHE_DIR="$(UV_CACHE_DIR)" uv pip install --python "$(UV_PROJECT_ENVIRONMENT)/bin/python" lib/dist/*.whl || exit 1; \
75
- UV_PROJECT_ENVIRONMENT="$(UV_PROJECT_ENVIRONMENT)" UV_CACHE_DIR="$(UV_CACHE_DIR)" uv run --project "$$dir" python main.py || exit 1; \
88
+ UV_PROJECT_ENVIRONMENT="$(UV_PROJECT_ENVIRONMENT)" UV_CACHE_DIR="$(UV_CACHE_DIR)" $(MISE) uv sync --project "$$dir" --frozen || exit 1; \
89
+ UV_PROJECT_ENVIRONMENT="$(UV_PROJECT_ENVIRONMENT)" UV_CACHE_DIR="$(UV_CACHE_DIR)" $(MISE) uv pip install --python "$(UV_PROJECT_ENVIRONMENT)/bin/python" lib/dist/*.whl || exit 1; \
90
+ UV_PROJECT_ENVIRONMENT="$(UV_PROJECT_ENVIRONMENT)" UV_CACHE_DIR="$(UV_CACHE_DIR)" $(MISE) uv run --project "$$dir" python main.py || exit 1; \
76
91
  fi; \
77
92
  done
78
93
 
@@ -82,9 +97,7 @@ clean:
82
97
  rm -rf .venv
83
98
  ```
84
99
 
85
- The root `Makefile` keeps the repository clean by delegating package work to `lib/` and treating each example directory as an independent consumer project.
86
-
87
- If the repository already uses Mise, wrap the delegated commands with `mise exec --` and pin both Python and uv in `.mise.toml`.
100
+ The root `Makefile` keeps the repository clean by delegating package work to `lib/` and treating each example directory as an independent consumer project. Child Makefiles own the actual `mise exec -- <tool>` calls.
88
101
 
89
102
  **`./.gitignore`**
90
103
 
@@ -106,6 +119,7 @@ Keep this README focused on the repository or workspace. Put Getting Started nea
106
119
  ## Getting Started
107
120
 
108
121
  ```sh
122
+ make setup
109
123
  make test
110
124
  ```
111
125
 
@@ -121,6 +135,7 @@ artifacts, and library-specific Makefile targets.
121
135
 
122
136
  ```makefile
123
137
  SHELL := /bin/bash
138
+ MISE := mise exec --
124
139
  ROOT_DIR := $(abspath ..)
125
140
  export UV_PROJECT_ENVIRONMENT := $(ROOT_DIR)/.venv
126
141
  export UV_CACHE_DIR := $(ROOT_DIR)/.cache/uv
@@ -133,34 +148,34 @@ PACKAGE_NAME ?= your_package
133
148
  all: build lint test-unit
134
149
 
135
150
  install:
136
- uv sync --project . --frozen --all-extras --dev
151
+ $(MISE) uv sync --project . --frozen --all-extras --dev
137
152
 
138
153
  build: install
139
154
  rm -rf dist
140
- uv build --project . --out-dir dist
155
+ $(MISE) uv build --project . --out-dir dist
141
156
 
142
157
  lint: install
143
- uv run --project . ruff format --check .
144
- uv run --project . ruff check .
145
- uv run --project . pyright
146
- uv run --project . pip-audit
158
+ $(MISE) uv run --project . ruff format --check .
159
+ $(MISE) uv run --project . ruff check .
160
+ $(MISE) uv run --project . pyright
161
+ $(MISE) uv run --project . pip-audit
147
162
 
148
163
  lint-fix: install
149
- uv run --project . ruff format .
150
- uv run --project . ruff check . --fix
151
- uv run --project . pyright
152
- uv run --project . pip-audit
164
+ $(MISE) uv run --project . ruff format .
165
+ $(MISE) uv run --project . ruff check . --fix
166
+ $(MISE) uv run --project . pyright
167
+ $(MISE) uv run --project . pip-audit
153
168
 
154
169
  test-unit: install
155
- uv run --project . pytest -o cache_dir=.cache/pytest --cov=src/$(PACKAGE_NAME) --cov-branch --cov-report=term-missing --cov-report=html:.cache/htmlcov --cov-fail-under=80
170
+ $(MISE) uv run --project . pytest -o cache_dir=.cache/pytest --cov=src/$(PACKAGE_NAME) --cov-branch --cov-report=term-missing --cov-report=html:.cache/htmlcov --cov-fail-under=80
156
171
 
157
172
  run: install
158
- uv run --project . python -m $(PACKAGE_NAME)
173
+ $(MISE) uv run --project . python -m $(PACKAGE_NAME)
159
174
 
160
175
  dev: run
161
176
 
162
177
  update-lockfile:
163
- uv lock --project . --upgrade
178
+ $(MISE) uv lock --project . --upgrade
164
179
 
165
180
  clean:
166
181
  rm -rf dist .cache
@@ -231,7 +246,7 @@ This README is the published package README referenced by `lib/pyproject.toml`.
231
246
  ## Getting Started
232
247
 
233
248
  ```sh
234
- uv sync --dev
249
+ make setup
235
250
  make test
236
251
  ```
237
252
 
@@ -331,11 +346,12 @@ Examples must import the package as a consumer would. Avoid relative imports bac
331
346
 
332
347
  After creating the files:
333
348
 
334
- 1. Run `make install`.
335
- 2. Run `make lint-fix`.
336
- 3. Run `make test`.
337
- 4. Run `make build`.
338
- 5. Fix all failures before finishing.
349
+ 1. Run `make setup`.
350
+ 2. Run `make install`.
351
+ 3. Run `make lint-fix`.
352
+ 4. Run `make test`.
353
+ 5. Run `make build`.
354
+ 6. Fix all failures before finishing.
339
355
 
340
356
  ## Examples
341
357
 
@@ -352,7 +368,7 @@ After creating the files:
352
368
 
353
369
  ## Edge Cases
354
370
 
355
- - If the repository already has a root `.mise.toml`, pin Python and uv there instead of assuming host-installed tools.
371
+ - Pin Python and uv in the root `.mise.toml`; do not assume host-installed tools.
356
372
  - If the project is fewer than 100 lines and explicitly marked as a spike or experiment, examples and linting may be skipped only when another applicable XDR allows it.
357
373
  - 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.
358
374
  - 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.
@@ -83,6 +83,7 @@ Repository, application, and module Makefiles **MUST** define at minimum: `all`,
83
83
  Module Makefiles **SHOULD** also provide `lint-fix` and `install` when the underlying tooling supports them.
84
84
 
85
85
  The root `Makefile` **MUST** also define a `setup` target that guides a new contributor to prepare their machine.
86
+ The root `setup` target **MUST** run `mise install` and any small repository bootstrap required before routine targets work.
86
87
 
87
88
  *Why:* Makefiles provide a universal, stack-agnostic entry point regardless of programming language.
88
89
 
@@ -91,11 +92,11 @@ The root `Makefile` **MUST** also define a `setup` target that guides a new cont
91
92
  - [Mise](https://mise.jdx.dev/) **MUST** be used to pin all tool versions (compilers, runtimes, CLI tools).
92
93
  - A `.mise.toml` **MUST** exist at the repository root.
93
94
  - Every language runtime or CLI referenced by any module `Makefile`, CI workflow, or README command **MUST** be pinned in `.mise.toml`.
94
- - Contributors run `mise install` once after cloning.
95
+ - Contributors and CI run `make setup` after cloning or checkout; this target must call `mise install`.
95
96
  - Agents and contributors **MUST** check `.mise.toml` before using a system-installed compiler, runtime, or CLI.
96
- - When `.mise.toml` exists, all build, test, lint, and code-generation commands **MUST** run inside the Mise-managed environment, preferably via `mise exec -- <command>` or an activated Mise shell.
97
+ - When `.mise.toml` exists, all build, test, lint, and code-generation commands **MUST** run through `make <target>`, and the Makefile recipes **MUST** execute the underlying tools via `mise exec -- <command>`, following [agentme-edr-017](017-tool-execution-and-scripting.md).
97
98
  - If a required tool is missing, the first remediation step **MUST** be to update `.mise.toml` or run `mise install`, not to install ad-hoc global tools with language-specific installers such as `go install`, `npm install -g`, `pip install --user`, or `cargo install`.
98
- - Root and module `Makefile` targets **SHOULD** work correctly when invoked through `mise exec -- make <target>`.
99
+ - Root and module `Makefile` targets **MUST** work when invoked as plain `make <target>` after `make setup`.
99
100
 
100
101
  *Why:* Eliminates "works on my machine" build failures by ensuring identical tool versions across all environments.
101
102
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: agentme-edr-008-common-development-script-names
3
- description: Defines standard development command names and lifecycle groups across projects, regardless of the underlying runner. Use when designing build, lint, test, and release entry points.
3
+ description: Defines standard Makefile target names and the mandatory tool-execution flow using Mise. Use when designing build, lint, test, and release entry points.
4
4
  ---
5
5
 
6
6
  # agentme-edr-008: Common development script names
@@ -9,46 +9,68 @@ description: Defines standard development command names and lifecycle groups acr
9
9
 
10
10
  Software projects use a wide variety of commands and tooling to perform the same fundamental tasks — building, testing, linting, and deploying. This diversity is amplified across language ecosystems, meaning developers must re-learn project-specific conventions every time they switch contexts. CI pipelines suffer from the same fragmentation, each one requiring bespoke scripts.
11
11
 
12
- What standard set of command names and conventions should projects adopt so that any developer or CI pipeline can immediately operate on any project without needing to read documentation first?
12
+ What standard set of Makefile target names and execution rules should projects adopt so that any developer or CI pipeline can immediately operate on any project without needing to read documentation first?
13
13
 
14
14
  ## Decision Outcome
15
15
 
16
- **Every project must expose its development actions using a defined set of standardized script names, grouped by lifecycle phase. These names apply regardless of the script runner used — Makefile, npm scripts, shell scripts, or any other tool — so that `build`, `test`, `lint`, and related commands work predictably across all projects and languages.**
16
+ **Every project must expose its development actions through a root `Makefile` using a defined set of standardized target names. Target implementation and tool-execution rules follow [agentme-edr-017](017-tool-execution-and-scripting.md), which requires `mise exec --` before routine tool commands.**
17
17
 
18
- Standardizing script names removes the cognitive overhead of learning per-project conventions, makes CI pipelines reusable across projects, and gives new developers an immediately operational entry point. The names are the contract; the underlying runner is an implementation detail.
18
+ Standardizing both the target names and the execution chain removes per-project guesswork, makes CI pipelines reusable, and keeps tooling behavior visible in one place.
19
19
 
20
20
  ### Implementation Details
21
21
 
22
- #### 1. Every project MUST have a root-level entry point exposing the standard script names
22
+ #### 1. Every project MUST have a root `Makefile` exposing the standard target names
23
23
 
24
- The project root must contain a single authoritative entry point — a `Makefile`, `package.json` scripts section, a shell wrapper, or equivalent — that exposes the standard target names defined in rule 2. Developers and CI pipelines must invoke actions through this entry point exclusively, never by calling underlying tools directly.
24
+ The project root must contain a single authoritative `Makefile` that exposes the standard target names defined in rule 3. Developers and CI pipelines must invoke routine actions through this `Makefile`, never by calling underlying tools directly in documentation, CI, or daily workflow commands.
25
25
 
26
- **Preferred runner: Makefile.** A `Makefile` is the default recommended choice because it is language-agnostic, universally available, and provides a consistent invocation syntax (`make <target>`) across all ecosystems.
26
+ `make <target>` is the shared contract across projects and languages.
27
27
 
28
- **Alternative runners** are acceptable when a Makefile is not practical for the project's ecosystem:
28
+ - The root `Makefile` must be the entry point for both developers and pipelines.
29
+ - The root `Makefile` must expose at minimum the common targets defined in this XDR.
30
+ - Reverse-compatibility wrappers are allowed when an ecosystem expects them, but they must stay trivial.
31
+ - Allowed: `package.json` script `"test": "make test"`
32
+ - Not allowed: `make test` -> `npm run test` -> tool command
33
+ - Project logic must not live in npm scripts, Mise tasks, shell wrappers, or other secondary runners when the same logic belongs in the `Makefile`.
29
34
 
30
- | Runner | Invocation example | When appropriate |
31
- |--------|--------------------|------------------|
32
- | Makefile | `make build` | Default; recommended for all projects |
33
- | npm scripts | `npm run build` | Pure Node.js/frontend projects without a Makefile |
34
- | Shell script | `./dev.sh build` | Projects where `make` is unavailable or impractical |
35
- | Other (Taskfile, just, etc.) | `task build` | When agreed upon at the project or org level |
35
+ *Why:* The project entry point must stay language-agnostic and obvious. A developer should be able to inspect the `Makefile` and immediately see which real tool commands will run.
36
36
 
37
- Whichever runner is chosen, the **target names** defined in rule 2 must be used unchanged. The runner is an implementation detail; the names are the shared contract.
37
+ #### 2. Makefile recipes MUST use the shared Mise execution rules
38
38
 
39
- *Why:* A single entry point means developers and CI pipelines use near-identical commands regardless of the underlying language or tooling. Any tooling change is then contained to the entry-point file and does not require updating CI pipelines or developer documentation.
39
+ After a checkout, the shared execution flow is:
40
+
41
+ ```text
42
+ make <target>
43
+ -> Makefile recipe
44
+ -> mise exec -- <tool> [tool arguments]
45
+ -> explicit tool command
46
+ ```
47
+
48
+ - The `setup` target must run `mise install` and any small project-specific bootstrap needed before normal targets work.
49
+ - Routine targets such as `build`, `lint`, `test`, `run`, and `publish` must be invoked as `make <target>` by both contributors and CI.
50
+ - Each Makefile recipe must call the real underlying command through `mise exec --`, following [agentme-edr-017](017-tool-execution-and-scripting.md).
51
+ - Makefile recipes must not add extra script layers such as `npm run`, `pnpm run`, `yarn run`, `mise run`, `mise tasks`, or shell aliases when those layers only forward to another command.
52
+ - Calling the actual tool is allowed even when that tool itself launches another program as part of its normal interface.
53
+ - Allowed: `mise exec -- pnpm exec eslint ./src`
54
+ - Allowed: `mise exec -- go test -cover ./...`
55
+ - Allowed: `mise exec -- uv run --project . pytest`
56
+ - Disallowed: `pnpm run lint`
57
+ - Disallowed: `pnpm exec eslint ./src`
58
+ - Disallowed: `mise run lint`
59
+ - Disallowed: `make lint` implemented as `./scripts/lint.sh` when the shell script only forwards to one visible tool command
60
+
61
+ *Why:* This keeps the execution path inspectable, avoids hidden logic spread across multiple scripting systems, and makes CI behave the same way as local development.
40
62
 
41
63
  ---
42
64
 
43
- #### 2. Standard script groups and names
65
+ #### 3. Standard target groups and names
44
66
 
45
- Scripts are organized into five lifecycle groups. Projects must use these names regardless of the script runner in use. Extensions are allowed (see rule 4) but the core names must not be repurposed.
67
+ Targets are organized into five lifecycle groups. Projects must use these names unchanged. Extensions are allowed (see rule 5) but the core names must not be repurposed.
46
68
 
47
69
  ##### Developer group
48
70
 
49
- | Script | Purpose |
71
+ | Target | Purpose |
50
72
  |--------|---------|
51
- | `setup` | Install any tools required on the developer machine (e.g., nvm, brew, python, golang). Typically run once per project checkout. In CI, tooling is usually pre-provisioned via runner images or workflow steps instead. |
73
+ | `setup` | Run `mise install` and any small project bootstrap needed before normal targets work. This is the first command after checkout. |
52
74
  | `all` | Alias that runs `build`, `lint`, and `test` in sequence. Must be the default target (i.e., running `make` or the runner with no arguments invokes `all`). Used by developers as a fast pre-push check to verify the software meets minimum quality standards in one command. |
53
75
  | `clean` | Remove all temporary or generated files created during build, lint, or test (e.g., `node_modules`, virtual environments, compiled binaries, generated files). Used both locally and in CI for a clean slate. |
54
76
  | `dev` | Run the software locally for development (e.g., start a Node.js API server, open a Jupyter notebook, launch a React dev server). May have debugging tools, verbose logging, or hot reloading features enabled. |
@@ -57,7 +79,7 @@ Scripts are organized into five lifecycle groups. Projects must use these names
57
79
 
58
80
  ##### Build group
59
81
 
60
- | Script | Purpose |
82
+ | Target | Purpose |
61
83
  |--------|---------|
62
84
  | `build` | Install dependencies, compile, and package the software. The full `install → compile → package` workflow. |
63
85
  | `install` | Download and install all project dependencies. Assumes the language runtime is already available (installed via `setup`). |
@@ -67,13 +89,13 @@ Scripts are organized into five lifecycle groups. Projects must use these names
67
89
 
68
90
  ##### Lint group
69
91
 
70
- | Script | Purpose |
92
+ | Target | Purpose |
71
93
  |--------|---------|
72
94
  | `lint` | Run **all static quality checks** outside of tests. This MUST include: code formatting validation, code style enforcement, code smell detection, static analysis, dependency audits for known CVEs, security vulnerability scans (e.g., SAST), and project/configuration structure checks. All checks must be non-destructive (read-only); fixes are handled by `lint-fix`. |
73
95
  | `lint-fix` | Automatically fix linting and formatting issues where possible. || `lint-format` | *(Optional)* Check code formatting only (e.g., Prettier, gofmt, Black). |
74
96
  ##### Test group
75
97
 
76
- | Script | Purpose |
98
+ | Target | Purpose |
77
99
  |--------|---------|
78
100
  | `test` | Run **all tests** required for the project. This MUST include unit tests (with coverage enforcement — the build MUST fail if coverage thresholds are not met) and integration/end-to-end tests. Normally delegates to `test-unit` and `test-integration` in sequence. |
79
101
  | `test-unit` | Run unit tests only, including coverage report generation and coverage threshold enforcement. |
@@ -82,7 +104,7 @@ Scripts are organized into five lifecycle groups. Projects must use these names
82
104
 
83
105
  ##### Release group
84
106
 
85
- | Script | Purpose |
107
+ | Target | Purpose |
86
108
  |--------|---------|
87
109
  | `release` | Determine the next version (e.g., via semantic versioning and git tags), generate changelogs and release notes, tag the repository, and create a release artifact. Normally invokes `docgen`. |
88
110
  | `docgen` | Generate documentation (API docs, static sites, changelogs, example outputs). |
@@ -103,9 +125,9 @@ Two environment variables have defined semantics and must be used consistently.
103
125
 
104
126
  ---
105
127
 
106
- #### 4. Extending scripts with prefixes
128
+ #### 5. Extending targets with prefixes
107
129
 
108
- Projects may add custom scripts beyond the standard set. Custom scripts must be named by prefixing a standard script name with a descriptive qualifier, keeping the naming intuitive and consistent with the group it belongs to.
130
+ Projects may add custom targets beyond the standard set. Custom targets must be named by prefixing a standard target name with a descriptive qualifier, keeping the naming intuitive and consistent with the group it belongs to.
109
131
 
110
132
  **Examples:**
111
133
 
@@ -121,13 +143,13 @@ start-debugger # launch the software with a visual debugger attached
121
143
  deploy-infra # deploy only the infrastructure layer
122
144
  ```
123
145
 
124
- The prefix convention ensures developers can infer the purpose of any script without documentation.
146
+ The prefix convention ensures developers can infer the purpose of any target without documentation.
125
147
 
126
148
  ---
127
149
 
128
- #### 5. Monorepo usage
150
+ #### 6. Monorepo usage
129
151
 
130
- In a monorepo, each module has its own `Makefile` with its own `build`, `lint`, `test`, and `deploy` targets scoped to that module. Parent-level Makefiles (at the application or repo root) delegate to module Makefiles in sequence.
152
+ In a monorepo, each module has its own `Makefile` with its own `build`, `lint`, `test`, and `deploy` targets scoped to that module. Parent-level Makefiles (at the application or repo root) delegate to child Makefiles in sequence. The parent Makefile should call `$(MAKE) -C <child> <target>` directly, while each child `Makefile` runs its actual tool commands through `mise exec --`.
131
153
 
132
154
  ```makefile
133
155
  # root Makefile — delegates to all modules
@@ -146,12 +168,12 @@ A developer can run `make test` at the repo root to test everything, or `cd modu
146
168
 
147
169
  ---
148
170
 
149
- #### 6. Quick-reference — commands a developer can always rely on
171
+ #### 7. Quick-reference — commands a developer can always rely on
150
172
 
151
- Any project following this EDR supports the following actions. Examples show Makefile syntax; substitute your project's runner (e.g., `npm run build`, `./dev.sh build`) if a Makefile is not used.
173
+ Any project following this EDR supports the following actions through the root `Makefile`.
152
174
 
153
175
  ```sh
154
- # install required development tools
176
+ # install the pinned toolchain and project bootstrap
155
177
  make setup
156
178
 
157
179
  # build the software (install deps, compile, package)
@@ -188,25 +210,18 @@ make clean
188
210
  make all
189
211
  ```
190
212
 
191
- **Equivalent examples for npm scripts and shell:**
192
-
193
- ```sh
194
- # npm scripts (package.json)
195
- npm run build
196
- npm run test
197
- npm run lint
198
- STAGE=dev npm run deploy
199
-
200
- # shell wrapper
201
- ./dev.sh build
202
- ./dev.sh test
203
- STAGE=dev ./dev.sh deploy
204
- ```
205
-
206
213
  ## Considered Options
207
214
 
208
- * (REJECTED) **Language-native entry points only** - Use `npm run`, `python -m`, `go run` etc. directly as the standard without a unifying name convention
215
+ * (REJECTED) **Language-native entry points only** - Use `npm run`, `python -m`, `go run`, and similar tool-specific commands directly as the standard surface
209
216
  * Reason: Ties CI pipelines and developer muscle memory to language-specific tooling; breaks the abstraction when the underlying tool changes; target names vary per ecosystem
210
217
 
211
- * (CHOSEN) **Standardized script names, runner-agnostic** - A common, language-agnostic command vocabulary that must be used regardless of whether the runner is a Makefile, npm scripts, a shell wrapper, or another tool; with Makefile as the preferred default
212
- * Reason: Separating the names (the contract) from the runner (the implementation) gives every developer and CI pipeline a predictable interface while allowing each project to choose the most practical runner for its ecosystem.
218
+ * (REJECTED) **Runner-agnostic targets with multiple primary runners** - Keep the target names standard but allow Makefile, npm scripts, shell wrappers, or other runners as equivalent first-class entry points
219
+ * Reason: Preserves naming consistency but still spreads behavior across multiple scripting systems, which hides the real command path and weakens CI standardization.
220
+
221
+ * (CHOSEN) **Standardized Makefile targets with Mise-managed explicit tool execution** - Use `make <target>` as the only routine entry point, keep target names standard, and run the actual underlying tool commands through `mise exec --`
222
+ * Reason: This keeps names, execution flow, and tool versions equally predictable while avoiding script indirection.
223
+
224
+ ## References
225
+
226
+ - [agentme-edr-005](005-monorepo-structure.md) - Monorepo layout and delegation structure
227
+ - [agentme-edr-017](017-tool-execution-and-scripting.md) - Tool-execution rules for Makefile targets and CI
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: agentme-edr-017-tool-execution-and-scripting
3
+ description: Defines how Makefiles, CI pipelines, and optional wrapper scripts execute project commands. Use when designing project automation or command entry points.
4
+ ---
5
+
6
+ # agentme-edr-017: Tool execution and scripting
7
+
8
+ ## Context and Problem Statement
9
+
10
+ Projects often hide build, lint, and test behavior behind multiple scripting layers, making it hard for developers and CI pipelines to see what actually runs.
11
+
12
+ How should projects execute development commands so the command surface stays predictable and the underlying operations stay obvious?
13
+
14
+ ## Decision Outcome
15
+
16
+ **Use Makefiles as the only authoritative command entry point, with targets named by [agentme-edr-008](008-common-targets.md) and implemented with `mise exec --` before the real tool command.**
17
+
18
+ This keeps local development and CI aligned, reduces indirection, and lets contributors understand project behavior by reading one command surface.
19
+
20
+ ### Implementation Details
21
+
22
+ - Every project MUST use a root `Makefile` as the authoritative entry point for developer and pipeline commands.
23
+ - The target names in that `Makefile` MUST follow [agentme-edr-008](008-common-targets.md).
24
+ - CI pipelines MUST run `make <target>` from the relevant root instead of calling language-specific scripts such as `npm run`, `pnpm run`, shell wrappers, or secondary task runners.
25
+ - A Makefile target MUST execute the real operation through `mise exec --` before invoking the tool itself, so it always uses the version pinned in `.mise.toml`. Avoid intermediate script layers that hide the actual command.
26
+ - Every Makefile target MUST start by echoing a concise summary of the target and folder or context, using fewer than 10 words. When delegating to another Makefile, echo the child path and delegated target before invoking it.
27
+ - Direct delegation to another Makefile is allowed when traversing repo, app, or module boundaries, for example `$(MAKE) -C lib build`.
28
+ - Calling the actual tool binary through its native executable launcher is allowed when that is the direct command under `mise exec --`, for example `mise exec -- pnpm exec eslint ./src`, `mise exec -- uv run pyright`, `mise exec -- go test`, or `mise exec -- npx -y monotag`.
29
+ - Makefile targets MUST use `mise exec --` consistently before routine tool commands and MUST NOT call `npm run`, `pnpm run`, `yarn run`, `just`, `task`, or similar abstraction layers for routine project commands.
30
+ - Tool installation and environment preparation MUST be handled explicitly in developer setup instructions and CI workflow steps, using ecosystem-specific installation steps such as `actions/setup-node`, `actions/setup-go`, `astral-sh/setup-uv`, system package managers, or pinned install commands such as `mise install`.
31
+ - `package.json` scripts are optional and MAY exist only as direct reverse-compatibility aliases to one Make target, for example `"test": "make test"`. They MUST stay one-to-one and add no extra orchestration.
32
+ - README examples, contributing guides, and pipeline snippets SHOULD show `make <target>` as the primary way to operate the project.
33
+
34
+ Allowed:
35
+
36
+ - `make lint` running `mise exec -- pnpm exec eslint ./src`
37
+ - `make test` running `mise exec -- go test ./...`
38
+ - `make build` running `mise exec -- uv build --project . --out-dir dist`
39
+ - Root Makefile delegating to module Makefiles with `$(MAKE) -C <module> <target>`
40
+ - A target beginning with `echo ">>> ./lib: lint"`
41
+
42
+ Disallowed:
43
+
44
+ - `make lint` running `pnpm run lint`
45
+ - `make test` running `mise exec -- make test`
46
+ - `make lint` running `pnpm exec eslint ./src` without `mise exec --`
47
+ - CI running `npm run build` when the project already defines `make build`
48
+ - `package.json` scripts that chain multiple operations instead of forwarding to one Make target
49
+
50
+ ## Considered Options
51
+
52
+ * (REJECTED) **Runner-agnostic command entry points** - Allow Makefiles, package-manager scripts, shell wrappers, and task runners as equivalent project entry points.
53
+ * Reason: Preserves multiple abstraction layers and weakens the guarantee that developers and CI execute the same visible commands.
54
+ * (CHOSEN) **Makefile-first Mise-managed execution** - Standardize on Makefiles for entry points and require targets to run the underlying commands through `mise exec --`.
55
+ * Reason: Keeps the command surface small, readable, and consistent across languages while ensuring the pinned tool versions from `.mise.toml` are always used.
56
+
57
+ ## References
58
+
59
+ - [agentme-edr-005](005-monorepo-structure.md) - Monorepo layout and Makefile hierarchy
60
+ - [agentme-edr-006](006-github-pipelines.md) - CI/CD workflows should call Make targets
61
+ - [agentme-edr-008](008-common-targets.md) - Standard target names
62
+ - [agentme-edr-003](../application/003-javascript-project-tooling.md) - JavaScript tooling commands inside Makefiles
63
+ - [agentme-edr-010](../application/010-golang-project-tooling.md) - Go tooling commands inside Makefiles
64
+ - [agentme-edr-014](../application/014-python-project-tooling.md) - Python tooling commands inside Makefiles
@@ -220,13 +220,13 @@ For each module inside an application:
220
220
  all: build lint test
221
221
 
222
222
  build:
223
- go build ./...
223
+ mise exec -- go build ./...
224
224
 
225
225
  lint:
226
- golangci-lint run ./...
226
+ mise exec -- golangci-lint run ./...
227
227
 
228
228
  test:
229
- go test ./... -cover
229
+ mise exec -- go test ./... -cover
230
230
 
231
231
  clean:
232
232
  rm -rf dist .cache
@@ -239,13 +239,13 @@ For each module inside an application:
239
239
  all: build lint test
240
240
 
241
241
  build:
242
- npm run build
242
+ mise exec -- pnpm exec tsc --project tsconfig.json
243
243
 
244
244
  lint:
245
- npm run lint
245
+ mise exec -- pnpm exec eslint ./src
246
246
 
247
247
  test:
248
- npm test
248
+ mise exec -- pnpm exec jest --verbose
249
249
 
250
250
  clean:
251
251
  rm -rf dist .cache
@@ -258,13 +258,13 @@ For each module inside an application:
258
258
  all: build lint test
259
259
 
260
260
  build:
261
- pip install -e .
261
+ mise exec -- uv build --project . --out-dir dist
262
262
 
263
263
  lint:
264
- ruff check .
264
+ mise exec -- uv run --project . ruff check .
265
265
 
266
266
  test:
267
- pytest
267
+ mise exec -- uv run --project . pytest
268
268
 
269
269
  clean:
270
270
  rm -rf dist .cache
@@ -38,6 +38,7 @@ Repository structure, build conventions, and CI/CD pipelines.
38
38
  - [agentme-edr-005](devops/005-monorepo-structure.md) - **Monorepo structure** *(includes skill: [002-monorepo-setup](devops/skills/002-monorepo-setup/SKILL.md))*
39
39
  - [agentme-edr-006](devops/006-github-pipelines.md) - **GitHub CI/CD pipelines**
40
40
  - [agentme-edr-008](devops/008-common-targets.md) - **Common development script names**
41
+ - [agentme-edr-017](devops/017-tool-execution-and-scripting.md) - **Tool execution and scripting**
41
42
 
42
43
  ## Governance
43
44
 
package/README.md CHANGED
@@ -80,27 +80,25 @@ This is useful when you want to:
80
80
 
81
81
  ## Development
82
82
 
83
- Install [Mise](https://mise.jdx.dev/getting-started.html), then sync the pinned toolchain:
83
+ Install [Mise](https://mise.jdx.dev/getting-started.html), then bootstrap the repository through the root `Makefile`:
84
84
 
85
85
  ```sh
86
- mise install
86
+ make setup
87
87
  ```
88
88
 
89
- Use the root `Makefile` as the entry point for local verification inside the Mise-managed environment:
89
+ Use the root `Makefile` as the entry point for local verification:
90
90
 
91
91
  ```sh
92
- mise exec -- make build
93
- mise exec -- make lint
94
- mise exec -- make test
92
+ make build
93
+ make lint
94
+ make test
95
95
  ```
96
96
 
97
- Running `make build`, `make lint`, or `make test` from an already activated Mise shell is equivalent.
98
-
99
97
  What these targets do:
100
98
 
101
- - `mise exec -- make build` installs dependencies and creates a local npm package in `dist/`.
102
- - `mise exec -- make lint` runs the repository lint target.
103
- - `mise exec -- make test` rebuilds the package and validates the consumer extraction flow through the runnable example in `examples/`.
99
+ - `make build` installs dependencies and creates a local npm package in `dist/`.
100
+ - `make lint` runs the repository lint target.
101
+ - `make test` rebuilds the package and validates the consumer extraction flow through the runnable example in `examples/`.
104
102
 
105
103
  ## Repository Map
106
104
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentme",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "description": "",
5
5
  "dependencies": {
6
6
  "filedist": "^0.26.0",