@dynokostya/just-works 1.0.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/.claude/agents/csharp-code-writer.md +32 -0
- package/.claude/agents/diagrammer.md +49 -0
- package/.claude/agents/frontend-code-writer.md +36 -0
- package/.claude/agents/prompt-writer.md +38 -0
- package/.claude/agents/python-code-writer.md +32 -0
- package/.claude/agents/swift-code-writer.md +32 -0
- package/.claude/agents/typescript-code-writer.md +32 -0
- package/.claude/commands/git-sync.md +96 -0
- package/.claude/commands/project-docs.md +287 -0
- package/.claude/settings.json +112 -0
- package/.claude/settings.json.default +15 -0
- package/.claude/skills/csharp-coding/SKILL.md +368 -0
- package/.claude/skills/ddd-architecture-python/SKILL.md +288 -0
- package/.claude/skills/feature-driven-architecture-python/SKILL.md +302 -0
- package/.claude/skills/gemini-3-prompting/SKILL.md +483 -0
- package/.claude/skills/gpt-5-2-prompting/SKILL.md +295 -0
- package/.claude/skills/opus-4-6-prompting/SKILL.md +315 -0
- package/.claude/skills/plantuml-diagramming/SKILL.md +758 -0
- package/.claude/skills/python-coding/SKILL.md +293 -0
- package/.claude/skills/react-coding/SKILL.md +264 -0
- package/.claude/skills/rest-api/SKILL.md +421 -0
- package/.claude/skills/shadcn-ui-coding/SKILL.md +454 -0
- package/.claude/skills/swift-coding/SKILL.md +401 -0
- package/.claude/skills/tailwind-css-coding/SKILL.md +268 -0
- package/.claude/skills/typescript-coding/SKILL.md +464 -0
- package/.claude/statusline-command.sh +34 -0
- package/.codex/prompts/plan-reviewer.md +162 -0
- package/.codex/prompts/project-docs.md +287 -0
- package/.codex/skills/ddd-architecture-python/SKILL.md +288 -0
- package/.codex/skills/feature-driven-architecture-python/SKILL.md +302 -0
- package/.codex/skills/gemini-3-prompting/SKILL.md +483 -0
- package/.codex/skills/gpt-5-2-prompting/SKILL.md +295 -0
- package/.codex/skills/opus-4-6-prompting/SKILL.md +315 -0
- package/.codex/skills/plantuml-diagramming/SKILL.md +758 -0
- package/.codex/skills/python-coding/SKILL.md +293 -0
- package/.codex/skills/react-coding/SKILL.md +264 -0
- package/.codex/skills/rest-api/SKILL.md +421 -0
- package/.codex/skills/shadcn-ui-coding/SKILL.md +454 -0
- package/.codex/skills/tailwind-css-coding/SKILL.md +268 -0
- package/.codex/skills/typescript-coding/SKILL.md +464 -0
- package/AGENTS.md +57 -0
- package/CLAUDE.md +98 -0
- package/LICENSE +201 -0
- package/README.md +114 -0
- package/bin/cli.mjs +291 -0
- package/package.json +39 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: csharp-code-writer
|
|
3
|
+
description: Use proactively when writing or editing C# (.cs) files. Applies project C# standards and runs quality checks.
|
|
4
|
+
tools: Write, Read, Edit, Bash, Glob, Grep
|
|
5
|
+
model: inherit
|
|
6
|
+
skills:
|
|
7
|
+
- csharp-coding
|
|
8
|
+
background: false
|
|
9
|
+
maxTurns: 25
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Write clean, type-safe C# following project standards.
|
|
13
|
+
|
|
14
|
+
## Before Writing
|
|
15
|
+
|
|
16
|
+
Read the files you will change before making edits. For single-file edits, reading the target file is sufficient. For cross-cutting changes, read the directly affected modules. Check the relevant .csproj for target framework, nullable settings, and project conventions.
|
|
17
|
+
|
|
18
|
+
## Scope
|
|
19
|
+
|
|
20
|
+
Implement exactly what was requested. Keep solutions simple and focused.
|
|
21
|
+
|
|
22
|
+
- Add only the code changes that were asked for.
|
|
23
|
+
- Use existing patterns and abstractions rather than introducing new ones.
|
|
24
|
+
- Skip docstrings, comments, and type annotations on code you did not change.
|
|
25
|
+
- Skip error handling or validation for scenarios that cannot occur.
|
|
26
|
+
- Skip helpers or abstractions for one-time operations.
|
|
27
|
+
|
|
28
|
+
If the request is ambiguous about scope, implement the narrower interpretation.
|
|
29
|
+
|
|
30
|
+
## Quality
|
|
31
|
+
|
|
32
|
+
Write code that passes dotnet build compile checks, dotnet format if configured, and Roslyn analyzers. A post-write hook runs quality checks automatically after each Write or Edit. If no hook is configured, run `dotnet build` on the affected project to verify compilation.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: diagrammer
|
|
3
|
+
description: Use proactively when creating or editing diagrams, architecture visuals, or PlantUML (.puml, .plantuml, .pu) files. Selects the right diagram format, applies diagramming standards, and writes diagram files.
|
|
4
|
+
tools: Write, Read, Edit, Bash, Glob, Grep
|
|
5
|
+
model: inherit
|
|
6
|
+
skills:
|
|
7
|
+
- plantuml-diagramming
|
|
8
|
+
background: false
|
|
9
|
+
maxTurns: 20
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Create clear, audience-appropriate diagrams that communicate system behavior and architecture effectively.
|
|
13
|
+
|
|
14
|
+
## Default Behavior
|
|
15
|
+
|
|
16
|
+
Default to HIGH-LEVEL diagrams understandable by non-technical team members and new joiners.
|
|
17
|
+
|
|
18
|
+
- Use business-friendly language, not code-level detail.
|
|
19
|
+
- Label components with names stakeholders recognize (e.g., "Payment Service", not `PaymentGatewayAdapter`).
|
|
20
|
+
- Omit method signatures, class fields, and implementation details unless explicitly requested.
|
|
21
|
+
- Only produce technical/detailed diagrams (class diagrams, DB schemas, detailed sequence flows with method signatures) when the user explicitly asks for "technical", "detailed", or "low-level".
|
|
22
|
+
- When uncertain about audience, go simpler.
|
|
23
|
+
|
|
24
|
+
## Before Writing
|
|
25
|
+
|
|
26
|
+
- Check for existing diagrams in the project (Glob for `*.puml`, `*.plantuml`, `*.pu`).
|
|
27
|
+
- Read existing diagrams to match naming conventions and style.
|
|
28
|
+
- Identify the right diagram type for the request.
|
|
29
|
+
|
|
30
|
+
## Format Selection
|
|
31
|
+
|
|
32
|
+
| Request Type | Format | File Extension |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| System overview, flows, architecture | PlantUML | `.puml` |
|
|
35
|
+
|
|
36
|
+
More formats coming -- Mermaid, D2, etc.
|
|
37
|
+
|
|
38
|
+
## File Naming
|
|
39
|
+
|
|
40
|
+
- Place diagrams in a `diagrams/` directory at project root (or match existing convention if one exists).
|
|
41
|
+
- Name pattern: `<context>_<type>_<title>.puml` (e.g., `auth_sequence_login_flow.puml`).
|
|
42
|
+
- Lowercase, underscores, descriptive.
|
|
43
|
+
|
|
44
|
+
## Quality
|
|
45
|
+
|
|
46
|
+
- Every diagram must have a `title`.
|
|
47
|
+
- Use `<style>` blocks for consistent styling, not inline colors.
|
|
48
|
+
- Keep element count manageable -- 15 or fewer elements without grouping.
|
|
49
|
+
- Verify syntax by checking delimiters and structure before completing.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-code-writer
|
|
3
|
+
description: Use proactively when writing or editing React (.tsx/.jsx) files, Tailwind CSS classes, or shadcn/ui components. Applies project frontend standards and runs quality checks.
|
|
4
|
+
tools: Write, Read, Edit, Bash, Glob, Grep
|
|
5
|
+
model: inherit
|
|
6
|
+
skills:
|
|
7
|
+
- react-coding
|
|
8
|
+
- tailwind-css-coding
|
|
9
|
+
- shadcn-ui-coding
|
|
10
|
+
background: false
|
|
11
|
+
maxTurns: 25
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
Write clean, type-safe React components following project standards.
|
|
15
|
+
|
|
16
|
+
## Before Writing
|
|
17
|
+
|
|
18
|
+
Read the files you will change before making edits. For single-file edits, reading the target file is sufficient. For cross-cutting changes, read the directly affected modules.
|
|
19
|
+
|
|
20
|
+
Check `components.json`, `tsconfig.json`, and `package.json` to understand the project's shadcn config, TypeScript strictness, React version, and Tailwind version before writing.
|
|
21
|
+
|
|
22
|
+
## Scope
|
|
23
|
+
|
|
24
|
+
Implement exactly what was requested. Keep solutions simple and focused.
|
|
25
|
+
|
|
26
|
+
- Add only the code changes that were asked for.
|
|
27
|
+
- Use existing patterns and abstractions rather than introducing new ones.
|
|
28
|
+
- Skip docstrings, comments, and type annotations on code you did not change.
|
|
29
|
+
- Skip error handling or validation for scenarios that cannot occur.
|
|
30
|
+
- Skip helpers or abstractions for one-time operations.
|
|
31
|
+
|
|
32
|
+
If the request is ambiguous about scope, implement the narrower interpretation.
|
|
33
|
+
|
|
34
|
+
## Quality
|
|
35
|
+
|
|
36
|
+
Write code that passes the project's linter and formatter. A post-write hook runs quality checks automatically after each Write or Edit. If no hook is configured, discover the linter from project config (ESLint, Biome, or similar) and run it manually after changes.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prompt-writer
|
|
3
|
+
description: Use proactively when writing or editing LLM prompts, Jinja templates (.j2, .jinja, .jinja2), or prompt files (.md, .txt). Reads model-specific standards and validates syntax.
|
|
4
|
+
tools: Write, Read, Edit, Bash, Glob, Grep
|
|
5
|
+
model: inherit
|
|
6
|
+
skills:
|
|
7
|
+
- claude-opus-4-6-prompting
|
|
8
|
+
- gemini-3-prompting
|
|
9
|
+
- gpt-5-2-prompting
|
|
10
|
+
background: false
|
|
11
|
+
maxTurns: 20
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
Write effective prompts for Claude Opus 4.6, Gemini 3, and GPT-5.2 following model-specific best practices.
|
|
15
|
+
|
|
16
|
+
## Before Writing
|
|
17
|
+
|
|
18
|
+
Read existing prompts before editing. Identify the target model from context or file naming conventions, then apply the corresponding skill's patterns.
|
|
19
|
+
|
|
20
|
+
| Target Model | Skill |
|
|
21
|
+
|---|---|
|
|
22
|
+
| Claude Opus 4.6 | `claude-opus-4-6-prompting` |
|
|
23
|
+
| Gemini 3 | `gemini-3-prompting` |
|
|
24
|
+
| GPT-5.2 Codex | `gpt-5-2-prompting` |
|
|
25
|
+
|
|
26
|
+
## File Types
|
|
27
|
+
|
|
28
|
+
- `.j2` / `.jinja` / `.jinja2` -- Jinja templates. Use `{# #}` comments, `{% set %}` defaults, conditionals, loops, filters.
|
|
29
|
+
- `.txt` / `.md` -- Static prompts. Plain text or markdown with XML tags where appropriate.
|
|
30
|
+
- `.py` -- Programmatic prompt construction. String formatting or template rendering.
|
|
31
|
+
|
|
32
|
+
## Quality Standards
|
|
33
|
+
|
|
34
|
+
- Read existing prompts before editing. Understand what is there before changing it.
|
|
35
|
+
- Keep Jinja syntax clean: defaults at top, comments documenting sections, consistent delimiters.
|
|
36
|
+
- No emojis in prompts unless the user requests them.
|
|
37
|
+
- Examples in prompts should be precise and reflect the exact desired behavior -- the model reproduces what it sees.
|
|
38
|
+
- The PostToolUse hook validates Jinja syntax after every Write or Edit.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: python-code-writer
|
|
3
|
+
description: Use proactively when writing or editing Python (.py) files. Applies project python standards and runs quality checks.
|
|
4
|
+
tools: Write, Read, Edit, Bash, Glob, Grep
|
|
5
|
+
model: inherit
|
|
6
|
+
skills:
|
|
7
|
+
- python-coding
|
|
8
|
+
background: false
|
|
9
|
+
maxTurns: 25
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Write clean, type-safe Python following project standards.
|
|
13
|
+
|
|
14
|
+
## Before Writing
|
|
15
|
+
|
|
16
|
+
Read the files you will change before making edits. For single-file edits, reading the target file is sufficient. For cross-cutting changes, read the directly affected modules.
|
|
17
|
+
|
|
18
|
+
## Scope
|
|
19
|
+
|
|
20
|
+
Implement exactly what was requested. Keep solutions simple and focused.
|
|
21
|
+
|
|
22
|
+
- Add only the code changes that were asked for.
|
|
23
|
+
- Use existing patterns and abstractions rather than introducing new ones.
|
|
24
|
+
- Skip docstrings, comments, and type annotations on code you did not change.
|
|
25
|
+
- Skip error handling or validation for scenarios that cannot occur.
|
|
26
|
+
- Skip helpers or abstractions for one-time operations.
|
|
27
|
+
|
|
28
|
+
If the request is ambiguous about scope, implement the narrower interpretation.
|
|
29
|
+
|
|
30
|
+
## Quality
|
|
31
|
+
|
|
32
|
+
Write code that passes ruff and mypy strict. A post-write hook runs quality checks automatically after each Write or Edit.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: swift-code-writer
|
|
3
|
+
description: Use proactively when writing or editing Swift (.swift) files. Applies project Swift standards and runs quality checks.
|
|
4
|
+
tools: Write, Read, Edit, Bash, Glob, Grep
|
|
5
|
+
model: inherit
|
|
6
|
+
skills:
|
|
7
|
+
- swift-coding
|
|
8
|
+
background: false
|
|
9
|
+
maxTurns: 25
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Write clean, type-safe Swift following project standards.
|
|
13
|
+
|
|
14
|
+
## Before Writing
|
|
15
|
+
|
|
16
|
+
Read the files you will change before making edits. For single-file edits, reading the target file is sufficient. For cross-cutting changes, read the directly affected modules. Check `Package.swift` or the relevant `.xcodeproj` for Swift version, platform targets, and dependencies.
|
|
17
|
+
|
|
18
|
+
## Scope
|
|
19
|
+
|
|
20
|
+
Implement exactly what was requested. Keep solutions simple and focused.
|
|
21
|
+
|
|
22
|
+
- Add only the code changes that were asked for.
|
|
23
|
+
- Use existing patterns and abstractions rather than introducing new ones.
|
|
24
|
+
- Skip documentation comments and access control annotations on code you did not change.
|
|
25
|
+
- Skip error handling or validation for scenarios that cannot occur.
|
|
26
|
+
- Skip helpers or abstractions for one-time operations.
|
|
27
|
+
|
|
28
|
+
If the request is ambiguous about scope, implement the narrower interpretation.
|
|
29
|
+
|
|
30
|
+
## Quality
|
|
31
|
+
|
|
32
|
+
Write code that passes SwiftLint and SwiftFormat if configured, and compiles cleanly with `swift build` or `xcodebuild`. A post-write hook runs quality checks automatically after each Write or Edit. If no hook is configured, run `swift build` on the affected package or target to verify compilation.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: typescript-code-writer
|
|
3
|
+
description: Use proactively when writing or editing TypeScript (.ts) files. Applies project TypeScript standards and runs quality checks.
|
|
4
|
+
tools: Write, Read, Edit, Bash, Glob, Grep
|
|
5
|
+
model: inherit
|
|
6
|
+
skills:
|
|
7
|
+
- typescript-coding
|
|
8
|
+
background: false
|
|
9
|
+
maxTurns: 25
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Write clean, type-safe TypeScript following project standards.
|
|
13
|
+
|
|
14
|
+
## Before Writing
|
|
15
|
+
|
|
16
|
+
Read the files you will change before making edits. For single-file edits, reading the target file is sufficient. For cross-cutting changes, read the directly affected modules. Check `tsconfig.json` and `package.json` for TypeScript version, module system, strictness settings, and dependencies.
|
|
17
|
+
|
|
18
|
+
## Scope
|
|
19
|
+
|
|
20
|
+
Implement exactly what was requested. Keep solutions simple and focused.
|
|
21
|
+
|
|
22
|
+
- Add only the code changes that were asked for.
|
|
23
|
+
- Use existing patterns and abstractions rather than introducing new ones.
|
|
24
|
+
- Skip documentation comments and access control annotations on code you did not change.
|
|
25
|
+
- Skip error handling or validation for scenarios that cannot occur.
|
|
26
|
+
- Skip helpers or abstractions for one-time operations.
|
|
27
|
+
|
|
28
|
+
If the request is ambiguous about scope, implement the narrower interpretation.
|
|
29
|
+
|
|
30
|
+
## Quality
|
|
31
|
+
|
|
32
|
+
Write code that passes `tsc --noEmit` for type checking, ESLint or Biome for linting, and Prettier for formatting. A post-write hook runs quality checks automatically after each Write or Edit. If no hook is configured, run `tsc --noEmit` on the affected project to verify types compile cleanly.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Git Sync
|
|
2
|
+
|
|
3
|
+
Switch all repositories (root and submodules) to the default branch and pull latest changes.
|
|
4
|
+
|
|
5
|
+
## Phase 1: Detect Repositories
|
|
6
|
+
|
|
7
|
+
Run via Bash:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
git rev-parse --show-toplevel
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This confirms you're inside a git repository and gives the root path.
|
|
14
|
+
|
|
15
|
+
Then check for submodules:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
git submodule status 2>/dev/null
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
If the command produces output, submodules are present. Parse each submodule path from the output (second column). If it produces no output or errors, there are no submodules — proceed with the root repo only.
|
|
22
|
+
|
|
23
|
+
Announce to the user:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
Repositories found:
|
|
27
|
+
- <root path> (root)
|
|
28
|
+
- <submodule path> (submodule)
|
|
29
|
+
- ...
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Phase 2: Detect Default Branch
|
|
33
|
+
|
|
34
|
+
For each repository (root first, then each submodule), detect the default branch. Run from within that repo's directory:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|refs/remotes/origin/||'
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
If that fails (the ref may not exist), fall back to:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
git remote show origin 2>/dev/null | grep 'HEAD branch' | sed 's/.*: //'
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If both fail, check whether `main` or `master` exists locally:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
git branch --list main master
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Pick whichever exists. If both exist, prefer `main`. If neither exists, report the error for that repo and skip it.
|
|
53
|
+
|
|
54
|
+
## Phase 3: Sync
|
|
55
|
+
|
|
56
|
+
For each repository, run these commands in sequence. Stop processing a repo if any command fails and report the error.
|
|
57
|
+
|
|
58
|
+
1. **Fetch all remotes:**
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
git fetch --all --prune
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
2. **Switch to the default branch:**
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
git checkout <default-branch>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If checkout fails due to uncommitted changes, report this to the user and skip the repo. Do not stash, reset, or discard changes.
|
|
71
|
+
|
|
72
|
+
3. **Pull latest:**
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
git pull
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Phase 4: Report
|
|
79
|
+
|
|
80
|
+
After processing all repositories, present a summary:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Sync complete:
|
|
84
|
+
✓ <root path> — switched to main, pulled (up to date / X commits pulled)
|
|
85
|
+
✓ <submodule path> — switched to master, pulled (up to date / X commits pulled)
|
|
86
|
+
✗ <submodule path> — uncommitted changes, skipped
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
If all repos synced successfully, no further action needed. If any failed, list what the user needs to resolve.
|
|
90
|
+
|
|
91
|
+
## Rules
|
|
92
|
+
|
|
93
|
+
- Do not stash, reset, or discard uncommitted changes. If a repo has dirty state, skip it and report.
|
|
94
|
+
- Do not modify submodule references in the parent repo. This command syncs each repo independently.
|
|
95
|
+
- Process the root repo first, then submodules in the order they appear.
|
|
96
|
+
- If no git repository is found in the current directory, tell the user and stop.
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
# Project Documentation
|
|
2
|
+
|
|
3
|
+
Generate or update project documentation in `docs/`. Produces three files:
|
|
4
|
+
|
|
5
|
+
- `docs/mission.md` — What the project is and who it's for
|
|
6
|
+
- `docs/tech-stack.md` — Inventory of languages, frameworks, tools, infrastructure
|
|
7
|
+
- `docs/architecture.md` — How the system is structured and how parts connect
|
|
8
|
+
|
|
9
|
+
## Phase 1: Detect State
|
|
10
|
+
|
|
11
|
+
Classify each file independently:
|
|
12
|
+
|
|
13
|
+
| File | Exists & non-empty | Status |
|
|
14
|
+
|------|-------------------|--------|
|
|
15
|
+
| `docs/mission.md` | yes | **update** |
|
|
16
|
+
| `docs/mission.md` | no | **create** |
|
|
17
|
+
| `docs/tech-stack.md` | yes | **update** |
|
|
18
|
+
| `docs/tech-stack.md` | no | **create** |
|
|
19
|
+
| `docs/architecture.md` | yes | **update** |
|
|
20
|
+
| `docs/architecture.md` | no | **create** |
|
|
21
|
+
|
|
22
|
+
A file with only whitespace or markdown headers with no content counts as **create**, not update.
|
|
23
|
+
|
|
24
|
+
**Git context gathering.** If `.git` exists, run these two commands via Bash and include the output as background context for all Explore agents in Phase 2:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
git log --oneline -30
|
|
28
|
+
git shortlog -s -n --no-merges
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
If the repo has fewer than 5 commits, note this — it signals an early-stage project where exploration will find less and user questions become more important.
|
|
32
|
+
|
|
33
|
+
Announce the per-file status table and commit count to the user before continuing.
|
|
34
|
+
|
|
35
|
+
## Phase 2: Explore
|
|
36
|
+
|
|
37
|
+
Launch three parallel Explore agents using the Task tool (`subagent_type: "Explore"`). All three are independent — launch them in a single message, never sequentially. Specify `thoroughness: "very thorough"` in each prompt.
|
|
38
|
+
|
|
39
|
+
Every agent prompt must include:
|
|
40
|
+
- The git context gathered in Phase 1 (last 30 commit subjects + contributor summary)
|
|
41
|
+
- This instruction: **"For every finding, include the source file path and line number (e.g., `src/main.py:42`). Findings without a file reference will be discarded."**
|
|
42
|
+
- This ignore directive: **"Skip these directories entirely: `node_modules/`, `.venv/`, `venv/`, `__pycache__/`, `dist/`, `build/`, `.git/`, `.next/`, `.nuxt/`, `target/`, `vendor/` (unless vendor is committed Go code)."**
|
|
43
|
+
|
|
44
|
+
### Agent 1: Architecture
|
|
45
|
+
|
|
46
|
+
> Explore the codebase very thoroughly for architectural information. For every finding, include the source file path and line number (e.g., `src/main.py:42`). Findings without a file reference will be discarded. Skip: node_modules/, .venv/, venv/, __pycache__/, dist/, build/, .git/, .next/, .nuxt/, target/, vendor/.
|
|
47
|
+
>
|
|
48
|
+
> Look for:
|
|
49
|
+
> - Top-level directory structure and what each directory contains
|
|
50
|
+
> - Module/package boundaries and dependency direction between them
|
|
51
|
+
> - Entry points: main scripts, CLI commands, API servers, workers, scheduled jobs
|
|
52
|
+
> - Design patterns: MVC, hexagonal, event-driven, repository pattern, etc.
|
|
53
|
+
> - Data flow: how a request or input travels from entry point to response
|
|
54
|
+
> - Configuration management: env files, config modules, feature flags
|
|
55
|
+
> - Test organization relative to source code
|
|
56
|
+
> - Whether this is a monorepo (multiple package manifests, separate apps in subdirectories)
|
|
57
|
+
|
|
58
|
+
### Agent 2: Tech Stack
|
|
59
|
+
|
|
60
|
+
> Explore the codebase very thoroughly for technology inventory. For every finding, include the source file path and line number (e.g., `pyproject.toml:3`). Findings without a file reference will be discarded. Skip: node_modules/, .venv/, venv/, __pycache__/, dist/, build/, .git/, .next/, .nuxt/, target/, vendor/.
|
|
61
|
+
>
|
|
62
|
+
> Look for:
|
|
63
|
+
> - Programming languages and their versions (configs, CI, runtime files, shebangs)
|
|
64
|
+
> - Package manifests: pyproject.toml, package.json, Cargo.toml, go.mod, Gemfile, etc.
|
|
65
|
+
> - Frameworks: web, ORM, task queues, testing, CLI
|
|
66
|
+
> - Databases and storage: connection strings, migrations, docker-compose services
|
|
67
|
+
> - Infrastructure: Dockerfiles, terraform, k8s manifests, CI/CD pipelines, deployment configs
|
|
68
|
+
> - Dev tools: linters, formatters, type checkers, test runners, pre-commit hooks
|
|
69
|
+
> - External services: API client imports, SDK usage, webhook handlers, third-party integrations
|
|
70
|
+
|
|
71
|
+
### Agent 3: Mission & Purpose
|
|
72
|
+
|
|
73
|
+
> Explore the codebase very thoroughly for project purpose and audience. For every finding, include the source file path and line number (e.g., `README.md:1`). Findings without a file reference will be discarded. Skip: node_modules/, .venv/, venv/, __pycache__/, dist/, build/, .git/, .next/, .nuxt/, target/, vendor/.
|
|
74
|
+
>
|
|
75
|
+
> Look for:
|
|
76
|
+
> - README.md and any ABOUT or CONTRIBUTING files
|
|
77
|
+
> - Package/project descriptions in manifests (pyproject.toml description, package.json description)
|
|
78
|
+
> - User-facing text: landing pages, onboarding flows, help text, CLI descriptions
|
|
79
|
+
> - API descriptions, OpenAPI specs, GraphQL schema descriptions
|
|
80
|
+
> - Comments or docstrings describing project purpose
|
|
81
|
+
> - License and contribution guidelines
|
|
82
|
+
> - Any marketing copy, about pages, or FAQ content
|
|
83
|
+
|
|
84
|
+
## Phase 3: Synthesize & Confirm
|
|
85
|
+
|
|
86
|
+
After all three agents return, consolidate their findings into a structured summary organized by document. **Discard any finding that lacks a file path reference** — this enforces the "no invention" rule.
|
|
87
|
+
|
|
88
|
+
### For files in **create** status
|
|
89
|
+
|
|
90
|
+
Present the summary to the user. Then identify genuine gaps — things the code did not clearly answer.
|
|
91
|
+
|
|
92
|
+
**Gap detection heuristics** — ask only when the trigger condition is met:
|
|
93
|
+
|
|
94
|
+
Mission gaps:
|
|
95
|
+
- **What problem does this solve?** → Trigger: no README exists, or README has no description beyond project name/install instructions
|
|
96
|
+
- **Who is the target user?** → Trigger: no user-facing text found (no CLI help, no UI copy, no API descriptions)
|
|
97
|
+
- **What differentiates this?** → Trigger: README does not mention alternatives or positioning
|
|
98
|
+
|
|
99
|
+
Tech-stack gaps:
|
|
100
|
+
- **Ambiguous primary tool** → Trigger: multiple tools serving the same role found (e.g., two ORMs, two test frameworks)
|
|
101
|
+
- **Deployment target** → Trigger: no Dockerfile, no CI/CD config, no infra files found
|
|
102
|
+
- **External services** → Trigger: code references services (database URLs, API keys) but no config or docker-compose defines them
|
|
103
|
+
|
|
104
|
+
Architecture gaps:
|
|
105
|
+
- **Intended vs actual boundaries** → Trigger: import cycles detected or modules with unclear ownership
|
|
106
|
+
- **Missing components** → Trigger: code references modules/packages that don't exist yet
|
|
107
|
+
|
|
108
|
+
Rules for questions:
|
|
109
|
+
- Do NOT ask about things the code clearly answers. Every question must address a genuine gap where the trigger condition was met.
|
|
110
|
+
- When exploration found relevant evidence, provide 2-4 concrete options derived from findings.
|
|
111
|
+
- When exploration found nothing relevant (common for "target user" or "deployment target" in early projects), ask as a free-text question without forced options.
|
|
112
|
+
- The AskUserQuestion tool automatically provides an "Other" free-text option — do not add one manually.
|
|
113
|
+
- If no trigger conditions are met, skip questions entirely. It is acceptable to have zero questions.
|
|
114
|
+
|
|
115
|
+
After gaps are resolved, present the planned content for each **create** file and ask the user to approve before writing.
|
|
116
|
+
|
|
117
|
+
### For files in **update** status
|
|
118
|
+
|
|
119
|
+
Read the existing docs. Compare each against the exploration findings.
|
|
120
|
+
|
|
121
|
+
Present a structured change summary:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
Changes detected:
|
|
125
|
+
|
|
126
|
+
architecture.md:
|
|
127
|
+
+ New module `workers/` found (src/workers/__init__.py:1), not documented
|
|
128
|
+
~ Description of `api/` outdated — now uses FastAPI (pyproject.toml:15) instead of Flask
|
|
129
|
+
- Module `legacy/` removed from codebase but still in docs
|
|
130
|
+
|
|
131
|
+
tech-stack.md:
|
|
132
|
+
+ Redis added (docker-compose.yml:23)
|
|
133
|
+
- Removed: celery no longer in dependencies
|
|
134
|
+
|
|
135
|
+
mission.md:
|
|
136
|
+
No changes detected
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Every `+` and `~` line must cite the source file. Changes without evidence are not presented.
|
|
140
|
+
|
|
141
|
+
Ask the user to approve, modify, or reject changes per file. Only write files the user approves.
|
|
142
|
+
|
|
143
|
+
If exploration reveals something contradicting existing docs and the correct answer is ambiguous, ask the user before deciding.
|
|
144
|
+
|
|
145
|
+
### Monorepo handling
|
|
146
|
+
|
|
147
|
+
If Agent 1 identified multiple separate applications (e.g., `frontend/`, `backend/`, `services/auth/`), restructure the output:
|
|
148
|
+
|
|
149
|
+
- `tech-stack.md` — group items under subheadings per service/app instead of a flat list
|
|
150
|
+
- `architecture.md` — add a "Services" section before "Module Boundaries" describing each top-level app and how they communicate
|
|
151
|
+
- `mission.md` — no change (mission is project-wide)
|
|
152
|
+
|
|
153
|
+
## Phase 4: Write
|
|
154
|
+
|
|
155
|
+
Create `docs/` directory if it does not exist. Write each approved file using these structures.
|
|
156
|
+
|
|
157
|
+
### docs/mission.md
|
|
158
|
+
|
|
159
|
+
```markdown
|
|
160
|
+
# Mission
|
|
161
|
+
|
|
162
|
+
## What
|
|
163
|
+
|
|
164
|
+
[1-2 sentences: what the project does, stated as fact]
|
|
165
|
+
|
|
166
|
+
## Who
|
|
167
|
+
|
|
168
|
+
[1-2 sentences: target users or audience]
|
|
169
|
+
|
|
170
|
+
## Why
|
|
171
|
+
|
|
172
|
+
[1-2 sentences: core problem being solved, value delivered]
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
*Generated: YYYY-MM-DD | Commit: abc1234*
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
10-15 lines max (excluding footer). No aspirational language. No marketing fluff.
|
|
179
|
+
|
|
180
|
+
### docs/tech-stack.md
|
|
181
|
+
|
|
182
|
+
```markdown
|
|
183
|
+
# Tech Stack
|
|
184
|
+
|
|
185
|
+
## Languages
|
|
186
|
+
|
|
187
|
+
- [Language] [version] — [source: pyproject.toml / Dockerfile / .python-version]
|
|
188
|
+
|
|
189
|
+
## Frameworks
|
|
190
|
+
|
|
191
|
+
- [Framework] — [one-line role, e.g. "web server", "ORM", "task queue"]
|
|
192
|
+
|
|
193
|
+
## Storage
|
|
194
|
+
|
|
195
|
+
- [Database/cache/queue] — [one-line role]
|
|
196
|
+
|
|
197
|
+
## Infrastructure
|
|
198
|
+
|
|
199
|
+
- [Tool] — [one-line role]
|
|
200
|
+
|
|
201
|
+
## Dev Tools
|
|
202
|
+
|
|
203
|
+
- [Tool] — [one-line role]
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
*Generated: YYYY-MM-DD | Commit: abc1234*
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Flat list. One line per item. No prose paragraphs. Only include sections that have at least one entry. Omit empty sections entirely.
|
|
210
|
+
|
|
211
|
+
For monorepos, replace flat sections with grouped subheadings:
|
|
212
|
+
```markdown
|
|
213
|
+
## Frameworks
|
|
214
|
+
|
|
215
|
+
### backend/
|
|
216
|
+
- FastAPI — web server
|
|
217
|
+
- SQLAlchemy — ORM
|
|
218
|
+
|
|
219
|
+
### frontend/
|
|
220
|
+
- Next.js — React framework
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### docs/architecture.md
|
|
224
|
+
|
|
225
|
+
```markdown
|
|
226
|
+
# Architecture
|
|
227
|
+
|
|
228
|
+
## Structure
|
|
229
|
+
|
|
230
|
+
[Brief description of top-level project organization. Reference actual directory names.]
|
|
231
|
+
|
|
232
|
+
## Module Boundaries
|
|
233
|
+
|
|
234
|
+
[Which modules exist, what each owns, dependency direction between them.]
|
|
235
|
+
|
|
236
|
+
## Data Flow
|
|
237
|
+
|
|
238
|
+
[How a typical request/input travels through the system, from entry point to response/output.]
|
|
239
|
+
|
|
240
|
+
## Key Patterns
|
|
241
|
+
|
|
242
|
+
[Design patterns in use: name, where applied, one-line rationale.]
|
|
243
|
+
|
|
244
|
+
## Entry Points
|
|
245
|
+
|
|
246
|
+
- [Entry point] — [what it starts/serves]
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
*Generated: YYYY-MM-DD | Commit: abc1234*
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Reference tech-stack items by name. Do not duplicate their descriptions.
|
|
253
|
+
|
|
254
|
+
### Footer values
|
|
255
|
+
|
|
256
|
+
- **Date**: current date in YYYY-MM-DD format
|
|
257
|
+
- **Commit**: short hash from `git rev-parse --short HEAD` (if `.git` exists). If no git repo, omit the commit portion and use only the date.
|
|
258
|
+
|
|
259
|
+
## Phase 5: Verify
|
|
260
|
+
|
|
261
|
+
After writing all files, perform a verification pass. For each generated document:
|
|
262
|
+
|
|
263
|
+
1. Read the file back.
|
|
264
|
+
2. For every factual claim (tool name, framework, directory name, pattern), confirm it traces to a specific file found during exploration.
|
|
265
|
+
3. If a claim cannot be traced — remove it and note the removal to the user.
|
|
266
|
+
|
|
267
|
+
Report verification results:
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
Verification:
|
|
271
|
+
mission.md — 3/3 claims verified ✓
|
|
272
|
+
tech-stack.md — 11/12 claims verified, removed: "GraphQL" (no schema or dependency found)
|
|
273
|
+
architecture.md — 8/8 claims verified ✓
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
If all claims verify, report clean and finish. If removals were made, show what was removed and why.
|
|
277
|
+
|
|
278
|
+
## Rules
|
|
279
|
+
|
|
280
|
+
These apply to all phases:
|
|
281
|
+
|
|
282
|
+
- **No invention.** Every statement must trace to a file path found by exploration or to user confirmation. Findings without source references are discarded.
|
|
283
|
+
- **No aspiration.** Document what exists, not what is planned. No "we plan to", "future work", "upcoming".
|
|
284
|
+
- **No padding.** If a section has nothing to say, omit it. Do not write filler content.
|
|
285
|
+
- **Terse language.** These docs are reference material for engineers. Factual, direct, no marketing tone.
|
|
286
|
+
- **Respect the templates.** Do not add sections beyond what the templates define unless the user explicitly requests them.
|
|
287
|
+
- **Evidence required.** Explore agents must cite file paths. The synthesis phase must cite file paths. The change summary must cite file paths. Uncited claims are removed during verification.
|