ai-forge-cli 3.0.1__tar.gz → 3.0.3__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-3.0.1/src/ai_forge_cli.egg-info → ai_forge_cli-3.0.3}/PKG-INFO +1 -1
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/pyproject.toml +1 -1
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3/src/ai_forge_cli.egg-info}/PKG-INFO +1 -1
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/ai_forge_cli.egg-info/SOURCES.txt +1 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/commands/init.py +53 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-build/SKILL.md +38 -7
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-business/SKILL.md +16 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-review/SKILL.md +19 -0
- ai_forge_cli-3.0.3/src/cli/resources/skills/forge-schema/FRAMEWORK_REUSE_DRAFT.md +61 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-schema/SKILL.md +102 -12
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-security/SKILL.md +8 -2
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/tests/test_context.py +4 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/MANIFEST.in +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/README.md +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/setup.cfg +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/setup.py +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/ai_forge_cli.egg-info/dependency_links.txt +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/ai_forge_cli.egg-info/entry_points.txt +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/ai_forge_cli.egg-info/requires.txt +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/ai_forge_cli.egg-info/top_level.txt +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/__init__.py +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/__main__.py +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/assets/audit_template.html +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/assets/forge_full_logo.drawio.svg +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/assets/forge_white_small.drawio.svg +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/commands/__init__.py +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/commands/audit.py +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/commands/base.py +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/commands/context.py +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/commands/crawl.py +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/common.py +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/crawler.py +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/forge.py +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/FRAMEWORK_V4.md +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/SCHEMA_REFERENCE_V4.md +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-build/agents/openai.yaml +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-business/agents/openai.yaml +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-hydrate/SKILL.md +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-hydrate/agents/openai.yaml +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-review/agents/openai.yaml +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-schema/agents/openai.yaml +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-security/agents/openai.yaml +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/yaml_io.py +0 -0
- {ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/tests/test_crawler.py +0 -0
|
@@ -33,6 +33,7 @@ src/cli/resources/skills/forge-hydrate/SKILL.md
|
|
|
33
33
|
src/cli/resources/skills/forge-hydrate/agents/openai.yaml
|
|
34
34
|
src/cli/resources/skills/forge-review/SKILL.md
|
|
35
35
|
src/cli/resources/skills/forge-review/agents/openai.yaml
|
|
36
|
+
src/cli/resources/skills/forge-schema/FRAMEWORK_REUSE_DRAFT.md
|
|
36
37
|
src/cli/resources/skills/forge-schema/SKILL.md
|
|
37
38
|
src/cli/resources/skills/forge-schema/agents/openai.yaml
|
|
38
39
|
src/cli/resources/skills/forge-security/SKILL.md
|
|
@@ -164,6 +164,7 @@ def _scaffold_repository(target_root: Path, system_name: str, system_id: str) ->
|
|
|
164
164
|
_copy_skills(forge_root)
|
|
165
165
|
_rewrite_skill_references(forge_root)
|
|
166
166
|
_create_surface_skills(target_root, forge_root)
|
|
167
|
+
_create_github_copilot_context(target_root)
|
|
167
168
|
|
|
168
169
|
|
|
169
170
|
def _copy_docs(forge_root: Path) -> None:
|
|
@@ -260,6 +261,30 @@ def _create_surface_skill(surface_root: Path, forge_root: Path, skill_name: str)
|
|
|
260
261
|
target_skill.symlink_to(_relative_symlink_target(surface_root, source_skill), target_is_directory=True)
|
|
261
262
|
|
|
262
263
|
|
|
264
|
+
def _create_github_copilot_context(target_root: Path) -> None:
|
|
265
|
+
github_root = target_root / ".github"
|
|
266
|
+
instructions_root = github_root / "instructions"
|
|
267
|
+
prompts_root = github_root / "prompts"
|
|
268
|
+
instructions_root.mkdir(parents=True, exist_ok=True)
|
|
269
|
+
prompts_root.mkdir(parents=True, exist_ok=True)
|
|
270
|
+
_write_text(github_root / "copilot-instructions.md", _copilot_instructions_doc())
|
|
271
|
+
_write_text(instructions_root / "forge.instructions.md", _copilot_path_instructions_doc())
|
|
272
|
+
for skill_name in SKILL_DIRS:
|
|
273
|
+
_create_symlink(
|
|
274
|
+
prompts_root / f"{skill_name}.prompt.md",
|
|
275
|
+
target_root / "forge" / "skills" / skill_name / "SKILL.md",
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
def _create_symlink(link_path: Path, destination: Path) -> None:
|
|
280
|
+
if link_path.exists() or link_path.is_symlink():
|
|
281
|
+
if link_path.is_symlink() or link_path.is_file():
|
|
282
|
+
link_path.unlink()
|
|
283
|
+
else:
|
|
284
|
+
shutil.rmtree(link_path)
|
|
285
|
+
link_path.symlink_to(_relative_symlink_target(link_path.parent, destination), target_is_directory=destination.is_dir())
|
|
286
|
+
|
|
287
|
+
|
|
263
288
|
def _relative_symlink_target(link_parent: Path, destination: Path) -> Path:
|
|
264
289
|
return Path(os.path.relpath(destination, start=link_parent))
|
|
265
290
|
|
|
@@ -290,6 +315,34 @@ def _scaffold_gitignore() -> str:
|
|
|
290
315
|
)
|
|
291
316
|
|
|
292
317
|
|
|
318
|
+
def _copilot_instructions_doc() -> str:
|
|
319
|
+
return """# Forge Instructions
|
|
320
|
+
|
|
321
|
+
This repository uses Forge V4. Start with `forge/USING_FORGE.md`, then use the
|
|
322
|
+
skills in `forge/skills` in this order:
|
|
323
|
+
|
|
324
|
+
1. `forge-business`
|
|
325
|
+
2. `forge-schema`
|
|
326
|
+
3. `forge-review`
|
|
327
|
+
4. `forge-security`
|
|
328
|
+
5. `forge-build`
|
|
329
|
+
|
|
330
|
+
Treat `forge/skills` as the canonical skill source. Agent-specific skill
|
|
331
|
+
surfaces are symlinked back to that directory.
|
|
332
|
+
"""
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
def _copilot_path_instructions_doc() -> str:
|
|
336
|
+
return """---
|
|
337
|
+
applyTo: "**"
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
Use the Forge V4 workflow for repository work. Read `forge/USING_FORGE.md`
|
|
341
|
+
before implementation, and prefer the relevant skill in `forge/skills` for the
|
|
342
|
+
current task.
|
|
343
|
+
"""
|
|
344
|
+
|
|
345
|
+
|
|
293
346
|
def _print_init_summary(target_root: Path, system_name: str, system_id: str) -> None:
|
|
294
347
|
forge_root = target_root / "forge"
|
|
295
348
|
print(_banner("FORGE INITIALIZED"))
|
|
@@ -31,6 +31,30 @@ This skill has two modes:
|
|
|
31
31
|
|
|
32
32
|
Do not redesign the system here. If implementation proves the system, containers, entities, flows, or security posture are wrong, route the change back through `forge-schema`, `forge-review`, or `forge-security`.
|
|
33
33
|
|
|
34
|
+
## YAGNI Build Discipline
|
|
35
|
+
|
|
36
|
+
Forge Build treats lazy as efficient, not careless. Before writing code, stop at
|
|
37
|
+
the first rung that works:
|
|
38
|
+
|
|
39
|
+
1. Does this behavior need to exist for the selected slice?
|
|
40
|
+
2. Does the repository already have this behavior or a pattern to reuse?
|
|
41
|
+
3. Does the language, framework, browser, database, shell, or platform already do it?
|
|
42
|
+
4. Does an already-installed dependency solve it without new ownership?
|
|
43
|
+
5. Can the slice be implemented as a small direct change?
|
|
44
|
+
6. Only then add new structure, and only the minimum that passes the checks.
|
|
45
|
+
|
|
46
|
+
Never simplify away trust-boundary validation, data-loss-safe error handling,
|
|
47
|
+
security, accessibility, or explicit Forge contracts. Do simplify away
|
|
48
|
+
speculative abstractions, one-use factories, new configuration, generic helper
|
|
49
|
+
layers, premature extension points, and defensive branches for impossible states.
|
|
50
|
+
|
|
51
|
+
If a shortcut has a known ceiling, mark it near the code with a `yagni:`
|
|
52
|
+
comment that names the ceiling and upgrade trigger. Example:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
// yagni: linear scan is fine below 1k local items; add indexed lookup if crawl time exceeds 200ms.
|
|
56
|
+
```
|
|
57
|
+
|
|
34
58
|
## Decision Log
|
|
35
59
|
|
|
36
60
|
Read `forge/decisions.yaml` when it exists and use it as build context.
|
|
@@ -111,18 +135,20 @@ Before coding:
|
|
|
111
135
|
3. If a simpler approach exists, say so and prefer it unless it violates the Forge model.
|
|
112
136
|
4. If the request, schema, or code context is unclear, stop and name the ambiguity.
|
|
113
137
|
5. Define success criteria as verifiable checks before implementation.
|
|
138
|
+
6. Name what you are deliberately not building yet.
|
|
114
139
|
|
|
115
140
|
Workflow:
|
|
116
141
|
|
|
117
142
|
1. Load the narrow Forge context for the target business action, container flow, container, entity, or component.
|
|
118
143
|
2. Identify the smallest runnable slice and the runtime steps it touches.
|
|
119
|
-
3.
|
|
120
|
-
4.
|
|
121
|
-
5.
|
|
122
|
-
6. Add or update
|
|
123
|
-
7.
|
|
124
|
-
8.
|
|
125
|
-
9.
|
|
144
|
+
3. Run the YAGNI ladder against each planned code change.
|
|
145
|
+
4. Map each touched runtime step to the C3 annotations it needs.
|
|
146
|
+
5. Confirm all implementation files live under the correct `source_root`; adjust schema only when the source-root model is genuinely wrong.
|
|
147
|
+
6. Add or update focused tests before or alongside implementation when behavior is non-trivial.
|
|
148
|
+
7. Implement the minimum code needed for the slice.
|
|
149
|
+
8. Add or update C3 annotations in the same code change.
|
|
150
|
+
9. Run relevant tests and `forge crawl --format json`.
|
|
151
|
+
10. Fix broken references, missing annotations, contract drift, and failed tests before calling the slice complete.
|
|
126
152
|
|
|
127
153
|
The C3 scope map should identify:
|
|
128
154
|
|
|
@@ -149,7 +175,10 @@ Think before coding:
|
|
|
149
175
|
Keep the implementation simple:
|
|
150
176
|
|
|
151
177
|
- build no features beyond the selected slice
|
|
178
|
+
- prefer stdlib, platform features, and local helpers before new code
|
|
179
|
+
- add no dependency unless the alternative is meaningfully riskier or larger
|
|
152
180
|
- add no abstractions for single-use code
|
|
181
|
+
- inline one-use wrappers, factories, adapters, and config unless Forge contracts require a boundary
|
|
153
182
|
- add no configurability that was not requested
|
|
154
183
|
- add no defensive error handling for impossible states unless required by the Forge contract
|
|
155
184
|
- if the implementation grows much larger than the behavior warrants, simplify it before moving on
|
|
@@ -169,6 +198,8 @@ Drive execution by verifiable goals:
|
|
|
169
198
|
- for bug fixes, reproduce the bug with a failing test before fixing it when feasible
|
|
170
199
|
- for refactors, establish current behavior before changing structure and verify behavior afterward
|
|
171
200
|
- for multi-step slices, use a short plan where each step has its own verification command or observation
|
|
201
|
+
- leave one runnable check for every non-trivial branch, parser, persistence path, security path, or cross-container contract
|
|
202
|
+
- do not create test helpers until duplication appears or repository conventions already provide them
|
|
172
203
|
|
|
173
204
|
## Test Mode
|
|
174
205
|
|
|
@@ -74,6 +74,12 @@ Use the `forge.decisions` schema from `SCHEMA_REFERENCE_V4.md`.
|
|
|
74
74
|
|
|
75
75
|
## Workflow
|
|
76
76
|
|
|
77
|
+
Default to the smallest useful business pass. If the user is exploring a small,
|
|
78
|
+
internal, low-spend, or already-understood idea, produce the quick pass first and
|
|
79
|
+
state what deeper research would add. Use the full workflow only when market,
|
|
80
|
+
pricing, regulation, competitive pressure, or investment risk materially affects
|
|
81
|
+
the decision.
|
|
82
|
+
|
|
77
83
|
### 1. Frame The Business Scenario
|
|
78
84
|
|
|
79
85
|
Clarify:
|
|
@@ -213,6 +219,16 @@ constraint. Leave system design to `forge-schema`.
|
|
|
213
219
|
|
|
214
220
|
## Output
|
|
215
221
|
|
|
222
|
+
For a lean pass, create or update `business-plan.md` with:
|
|
223
|
+
|
|
224
|
+
- target customer
|
|
225
|
+
- problem or desired gain
|
|
226
|
+
- strongest market signal or evidence gap
|
|
227
|
+
- riskiest assumption
|
|
228
|
+
- smallest useful MVP promise
|
|
229
|
+
- business actions needed for `forge-schema`
|
|
230
|
+
- next decision: proceed, stop, pivot, or research deeper
|
|
231
|
+
|
|
216
232
|
For a full pass, create or update `business-plan.md` with:
|
|
217
233
|
|
|
218
234
|
- executive summary
|
|
@@ -65,6 +65,25 @@ Every finding should include:
|
|
|
65
65
|
|
|
66
66
|
If no issues are found, say so clearly and note any residual risk.
|
|
67
67
|
|
|
68
|
+
## Complexity Review
|
|
69
|
+
|
|
70
|
+
When reviewing build, schema, or annotation changes, also run a complexity pass:
|
|
71
|
+
|
|
72
|
+
- `delete`: dead schema, unused annotation, speculative feature, stale option
|
|
73
|
+
- `stdlib`: custom code where the language/platform already provides the behavior
|
|
74
|
+
- `native`: dependency or model construct doing what the runtime, database, browser, or Forge crawler already does
|
|
75
|
+
- `yagni`: abstraction, container, config, helper, flow, or decision record with only one real use
|
|
76
|
+
- `shrink`: same contract or behavior can be represented with fewer files, annotations, or schema elements
|
|
77
|
+
|
|
78
|
+
Prefer one-line findings:
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
path:line: yagni: one-use adapter around a single operation. Inline until a second caller exists.
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Do not apply fixes during review unless the user asks for a fix pass. End with a
|
|
85
|
+
rough net impact when useful: `net: -N lines/files/schema elements possible`.
|
|
86
|
+
|
|
68
87
|
## Workflow
|
|
69
88
|
|
|
70
89
|
### 1. Establish Scope
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Framework Reuse Draft
|
|
2
|
+
|
|
3
|
+
Draft language for `forge-schema`:
|
|
4
|
+
|
|
5
|
+
Before modeling custom runtime responsibility, classify each required capability
|
|
6
|
+
as core business logic or commodity functionality.
|
|
7
|
+
|
|
8
|
+
Core business logic is behavior that makes this product meaningfully different:
|
|
9
|
+
domain workflow, proprietary decisioning, unique data model, customer-specific
|
|
10
|
+
operations, or business rules that cannot be delegated without losing the point
|
|
11
|
+
of the system.
|
|
12
|
+
|
|
13
|
+
Commodity functionality is everything else: authentication, authorization, RAG,
|
|
14
|
+
search, security controls, rate limiting, payments, billing, email, analytics,
|
|
15
|
+
observability, background jobs, queues, file storage, feature flags, admin
|
|
16
|
+
tooling, import/export, notifications, scheduling, and common CRUD scaffolding.
|
|
17
|
+
|
|
18
|
+
For each commodity capability, propose existing options before designing custom
|
|
19
|
+
code:
|
|
20
|
+
|
|
21
|
+
- framework-native option
|
|
22
|
+
- managed service option
|
|
23
|
+
- platform primitive option
|
|
24
|
+
- bootstrap or starter framework option when it would remove setup burden
|
|
25
|
+
|
|
26
|
+
For each option, name:
|
|
27
|
+
|
|
28
|
+
- responsibility removed from this system
|
|
29
|
+
- smallest native/local alternative
|
|
30
|
+
- integration boundary introduced
|
|
31
|
+
- data ownership or compliance implication
|
|
32
|
+
- cost, lock-in, and operational burden
|
|
33
|
+
- added code, schema, configuration, infrastructure, and operating procedure
|
|
34
|
+
- upgrade trigger from the smallest option
|
|
35
|
+
- whether it should appear as an external dependency, runtime container, or
|
|
36
|
+
deferred decision
|
|
37
|
+
|
|
38
|
+
YAGNI hardening:
|
|
39
|
+
|
|
40
|
+
- Propose frameworks before custom code, but do not adopt them automatically.
|
|
41
|
+
- Prefer the smallest option that satisfies the current build slice.
|
|
42
|
+
- Reject any option that adds unused flows, roles, queues, admin surfaces,
|
|
43
|
+
multi-tenant models, billing products, deployment units, or configuration.
|
|
44
|
+
- Model a managed/framework capability as an external dependency unless this
|
|
45
|
+
system deploys, operates, or owns the runtime.
|
|
46
|
+
- Record a decision when custom commodity functionality is chosen or when a
|
|
47
|
+
reuse option materially shapes architecture.
|
|
48
|
+
|
|
49
|
+
Useful examples to consider:
|
|
50
|
+
|
|
51
|
+
- auth: Auth.js, Clerk, Supabase Auth, Django auth, Rails authentication
|
|
52
|
+
- RAG and AI retrieval: LangChain, LlamaIndex, provider/vector-store templates
|
|
53
|
+
- security: OWASP ASVS, Arcjet, framework middleware, platform WAF features
|
|
54
|
+
- rate limiting: Upstash Rate Limit, Arcjet, API gateway or platform limits
|
|
55
|
+
- payments: Stripe Checkout, Stripe Billing, Paddle, provider-hosted checkout
|
|
56
|
+
- bootstrap: next-forge, create-t3-app, Django, Rails, Laravel, Phoenix,
|
|
57
|
+
framework starters already present in the repository
|
|
58
|
+
|
|
59
|
+
Do not select a technology because it is popular. Select it only when it reduces
|
|
60
|
+
owned code while preserving the system's business intent, security posture, data
|
|
61
|
+
ownership, deployment model, and build slice.
|
|
@@ -97,6 +97,39 @@ Use a consultative system design workshop style.
|
|
|
97
97
|
7. Prefer the simplest architecture that satisfies the system drivers.
|
|
98
98
|
8. Keep schema tied to real runtime, ownership, security, or operational needs.
|
|
99
99
|
|
|
100
|
+
## Framework Reuse Preface
|
|
101
|
+
|
|
102
|
+
Do not reinvent non-core capabilities. For every feature that is not core
|
|
103
|
+
business logic, first identify existing industry-standard frameworks, managed
|
|
104
|
+
services, platform primitives, or bootstrap templates the developer could build
|
|
105
|
+
on. This includes authentication, authorization, RAG, search, security controls,
|
|
106
|
+
rate limiting, payments, billing, email, analytics, observability, background
|
|
107
|
+
jobs, queues, file storage, feature flags, and admin tooling.
|
|
108
|
+
|
|
109
|
+
Treat framework suggestions as architecture options, not automatic decisions.
|
|
110
|
+
Propose them before modeling custom runtime responsibility. Use custom
|
|
111
|
+
implementation only when the business logic, constraints, compliance posture,
|
|
112
|
+
cost, data ownership, or integration shape clearly justifies owning it.
|
|
113
|
+
|
|
114
|
+
Keep this pass YAGNI-hardened: a framework is useful only when it reduces owned
|
|
115
|
+
code and operational risk for the current build slice. Do not adopt a framework,
|
|
116
|
+
managed service, starter, queue, worker, database, auth layer, or policy engine
|
|
117
|
+
because a future version might need it. If the current slice can use a local
|
|
118
|
+
framework primitive, existing repository pattern, or simpler managed feature,
|
|
119
|
+
prefer that over a broader platform.
|
|
120
|
+
|
|
121
|
+
Examples to consider when relevant:
|
|
122
|
+
|
|
123
|
+
- auth: Auth.js, Clerk, Supabase Auth, framework-native auth
|
|
124
|
+
- RAG and AI retrieval: LangChain, LlamaIndex, vector database integrations
|
|
125
|
+
- security and abuse prevention: OWASP ASVS, Arcjet, platform middleware
|
|
126
|
+
- rate limiting: Upstash Rate Limit, Arcjet, API gateway or platform limits
|
|
127
|
+
- payments and billing: Stripe Checkout, Stripe Billing, Paddle
|
|
128
|
+
- bootstrap frameworks: next-forge, create-t3-app, Django, Rails, Laravel,
|
|
129
|
+
Phoenix, framework starters already present in the repository
|
|
130
|
+
|
|
131
|
+
Examples are prompts for research and comparison, not defaults.
|
|
132
|
+
|
|
100
133
|
## Description-First Drafting
|
|
101
134
|
|
|
102
135
|
When the operator asks to evaluate ideas before schema authoring, draft
|
|
@@ -139,6 +172,20 @@ Use these lenses to improve judgment. Do not force every insight into YAML.
|
|
|
139
172
|
|
|
140
173
|
## Workflow
|
|
141
174
|
|
|
175
|
+
Default to the minimum truthful schema pass:
|
|
176
|
+
|
|
177
|
+
1. system intent and boundary
|
|
178
|
+
2. real actors and external dependencies
|
|
179
|
+
3. business actions that matter now
|
|
180
|
+
4. real runtime containers only where runtime, deployment, ownership, scaling, or
|
|
181
|
+
security boundaries justify them
|
|
182
|
+
5. business-significant entities only
|
|
183
|
+
|
|
184
|
+
Add runtime flows, entity lifecycle detail, deployment metadata, and C3
|
|
185
|
+
responsibility plans only when they clarify the first build slice or prevent a
|
|
186
|
+
real design mistake. Do not model future options as if they are current
|
|
187
|
+
architecture.
|
|
188
|
+
|
|
142
189
|
### Phase 1: Situation Scan
|
|
143
190
|
|
|
144
191
|
If Forge files exist, inspect them:
|
|
@@ -228,7 +275,36 @@ order_repository
|
|
|
228
275
|
|
|
229
276
|
That belongs to code annotations.
|
|
230
277
|
|
|
231
|
-
### Phase 4:
|
|
278
|
+
### Phase 4: Capability Reuse Pass
|
|
279
|
+
|
|
280
|
+
Before finalizing runtime containers or custom responsibilities, classify each
|
|
281
|
+
required capability as either core business logic or commodity functionality.
|
|
282
|
+
|
|
283
|
+
For commodity functionality, propose existing options:
|
|
284
|
+
|
|
285
|
+
- one or two framework, managed-service, platform, or bootstrap options
|
|
286
|
+
- the smallest viable local or platform-native option
|
|
287
|
+
- what responsibility the option would remove from this system
|
|
288
|
+
- what new dependency, data boundary, cost, or lock-in it introduces
|
|
289
|
+
- what code, schema, configuration, infrastructure, or operating procedure it
|
|
290
|
+
would add
|
|
291
|
+
- the concrete trigger that would justify upgrading from the smallest option
|
|
292
|
+
- whether the schema should model it as an external dependency, a container, or
|
|
293
|
+
a deferred decision
|
|
294
|
+
|
|
295
|
+
Prefer external dependencies for managed services and framework capabilities
|
|
296
|
+
that the system calls but does not own. Create a container only when this system
|
|
297
|
+
deploys, operates, or meaningfully owns that runtime.
|
|
298
|
+
|
|
299
|
+
Reject reuse options that add more surface area than the custom or native
|
|
300
|
+
alternative for the current slice. A reusable framework that introduces unused
|
|
301
|
+
flows, roles, queues, admin surfaces, multi-tenant models, billing products, or
|
|
302
|
+
deployment units is still bloat until those responsibilities are real.
|
|
303
|
+
|
|
304
|
+
Record a decision when choosing to build custom commodity functionality or when
|
|
305
|
+
choosing a framework/service that shapes architecture.
|
|
306
|
+
|
|
307
|
+
### Phase 5: Container Model
|
|
232
308
|
|
|
233
309
|
Settle runtime containers after runtime flow speculation.
|
|
234
310
|
|
|
@@ -257,7 +333,7 @@ Rules:
|
|
|
257
333
|
- Cross-container flow steps describe runtime control movement.
|
|
258
334
|
- Inside-container logic should stay summarized until C3 annotations exist.
|
|
259
335
|
|
|
260
|
-
### Phase
|
|
336
|
+
### Phase 6: Entity Model
|
|
261
337
|
|
|
262
338
|
Author or refine:
|
|
263
339
|
|
|
@@ -282,7 +358,7 @@ Rules:
|
|
|
282
358
|
- `persisted_in` should point to durable storage ownership.
|
|
283
359
|
- Do not create entities for incidental DTOs.
|
|
284
360
|
|
|
285
|
-
### Phase
|
|
361
|
+
### Phase 7: C3 Responsibility Plan
|
|
286
362
|
|
|
287
363
|
For the first build slice, identify what implementation should later annotate:
|
|
288
364
|
|
|
@@ -302,7 +378,7 @@ When building this slice:
|
|
|
302
378
|
- account_store should become @forge:persistence
|
|
303
379
|
```
|
|
304
380
|
|
|
305
|
-
### Phase
|
|
381
|
+
### Phase 8: Validation
|
|
306
382
|
|
|
307
383
|
After schema edits, run where available:
|
|
308
384
|
|
|
@@ -365,14 +441,20 @@ Before calling schema work complete, check:
|
|
|
365
441
|
2. Does `system.yaml` describe system intent, not implementation?
|
|
366
442
|
3. Are business actions expressed as intent and outcomes?
|
|
367
443
|
4. Were runtime flows speculated before containers were finalized?
|
|
368
|
-
5.
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
444
|
+
5. Were non-core capabilities checked against existing frameworks, managed
|
|
445
|
+
services, platform primitives, or bootstrap templates?
|
|
446
|
+
6. Did each proposed reuse option beat the smallest native/local option for the
|
|
447
|
+
current slice?
|
|
448
|
+
7. Were unused framework features, future workflows, speculative services, and
|
|
449
|
+
premature integration layers excluded from the schema?
|
|
450
|
+
8. Are containers real runtime units?
|
|
451
|
+
9. Are container responsibilities distinct?
|
|
452
|
+
10. Are central flows cross-container/runtime-level, not C3 internals?
|
|
453
|
+
11. Are entities business-significant?
|
|
454
|
+
12. Are ownership, persistence, and lifecycle separated?
|
|
455
|
+
13. Is C3 intentionally left to annotations?
|
|
456
|
+
14. Is the first build slice thin and buildable?
|
|
457
|
+
15. Would `forge-review` have enough context to evaluate the model?
|
|
376
458
|
|
|
377
459
|
## Output
|
|
378
460
|
|
|
@@ -381,6 +463,8 @@ When making changes, summarize:
|
|
|
381
463
|
- files changed
|
|
382
464
|
- system design decisions made
|
|
383
465
|
- runtime flow assumptions
|
|
466
|
+
- framework, managed-service, platform, or bootstrap options considered for
|
|
467
|
+
non-core functionality
|
|
384
468
|
- container boundaries chosen
|
|
385
469
|
- entities identified
|
|
386
470
|
- C3 responsibilities deferred to annotations
|
|
@@ -390,6 +474,7 @@ When not making changes, produce a design brief with:
|
|
|
390
474
|
|
|
391
475
|
- recommended system intent
|
|
392
476
|
- inferred business-action/runtime-flow mapping
|
|
477
|
+
- recommended reuse options for non-core capabilities
|
|
393
478
|
- recommended container model
|
|
394
479
|
- recommended entity model
|
|
395
480
|
- key trade-offs
|
|
@@ -402,6 +487,11 @@ When not making changes, produce a design brief with:
|
|
|
402
487
|
- Do not model inside-container flows centrally.
|
|
403
488
|
- Do not over-model.
|
|
404
489
|
- Do not add distributed-system complexity without a concrete driver.
|
|
490
|
+
- Do not invent custom implementations for commodity capabilities before
|
|
491
|
+
proposing existing framework, platform, managed-service, or bootstrap options.
|
|
492
|
+
- Do not adopt a reuse option that adds more runtime, schema, configuration, or
|
|
493
|
+
operational surface than the current slice needs.
|
|
494
|
+
- Do not model unused framework capabilities as current architecture.
|
|
405
495
|
- Do not hide uncertainty inside confident YAML.
|
|
406
496
|
- Do not use technology names as architecture justification.
|
|
407
497
|
- Do not proceed to build before schema, security, and review concerns are clear.
|
|
@@ -162,8 +162,14 @@ Ask only questions that cannot be inferred from the model.
|
|
|
162
162
|
|
|
163
163
|
### 4. Research Medium-Specific Attack Vectors
|
|
164
164
|
|
|
165
|
-
When reviewing a real system or codebase
|
|
166
|
-
for the system's medium before finalizing
|
|
165
|
+
When reviewing a real system or codebase with meaningful security exposure,
|
|
166
|
+
research current common attack vectors for the system's medium before finalizing
|
|
167
|
+
findings. Meaningful exposure includes public input, authentication,
|
|
168
|
+
authorization, sensitive data, money movement, third-party calls, privileged
|
|
169
|
+
actions, deployment surfaces, or user-controlled persistence/query behavior.
|
|
170
|
+
|
|
171
|
+
For a small model-only edit outside those areas, do a lightweight trust-boundary
|
|
172
|
+
review and state that attack-vector research was not needed.
|
|
167
173
|
|
|
168
174
|
Use authoritative public references first, such as:
|
|
169
175
|
|
|
@@ -130,6 +130,10 @@ def test_init_scaffolds_traversable_repo(tmp_path: Path, capsys) -> None:
|
|
|
130
130
|
assert (root / ".claude" / "skills" / "forge-hydrate").is_symlink()
|
|
131
131
|
assert (root / ".agents" / "skills" / "forge-review").is_symlink()
|
|
132
132
|
assert (root / ".copilot" / "skills" / "forge-security").is_symlink()
|
|
133
|
+
assert (root / ".github" / "copilot-instructions.md").exists()
|
|
134
|
+
assert (root / ".github" / "instructions" / "forge.instructions.md").exists()
|
|
135
|
+
assert (root / ".github" / "prompts" / "forge-build.prompt.md").is_symlink()
|
|
136
|
+
assert (root / ".github" / "prompts" / "forge-build.prompt.md").resolve() == forge_root / "skills" / "forge-build" / "SKILL.md"
|
|
133
137
|
rewritten_skill = (forge_root / "skills" / "forge-schema" / "SKILL.md").read_text(encoding="utf-8")
|
|
134
138
|
assert "forge/SCHEMA_REFERENCE_V4.md" in rewritten_skill
|
|
135
139
|
assert "forge/USING_FORGE.md" in rewritten_skill
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-build/agents/openai.yaml
RENAMED
|
File without changes
|
{ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-business/agents/openai.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-hydrate/agents/openai.yaml
RENAMED
|
File without changes
|
{ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-review/agents/openai.yaml
RENAMED
|
File without changes
|
{ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-schema/agents/openai.yaml
RENAMED
|
File without changes
|
{ai_forge_cli-3.0.1 → ai_forge_cli-3.0.3}/src/cli/resources/skills/forge-security/agents/openai.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|