@rijalpermana/spec-forge 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@rijalpermana/spec-forge",
3
+ "version": "0.1.0",
4
+ "description": "Spec-driven development CLI: scaffolds specs, schemas, API contracts, task lists, and test cases; bridges into Claude Code as slash commands.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "Rijal Permana <rijalpermana00@gmail.com>",
8
+ "keywords": [
9
+ "cli",
10
+ "spec-driven",
11
+ "scaffold",
12
+ "prd",
13
+ "claude-code",
14
+ "dbml",
15
+ "api-contract"
16
+ ],
17
+ "engines": {
18
+ "node": ">=18"
19
+ },
20
+ "bin": {
21
+ "forge": "./dist/cli.js"
22
+ },
23
+ "files": [
24
+ "dist",
25
+ "templates"
26
+ ],
27
+ "scripts": {
28
+ "build": "bun build ./src/cli.ts --outdir ./dist --target node",
29
+ "prepublishOnly": "bun run build",
30
+ "link": "bun link"
31
+ },
32
+ "dependencies": {
33
+ "commander": "^12.1.0",
34
+ "prompts": "^2.4.2"
35
+ },
36
+ "devDependencies": {
37
+ "@types/prompts": "^2.4.9",
38
+ "bun-types": "^1.3.14",
39
+ "typescript": "^5.5.4"
40
+ }
41
+ }
@@ -0,0 +1,7 @@
1
+ # API Contract — {{feature}}
2
+
3
+ Title: sample title
4
+ endpoint: GET xxxx/xxx
5
+ Request: [details]
6
+ Response: [all responses in json]
7
+ Note: [if available]
@@ -0,0 +1,21 @@
1
+ # Smelt Brief — {{feature}}
2
+
3
+ Captured on: {{date}}
4
+
5
+ ## Goal
6
+ {{goal}}
7
+
8
+ ## Actors
9
+ {{actors}}
10
+
11
+ ## Key constraints
12
+ {{constraints}}
13
+
14
+ ## Out of scope (explicit)
15
+ {{outOfScope}}
16
+
17
+ ---
18
+ Next step: open this file in Claude Code / Claude Desktop and ask it to draft
19
+ `prd.md` in this same folder using this brief as grounding context. Do not let
20
+ the AI invent scope not covered here — send it back to `forge smelt {{feature}}`
21
+ to re-run the Q&A if something's missing.
@@ -0,0 +1,32 @@
1
+ # Codebase Map
2
+
3
+ > Generated by `forge scan` on {{generatedAt}}. This is a **factual inventory**
4
+ > of the existing project — deterministic, no interpretation. Use it as grounding
5
+ > before drafting specs: prefer the conventions, entities, and files that already
6
+ > exist here over inventing new ones. Re-run `forge scan` to refresh.
7
+
8
+ ## Project
9
+
10
+ {{project}}
11
+
12
+ ## Detected stack
13
+
14
+ {{stack}}
15
+
16
+ ## File statistics
17
+
18
+ {{stats}}
19
+
20
+ ## Existing schema / data-model files
21
+
22
+ {{schemas}}
23
+
24
+ ## Existing API / route files
25
+
26
+ {{apis}}
27
+
28
+ ## Directory tree (depth {{depth}})
29
+
30
+ ```
31
+ {{tree}}
32
+ ```
@@ -0,0 +1,29 @@
1
+ # PRD — {{feature}}
2
+
3
+ > Generated by `forge smelt {{feature}}`. Draft this with AI (Claude Code / Claude Desktop)
4
+ > using brief.md in this folder as grounding context. Replace every [TODO] before running
5
+ > `forge schema`, `forge contract`, or `forge tasks`.
6
+
7
+ ## 1. Background
8
+ [TODO: why this feature exists, business context]
9
+
10
+ ## 2. Goal
11
+ [TODO: one-sentence outcome this feature must deliver]
12
+
13
+ ## 3. Actors / Roles
14
+ [TODO: who interacts with this feature, and how]
15
+
16
+ ## 4. User Stories
17
+ [TODO: As a [role], I want [capability], so that [benefit]. Repeat per story.]
18
+
19
+ ### Acceptance Criteria (Given/When/Then)
20
+ [TODO: per user story]
21
+
22
+ ## 5. Business Rules & Edge Cases
23
+ [TODO: explicit rules, validation logic, edge cases — do not leave implicit]
24
+
25
+ ## 6. Out of Scope
26
+ [TODO: explicitly excluded items, to prevent AI over-building]
27
+
28
+ ## 7. Dependencies
29
+ [TODO: upstream/downstream systems, data sources, other features this depends on]
@@ -0,0 +1,10 @@
1
+ // Schema — {{feature}}
2
+ // Generated by `forge schema {{feature}}`. Derive this from prd.md — do not invent
3
+ // entities that aren't grounded in the PRD's user stories or business rules.
4
+
5
+ // Table example (replace/remove):
6
+ // Table {{feature}}_items {
7
+ // id uuid [pk, default: `gen_random_uuid()`]
8
+ // tenant_id uuid [not null, note: 'RLS scope']
9
+ // created_at timestamp [not null, default: `now()`]
10
+ // }
@@ -0,0 +1,11 @@
1
+ # Tasks — {{feature}}
2
+
3
+ > Sequence matters. Data/schema tasks before logic tasks before UI tasks.
4
+ > Flag any dependency inversion explicitly (e.g. do not schedule model/logic work
5
+ > before its data source task is complete).
6
+
7
+ | Task ID | Task | Depends On | Layer | Est. (man-day) | Status |
8
+ | ------ | ------ | ------ | ------ | ------ | ------ |
9
+ | {{feature}}-01 | [TODO] | - | data | - | todo |
10
+ | {{feature}}-02 | [TODO] | {{feature}}-01 | logic | - | todo |
11
+ | {{feature}}-03 | [TODO] | {{feature}}-02 | ui | - | todo |
@@ -0,0 +1,5 @@
1
+ # Test Cases — {{feature}}
2
+
3
+ | No | Test Scenario | Test Case | Test Type | Expected Result | Actual Result | Status | Remark |
4
+ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ |
5
+ | 1 | Diisi dengan Modul / Menu / Fitur | Diisi dengan Item Test | **Positive / Negative** | Diisi dengan hasil yang diharapkan | - | - | - |