agent-smith-cli 0.3.1__tar.gz → 0.4.0__tar.gz

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.
Files changed (19) hide show
  1. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/PKG-INFO +68 -14
  2. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/README.md +66 -10
  3. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/pyproject.toml +5 -12
  4. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/pyproject.toml.orig +4 -11
  5. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/src/agent_smith/adapters/configuration.py +1 -6
  6. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/src/agent_smith/adapters/mise.py +1 -6
  7. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/LICENSE +0 -0
  8. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/src/agent_smith/__init__.py +0 -0
  9. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/src/agent_smith/__main__.py +0 -0
  10. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/src/agent_smith/adapters/__init__.py +0 -0
  11. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/src/agent_smith/adapters/adr.py +0 -0
  12. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/src/agent_smith/adapters/cli.py +0 -0
  13. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/src/agent_smith/adapters/filesystem.py +0 -0
  14. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/src/agent_smith/adapters/just_help.py +0 -0
  15. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/src/agent_smith/adapters/markdown.py +0 -0
  16. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/src/agent_smith/adapters/process.py +0 -0
  17. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/src/agent_smith/application/__init__.py +0 -0
  18. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/src/agent_smith/application/generation.py +0 -0
  19. {agent_smith_cli-0.3.1 → agent_smith_cli-0.4.0}/src/agent_smith/application/ports.py +0 -0
@@ -1,20 +1,18 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-smith-cli
3
- Version: 0.3.1
3
+ Version: 0.4.0
4
4
  Summary: Build agent instructions from your project's sources.
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
7
7
  Classifier: Development Status :: 2 - Pre-Alpha
8
8
  Classifier: Environment :: Console
9
9
  Classifier: Programming Language :: Python :: 3 :: Only
10
- Classifier: Programming Language :: Python :: 3.10
11
10
  Classifier: Programming Language :: Python :: 3.11
12
11
  Classifier: Programming Language :: Python :: 3.12
13
12
  Classifier: Programming Language :: Python :: 3.13
14
13
  Classifier: Programming Language :: Python :: 3.14
15
14
  Requires-Dist: markdown-it-py>=4,<5
16
- Requires-Dist: tomli>=2 ; python_full_version < '3.11'
17
- Requires-Python: >=3.10
15
+ Requires-Python: >=3.11
18
16
  Project-URL: Repository, https://github.com/Mehdi-H/agent-smith
19
17
  Project-URL: Issues, https://github.com/Mehdi-H/agent-smith/issues
20
18
  Description-Content-Type: text/markdown
@@ -22,7 +20,9 @@ Description-Content-Type: text/markdown
22
20
  # Agent Smith 🕶️
23
21
 
