Skip to content

Commit 9652b50

Browse files
committed
Harden repo automation, prompt explainations and fix project scaffolds
1 parent 21fbb41 commit 9652b50

22 files changed

+1180
-138
lines changed

.github/dependabot.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
day: monday
8+
time: "09:00"
9+
timezone: Asia/Karachi
10+
open-pull-requests-limit: 10
11+
labels:
12+
- dependencies
13+
- npm
14+
groups:
15+
production-dependencies:
16+
dependency-type: production
17+
development-dependencies:
18+
dependency-type: development
19+
20+
- package-ecosystem: github-actions
21+
directory: "/"
22+
schedule:
23+
interval: weekly
24+
day: monday
25+
time: "09:30"
26+
timezone: Asia/Karachi
27+
open-pull-requests-limit: 5
28+
labels:
29+
- dependencies
30+
- github-actions
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Dependency Review
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
dependency-review:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v5
14+
- uses: actions/dependency-review-action@v4
15+
with:
16+
fail-on-severity: high

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
runs-on: ubuntu-latest
1515
permissions:
1616
contents: write
17+
attestations: write
18+
id-token: write
1719
steps:
1820
- uses: actions/checkout@v5
1921
with:
@@ -37,6 +39,10 @@ jobs:
3739
run: |
3840
mkdir -p release-artifacts
3941
npm pack --ignore-scripts --pack-destination release-artifacts --cache /tmp/devforge-release-cache
42+
- name: Attest release artifact provenance
43+
uses: actions/attest-build-provenance@v3
44+
with:
45+
subject-path: release-artifacts/*.tgz
4046
- name: Publish GitHub release
4147
env:
4248
GH_TOKEN: ${{ github.token }}

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,27 @@ The format follows Keep a Changelog and the version numbers follow Semantic Vers
66

77
## [Unreleased]
88

9+
## [0.4.0] - 2026-03-26
10+
11+
### Added
12+
13+
- Added repository hardening files and workflows: `CODEOWNERS`, Dependabot configuration, a pull-request dependency review workflow, and GitHub release artifact attestations.
14+
- Added generated README and getting-started command guides that explain what each common command does and why it matters.
15+
- Added a dedicated prompt reference page so users can understand what each CLI question changes and why DevForge asks it.
16+
17+
### Changed
18+
19+
- Refreshed the public README and documentation site with clearer positioning, stronger command explanations, and clearer guidance around default versus optional tooling.
20+
- Made Husky and Commitlint opt-in defaults, while keeping ESLint and Prettier enabled as the baseline quality setup.
21+
- Narrowed generated microfrontend strategy support to the currently implemented Vite federation flow so prompts and normalization no longer imply unsupported runtime behavior.
22+
23+
### Fixed
24+
25+
- Reworked generated microfrontend workspaces to use a federation-aware host and remote setup with stable ports, remote entry exposure, and a dev workflow that no longer races three generic Vite apps against each other.
26+
- Improved installer UX by surfacing explicit progress steps before dependency installation and git setup begin.
27+
- Added pnpm build-approval hints for browser-oriented scaffolds so common `esbuild` installs no longer stop at an approval warning on fresh pnpm setups.
28+
- Updated generated Tailwind Vite scaffolds to use the current Tailwind package integration instead of writing unprocessed `@tailwind` directives without the required plugin setup.
29+
930
## [0.3.4] - 2026-03-26
1031

1132
### Changed

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @Ali-dev11

README.md

Lines changed: 80 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,87 @@
11
# DevForge CLI
22

3-
DevForge CLI is a production-focused, AI-native scaffolding tool for modern JavaScript and TypeScript applications. It helps teams move from project intent to a documented, installable repository with architecture guidance, AI assistant rules, testing setup, release hygiene, and baseline tooling already in place.
3+
DevForge CLI is an AI-native scaffolding tool for JavaScript and TypeScript teams that want more than a blank starter. It turns project intent into a runnable repository with architecture guidance, starter surfaces, testing setup, AI rules, repository hygiene, and contributor docs already in place.
44

5-
## Why DevForge
5+
## Why DevForge Exists
66

7-
Starting a new project usually means repeating the same setup work: choosing frameworks, wiring testing, adding linting, deciding on architecture, documenting the stack, and aligning AI assistants with team standards. DevForge turns that setup phase into a guided flow that produces a repo your team can actually build on.
7+
Most new projects lose time before real product work even starts. Teams repeat the same setup decisions around frameworks, package managers, testing, linting, formatting, release hygiene, CI, and AI tooling. DevForge compresses that setup phase into one guided flow and outputs a repository that already explains itself.
88

99
DevForge helps you:
1010

11-
- reduce setup time for frontend, backend, fullstack, microfrontend, extension, and CLI projects
12-
- avoid invalid stack combinations through built-in normalization and compatibility rules
13-
- start with generated docs, health surfaces, project metadata, and repository hygiene from day one
14-
- configure AI tools like Cursor, Claude, and Codex with stack-aware rule packs
15-
- standardize project creation across teams, internal tools, client work, and experiments
11+
- move from idea to runnable repo faster
12+
- avoid invalid stack combinations before they land in code
13+
- start with project docs, starter surfaces, and contributor files on day one
14+
- standardize scaffolding across personal projects, internal tooling, and client work
15+
- keep Cursor, Claude, and Codex aligned with the selected stack through generated rules
1616

17-
## What You Get
17+
## What It Generates
1818

19-
- intent-driven scaffolding for landing pages, frontend apps, backend APIs, fullstack apps, microfrontends, Chrome extensions, and CLI tools
20-
- environment-aware setup for Node.js and package manager selection
21-
- configurable ESLint, Prettier, and Husky strictness profiles
22-
- testing setup prompts for Vitest, Jest, Playwright, Cypress, `node`, `jsdom`, and `happy-dom`
23-
- frontend state and data choices including Redux Toolkit, MobX, Jotai, TanStack Query, RTK Query, and more
24-
- generated docs, AI rules, CI, contribution files, and release-ready repository hygiene
25-
26-
## Generated Starter Experience
27-
28-
DevForge does not stop at writing config files. Fresh projects include meaningful starter surfaces so the generated app explains itself:
29-
30-
- frontend projects render a project details page with stack information and generator metadata
31-
- backend projects expose structured metadata from `/` and `/health`
32-
- fullstack apps ship with a frontend surface and an API health route
33-
- microfrontends generate a host plus remotes with role-aware starter screens
34-
- Chrome extensions include popup, background, and content-script starter surfaces
35-
- CLI projects expose human-readable output and machine-readable `--json` output
19+
- landing pages, frontend apps, backend APIs, fullstack apps, microfrontend workspaces, Chrome extensions, and CLI tools
20+
- project-detail starter UIs for frontend surfaces
21+
- metadata and health endpoints for backend and fullstack APIs
22+
- AI rule outputs for Cursor, Claude, Codex, and `AGENTS.md`
23+
- testing setup for Vitest, Jest, Playwright, and Cypress
24+
- optional ESLint, Prettier, Husky, Commitlint, Docker, and GitHub Actions setup
25+
- generated docs, changelog-ready project metadata, and baseline repository hygiene
3626

3727
## Quick Start
3828

39-
Run without installing globally:
29+
Run without a global install:
4030

4131
```bash
42-
npx @ali-dev11/devforge@latest
32+
npx --yes @ali-dev11/devforge@latest
4333
```
4434

4535
Global install:
4636

4737
```bash
4838
npm install -g @ali-dev11/devforge
49-
create-devforge
50-
# or
5139
devforge
5240
```
5341

54-
## Local Development
42+
## What The CLI Asks You
5543

56-
```bash
57-
npm install
58-
npm run check
59-
npm run build
60-
node dist/bin/devforge.js --help
61-
node dist/bin/devforge.js init
62-
```
44+
DevForge keeps core setup decisions required, and pushes the rest behind optional customization steps.
6345

64-
## Release History And Docs
46+
- Always asked: project name, output directory, Node strategy, package manager, project intent, architecture when there is more than one valid choice, and stack-specific core choices like framework or backend language.
47+
- Asked only when you opt in to customization: frontend libraries, backend capabilities, testing details, AI rule details, linting/formatting/hooks, and extra DevOps tooling.
6548

66-
- [Documentation Site](https://ali-dev11.github.io/devforge/)
67-
- [Docs Overview](./docs/overview.md)
68-
- [Changelog](./CHANGELOG.md)
69-
- [GitHub Releases](https://github.com/Ali-dev11/devforge/releases)
70-
- [GitHub Pages Changelog](https://ali-dev11.github.io/devforge/changelog.html)
49+
## Prompt Guide
50+
51+
Every prompt in DevForge exists to answer one of four questions: where the project should live, what kind of product is being created, which stack should power it, and how much team/process setup should be generated from day one.
52+
53+
- `Project name`: becomes the generated package or workspace name and is reused in starter screens, docs, and metadata.
54+
- `Output directory`: tells DevForge where to write files. It is needed so the generator knows which folder to create or validate before writing.
55+
- `Node.js version`: controls whether the scaffold follows the current LTS track, the latest available release, or a custom pinned version for stricter team environments.
56+
- `Package manager`: chooses the lockfile, install command, and workspace behavior for the generated project.
57+
- `What are you building?`: decides the entire downstream flow, including whether DevForge asks frontend, backend, extension, CLI, or workspace-specific questions.
58+
- `Architecture style`: determines whether the output is a single app, a modular codebase, a monorepo, or a microfrontend workspace when that makes sense for the selected intent.
59+
- `Template tier`: controls how much baseline setup and production-minded structure the scaffold should include.
60+
61+
The full prompt-by-prompt guide is here:
62+
63+
- [Prompt Reference](./docs/prompts.md)
64+
65+
## Default Versus Optional Tooling
66+
67+
- ESLint: enabled by default because most teams want lint feedback immediately.
68+
- Prettier: enabled by default so formatting stays consistent across humans and AI tools.
69+
- Husky: optional and off by default because local git hooks are team-policy dependent.
70+
- Commitlint: optional and off by default unless you explicitly want commit-message enforcement.
71+
- Docker and generated GitHub Actions: optional, depending on whether the project needs containerization or repo-level automation from day one.
72+
73+
## How DevForge Helps In Practice
74+
75+
- For frontend teams, it creates a visible starter surface that shows the selected stack, project metadata, and generator details.
76+
- For backend teams, it exposes structured metadata and health endpoints so the scaffold is immediately inspectable.
77+
- For fullstack teams, it gives you both a frontend shell and an API surface instead of only config files.
78+
- For platform teams, it creates repeatable project conventions around docs, testing, and AI rules.
79+
- For public packages and client work, it reduces “first week” setup drift and gives contributors a clearer starting point.
7180

7281
## Development Commands
7382

7483
```bash
84+
npm install
7585
npm run lint
7686
npm run typecheck
7787
npm run test
@@ -82,16 +92,30 @@ npm run smoke
8292
npm run runtime:matrix -- --scenario backend-hono --scenario cli-tool
8393
```
8494

85-
## Documentation
95+
## Why These Commands Matter
8696

97+
- `npm install` installs local development dependencies for the DevForge repository itself.
98+
- `npm run lint` checks repository code quality rules.
99+
- `npm run typecheck` validates the TypeScript source without emitting build output.
100+
- `npm run test` runs regression coverage for prompts, normalization, generator output, changelog rendering, and runtime-matrix coverage.
101+
- `npm run build` compiles the CLI into `dist/` so the published package and smoke runs use built artifacts.
102+
- `npm run check` is the main contributor safety command because it combines linting, typechecking, tests, and build verification.
103+
- `npm run docs:changelog` refreshes the GitHub Pages changelog page from `CHANGELOG.md`.
104+
- `npm run smoke` verifies a non-interactive scaffold run end to end.
105+
- `npm run runtime:matrix -- --scenario ...` installs, builds, and verifies generated projects so the scaffold output is tested as a product, not just as source code.
106+
107+
## Repository Docs
108+
109+
- [Documentation Site](https://ali-dev11.github.io/devforge/)
87110
- [Docs Home](./docs/index.md)
88-
- [Changelog Page](./docs/changelog.md)
111+
- [Prompt Reference](./docs/prompts.md)
89112
- [Overview](./docs/overview.md)
90113
- [Architecture](./docs/architecture.md)
91114
- [Development](./docs/development.md)
92115
- [Generated Output](./docs/generated-output.md)
93-
- [Contributing](./CONTRIBUTING.md)
94-
- [Docs Contributing Page](./docs/contributing.md)
116+
- [Changelog](./CHANGELOG.md)
117+
- [GitHub Releases](https://github.com/Ali-dev11/devforge/releases)
118+
- [GitHub Pages Changelog](https://ali-dev11.github.io/devforge/changelog.html)
95119

96120
## Community Health
97121

@@ -105,13 +129,14 @@ npm run runtime:matrix -- --scenario backend-hono --scenario cli-tool
105129

106130
## Repository Structure
107131

108-
- `src/cli.ts`: argument parsing and command dispatch
109-
- `src/commands/init.ts`: orchestration for the init flow
110-
- `src/engines/`: environment detection, prompts, normalization, generation, install hooks, AI rules
111-
- `src/templates.ts`: generated file content and project docs
112-
- `src/devforge-rules.ts`: DevForge-curated AI rule pack mapping
113-
- `test/`: regression tests
114-
- `docs/`: product, architecture, and contribution documentation
132+
- `src/cli.ts` handles argument parsing and command dispatch.
133+
- `src/commands/init.ts` orchestrates the interactive initialization flow.
134+
- `src/engines/` contains environment detection, prompting, normalization, generation, installation, and AI rule logic.
135+
- `src/templates.ts` defines generated project files, starter surfaces, and generated docs.
136+
- `src/runtime-matrix.ts` verifies generated project installs, builds, and runtime behavior.
137+
- `src/devforge-rules.ts` maps stack choices to DevForge-curated AI rule packs.
138+
- `docs/` powers the public documentation site.
139+
- `test/` covers generator behavior, decision normalization, changelog rendering, and runtime-matrix coverage.
115140

116141
## License
117142

docs/changelog.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,27 @@ Track what changed in DevForge CLI across releases, including scaffolding behavi
99
- [GitHub Releases](https://github.com/Ali-dev11/devforge/releases)
1010
- [Repository Changelog](https://github.com/Ali-dev11/devforge/blob/main/CHANGELOG.md)
1111

12+
## [0.4.0] - 2026-03-26
13+
14+
### Added
15+
16+
- Added repository hardening files and workflows: `CODEOWNERS`, Dependabot configuration, a pull-request dependency review workflow, and GitHub release artifact attestations.
17+
- Added generated README and getting-started command guides that explain what each common command does and why it matters.
18+
- Added a dedicated prompt reference page so users can understand what each CLI question changes and why DevForge asks it.
19+
20+
### Changed
21+
22+
- Refreshed the public README and documentation site with clearer positioning, stronger command explanations, and clearer guidance around default versus optional tooling.
23+
- Made Husky and Commitlint opt-in defaults, while keeping ESLint and Prettier enabled as the baseline quality setup.
24+
- Narrowed generated microfrontend strategy support to the currently implemented Vite federation flow so prompts and normalization no longer imply unsupported runtime behavior.
25+
26+
### Fixed
27+
28+
- Reworked generated microfrontend workspaces to use a federation-aware host and remote setup with stable ports, remote entry exposure, and a dev workflow that no longer races three generic Vite apps against each other.
29+
- Improved installer UX by surfacing explicit progress steps before dependency installation and git setup begin.
30+
- Added pnpm build-approval hints for browser-oriented scaffolds so common `esbuild` installs no longer stop at an approval warning on fresh pnpm setups.
31+
- Updated generated Tailwind Vite scaffolds to use the current Tailwind package integration instead of writing unprocessed `@tailwind` directives without the required plugin setup.
32+
1233
## [0.3.4] - 2026-03-26
1334

1435
### Changed

docs/development.md

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ title: Development
77
## Prerequisites
88

99
- Node.js 20+
10-
- npm 10+ recommended
11-
- Use Node `20.19.0+` or `22.12.0+` when running generated frontend or extension runtime scenarios locally.
10+
- npm 10+ recommended for working on the DevForge repository
11+
- Use Node `20.19.0+` or `22.12.0+` when running generated frontend or extension runtime scenarios locally
1212

1313
## Local Setup
1414

@@ -17,23 +17,41 @@ npm install
1717
npm run check
1818
```
1919

20-
## Common Commands
20+
## Repository Commands
2121

2222
```bash
2323
npm run dev -- --help
24-
npm run build
25-
npm run test
2624
npm run lint
25+
npm run typecheck
26+
npm run test
27+
npm run build
28+
npm run check
2729
npm run docs:changelog
2830
npm run smoke
2931
npm run runtime:matrix -- --scenario backend-hono --scenario cli-tool
3032
```
3133

32-
## Workflow
34+
## Why Each Command Exists
35+
36+
- `npm run dev -- --help` lets you exercise the CLI locally without publishing a package first.
37+
- `npm run lint` checks repository code-style and code-quality rules.
38+
- `npm run typecheck` catches TypeScript regressions before runtime.
39+
- `npm run test` runs focused regression tests for prompting, normalization, generator output, changelog rendering, and runtime-matrix coverage.
40+
- `npm run build` compiles the CLI to `dist/`, which mirrors what npm users receive.
41+
- `npm run check` is the primary contributor gate because it runs lint, types, tests, and build verification together.
42+
- `npm run docs:changelog` keeps the GitHub Pages changelog synchronized with `CHANGELOG.md`.
43+
- `npm run smoke` verifies a fast end-to-end scaffold run without interactive prompts.
44+
- `npm run runtime:matrix -- --scenario ...` validates generated projects as products by installing, building, and checking runtime behavior for representative stacks.
45+
46+
## Working On Generated Scaffolds
47+
48+
- Prefer `npm run smoke` for quick CLI sanity checks.
49+
- Use `npm run runtime:matrix` when changing templates, prompts, package-manager behavior, or generated runtime surfaces.
50+
- If you touch microfrontend templates, validate the generated `dev` workflow, not just build output.
51+
- If you touch docs or release notes, rerun `npm run docs:changelog`.
52+
53+
## Tooling Defaults
3354

34-
1. Make changes in `src/`.
35-
2. Run `npm run check`.
36-
3. Use `npm run smoke` for an end-to-end non-interactive scaffold.
37-
4. Use `npm run runtime:matrix` to verify generated installs, builds, and runtime surfaces for representative stacks.
38-
5. Run `npm run docs:changelog` after changelog updates so the GitHub Pages release history stays aligned.
39-
6. Update docs when command behavior or generated output changes.
55+
- ESLint and Prettier are default-on in generated projects because they are broad quality baselines.
56+
- Husky and Commitlint are opt-in because local hook enforcement is not appropriate for every team or prototype.
57+
- Generated GitHub Actions, Docker, and heavier DevOps setup remain optional to avoid forcing unnecessary tooling into every scaffold.

0 commit comments

Comments
 (0)