aidflow 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/LICENSE +21 -0
- package/README.md +147 -0
- package/dist/context/session.d.ts +35 -0
- package/dist/context/session.d.ts.map +1 -0
- package/dist/context/session.js +120 -0
- package/dist/context/session.js.map +1 -0
- package/dist/context/workspace.d.ts +21 -0
- package/dist/context/workspace.d.ts.map +1 -0
- package/dist/context/workspace.js +79 -0
- package/dist/context/workspace.js.map +1 -0
- package/dist/context/yaml.d.ts +8 -0
- package/dist/context/yaml.d.ts.map +1 -0
- package/dist/context/yaml.js +73 -0
- package/dist/context/yaml.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +105 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/guide/description.d.ts +2 -0
- package/dist/tools/guide/description.d.ts.map +1 -0
- package/dist/tools/guide/description.js +7 -0
- package/dist/tools/guide/description.js.map +1 -0
- package/dist/tools/guide/handler.d.ts +3 -0
- package/dist/tools/guide/handler.d.ts.map +1 -0
- package/dist/tools/guide/handler.js +68 -0
- package/dist/tools/guide/handler.js.map +1 -0
- package/dist/tools/guide/index.d.ts +4 -0
- package/dist/tools/guide/index.d.ts.map +1 -0
- package/dist/tools/guide/index.js +4 -0
- package/dist/tools/guide/index.js.map +1 -0
- package/dist/tools/guide/schema.d.ts +13 -0
- package/dist/tools/guide/schema.d.ts.map +1 -0
- package/dist/tools/guide/schema.js +12 -0
- package/dist/tools/guide/schema.js.map +1 -0
- package/dist/tools/init/description.d.ts +2 -0
- package/dist/tools/init/description.d.ts.map +1 -0
- package/dist/tools/init/description.js +6 -0
- package/dist/tools/init/description.js.map +1 -0
- package/dist/tools/init/handler.d.ts +3 -0
- package/dist/tools/init/handler.d.ts.map +1 -0
- package/dist/tools/init/handler.js +114 -0
- package/dist/tools/init/handler.js.map +1 -0
- package/dist/tools/init/index.d.ts +4 -0
- package/dist/tools/init/index.d.ts.map +1 -0
- package/dist/tools/init/index.js +4 -0
- package/dist/tools/init/index.js.map +1 -0
- package/dist/tools/init/schema.d.ts +10 -0
- package/dist/tools/init/schema.d.ts.map +1 -0
- package/dist/tools/init/schema.js +9 -0
- package/dist/tools/init/schema.js.map +1 -0
- package/dist/tools/plan/description.d.ts +2 -0
- package/dist/tools/plan/description.d.ts.map +1 -0
- package/dist/tools/plan/description.js +7 -0
- package/dist/tools/plan/description.js.map +1 -0
- package/dist/tools/plan/handler.d.ts +3 -0
- package/dist/tools/plan/handler.d.ts.map +1 -0
- package/dist/tools/plan/handler.js +65 -0
- package/dist/tools/plan/handler.js.map +1 -0
- package/dist/tools/plan/index.d.ts +4 -0
- package/dist/tools/plan/index.d.ts.map +1 -0
- package/dist/tools/plan/index.js +4 -0
- package/dist/tools/plan/index.js.map +1 -0
- package/dist/tools/plan/schema.d.ts +13 -0
- package/dist/tools/plan/schema.d.ts.map +1 -0
- package/dist/tools/plan/schema.js +12 -0
- package/dist/tools/plan/schema.js.map +1 -0
- package/dist/tools/session/description.d.ts +2 -0
- package/dist/tools/session/description.d.ts.map +1 -0
- package/dist/tools/session/description.js +9 -0
- package/dist/tools/session/description.js.map +1 -0
- package/dist/tools/session/handler.d.ts +3 -0
- package/dist/tools/session/handler.d.ts.map +1 -0
- package/dist/tools/session/handler.js +185 -0
- package/dist/tools/session/handler.js.map +1 -0
- package/dist/tools/session/index.d.ts +4 -0
- package/dist/tools/session/index.d.ts.map +1 -0
- package/dist/tools/session/index.js +4 -0
- package/dist/tools/session/index.js.map +1 -0
- package/dist/tools/session/schema.d.ts +19 -0
- package/dist/tools/session/schema.d.ts.map +1 -0
- package/dist/tools/session/schema.js +20 -0
- package/dist/tools/session/schema.js.map +1 -0
- package/dist/worktree/manager.d.ts +9 -0
- package/dist/worktree/manager.d.ts.map +1 -0
- package/dist/worktree/manager.js +92 -0
- package/dist/worktree/manager.js.map +1 -0
- package/package.json +49 -0
- package/templates/README.md +146 -0
- package/templates/config.yaml +20 -0
- package/templates/guides/getting-started.md +21 -0
- package/templates/skills/report.md +52 -0
- package/templates/skills/review.md +69 -0
- package/templates/skills/spec.md +120 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: Review session work before completing. Run before session complete.
|
|
4
|
+
allowed-tools: Read, Glob, Grep, Bash, WebSearch
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Perform a thorough review of the current session's work before archiving.
|
|
8
|
+
This is a quality gate - find issues NOW while they can still be fixed.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Identify the active session**
|
|
13
|
+
- Use `session status` to find the current session and its changed files
|
|
14
|
+
- Read plan.md to understand what was intended
|
|
15
|
+
|
|
16
|
+
2. **Code Review - Changed Files**
|
|
17
|
+
Read EVERY changed file and check:
|
|
18
|
+
- Does the implementation match plan.md requirements?
|
|
19
|
+
- Are there any incomplete TODOs or FIXMEs?
|
|
20
|
+
- Error handling: are edge cases covered?
|
|
21
|
+
- If SPEC.md exists, do changes follow its conventions?
|
|
22
|
+
- Are there any hardcoded values that should be configurable?
|
|
23
|
+
- Security: no exposed secrets, no injection vulnerabilities?
|
|
24
|
+
|
|
25
|
+
3. **Consistency Check**
|
|
26
|
+
- Naming conventions consistent across new/modified code?
|
|
27
|
+
- Import patterns match existing codebase style?
|
|
28
|
+
- No duplicate logic that should be extracted?
|
|
29
|
+
- No dead code or unused imports left behind?
|
|
30
|
+
|
|
31
|
+
4. **Test Coverage**
|
|
32
|
+
- Are new features covered by tests?
|
|
33
|
+
- Run existing tests: `npm test` (or project-specific command)
|
|
34
|
+
- If tests fail, flag them as issues
|
|
35
|
+
|
|
36
|
+
5. **Plan Completion Audit**
|
|
37
|
+
- Check each Implementation Item in plan.md
|
|
38
|
+
- Check each Acceptance Criteria
|
|
39
|
+
- Flag any unchecked items with reasons
|
|
40
|
+
|
|
41
|
+
6. **Present Findings**
|
|
42
|
+
Use AskUserQuestion to present the review results:
|
|
43
|
+
|
|
44
|
+
**If issues found:**
|
|
45
|
+
```
|
|
46
|
+
Review found {N} issue(s):
|
|
47
|
+
1. {issue description}
|
|
48
|
+
2. {issue description}
|
|
49
|
+
|
|
50
|
+
Options:
|
|
51
|
+
- Fix issues now (recommended)
|
|
52
|
+
- Proceed to complete anyway
|
|
53
|
+
- Cancel and continue working
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**If no issues:**
|
|
57
|
+
```
|
|
58
|
+
Review passed. No issues found.
|
|
59
|
+
- {N} files changed
|
|
60
|
+
- {N}/{M} plan items completed
|
|
61
|
+
- Tests: passing/failing/none
|
|
62
|
+
|
|
63
|
+
Ready to run `session complete`.
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Notes
|
|
67
|
+
- Be thorough but practical - flag real issues, not style nitpicks
|
|
68
|
+
- If the project has a linter/formatter, run it
|
|
69
|
+
- Focus on correctness and completeness over perfection
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec
|
|
3
|
+
description: Define or update project SPEC.md - engineering foundations and conventions.
|
|
4
|
+
allowed-tools: Read, Write, Edit, AskUserQuestion, Glob, Grep, WebSearch
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Manage the project SPEC.md file - the single source of truth for project-level engineering decisions.
|
|
8
|
+
|
|
9
|
+
## If SPEC.md does not exist (Initial Setup)
|
|
10
|
+
|
|
11
|
+
### Phase 1: Project Analysis
|
|
12
|
+
1. Scan the codebase to understand current state:
|
|
13
|
+
- `package.json` / `pyproject.toml` / build configs
|
|
14
|
+
- Directory structure and module organization
|
|
15
|
+
- Key source files and entry points
|
|
16
|
+
- Existing tests, CI/CD, linting configs
|
|
17
|
+
|
|
18
|
+
### Phase 2: Requirements Gathering (HITL)
|
|
19
|
+
Use AskUserQuestion in **multiple rounds**. Do NOT skip or merge rounds.
|
|
20
|
+
|
|
21
|
+
**Important: "Auto-research" Option**
|
|
22
|
+
For EVERY round, always include this option in AskUserQuestion:
|
|
23
|
+
- "I'm not sure / Let AI research best practices" (or similar)
|
|
24
|
+
|
|
25
|
+
When the user selects this option:
|
|
26
|
+
1. Use WebSearch to find the **latest stable best practices** for the detected tech stack
|
|
27
|
+
2. Search for: "{framework/language} project structure best practices {year}"
|
|
28
|
+
3. Search for: "{framework/language} conventions recommended {year}"
|
|
29
|
+
4. Synthesize findings into concrete recommendations
|
|
30
|
+
5. Present the recommendations to the user for confirmation before applying
|
|
31
|
+
|
|
32
|
+
This is essential for users who are unfamiliar with the language/framework.
|
|
33
|
+
|
|
34
|
+
**Round 1 - Project Identity**:
|
|
35
|
+
- What is this project? Who uses it?
|
|
36
|
+
- What is the tech stack and why?
|
|
37
|
+
- What are the main features / responsibilities?
|
|
38
|
+
- (Option: "I'm not sure, research best practices for this stack")
|
|
39
|
+
|
|
40
|
+
**Round 2 - Architecture**:
|
|
41
|
+
- What is the module/directory structure philosophy? (by feature, by layer, etc.)
|
|
42
|
+
- What are the key abstractions and interfaces?
|
|
43
|
+
- How do modules communicate? (imports, events, APIs, etc.)
|
|
44
|
+
- What external dependencies are critical and why?
|
|
45
|
+
- (Option: "Research recommended architecture for this stack")
|
|
46
|
+
|
|
47
|
+
**Round 3 - Engineering Conventions**:
|
|
48
|
+
- Error handling strategy: where to catch, how to propagate, what to expose to users?
|
|
49
|
+
- Logging and observability approach?
|
|
50
|
+
- Testing strategy: what level (unit/integration/e2e), coverage expectations, test location?
|
|
51
|
+
- Naming conventions (files, functions, variables, branches)?
|
|
52
|
+
- Code style rules beyond linter (patterns to follow, patterns to avoid)?
|
|
53
|
+
- (Option: "Research standard conventions for this stack")
|
|
54
|
+
|
|
55
|
+
**Round 4 - Boundaries & Constraints**:
|
|
56
|
+
- Performance requirements or constraints?
|
|
57
|
+
- Security considerations?
|
|
58
|
+
- Compatibility requirements (browsers, Node versions, APIs)?
|
|
59
|
+
- What should NEVER be done in this project? (anti-patterns, forbidden approaches)
|
|
60
|
+
- (Option: "Research common pitfalls and constraints for this stack")
|
|
61
|
+
|
|
62
|
+
### Phase 3: Write SPEC.md
|
|
63
|
+
Write to the project root as `SPEC.md` using this structure:
|
|
64
|
+
|
|
65
|
+
```markdown
|
|
66
|
+
# {Project Name}
|
|
67
|
+
|
|
68
|
+
## Overview
|
|
69
|
+
{What this project is, who it's for, core value proposition. 2-3 sentences.}
|
|
70
|
+
|
|
71
|
+
## Tech Stack
|
|
72
|
+
| Category | Choice | Rationale |
|
|
73
|
+
|----------|--------|-----------|
|
|
74
|
+
| Runtime | ... | ... |
|
|
75
|
+
| Framework | ... | ... |
|
|
76
|
+
| ... | ... | ... |
|
|
77
|
+
|
|
78
|
+
## Architecture
|
|
79
|
+
|
|
80
|
+
### Directory Structure
|
|
81
|
+
{Module organization philosophy and actual structure}
|
|
82
|
+
|
|
83
|
+
### Key Abstractions
|
|
84
|
+
{Core interfaces, base classes, shared types - the backbone of the system}
|
|
85
|
+
|
|
86
|
+
### Module Boundaries
|
|
87
|
+
{How modules interact, dependency direction rules}
|
|
88
|
+
|
|
89
|
+
## Conventions
|
|
90
|
+
|
|
91
|
+
### Error Handling
|
|
92
|
+
{Strategy: where errors are caught, how they propagate, user-facing vs internal}
|
|
93
|
+
|
|
94
|
+
### Testing
|
|
95
|
+
{Strategy: test types, location, naming, coverage expectations}
|
|
96
|
+
|
|
97
|
+
### Naming
|
|
98
|
+
{Files, functions, variables, branches - with examples}
|
|
99
|
+
|
|
100
|
+
### Patterns
|
|
101
|
+
{Patterns to follow and patterns to explicitly avoid, with rationale}
|
|
102
|
+
|
|
103
|
+
## Constraints
|
|
104
|
+
{Performance, security, compatibility requirements. Things that must NEVER be done.}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Phase 4: User Review
|
|
108
|
+
Present the complete SPEC.md for review. Use AskUserQuestion to confirm or request changes.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## If SPEC.md exists (Update)
|
|
113
|
+
|
|
114
|
+
1. Read current SPEC.md
|
|
115
|
+
2. Use AskUserQuestion to understand what triggered the update:
|
|
116
|
+
- New architectural pattern introduced?
|
|
117
|
+
- Convention changed?
|
|
118
|
+
- New constraint discovered?
|
|
119
|
+
3. Update ONLY the relevant sections, preserving everything else
|
|
120
|
+
4. Show the diff and ask for confirmation before saving
|