Skip to content

Commit d7e9d84

Browse files
committed
docs: update README to enhance clarity on DevContext features and usage
1 parent aa40571 commit d7e9d84

File tree

1 file changed

+62
-30
lines changed

1 file changed

+62
-30
lines changed

README.md

Lines changed: 62 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,81 @@
11
![devcontext logo](public/logo.png)
22

3+
Repo-aware AI coding guidelines assistant. Wizard or Repo Scan — your context, ready.
34

4-
Build high-signal agent and instruction files from community-proven best practices.
5+
## What DevContext does
6+
- Generates AI‑ready files for your project: Copilot instructions, Cursor rules, and agent guidance.
7+
- Works two ways: start from scratch with a guided wizard or scan a public GitHub repository to prefill answers.
8+
- Surfaces examples, trade‑offs, tags, and authoritative docs so choices are transparent and revisitable.
59

6-
## What devcontext does
7-
- Transforms curated community knowledge into ready-to-use instructions for agents, coding copilots, and repo guides.
8-
- Guides you through a multi-step wizard that selects files, stacks, and scenario-specific topics.
9-
- Surfaces examples, trade-offs, and documentation links so every choice is backed by trusted references.
10+
## Two ways to use
11+
- New Project (Wizard)
12+
- Start from curated stacks or go fully custom.
13+
- Answer focused questions (general, architecture, performance, security, commits, etc.).
14+
- Apply smart defaults when unsure; you can edit everything later.
15+
- Existing Project (Repo Scan)
16+
- Paste an `owner/repo` or full URL. DevContext detects languages, frameworks, tooling, tests, and conventions.
17+
- The wizard is prefilled with detected signals; you only confirm or fill gaps.
1018

11-
## How the wizard works
12-
1. Launch the app and switch from the landing hero to the Instructions Wizard.
13-
2. Pick the instruction file you want to assemble (from templates defined in `data/files.json`).
14-
3. Choose your stack and automatically load its follow-up question set (dynamic imports from `data/questions/<stack>.json`).
15-
4. Answer topic prompts across general, architecture, performance, security, commits, and more—or lean on the recommended defaults when you need a fast decision.
16-
5. Review a completion summary that highlights what made it into your file and which areas still need decisions.
19+
See the Scan → Wizard pipeline in docs/scan-flow.md.
1720

18-
## Architecture docs
19-
- [Scan → Wizard Flow](docs/scan-flow.md) – how repository scans feed conventions, defaults, and final instruction files.
21+
## What repo scan detects
22+
- Languages and frameworks (e.g., Next.js, React, Vue, Python)
23+
- Tooling and testing (ESLint, Prettier, TypeScript; Jest, Vitest, Playwright, Cypress, pytest)
24+
- Structure (src/, components/, tests/, monorepo/workspaces) and package manager
25+
- Routing, styling, state management, data fetching
26+
- Auth, validation, logging, CI/CD, code quality tools
27+
- Editor and naming conventions; commit message style
2028

21-
## Community knowledge base
22-
- Every topic originates from the developer community—playbooks, real-world retrospectives, and shared tooling habits.
23-
- JSON entries in `data/` capture those insights: each answer carries labels, examples, pros/cons, tags, and authoritative `docs` links.
24-
- Disabled options mark ideas that the community is still refining; they stay visible so contributors can track demand.
25-
- Icon choices use Simple Icons with automatic contrast adjustments for readability across themes.
29+
The detected summary is converted into wizard answers and ultimately into tailored instruction files.
2630

27-
## Key interaction details
28-
- Tooltips open from the info icon, letting you explore examples, pros/cons, tags, and external docs without losing your place.
29-
- Multi-select questions let you apply the curated default choice with a single click so momentum never stalls.
30-
- Progress indicators keep a running count of answered versus unanswered items, making gaps obvious before export.
31+
## Outputs
32+
- `copilot-instructions.md` (from `file-templates/copilot-instructions-template.md`)
33+
- `agents.md` (from `file-templates/agents-template.md`)
34+
- `.cursor/rules` (from `file-templates/cursor-rules-template.json`)
35+
36+
Templates are mapped via `lib/template-config.ts` and populated by `lib/template-render.ts`.
3137

32-
## Run devcontext locally
38+
## Run locally
3339
```bash
3440
git clone https://github.com/spivx/devcontext.git
3541
cd devcontext
3642
npm install
43+
44+
# Set your GitHub token for repo scans (required)
45+
cp .env.local.example .env.local # if present, otherwise create it
46+
echo "GITHUB_TOKEN=YOUR_TOKEN_HERE" >> .env.local
47+
3748
npm run dev
3849
```
39-
Then open the printed local URL in your browser to explore the wizard.
50+
Open the printed local URL. On the landing page you can:
51+
- Launch the wizard (Start from stacks or custom)
52+
- Scan a public GitHub repo (prefills the wizard)
4053

41-
## Contribute back to the community
42-
- Add or improve topics in `data/*.json` with clear labels, examples, and `docs` links.
43-
- Propose new stack questionnaires under `data/questions/`, keeping the schema consistent.
44-
- Share hooks, utilities, or UI refinements that make the wizard easier to reason about for first-time contributors.
54+
Notes:
55+
- Scanning requires a GitHub personal access token (`GITHUB_TOKEN`) to avoid low rate limits.
56+
- Only public repositories are supported.
57+
58+
## Testing
59+
- Unit tests (Vitest): `npm run test`
60+
- E2E tests (Playwright): `npm run test:e2e`
61+
- Validate question IDs: `npm run validate:ids`
62+
63+
## Community knowledge base
64+
- All selectable answers are defined in `data/*.json` and stack‑specific files under `data/questions/<stack>.json`.
65+
- Each answer can include `value`, `label`, `icon`, `example`, `infoLines` (from pros/cons), `tags`, `isDefault`, `disabled`, `disabledLabel`, and `docs`.
66+
- Disabled choices show as “Soon” and are non‑interactive.
67+
- Icons come from `simple-icons` and auto‑adjust for dark mode readability.
68+
69+
## Key interaction details
70+
- Tooltips open from the info icon and remain interactive, with External Link icons to docs.
71+
- You can apply recommended defaults per question to keep momentum.
72+
- A completion summary highlights answered items and remaining gaps.
4573

46-
Every addition helps the community build better instruction files faster.
74+
## Contributing
75+
- Add new stacks by updating `data/stacks.json`, adding `data/questions/<stack>.json`, and (optionally) `conventions/<stack>.json`.
76+
- When adding logic: move shared TypeScript types into `types/` (e.g., `types/wizard.ts`).
77+
- Extract reusable effect logic into hooks under `hooks/` and reuse across components.
78+
- Keep PRs focused; include docs or examples where helpful.
4779

4880
## License
49-
MIT License — see [`LICENSE`](LICENSE) for the full text.
81+
MIT — see `LICENSE`.

0 commit comments

Comments
 (0)