24
22
  [![CI](https://github.com/Mehdi-H/agent-smith/actions/workflows/release.yml/badge.svg?branch=main)](https://github.com/Mehdi-H/agent-smith/actions/workflows/release.yml?query=branch%3Amain)
25
- [![Python 3.10–3.14](https://img.shields.io/badge/python-3.10%E2%80%933.14-blue?logo=python&logoColor=white)](pyproject.toml)
23
+ [![Python 3.11–3.14](https://img.shields.io/badge/python-3.11%E2%80%933.14-blue?logo=python&logoColor=white)](pyproject.toml)
24
+ [![Codecov](https://codecov.io/github/Mehdi-H/agent-smith/branch/main/graph/badge.svg?token=9RYPPL8VLH)](https://codecov.io/github/Mehdi-H/agent-smith)
25
+ [![PyPI](https://img.shields.io/pypi/v/agent-smith-cli)](https://pypi.org/project/agent-smith-cli/)
26
26
  [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
27
27
 
28
28
  *Smith* your AGENTS.md file 🕶️
@@ -41,9 +41,13 @@ Forget `/init` skill, the output is _deterministic_, repeatable Markdown, you st
41
41
  ## Demo
42
42
 
43
43
  > [!NOTE]
44
- > The CLI is a development preview. Built-in overview, tech-stack, command and ADR
45
- > sections are available; no package release has been published yet.
44
+ > Agent Smith is available on [PyPI](https://pypi.org/project/agent-smith-cli/).
45
+ > It is under active development; versions remain below 1.0.
46
46
 
47
+ > [!TIP]
48
+ > **See the real output: [our generated AGENTS.md](AGENTS.md).**
49
+ > We eat our own dog food: Agent Smith generates this repository's agent
50
+ > instructions from its own project sources.
47
51
 
48
52
  ![agent-smith creating AGENTS.md on the left, with a live Glow preview on the right](docs/demo/agent-smith.gif)
49
53
 
@@ -52,12 +56,10 @@ Forget `/init` skill, the output is _deterministic_, repeatable Markdown, you st
52
56
  The PyPI distribution is named **`agent-smith-cli`**; the executable remains
53
57
  `agent-smith`. The name `agent-smith` was already taken on PyPI.
54
58
 
55
- Agent Smith supports Python 3.10–3.14. No release is available on PyPI yet:
56
- start from a checkout of this version of the repository and install the CLI
57
- from its root directory with uv:
59
+ Agent Smith supports Python 3.11–3.14. Install the published CLI from PyPI with uv:
58
60
 
59
61
  ```sh
60
- uv tool install .
62
+ uv tool install agent-smith-cli
61
63
  ```
62
64
 
63
65
  This installs the command in an isolated environment.
@@ -69,7 +71,7 @@ This installs the command in an isolated environment.
69
71
  Alternatively, install with pip in an activated Python virtual environment:
70
72
 
71
73
  ```sh
72
- python -m pip install .
74
+ python -m pip install agent-smith-cli
73
75
  ```
74
76
 
75
77
  ## Run and verify
@@ -127,7 +129,7 @@ Put a `mise.toml` at your project root with a nonempty `[tools]` table:
127
129
 
128
130
  ```toml
129
131
  [tools]
130
- python = ["3.14", "3.10"]
132
+ python = ["3.14", "3.11"]
131
133
  uv = "latest"
132
134
  node = { version = "lts", postinstall = "corepack enable" }
133
135
  ```
@@ -137,7 +139,7 @@ Agent Smith automatically adds:
137
139
  ```markdown
138
140
  ## Main tech stack
139
141
 
140
- - `python` — `3.14`, `3.10`
142
+ - `python` — `3.14`, `3.11`
141
143
  - `uv` — `latest`
142
144
  - `node` — `lts`
143
145
  ```
@@ -269,6 +271,58 @@ to disable command discovery, or change its `command` to another source of
269
271
  standard just list output, such as `just --list`. Explicit `enabled = true`
270
272
  requires the command to work even if no root justfile was detected.
271
273
 
274
+ ### Add multiple custom sections
275
+
276
+ In TOML, double brackets such as `[[sections]]` add an item to an **array of
277
+ tables**: here, a list of custom sections. Repeat that exact header for each
278
+ section, followed by its own `title` and `command`. You do not need to number
279
+ the headers or give them different names.
280
+
281
+ For example, use these three blocks in `agent-smith.toml`:
282
+
283
+ ```toml
284
+ [[sections]]
285
+ title = "Tracked files"
286
+ command = "git ls-files"
287
+
288
+ [[sections]]
289
+ title = "Development guidelines"
290
+ command = "cat docs/development.md"
291
+
292
+ [[sections]]
293
+ title = "Project context"
294
+ command = "bash scripts/project-context.sh"
295
+ ```
296
+
297
+ Supply the referenced files and scripts, then run `agent-smith`. It appends
298
+ these three sections after the built-ins, in the order shown. Each command's
299
+ stdout becomes the Markdown body under its section's H2 heading, with a footer
300
+ recording the command. Any executable can provide the content; Python is not
301
+ required.
302
+
303
+ ### Control section order
304
+
305
+ The generated document follows this order, omitting disabled or undetected
306
+ built-ins:
307
+
308
+ 1. Overview
309
+ 2. Main tech stack
310
+ 3. Available commands
311
+ 4. Architecture decisions
312
+ 5. Custom sections, in the order of their `[[sections]]` blocks
313
+
314
+ To reorder custom sections, move their entire `[[sections]]` blocks in
315
+ `agent-smith.toml`. For example, moving the "Project context" block above
316
+ "Tracked files" makes it appear first among the custom sections.
317
+
318
+ > [!NOTE]
319
+ > Built-in order is currently fixed. Moving `[overview]`, `[tech_stack]`,
320
+ > `[available_commands]` or `[architecture_decisions]` in the TOML file does not
321
+ > change their output order. Custom sections cannot currently be inserted before
322
+ > or between built-ins, and there is no `order` or `position` setting.
323
+
324
+ ### Replace a built-in section
325
+
272
326
  To replace the overview with your own extractor:
273
327
 
274
328
  ```toml
@@ -1,7 +1,9 @@
1
1
  # Agent Smith 🕶️
2
2
 
3
3
  [![CI](https://github.com/Mehdi-H/agent-smith/actions/workflows/release.yml/badge.svg?branch=main)](https://github.com/Mehdi-H/agent-smith/actions/workflows/release.yml?query=branch%3Amain)
4
- [![Python 3.10–3.14](https://img.shields.io/badge/python-3.10%E2%80%933.14-blue?logo=python&logoColor=white)](pyproject.toml)
4
+ [![Python 3.11–3.14](https://img.shields.io/badge/python-3.11%E2%80%933.14-blue?logo=python&logoColor=white)](pyproject.toml)
5
+ [![Codecov](https://codecov.io/github/Mehdi-H/agent-smith/branch/main/graph/badge.svg?token=9RYPPL8VLH)](https://codecov.io/github/Mehdi-H/agent-smith)
6
+ [![PyPI](https://img.shields.io/pypi/v/agent-smith-cli)](https://pypi.org/project/agent-smith-cli/)
5
7
  [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
6
8
 
7
9
  *Smith* your AGENTS.md file 🕶️
@@ -20,9 +22,13 @@ Forget `/init` skill, the output is _deterministic_, repeatable Markdown, you st
20
22
  ## Demo
21
23
 
22
24
  > [!NOTE]
23
- > The CLI is a development preview. Built-in overview, tech-stack, command and ADR
24
- > sections are available; no package release has been published yet.
25
+ > Agent Smith is available on [PyPI](https://pypi.org/project/agent-smith-cli/).
26
+ > It is under active development; versions remain below 1.0.
25
27
 
28
+ > [!TIP]
29
+ > **See the real output: [our generated AGENTS.md](AGENTS.md).**
30
+ > We eat our own dog food: Agent Smith generates this repository's agent
31
+ > instructions from its own project sources.
26
32
 
27
33
  ![agent-smith creating AGENTS.md on the left, with a live Glow preview on the right](docs/demo/agent-smith.gif)
28
34
 
@@ -31,12 +37,10 @@ Forget `/init` skill, the output is _deterministic_, repeatable Markdown, you st
31
37
  The PyPI distribution is named **`agent-smith-cli`**; the executable remains
32
38
  `agent-smith`. The name `agent-smith` was already taken on PyPI.
33
39
 
34
- Agent Smith supports Python 3.10–3.14. No release is available on PyPI yet:
35
- start from a checkout of this version of the repository and install the CLI
36
- from its root directory with uv:
40
+ Agent Smith supports Python 3.11–3.14. Install the published CLI from PyPI with uv:
37
41
 
38
42
  ```sh
39
- uv tool install .
43
+ uv tool install agent-smith-cli
40
44
  ```
41
45
 
42
46
  This installs the command in an isolated environment.
@@ -48,7 +52,7 @@ This installs the command in an isolated environment.
48
52
  Alternatively, install with pip in an activated Python virtual environment:
49
53
 
50
54
  ```sh
51
- python -m pip install .
55
+ python -m pip install agent-smith-cli
52
56
  ```
53
57
 
54
58
  ## Run and verify
@@ -106,7 +110,7 @@ Put a `mise.toml` at your project root with a nonempty `[tools]` table:
106
110
 
107
111
  ```toml
108
112
  [tools]
109
- python = ["3.14", "3.10"]
113
+ python = ["3.14", "3.11"]
110
114
  uv = "latest"
111
115
  node = { version = "lts", postinstall = "corepack enable" }
112
116
  ```
@@ -116,7 +120,7 @@ Agent Smith automatically adds:
116
120
  ```markdown
117
121
  ## Main tech stack
118
122
 
119
- - `python` — `3.14`, `3.10`
123
+ - `python` — `3.14`, `3.11`
120
124
  - `uv` — `latest`
121
125
  - `node` — `lts`
122
126
  ```
@@ -248,6 +252,58 @@ to disable command discovery, or change its `command` to another source of
248
252
  standard just list output, such as `just --list`. Explicit `enabled = true`
249
253
  requires the command to work even if no root justfile was detected.
250
254
 
255
+ ### Add multiple custom sections
256
+
257
+ In TOML, double brackets such as `[[sections]]` add an item to an **array of
258
+ tables**: here, a list of custom sections. Repeat that exact header for each
259
+ section, followed by its own `title` and `command`. You do not need to number
260
+ the headers or give them different names.
261
+
262
+ For example, use these three blocks in `agent-smith.toml`:
263
+
264
+ ```toml
265
+ [[sections]]
266
+ title = "Tracked files"
267
+ command = "git ls-files"
268
+
269
+ [[sections]]
270
+ title = "Development guidelines"
271
+ command = "cat docs/development.md"
272
+
273
+ [[sections]]
274
+ title = "Project context"
275
+ command = "bash scripts/project-context.sh"
276
+ ```
277
+
278
+ Supply the referenced files and scripts, then run `agent-smith`. It appends
279
+ these three sections after the built-ins, in the order shown. Each command's
280
+ stdout becomes the Markdown body under its section's H2 heading, with a footer
281
+ recording the command. Any executable can provide the content; Python is not
282
+ required.
283
+
284
+ ### Control section order
285
+
286
+ The generated document follows this order, omitting disabled or undetected
287
+ built-ins:
288
+
289
+ 1. Overview
290
+ 2. Main tech stack
291
+ 3. Available commands
292
+ 4. Architecture decisions
293
+ 5. Custom sections, in the order of their `[[sections]]` blocks
294
+
295
+ To reorder custom sections, move their entire `[[sections]]` blocks in
296
+ `agent-smith.toml`. For example, moving the "Project context" block above
297
+ "Tracked files" makes it appear first among the custom sections.
298
+
299
+ > [!NOTE]
300
+ > Built-in order is currently fixed. Moving `[overview]`, `[tech_stack]`,
301
+ > `[available_commands]` or `[architecture_decisions]` in the TOML file does not
302
+ > change their output order. Custom sections cannot currently be inserted before
303
+ > or between built-ins, and there is no `order` or `position` setting.
304
+
305
+ ### Replace a built-in section
306
+
251
307
  To replace the overview with your own extractor:
252
308
 
253
309
  ```toml
@@ -1,20 +1,16 @@
1
1
  [project]
2
2
  name = "agent-smith-cli"
3
- version = "0.3.1"
3
+ version = "0.4.0"
4
4
  description = "Build agent instructions from your project's sources."
5
5
  readme = "README.md"
6
- requires-python = ">=3.10"
6
+ requires-python = ">=3.11"
7
7
  license = "MIT"
8
8
  license-files = ["LICENSE"]
9
- dependencies = [
10
- "markdown-it-py>=4,<5",
11
- "tomli>=2 ; python_full_version < '3.11'",
12
- ]
9
+ dependencies = ["markdown-it-py>=4,<5"]
13
10
  classifiers = [
14
11
  "Development Status :: 2 - Pre-Alpha",
15
12
  "Environment :: Console",
16
13
  "Programming Language :: Python :: 3 :: Only",
17
- "Programming Language :: Python :: 3.10",
18
14
  "Programming Language :: Python :: 3.11",
19
15
  "Programming Language :: Python :: 3.12",
20
16
  "Programming Language :: Python :: 3.13",
@@ -46,7 +42,7 @@ dev = [
46
42
  release = ["python-semantic-release==10.6.2"]
47
43
 
48
44
  [tool.ruff]
49
- target-version = "py310"
45
+ target-version = "py311"
50
46
  line-length = 100
51
47
 
52
48
  [tool.ruff.lint]
@@ -63,7 +59,7 @@ select = [
63
59
  ]
64
60
 
65
61
  [tool.ty.environment]
66
- python-version = "3.10"
62
+ python-version = "3.11"
67
63
 
68
64
  [tool.ty.terminal]
69
65
  error-on-warning = true
@@ -71,9 +67,6 @@ error-on-warning = true
71
67
  [tool.deptry]
72
68
  github_warning_errors = []
73
69
 
74
- [tool.deptry.per_rule_ignores]
75
- DEP001 = ["tomllib"]
76
-
77
70
  [tool.pytest.ini_options]
78
71
  testpaths = ["tests"]
79
72
  addopts = "--strict-config --strict-markers --cov=agent_smith --cov-branch --cov-report=term-missing"
@@ -1,20 +1,18 @@
1
1
  [project]
2
2
  name = "agent-smith-cli"
3
- version = "0.3.1"
3
+ version = "0.4.0"
4
4
  description = "Build agent instructions from your project's sources."
5
5
  readme = "README.md"
6
- requires-python = ">=3.10"
6
+ requires-python = ">=3.11"
7
7
  license = "MIT"
8
8
  license-files = ["LICENSE"]
9
9
  dependencies = [
10
10
  "markdown-it-py>=4,<5",
11
- "tomli>=2 ; python_full_version < '3.11'",
12
11
  ]
13
12
  classifiers = [
14
13
  "Development Status :: 2 - Pre-Alpha",
15
14
  "Environment :: Console",
16
15
  "Programming Language :: Python :: 3 :: Only",
17
- "Programming Language :: Python :: 3.10",
18
16
  "Programming Language :: Python :: 3.11",
19
17
  "Programming Language :: Python :: 3.12",
20
18
  "Programming Language :: Python :: 3.13",
@@ -51,14 +49,14 @@ release = [
51
49
  module-name = "agent_smith"
52
50
 
53
51
  [tool.ruff]
54
- target-version = "py310"
52
+ target-version = "py311"
55
53
  line-length = 100
56
54
 
57
55
  [tool.ruff.lint]
58
56
  select = ["E", "F", "W", "I", "UP", "B", "SIM", "ANN", "RUF"]
59
57
 
60
58
  [tool.ty.environment]
61
- python-version = "3.10"
59
+ python-version = "3.11"
62
60
 
63
61
  [tool.ty.terminal]
64
62
  error-on-warning = true
@@ -66,11 +64,6 @@ error-on-warning = true
66
64
  [tool.deptry]
67
65
  github_warning_errors = []
68
66
 
69
- [tool.deptry.per_rule_ignores]
70
- # tomllib is stdlib on 3.11+ and only imported behind a version guard.
71
- # On 3.10, deptry scans that inactive branch; the runtime uses declared tomli.
72
- DEP001 = ["tomllib"]
73
-
74
67
  [tool.pytest.ini_options]
75
68
  testpaths = ["tests"]
76
69
  addopts = "--strict-config --strict-markers --cov=agent_smith --cov-branch --cov-report=term-missing"
@@ -1,14 +1,9 @@
1
1
  """Load optional TOML configuration and apply explicit CLI overrides."""
2
2
 
3
- import sys
3
+ import tomllib
4
4
  from pathlib import Path
5
5
  from typing import cast
6
6
 
7
- if sys.version_info >= (3, 11):
8
- import tomllib
9
- else:
10
- import tomli as tomllib
11
-
12
7
  from agent_smith.application.ports import (
13
8
  ArchitectureDecisionsSection,
14
9
  AvailableCommandsSection,
@@ -1,11 +1,6 @@
1
1
  """Render the declared mise tools without running mise or resolving versions."""
2
2
 
3
- import sys
4
-
5
- if sys.version_info >= (3, 11):
6
- import tomllib
7
- else:
8
- import tomli as tomllib
3
+ import tomllib
9
4
 
10
5
  from agent_smith.application.generation import inline_code
11
6
  from agent_smith.application.ports import GenerationError
File without changes