ai-forge-cli 0.1.8__tar.gz → 2.0.1__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.
- {ai_forge_cli-0.1.8/src/ai_forge_cli.egg-info → ai_forge_cli-2.0.1}/PKG-INFO +2 -2
- ai_forge_cli-2.0.1/README.md +269 -0
- {ai_forge_cli-0.1.8 → ai_forge_cli-2.0.1}/pyproject.toml +5 -2
- {ai_forge_cli-0.1.8 → ai_forge_cli-2.0.1/src/ai_forge_cli.egg-info}/PKG-INFO +2 -2
- ai_forge_cli-2.0.1/src/ai_forge_cli.egg-info/SOURCES.txt +57 -0
- ai_forge_cli-2.0.1/src/cli/__init__.py +2 -0
- {ai_forge_cli-0.1.8 → ai_forge_cli-2.0.1}/src/cli/bundle.py +16 -29
- {ai_forge_cli-0.1.8 → ai_forge_cli-2.0.1}/src/cli/commands/__init__.py +4 -0
- {ai_forge_cli-0.1.8 → ai_forge_cli-2.0.1}/src/cli/commands/context.py +6 -7
- {ai_forge_cli-0.1.8 → ai_forge_cli-2.0.1}/src/cli/commands/find.py +2 -3
- ai_forge_cli-2.0.1/src/cli/commands/graph.py +532 -0
- ai_forge_cli-2.0.1/src/cli/commands/init.py +302 -0
- ai_forge_cli-2.0.1/src/cli/commands/inspect.py +153 -0
- ai_forge_cli-2.0.1/src/cli/commands/update.py +77 -0
- ai_forge_cli-2.0.1/src/cli/commands/validate.py +396 -0
- {ai_forge_cli-0.1.8 → ai_forge_cli-2.0.1}/src/cli/common.py +12 -18
- {ai_forge_cli-0.1.8 → ai_forge_cli-2.0.1}/src/cli/forge.py +10 -6
- ai_forge_cli-2.0.1/src/cli/framework.yaml +228 -0
- ai_forge_cli-2.0.1/src/cli/index.py +277 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-build/SKILL.md +146 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-build/references/framework.md +564 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-build/references/framework.yaml +228 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-build/references/templates.yaml +364 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-cast/SKILL.md +136 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-cast/references/framework.md +564 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-cast/references/framework.yaml +228 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-cast/references/templates.yaml +364 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-design/SKILL.md +107 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-design/references/framework.md +564 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-design/references/framework.yaml +228 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-design/references/templates.yaml +364 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-review/SKILL.md +218 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-review/references/framework.md +564 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-review/references/framework.yaml +228 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-review/references/templates.yaml +364 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-spec/SKILL.md +144 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-spec/references/framework.md +564 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-spec/references/framework.yaml +228 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-spec/references/templates.yaml +364 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-validate/SKILL.md +143 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-validate/references/framework.md +564 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-validate/references/framework.yaml +228 -0
- ai_forge_cli-2.0.1/src/cli/skills/forge-validate/references/templates.yaml +364 -0
- ai_forge_cli-2.0.1/src/cli/walker.py +275 -0
- ai_forge_cli-2.0.1/tests/test_cli.py +153 -0
- ai_forge_cli-2.0.1/tests/test_find.py +106 -0
- ai_forge_cli-2.0.1/tests/test_index.py +157 -0
- ai_forge_cli-2.0.1/tests/test_init.py +105 -0
- ai_forge_cli-2.0.1/tests/test_update.py +97 -0
- ai_forge_cli-2.0.1/tests/test_walker.py +113 -0
- ai_forge_cli-0.1.8/README.md +0 -290
- ai_forge_cli-0.1.8/src/ai_forge_cli.egg-info/SOURCES.txt +0 -30
- ai_forge_cli-0.1.8/src/cli/__init__.py +0 -2
- ai_forge_cli-0.1.8/src/cli/commands/init.py +0 -452
- ai_forge_cli-0.1.8/src/cli/commands/inspect.py +0 -111
- ai_forge_cli-0.1.8/src/cli/commands/update.py +0 -78
- ai_forge_cli-0.1.8/src/cli/index.py +0 -156
- ai_forge_cli-0.1.8/src/cli/walker.py +0 -849
- ai_forge_cli-0.1.8/tests/test_cli.py +0 -151
- ai_forge_cli-0.1.8/tests/test_find.py +0 -113
- ai_forge_cli-0.1.8/tests/test_index.py +0 -63
- ai_forge_cli-0.1.8/tests/test_init.py +0 -156
- ai_forge_cli-0.1.8/tests/test_update.py +0 -70
- ai_forge_cli-0.1.8/tests/test_walker.py +0 -266
- {ai_forge_cli-0.1.8 → ai_forge_cli-2.0.1}/LICENSE +0 -0
- {ai_forge_cli-0.1.8 → ai_forge_cli-2.0.1}/setup.cfg +0 -0
- {ai_forge_cli-0.1.8 → ai_forge_cli-2.0.1}/src/ai_forge_cli.egg-info/dependency_links.txt +0 -0
- {ai_forge_cli-0.1.8 → ai_forge_cli-2.0.1}/src/ai_forge_cli.egg-info/entry_points.txt +0 -0
- {ai_forge_cli-0.1.8 → ai_forge_cli-2.0.1}/src/ai_forge_cli.egg-info/requires.txt +0 -0
- {ai_forge_cli-0.1.8 → ai_forge_cli-2.0.1}/src/ai_forge_cli.egg-info/top_level.txt +0 -0
- {ai_forge_cli-0.1.8 → ai_forge_cli-2.0.1}/src/cli/__main__.py +0 -0
- {ai_forge_cli-0.1.8 → ai_forge_cli-2.0.1}/src/cli/commands/base.py +0 -0
- {ai_forge_cli-0.1.8 → ai_forge_cli-2.0.1}/src/cli/commands/list_cmd.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ai-forge-cli
|
|
3
|
-
Version: 0.1
|
|
4
|
-
Summary: Context walker for the Forge
|
|
3
|
+
Version: 2.0.1
|
|
4
|
+
Summary: Context walker for the Forge spec system
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
License-File: LICENSE
|
|
7
7
|
Requires-Dist: pyyaml>=6.0
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
███████╗ ██████╗ ██████╗ ██████╗ ███████╗
|
|
5
|
+
██╔════╝██╔═══██╗██╔══██╗██╔════╝ ██╔════╝
|
|
6
|
+
█████╗ ██║ ██║██████╔╝██║ ███╗█████╗
|
|
7
|
+
██╔══╝ ██║ ██║██╔══██╗██║ ██║██╔══╝
|
|
8
|
+
██║ ╚██████╔╝██║ ██║╚██████╔╝███████╗
|
|
9
|
+
╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
**Spec-driven agent development.**
|
|
13
|
+
The agent drives the interview. The specs drive the code.
|
|
14
|
+
|
|
15
|
+
[](https://github.com/GreyFlames07/forge/actions/workflows/ci.yml)
|
|
16
|
+
[](LICENSE)
|
|
17
|
+
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## What it is
|
|
23
|
+
|
|
24
|
+
A hierarchical YAML spec system, a Python CLI for context assembly, and **six agent skills** that take a human from a vague product idea to working, reviewed, and validated code — with the agent asking questions and the human answering, not the reverse.
|
|
25
|
+
|
|
26
|
+
Built on the premise that **people explain systems well under questioning but poorly when cold-prompted**. Forge inverts the default "human prompts agent → agent implements" loop into "agent interviews human → structured spec emerges → agent implements from spec".
|
|
27
|
+
|
|
28
|
+
Runs in any agent client that supports skills: **Claude Code**, **OpenAI Codex CLI**, **VS Code Copilot**, **Cursor**, and any other agentskills.io-compatible client.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## The pipeline
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
idea
|
|
36
|
+
↓
|
|
37
|
+
forge-design → system design (conception, systems, domains, modules, environments)
|
|
38
|
+
↓
|
|
39
|
+
forge-spec → element specs (elements, properties, operations, types, contracts, flows)
|
|
40
|
+
↓
|
|
41
|
+
forge-cast → repo hydration (existing codebase → draft Forge spec + uncertainty report)
|
|
42
|
+
↓
|
|
43
|
+
forge-review → quality + security (completeness, consistency, contract correctness, attack vectors)
|
|
44
|
+
↓
|
|
45
|
+
forge-build → code + tests (parallel subagents, each element gets forge context)
|
|
46
|
+
↓
|
|
47
|
+
forge-validate → validation report (static analysis, test coverage, behavioral probes)
|
|
48
|
+
↓
|
|
49
|
+
working system
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Each skill is a SKILL.md directive (agent-facing) plus a shared `docs/framework-reference.md` (human reference). Agents use the `forge` CLI to load element context — no spec content is inlined in prompts.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Install
|
|
57
|
+
|
|
58
|
+
### Fresh machine — four commands
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
git clone https://github.com/GreyFlames07/forge.git
|
|
62
|
+
cd forge
|
|
63
|
+
uv venv --python 3.13 .venv && uv pip install -e . pytest
|
|
64
|
+
./scripts/install-skills.sh install
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
This wires the `forge` binary into `~/.local/bin/` and symlinks the six skills into `~/.claude/skills/`, `~/.codex/skills/`, and `~/.agents/skills/` — discoverable by every supported client.
|
|
68
|
+
|
|
69
|
+
### Verify
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
forge --version # shows installed forge version
|
|
73
|
+
forge --help # shows: init, update, context, list, inspect, find, validate, graph
|
|
74
|
+
.venv/bin/pytest # 74 passed
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Requirements
|
|
78
|
+
|
|
79
|
+
| | |
|
|
80
|
+
|---|---|
|
|
81
|
+
| Python | ≥ 3.13 |
|
|
82
|
+
| Package manager | [`uv`](https://docs.astral.sh/uv/) recommended; pip works |
|
|
83
|
+
| Agent client | Claude Code, Codex CLI, or any agentskills.io-compatible client |
|
|
84
|
+
|
|
85
|
+
If `forge: command not found`: add `~/.local/bin` to PATH.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
export PATH="$HOME/.local/bin:$PATH" # add to ~/.zshrc to persist
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Quick start
|
|
94
|
+
|
|
95
|
+
Bootstrap a new project in any empty directory:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
mkdir ~/my-idea && cd ~/my-idea
|
|
99
|
+
forge init
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
▸ Forge init in /Users/you/my-idea
|
|
104
|
+
|
|
105
|
+
✓ spec/
|
|
106
|
+
✓ spec/framework.yaml (framework vocabulary)
|
|
107
|
+
✓ spec/conception.yaml (fill in your conception details)
|
|
108
|
+
|
|
109
|
+
───── Next steps ─────
|
|
110
|
+
|
|
111
|
+
Edit spec/conception.yaml and replace placeholders:
|
|
112
|
+
id: <conception>
|
|
113
|
+
name: <ConceptionName>
|
|
114
|
+
|
|
115
|
+
Create your first system directory:
|
|
116
|
+
mkdir -p spec/<system>
|
|
117
|
+
touch spec/<system>/system.yaml
|
|
118
|
+
|
|
119
|
+
Set the spec dir (add to shell rc to persist):
|
|
120
|
+
export FORGE_SPEC_DIR="/Users/you/my-idea/spec"
|
|
121
|
+
|
|
122
|
+
Validate at any time:
|
|
123
|
+
forge validate
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Open an agent session in that directory and describe your idea. The relevant skill activates; the interview begins.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## CLI
|
|
131
|
+
|
|
132
|
+
| Command | Purpose |
|
|
133
|
+
|---|---|
|
|
134
|
+
| `forge init` | Scaffold a new project (`spec/` + `framework.yaml` + `conception.yaml`) |
|
|
135
|
+
| `forge update` | Refresh `framework.yaml` to the current Forge version |
|
|
136
|
+
| `forge --version` | Print the installed Forge CLI version |
|
|
137
|
+
| `forge list [--kind K]` | Enumerate nodes in the spec dir |
|
|
138
|
+
| `forge inspect <id>` | Lightweight metadata probe |
|
|
139
|
+
| `forge context <element-id>` | Full implementation-ready bundle for an element |
|
|
140
|
+
| `forge find <query>` | Substring search across IDs and descriptions |
|
|
141
|
+
| `forge validate` | Lint the spec for structural and referential errors |
|
|
142
|
+
| `forge graph` | Visualise the dependency graph |
|
|
143
|
+
|
|
144
|
+
Spec-dir resolution order: `--spec-dir` flag > `$FORGE_SPEC_DIR` env var > auto-discover (walks upward looking for `spec/conception.yaml`).
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## The six skills
|
|
149
|
+
|
|
150
|
+
| Skill | Role | Input | Output |
|
|
151
|
+
|---|---|---|---|
|
|
152
|
+
| **forge-design** | System designer / interviewer | Vague product idea | conception.yaml, system.yaml, domain.yaml files, module.yaml skeletons, workbench/discovery.md |
|
|
153
|
+
| **forge-spec** | Element elicitation | One module | Elements, properties, operations, types, errors, contracts, interactions, flows, datastores |
|
|
154
|
+
| **forge-cast** | Codebase hydration | Existing non-Forge codebase | Draft Forge spec corpus anchored to repository evidence, workbench/cast-report.md |
|
|
155
|
+
| **forge-review** | Quality + security review | Completed module specs | Completeness, consistency, contract correctness, attack vector analysis, workbench/review.md |
|
|
156
|
+
| **forge-build** | Implementation orchestrator | Reviewed spec corpus | Code + tests dispatched via parallel subagents, each using `forge context <id>` |
|
|
157
|
+
| **forge-validate** | Post-implementation validator | Implemented system + spec | Static analysis, test coverage, behavioral probes, workbench/validation.md |
|
|
158
|
+
|
|
159
|
+
Skills activate via natural-language prompts in any supported client, or slash-commands where the client supports them.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## The spec system
|
|
164
|
+
|
|
165
|
+
Hierarchical YAML — one file per node, IDs derived from file paths.
|
|
166
|
+
|
|
167
|
+
| Level | Node type | File location |
|
|
168
|
+
|---|---|---|
|
|
169
|
+
| Conception | conception | `spec/conception.yaml` |
|
|
170
|
+
| System | system | `spec/<system>/system.yaml` |
|
|
171
|
+
| Domain | domain | `spec/<system>/<domain>/domain.yaml` |
|
|
172
|
+
| Module | module | `spec/<system>/<domain>/<module>/module.yaml` |
|
|
173
|
+
| Element | element | `spec/<system>/<domain>/<module>/<element>.yaml` |
|
|
174
|
+
| Registry | type, error, policy, contract, integration, interaction, flow | `spec/<system>/<registry>/` |
|
|
175
|
+
| Implementation | datastore, environment, test, deployment | `spec/<system>/implementation/` |
|
|
176
|
+
|
|
177
|
+
Process artifacts (discovery notes, review reports, build plans) live in `spec/<system>/workbench/`.
|
|
178
|
+
|
|
179
|
+
Full schema reference: [`docs/framework-reference.md`](docs/framework-reference.md).
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Repository layout
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
forge/
|
|
187
|
+
├── src/
|
|
188
|
+
│ └── cli/ Python CLI package (the forge command)
|
|
189
|
+
├── .agents/skills/ The 6 forge skills
|
|
190
|
+
│ ├── forge-design/
|
|
191
|
+
│ ├── forge-spec/
|
|
192
|
+
│ ├── forge-cast/
|
|
193
|
+
│ ├── forge-review/
|
|
194
|
+
│ ├── forge-build/
|
|
195
|
+
│ └── forge-validate/
|
|
196
|
+
├── docs/
|
|
197
|
+
│ └── framework-reference.md Combined schema + enum + rule reference
|
|
198
|
+
├── example/
|
|
199
|
+
│ └── spec/ Working example spec (LinkHub URL shortener)
|
|
200
|
+
├── scripts/
|
|
201
|
+
│ └── install-skills.sh Global skill install + CLI symlink
|
|
202
|
+
├── tests/ pytest suite — 74 tests
|
|
203
|
+
├── pyproject.toml
|
|
204
|
+
└── README.md
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Development
|
|
210
|
+
|
|
211
|
+
### Testing
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
.venv/bin/pytest -v
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
The `example/spec/` directory is a complete working spec (LinkHub, a URL shortener) that doubles as the test fixture and a reference for what a finished project looks like.
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
export FORGE_SPEC_DIR="$(pwd)/example/spec"
|
|
221
|
+
forge list # see all nodes
|
|
222
|
+
forge context linkhub.shortener.links.link_manager.short_link # full element bundle
|
|
223
|
+
forge find redirect # search across nodes
|
|
224
|
+
forge validate # lint the spec
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Adding a new skill
|
|
228
|
+
|
|
229
|
+
1. Create `.agents/skills/<name>/SKILL.md` with agentskills.io frontmatter (`name`, `description`).
|
|
230
|
+
2. Symlink `references/framework.md` → `../../../../docs/framework-reference.md` for framework access.
|
|
231
|
+
3. Add the skill to `SKILLS=()` in `scripts/install-skills.sh`.
|
|
232
|
+
4. `./scripts/install-skills.sh install` to wire up globally.
|
|
233
|
+
|
|
234
|
+
### Uninstall
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
./scripts/install-skills.sh uninstall
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Removes all global skill symlinks and the `forge` CLI binary. Does not touch project `spec/` directories.
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Contributing
|
|
245
|
+
|
|
246
|
+
Pull requests welcome. See [`CONTRIBUTING.md`](CONTRIBUTING.md) for:
|
|
247
|
+
|
|
248
|
+
- Branching and commit conventions (Conventional Commits)
|
|
249
|
+
- Local dev setup
|
|
250
|
+
- PR requirements and CI expectations
|
|
251
|
+
- Release process
|
|
252
|
+
|
|
253
|
+
Changes are tracked in [`CHANGELOG.md`](CHANGELOG.md) following [Keep a Changelog](https://keepachangelog.com).
|
|
254
|
+
|
|
255
|
+
## Security
|
|
256
|
+
|
|
257
|
+
Security issues: see [`SECURITY.md`](SECURITY.md). Do not open public issues for vulnerabilities.
|
|
258
|
+
|
|
259
|
+
## License
|
|
260
|
+
|
|
261
|
+
MIT — see [`LICENSE`](LICENSE).
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
<div align="center">
|
|
266
|
+
|
|
267
|
+
<sub>Built for agent-driven development. Questions over prompts. Specs over intentions. Code follows.</sub>
|
|
268
|
+
|
|
269
|
+
</div>
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ai-forge-cli"
|
|
7
|
-
version = "0.1
|
|
8
|
-
description = "Context walker for the Forge
|
|
7
|
+
version = "2.0.1"
|
|
8
|
+
description = "Context walker for the Forge spec system"
|
|
9
9
|
requires-python = ">=3.11"
|
|
10
10
|
dependencies = ["pyyaml>=6.0"]
|
|
11
11
|
|
|
@@ -16,6 +16,9 @@ forge = "cli.forge:main"
|
|
|
16
16
|
where = ["src"]
|
|
17
17
|
include = ["cli*"]
|
|
18
18
|
|
|
19
|
+
[tool.setuptools.package-data]
|
|
20
|
+
cli = ["framework.yaml", "skills/*/SKILL.md", "skills/*/references/*", "skills/*/assets/**/*"]
|
|
21
|
+
|
|
19
22
|
[tool.pytest.ini_options]
|
|
20
23
|
testpaths = ["tests"]
|
|
21
24
|
pythonpath = ["src"]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ai-forge-cli
|
|
3
|
-
Version: 0.1
|
|
4
|
-
Summary: Context walker for the Forge
|
|
3
|
+
Version: 2.0.1
|
|
4
|
+
Summary: Context walker for the Forge spec system
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
License-File: LICENSE
|
|
7
7
|
Requires-Dist: pyyaml>=6.0
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/ai_forge_cli.egg-info/PKG-INFO
|
|
5
|
+
src/ai_forge_cli.egg-info/SOURCES.txt
|
|
6
|
+
src/ai_forge_cli.egg-info/dependency_links.txt
|
|
7
|
+
src/ai_forge_cli.egg-info/entry_points.txt
|
|
8
|
+
src/ai_forge_cli.egg-info/requires.txt
|
|
9
|
+
src/ai_forge_cli.egg-info/top_level.txt
|
|
10
|
+
src/cli/__init__.py
|
|
11
|
+
src/cli/__main__.py
|
|
12
|
+
src/cli/bundle.py
|
|
13
|
+
src/cli/common.py
|
|
14
|
+
src/cli/forge.py
|
|
15
|
+
src/cli/framework.yaml
|
|
16
|
+
src/cli/index.py
|
|
17
|
+
src/cli/walker.py
|
|
18
|
+
src/cli/commands/__init__.py
|
|
19
|
+
src/cli/commands/base.py
|
|
20
|
+
src/cli/commands/context.py
|
|
21
|
+
src/cli/commands/find.py
|
|
22
|
+
src/cli/commands/graph.py
|
|
23
|
+
src/cli/commands/init.py
|
|
24
|
+
src/cli/commands/inspect.py
|
|
25
|
+
src/cli/commands/list_cmd.py
|
|
26
|
+
src/cli/commands/update.py
|
|
27
|
+
src/cli/commands/validate.py
|
|
28
|
+
src/cli/skills/forge-build/SKILL.md
|
|
29
|
+
src/cli/skills/forge-build/references/framework.md
|
|
30
|
+
src/cli/skills/forge-build/references/framework.yaml
|
|
31
|
+
src/cli/skills/forge-build/references/templates.yaml
|
|
32
|
+
src/cli/skills/forge-cast/SKILL.md
|
|
33
|
+
src/cli/skills/forge-cast/references/framework.md
|
|
34
|
+
src/cli/skills/forge-cast/references/framework.yaml
|
|
35
|
+
src/cli/skills/forge-cast/references/templates.yaml
|
|
36
|
+
src/cli/skills/forge-design/SKILL.md
|
|
37
|
+
src/cli/skills/forge-design/references/framework.md
|
|
38
|
+
src/cli/skills/forge-design/references/framework.yaml
|
|
39
|
+
src/cli/skills/forge-design/references/templates.yaml
|
|
40
|
+
src/cli/skills/forge-review/SKILL.md
|
|
41
|
+
src/cli/skills/forge-review/references/framework.md
|
|
42
|
+
src/cli/skills/forge-review/references/framework.yaml
|
|
43
|
+
src/cli/skills/forge-review/references/templates.yaml
|
|
44
|
+
src/cli/skills/forge-spec/SKILL.md
|
|
45
|
+
src/cli/skills/forge-spec/references/framework.md
|
|
46
|
+
src/cli/skills/forge-spec/references/framework.yaml
|
|
47
|
+
src/cli/skills/forge-spec/references/templates.yaml
|
|
48
|
+
src/cli/skills/forge-validate/SKILL.md
|
|
49
|
+
src/cli/skills/forge-validate/references/framework.md
|
|
50
|
+
src/cli/skills/forge-validate/references/framework.yaml
|
|
51
|
+
src/cli/skills/forge-validate/references/templates.yaml
|
|
52
|
+
tests/test_cli.py
|
|
53
|
+
tests/test_find.py
|
|
54
|
+
tests/test_index.py
|
|
55
|
+
tests/test_init.py
|
|
56
|
+
tests/test_update.py
|
|
57
|
+
tests/test_walker.py
|
|
@@ -13,30 +13,17 @@ import yaml
|
|
|
13
13
|
|
|
14
14
|
# Human-readable headers for each bundle section.
|
|
15
15
|
_SECTION_HEADERS: dict[str, str] = {
|
|
16
|
-
"target":
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"owned_artifacts": "L3 — Owned Artifacts",
|
|
28
|
-
"called_atom_signatures": "L3 — Called Atom Signatures",
|
|
29
|
-
"producer_atom_signature": "L3 — Producer Atom Signature",
|
|
30
|
-
"source_artifacts": "L3 — Upstream Source Artifacts",
|
|
31
|
-
"consumer_signatures": "L3 — Consumer Signatures",
|
|
32
|
-
"training_artifact": "L3 — Training Artifact",
|
|
33
|
-
"handler_atoms": "L3 — Handler Atoms",
|
|
34
|
-
"step_atom_signatures": "L3 — Step Atom Signatures",
|
|
35
|
-
"l4_journey": "L4 — Target Journey",
|
|
36
|
-
"l4_orchestration": "L4 — Target Orchestration",
|
|
37
|
-
"invoked_orchestrations": "L4 — Invoked Orchestrations",
|
|
38
|
-
"l4_callers": "L4 — Callers (atoms consumed here)",
|
|
39
|
-
"l5_operations": "L5 — Operations",
|
|
16
|
+
"target": "Target",
|
|
17
|
+
"element": "Element",
|
|
18
|
+
"module": "Module",
|
|
19
|
+
"domain": "Domain",
|
|
20
|
+
"system": "System",
|
|
21
|
+
"contracts": "Contracts",
|
|
22
|
+
"types": "Types",
|
|
23
|
+
"errors": "Errors",
|
|
24
|
+
"interactions": "Interactions",
|
|
25
|
+
"policies_applied": "Policies Applied",
|
|
26
|
+
"datastores": "Datastores",
|
|
40
27
|
}
|
|
41
28
|
|
|
42
29
|
|
|
@@ -60,11 +47,11 @@ def _render_yaml(bundle: OrderedDict[str, Any]) -> str:
|
|
|
60
47
|
parts: list[str] = []
|
|
61
48
|
target = bundle.get("target") or {}
|
|
62
49
|
parts.append("# " + "=" * 66)
|
|
63
|
-
parts.append(
|
|
50
|
+
parts.append("# FORGE CONTEXT BUNDLE")
|
|
64
51
|
parts.append(f"# target: {target.get('id', '<unknown>')}")
|
|
65
52
|
parts.append(f"# kind: {target.get('kind', '<unknown>')}")
|
|
66
|
-
if target.get("
|
|
67
|
-
parts.append(f"#
|
|
53
|
+
if target.get("element_kind"):
|
|
54
|
+
parts.append(f"# element_kind: {target['element_kind']}")
|
|
68
55
|
parts.append("# " + "=" * 66)
|
|
69
56
|
parts.append("")
|
|
70
57
|
|
|
@@ -91,8 +78,8 @@ def _render_markdown(bundle: OrderedDict[str, Any]) -> str:
|
|
|
91
78
|
"",
|
|
92
79
|
f"- **kind**: `{target.get('kind', '<unknown>')}`",
|
|
93
80
|
]
|
|
94
|
-
if target.get("
|
|
95
|
-
parts.append(f"- **
|
|
81
|
+
if target.get("element_kind"):
|
|
82
|
+
parts.append(f"- **element_kind**: `{target['element_kind']}`")
|
|
96
83
|
parts.append("")
|
|
97
84
|
|
|
98
85
|
for key, value in bundle.items():
|
|
@@ -13,10 +13,12 @@ builds its subparser, and wires dispatch via `args.handler`.
|
|
|
13
13
|
|
|
14
14
|
from cli.commands import context as _context
|
|
15
15
|
from cli.commands import find as _find
|
|
16
|
+
from cli.commands import graph as _graph
|
|
16
17
|
from cli.commands import init as _init
|
|
17
18
|
from cli.commands import inspect as _inspect
|
|
18
19
|
from cli.commands import list_cmd as _list_cmd
|
|
19
20
|
from cli.commands import update as _update
|
|
21
|
+
from cli.commands import validate as _validate
|
|
20
22
|
|
|
21
23
|
ALL_COMMANDS = [
|
|
22
24
|
_init,
|
|
@@ -25,4 +27,6 @@ ALL_COMMANDS = [
|
|
|
25
27
|
_list_cmd,
|
|
26
28
|
_inspect,
|
|
27
29
|
_find,
|
|
30
|
+
_validate,
|
|
31
|
+
_graph,
|
|
28
32
|
]
|
|
@@ -11,13 +11,12 @@ from cli import index as index_mod
|
|
|
11
11
|
from cli import walker
|
|
12
12
|
|
|
13
13
|
NAME = "context"
|
|
14
|
-
HELP = "Build a full implementation-ready context bundle for an
|
|
14
|
+
HELP = "Build a full implementation-ready context bundle for an element."
|
|
15
15
|
DESCRIPTION = (
|
|
16
|
-
"Walks the spec dependency graph from <id> and emits everything "
|
|
17
|
-
"an agent needs to implement it: the
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"implications, and L5 operations."
|
|
16
|
+
"Walks the spec dependency graph from <element-id> and emits everything "
|
|
17
|
+
"an agent needs to implement it: the element (with inline properties and "
|
|
18
|
+
"operations), parent module/domain/system, referenced contracts, types "
|
|
19
|
+
"(transitive), errors, interactions, cascaded policies, and datastores."
|
|
21
20
|
)
|
|
22
21
|
|
|
23
22
|
|
|
@@ -25,7 +24,7 @@ def register(sub: argparse._SubParsersAction) -> None:
|
|
|
25
24
|
p = sub.add_parser(NAME, help=HELP, description=DESCRIPTION)
|
|
26
25
|
p.add_argument(
|
|
27
26
|
"id",
|
|
28
|
-
help="Target id.
|
|
27
|
+
help="Target element id (e.g. myapp.billing.payments.charge_processor.charge).",
|
|
29
28
|
)
|
|
30
29
|
common.add_spec_dir_arg(p)
|
|
31
30
|
p.add_argument(
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"""`forge find <query>` — substring search across entity IDs and descriptions.
|
|
2
2
|
|
|
3
3
|
Used as the scanning primitive for reuse-before-create probes in the
|
|
4
|
-
forge-
|
|
5
|
-
|
|
6
|
-
present them advisorily to the human.
|
|
4
|
+
forge-spec skill. Agents call this before writing a new type or error
|
|
5
|
+
to surface potential matches, then present them advisorily to the human.
|
|
7
6
|
"""
|
|
8
7
|
|
|
9
8
|
from __future__ import annotations
|