@iservu-inc/adf-cli 0.13.0 → 0.14.1
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/.context/memory/architecture.md +40 -0
- package/.context/memory/glossary.md +19 -0
- package/.project/docs/VERSIONING-GUIDE.md +127 -0
- package/AGENTS.md +53 -0
- package/CHANGELOG.md +57 -0
- package/README.md +12 -2
- package/bin/adf.js +10 -0
- package/conductor/archive/context_synthesis_20260112/metadata.json +8 -0
- package/conductor/archive/context_synthesis_20260112/plan.md +40 -0
- package/conductor/archive/context_synthesis_20260112/spec.md +43 -0
- package/conductor/archive/verify_opencode_20260111/metadata.json +8 -0
- package/conductor/archive/verify_opencode_20260111/plan.md +34 -0
- package/conductor/archive/verify_opencode_20260111/spec.md +25 -0
- package/conductor/code_styleguides/javascript.md +51 -0
- package/conductor/product-guidelines.md +26 -0
- package/conductor/product.md +25 -0
- package/conductor/setup_state.json +1 -0
- package/conductor/tech-stack.md +28 -0
- package/conductor/tracks/bootstrap_agents_20260111/metadata.json +8 -0
- package/conductor/tracks/bootstrap_agents_20260111/plan.md +17 -0
- package/conductor/tracks/bootstrap_agents_20260111/spec.md +27 -0
- package/conductor/tracks.md +9 -0
- package/conductor/workflow.md +333 -0
- package/lib/analysis/ai-gap-analyzer.js +66 -0
- package/lib/analysis/dynamic-question-generator.js +55 -0
- package/lib/analysis/heuristic-gap-analyzer.js +45 -0
- package/lib/analysis/synthesis-engine.js +142 -0
- package/lib/commands/deploy.js +28 -2
- package/lib/commands/init.js +94 -0
- package/lib/commands/tools.js +38 -0
- package/lib/frameworks/interviewer.js +4 -3
- package/lib/generators/codex-cli-generator.js +41 -0
- package/lib/generators/index.js +33 -0
- package/lib/generators/kiro-generator.js +49 -0
- package/lib/generators/opencode-generator.js +332 -313
- package/lib/generators/trae-generator.js +34 -0
- package/lib/templates/scripts/analyze-framework-updates.js +361 -0
- package/lib/templates/scripts/build.js +608 -0
- package/lib/templates/scripts/check-framework-updates.js +118 -0
- package/lib/templates/scripts/config-helpers.js +1 -1
- package/lib/templates/scripts/deploy.js +13 -28
- package/lib/templates/scripts/init.js +110 -220
- package/lib/templates/scripts/postinstall.js +13 -0
- package/lib/templates/scripts/update-frameworks.js +28 -0
- package/lib/templates/scripts/validate-env.js +428 -0
- package/lib/templates/scripts/validate-mcp.js +471 -0
- package/lib/templates/scripts/validate.js +482 -0
- package/lib/templates/shared/agents/analyst.md +1 -1
- package/lib/templates/shared/agents/architect.md +13 -17
- package/lib/templates/shared/agents/dev.md +2 -2
- package/lib/templates/shared/agents/pm.md +1 -1
- package/lib/templates/shared/agents/qa.md +1 -1
- package/lib/templates/shared/agents/sm.md +2 -2
- package/lib/templates/shared/templates/README.md +2 -2
- package/lib/templates/shared/templates/openspec-proposal.md +2 -2
- package/lib/templates/shared/templates/prd-template.md +1 -1
- package/lib/templates/shared/templates/story-template.md +1 -1
- package/lib/utils/context-extractor.js +157 -0
- package/lib/utils/framework-detector.js +54 -0
- package/lib/utils/tool-feature-registry.js +102 -0
- package/package.json +1 -1
- package/tests/ai-gap-analyzer.test.js +38 -0
- package/tests/codex-cli-generator.test.js +29 -0
- package/tests/context-extractor.test.js +70 -0
- package/tests/deploy-integration.test.js +36 -0
- package/tests/deploy.test.js +57 -0
- package/tests/dynamic-question-generator.test.js +29 -0
- package/tests/framework-detector.test.js +55 -0
- package/tests/heuristic-gap-analyzer.test.js +46 -0
- package/tests/kiro-trae-generators.test.js +43 -0
- package/tests/opencode-generator.test.js +113 -0
- package/tests/synthesis-engine.test.js +52 -0
- package/tests/tool-feature-registry.test.js +23 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Technology Stack: ADF CLI
|
|
2
|
+
|
|
3
|
+
## 1. Core Runtime & Language
|
|
4
|
+
* **Runtime:** Node.js (>=18.0.0)
|
|
5
|
+
* **Language:** JavaScript (ESM/CommonJS hybrid)
|
|
6
|
+
|
|
7
|
+
## 2. Frameworks & UI
|
|
8
|
+
* **CLI Framework:** `commander` (Command routing and argument parsing with sub-command support)
|
|
9
|
+
* **Interactive UI:** `inquirer` (Multi-select, autocomplete prompts)
|
|
10
|
+
* **Visual Feedback:** `chalk` (Terminal styling), `ora` (Progress spinners)
|
|
11
|
+
* **Configuration Formats:** Support for JSON, TOML, and Markdown-based tool configurations.
|
|
12
|
+
|
|
13
|
+
## 3. AI & Analysis
|
|
14
|
+
* **Multi-Provider Integration:**
|
|
15
|
+
* Anthropic: `@anthropic-ai/sdk`
|
|
16
|
+
* OpenAI: `openai`
|
|
17
|
+
* Google Gemini: `@google/generative-ai`
|
|
18
|
+
* OpenRouter: `node-fetch` (Standard API interface)
|
|
19
|
+
* **Context Engineering:** Custom Dynamic Pipeline and Knowledge Graph system.
|
|
20
|
+
|
|
21
|
+
## 4. Infrastructure & Utilities
|
|
22
|
+
* **File Management:** `fs-extra` (Atomic writes, directory management)
|
|
23
|
+
* **Environment:** `dotenv` (Secure API key management)
|
|
24
|
+
* **Identity:** `uuid` (Session and project identification)
|
|
25
|
+
|
|
26
|
+
## 5. Quality & Standards
|
|
27
|
+
* **Testing:** `jest` (Unit testing and coverage)
|
|
28
|
+
* **Architecture Standard:** AGENTS.md (Agent-Native Manifest compliance)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Implementation Plan: Bootstrap Agent-Native Documentation
|
|
2
|
+
|
|
3
|
+
## Phase 1: Artifact Generation [checkpoint: 9f9b348]
|
|
4
|
+
- [x] Task: Create `.context/` directory structure. [commit: 0cd6c96]
|
|
5
|
+
- [x] Subtask: Create `.context/memory/` and `.context/skills/`.
|
|
6
|
+
- [x] Subtask: Create `.context/memory/glossary.md` with key terms.
|
|
7
|
+
- [x] Subtask: Create `.context/memory/architecture.md` based on `CLAUDE.md`.
|
|
8
|
+
- [x] Task: Create `AGENTS.md`. [commit: f313bd1]
|
|
9
|
+
- [x] Subtask: Draft `AGENTS.md` content with Operational Rules and Commands.
|
|
10
|
+
- [x] Subtask: Ensure it references `.context/memory/architecture.md`.
|
|
11
|
+
- [x] Task: Conductor - User Manual Verification 'Artifact Generation' (Protocol in workflow.md)
|
|
12
|
+
|
|
13
|
+
## Phase 2: Verification
|
|
14
|
+
- [x] Task: Verify Agent Access.
|
|
15
|
+
- [x] Subtask: Simulate an agent reading `AGENTS.md` and following the references.
|
|
16
|
+
- [x] Subtask: Ensure all paths in `AGENTS.md` are valid.
|
|
17
|
+
- [x] Task: Conductor - User Manual Verification 'Verification' (Protocol in workflow.md)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Specification: Bootstrap Agent-Native Documentation
|
|
2
|
+
|
|
3
|
+
## 1. Goal
|
|
4
|
+
Establish the "Agent-Native" documentation standard for the `adf-cli` repository itself by creating an `AGENTS.md` manifest and a structured `.context/` directory.
|
|
5
|
+
|
|
6
|
+
## 2. Context
|
|
7
|
+
The project generates these files for users but lacks them for its own development. Providing them will allow AI agents (like Windsurf, Cursor, and potential future agents) to better understand the codebase and architectural decisions.
|
|
8
|
+
|
|
9
|
+
## 3. Requirements
|
|
10
|
+
|
|
11
|
+
### 3.1 Artifacts
|
|
12
|
+
* **AGENTS.md:** The root manifest file at the project root. It must:
|
|
13
|
+
* Define the project name and description.
|
|
14
|
+
* Reference the `.context/` directory.
|
|
15
|
+
* List high-priority operational rules (e.g., TDD, commit styles).
|
|
16
|
+
* List standard build/test commands.
|
|
17
|
+
* **.context/ Directory:**
|
|
18
|
+
* **memory/architecture.md:** A high-level overview of the system, component interactions, and key design patterns (extracted from `CLAUDE.md`).
|
|
19
|
+
* **memory/glossary.md:** Definitions of key terms (PRP, BMAD, Spec-Kit, Track, Conductor).
|
|
20
|
+
|
|
21
|
+
### 3.2 Content Source
|
|
22
|
+
* Leverage existing `CLAUDE.md`, `README.md`, and `conductor/product.md` as the primary sources of information.
|
|
23
|
+
|
|
24
|
+
## 4. Success Criteria
|
|
25
|
+
* [ ] `AGENTS.md` exists and is valid YAML/Markdown.
|
|
26
|
+
* [ ] `.context/memory/architecture.md` accurately reflects the current system design.
|
|
27
|
+
* [ ] `.context/memory/glossary.md` contains key framework terms.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Project Tracks
|
|
2
|
+
|
|
3
|
+
This file tracks all major tracks for the project. Each track has its own detailed plan in its respective folder.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## [x] Track: Bootstrap Agent-Native Documentation
|
|
8
|
+
*Link: [./conductor/tracks/bootstrap_agents_20260111/](./conductor/tracks/bootstrap_agents_20260111/)*
|
|
9
|
+
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
# Project Workflow
|
|
2
|
+
|
|
3
|
+
## Guiding Principles
|
|
4
|
+
|
|
5
|
+
1. **The Plan is the Source of Truth:** All work must be tracked in `plan.md`
|
|
6
|
+
2. **The Tech Stack is Deliberate:** Changes to the tech stack must be documented in `tech-stack.md` *before* implementation
|
|
7
|
+
3. **Test-Driven Development:** Write unit tests before implementing functionality
|
|
8
|
+
4. **High Code Coverage:** Aim for >80% code coverage for all modules
|
|
9
|
+
5. **User Experience First:** Every decision should prioritize user experience
|
|
10
|
+
6. **Non-Interactive & CI-Aware:** Prefer non-interactive commands. Use `CI=true` for watch-mode tools (tests, linters) to ensure single execution.
|
|
11
|
+
|
|
12
|
+
## Task Workflow
|
|
13
|
+
|
|
14
|
+
All tasks follow a strict lifecycle:
|
|
15
|
+
|
|
16
|
+
### Standard Task Workflow
|
|
17
|
+
|
|
18
|
+
1. **Select Task:** Choose the next available task from `plan.md` in sequential order
|
|
19
|
+
|
|
20
|
+
2. **Mark In Progress:** Before beginning work, edit `plan.md` and change the task from `[ ]` to `[~]`
|
|
21
|
+
|
|
22
|
+
3. **Write Failing Tests (Red Phase):**
|
|
23
|
+
- Create a new test file for the feature or bug fix.
|
|
24
|
+
- Write one or more unit tests that clearly define the expected behavior and acceptance criteria for the task.
|
|
25
|
+
- **CRITICAL:** Run the tests and confirm that they fail as expected. This is the "Red" phase of TDD. Do not proceed until you have failing tests.
|
|
26
|
+
|
|
27
|
+
4. **Implement to Pass Tests (Green Phase):**
|
|
28
|
+
- Write the minimum amount of application code necessary to make the failing tests pass.
|
|
29
|
+
- Run the test suite again and confirm that all tests now pass. This is the "Green" phase.
|
|
30
|
+
|
|
31
|
+
5. **Refactor (Optional but Recommended):**
|
|
32
|
+
- With the safety of passing tests, refactor the implementation code and the test code to improve clarity, remove duplication, and enhance performance without changing the external behavior.
|
|
33
|
+
- Rerun tests to ensure they still pass after refactoring.
|
|
34
|
+
|
|
35
|
+
6. **Verify Coverage:** Run coverage reports using the project's chosen tools. For example, in a Python project, this might look like:
|
|
36
|
+
```bash
|
|
37
|
+
pytest --cov=app --cov-report=html
|
|
38
|
+
```
|
|
39
|
+
Target: >80% coverage for new code. The specific tools and commands will vary by language and framework.
|
|
40
|
+
|
|
41
|
+
7. **Document Deviations:** If implementation differs from tech stack:
|
|
42
|
+
- **STOP** implementation
|
|
43
|
+
- Update `tech-stack.md` with new design
|
|
44
|
+
- Add dated note explaining the change
|
|
45
|
+
- Resume implementation
|
|
46
|
+
|
|
47
|
+
8. **Commit Code Changes:**
|
|
48
|
+
- Stage all code changes related to the task.
|
|
49
|
+
- Propose a clear, concise commit message e.g, `feat(ui): Create basic HTML structure for calculator`.
|
|
50
|
+
- Perform the commit.
|
|
51
|
+
|
|
52
|
+
9. **Attach Task Summary with Git Notes:**
|
|
53
|
+
- **Step 9.1: Get Commit Hash:** Obtain the hash of the *just-completed commit* (`git log -1 --format="%H"`).
|
|
54
|
+
- **Step 9.2: Draft Note Content:** Create a detailed summary for the completed task. This should include the task name, a summary of changes, a list of all created/modified files, and the core "why" for the change.
|
|
55
|
+
- **Step 9.3: Attach Note:** Use the `git notes` command to attach the summary to the commit.
|
|
56
|
+
```bash
|
|
57
|
+
# The note content from the previous step is passed via the -m flag.
|
|
58
|
+
git notes add -m "<note content>" <commit_hash>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
10. **Get and Record Task Commit SHA:**
|
|
62
|
+
- **Step 10.1: Update Plan:** Read `plan.md`, find the line for the completed task, update its status from `[~]` to `[x]`, and append the first 7 characters of the *just-completed commit's* commit hash.
|
|
63
|
+
- **Step 10.2: Write Plan:** Write the updated content back to `plan.md`.
|
|
64
|
+
|
|
65
|
+
11. **Commit Plan Update:**
|
|
66
|
+
- **Action:** Stage the modified `plan.md` file.
|
|
67
|
+
- **Action:** Commit this change with a descriptive message (e.g., `conductor(plan): Mark task 'Create user model' as complete`).
|
|
68
|
+
|
|
69
|
+
### Phase Completion Verification and Checkpointing Protocol
|
|
70
|
+
|
|
71
|
+
**Trigger:** This protocol is executed immediately after a task is completed that also concludes a phase in `plan.md`.
|
|
72
|
+
|
|
73
|
+
1. **Announce Protocol Start:** Inform the user that the phase is complete and the verification and checkpointing protocol has begun.
|
|
74
|
+
|
|
75
|
+
2. **Ensure Test Coverage for Phase Changes:**
|
|
76
|
+
- **Step 2.1: Determine Phase Scope:** To identify the files changed in this phase, you must first find the starting point. Read `plan.md` to find the Git commit SHA of the *previous* phase's checkpoint. If no previous checkpoint exists, the scope is all changes since the first commit.
|
|
77
|
+
- **Step 2.2: List Changed Files:** Execute `git diff --name-only <previous_checkpoint_sha> HEAD` to get a precise list of all files modified during this phase.
|
|
78
|
+
- **Step 2.3: Verify and Create Tests:** For each file in the list:
|
|
79
|
+
- **CRITICAL:** First, check its extension. Exclude non-code files (e.g., `.json`, `.md`, `.yaml`).
|
|
80
|
+
- For each remaining code file, verify a corresponding test file exists.
|
|
81
|
+
- If a test file is missing, you **must** create one. Before writing the test, **first, analyze other test files in the repository to determine the correct naming convention and testing style.** The new tests **must** validate the functionality described in this phase's tasks (`plan.md`).
|
|
82
|
+
|
|
83
|
+
3. **Execute Automated Tests with Proactive Debugging:**
|
|
84
|
+
- Before execution, you **must** announce the exact shell command you will use to run the tests.
|
|
85
|
+
- **Example Announcement:** "I will now run the automated test suite to verify the phase. **Command:** `CI=true npm test`"
|
|
86
|
+
- Execute the announced command.
|
|
87
|
+
- If tests fail, you **must** inform the user and begin debugging. You may attempt to propose a fix a **maximum of two times**. If the tests still fail after your second proposed fix, you **must stop**, report the persistent failure, and ask the user for guidance.
|
|
88
|
+
|
|
89
|
+
4. **Propose a Detailed, Actionable Manual Verification Plan:**
|
|
90
|
+
- **CRITICAL:** To generate the plan, first analyze `product.md`, `product-guidelines.md`, and `plan.md` to determine the user-facing goals of the completed phase.
|
|
91
|
+
- You **must** generate a step-by-step plan that walks the user through the verification process, including any necessary commands and specific, expected outcomes.
|
|
92
|
+
- The plan you present to the user **must** follow this format:
|
|
93
|
+
|
|
94
|
+
**For a Frontend Change:**
|
|
95
|
+
```
|
|
96
|
+
The automated tests have passed. For manual verification, please follow these steps:
|
|
97
|
+
|
|
98
|
+
**Manual Verification Steps:**
|
|
99
|
+
1. **Start the development server with the command:** `npm run dev`
|
|
100
|
+
2. **Open your browser to:** `http://localhost:3000`
|
|
101
|
+
3. **Confirm that you see:** The new user profile page, with the user's name and email displayed correctly.
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**For a Backend Change:**
|
|
105
|
+
```
|
|
106
|
+
The automated tests have passed. For manual verification, please follow these steps:
|
|
107
|
+
|
|
108
|
+
**Manual Verification Steps:**
|
|
109
|
+
1. **Ensure the server is running.**
|
|
110
|
+
2. **Execute the following command in your terminal:** `curl -X POST http://localhost:8080/api/v1/users -d '{"name": "test"}'`
|
|
111
|
+
3. **Confirm that you receive:** A JSON response with a status of `201 Created`.
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
5. **Await Explicit User Feedback:**
|
|
115
|
+
- After presenting the detailed plan, ask the user for confirmation: "**Does this meet your expectations? Please confirm with yes or provide feedback on what needs to be changed.**"
|
|
116
|
+
- **PAUSE** and await the user's response. Do not proceed without an explicit yes or confirmation.
|
|
117
|
+
|
|
118
|
+
6. **Create Checkpoint Commit:**
|
|
119
|
+
- Stage all changes. If no changes occurred in this step, proceed with an empty commit.
|
|
120
|
+
- Perform the commit with a clear and concise message (e.g., `conductor(checkpoint): Checkpoint end of Phase X`).
|
|
121
|
+
|
|
122
|
+
7. **Attach Auditable Verification Report using Git Notes:**
|
|
123
|
+
- **Step 8.1: Draft Note Content:** Create a detailed verification report including the automated test command, the manual verification steps, and the user's confirmation.
|
|
124
|
+
- **Step 8.2: Attach Note:** Use the `git notes` command and the full commit hash from the previous step to attach the full report to the checkpoint commit.
|
|
125
|
+
|
|
126
|
+
8. **Get and Record Phase Checkpoint SHA:**
|
|
127
|
+
- **Step 7.1: Get Commit Hash:** Obtain the hash of the *just-created checkpoint commit* (`git log -1 --format="%H"`).
|
|
128
|
+
- **Step 7.2: Update Plan:** Read `plan.md`, find the heading for the completed phase, and append the first 7 characters of the commit hash in the format `[checkpoint: <sha>]`.
|
|
129
|
+
- **Step 7.3: Write Plan:** Write the updated content back to `plan.md`.
|
|
130
|
+
|
|
131
|
+
9. **Commit Plan Update:**
|
|
132
|
+
- **Action:** Stage the modified `plan.md` file.
|
|
133
|
+
- **Action:** Commit this change with a descriptive message following the format `conductor(plan): Mark phase '<PHASE NAME>' as complete`.
|
|
134
|
+
|
|
135
|
+
10. **Announce Completion:** Inform the user that the phase is complete and the checkpoint has been created, with the detailed verification report attached as a git note.
|
|
136
|
+
|
|
137
|
+
### Quality Gates
|
|
138
|
+
|
|
139
|
+
Before marking any task complete, verify:
|
|
140
|
+
|
|
141
|
+
- [ ] All tests pass
|
|
142
|
+
- [ ] Code coverage meets requirements (>80%)
|
|
143
|
+
- [ ] Code follows project's code style guidelines (as defined in `code_styleguides/`)
|
|
144
|
+
- [ ] All public functions/methods are documented (e.g., docstrings, JSDoc, GoDoc)
|
|
145
|
+
- [ ] Type safety is enforced (e.g., type hints, TypeScript types, Go types)
|
|
146
|
+
- [ ] No linting or static analysis errors (using the project's configured tools)
|
|
147
|
+
- [ ] Works correctly on mobile (if applicable)
|
|
148
|
+
- [ ] Documentation updated if needed
|
|
149
|
+
- [ ] No security vulnerabilities introduced
|
|
150
|
+
|
|
151
|
+
## Development Commands
|
|
152
|
+
|
|
153
|
+
**AI AGENT INSTRUCTION: This section should be adapted to the project's specific language, framework, and build tools.**
|
|
154
|
+
|
|
155
|
+
### Setup
|
|
156
|
+
```bash
|
|
157
|
+
# Example: Commands to set up the development environment (e.g., install dependencies, configure database)
|
|
158
|
+
# e.g., for a Node.js project: npm install
|
|
159
|
+
# e.g., for a Go project: go mod tidy
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Daily Development
|
|
163
|
+
```bash
|
|
164
|
+
# Example: Commands for common daily tasks (e.g., start dev server, run tests, lint, format)
|
|
165
|
+
# e.g., for a Node.js project: npm run dev, npm test, npm run lint
|
|
166
|
+
# e.g., for a Go project: go run main.go, go test ./..., go fmt ./...
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Before Committing
|
|
170
|
+
```bash
|
|
171
|
+
# Example: Commands to run all pre-commit checks (e.g., format, lint, type check, run tests)
|
|
172
|
+
# e.g., for a Node.js project: npm run check
|
|
173
|
+
# e.g., for a Go project: make check (if a Makefile exists)
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Testing Requirements
|
|
177
|
+
|
|
178
|
+
### Unit Testing
|
|
179
|
+
- Every module must have corresponding tests.
|
|
180
|
+
- Use appropriate test setup/teardown mechanisms (e.g., fixtures, beforeEach/afterEach).
|
|
181
|
+
- Mock external dependencies.
|
|
182
|
+
- Test both success and failure cases.
|
|
183
|
+
|
|
184
|
+
### Integration Testing
|
|
185
|
+
- Test complete user flows
|
|
186
|
+
- Verify database transactions
|
|
187
|
+
- Test authentication and authorization
|
|
188
|
+
- Check form submissions
|
|
189
|
+
|
|
190
|
+
### Mobile Testing
|
|
191
|
+
- Test on actual iPhone when possible
|
|
192
|
+
- Use Safari developer tools
|
|
193
|
+
- Test touch interactions
|
|
194
|
+
- Verify responsive layouts
|
|
195
|
+
- Check performance on 3G/4G
|
|
196
|
+
|
|
197
|
+
## Code Review Process
|
|
198
|
+
|
|
199
|
+
### Self-Review Checklist
|
|
200
|
+
Before requesting review:
|
|
201
|
+
|
|
202
|
+
1. **Functionality**
|
|
203
|
+
- Feature works as specified
|
|
204
|
+
- Edge cases handled
|
|
205
|
+
- Error messages are user-friendly
|
|
206
|
+
|
|
207
|
+
2. **Code Quality**
|
|
208
|
+
- Follows style guide
|
|
209
|
+
- DRY principle applied
|
|
210
|
+
- Clear variable/function names
|
|
211
|
+
- Appropriate comments
|
|
212
|
+
|
|
213
|
+
3. **Testing**
|
|
214
|
+
- Unit tests comprehensive
|
|
215
|
+
- Integration tests pass
|
|
216
|
+
- Coverage adequate (>80%)
|
|
217
|
+
|
|
218
|
+
4. **Security**
|
|
219
|
+
- No hardcoded secrets
|
|
220
|
+
- Input validation present
|
|
221
|
+
- SQL injection prevented
|
|
222
|
+
- XSS protection in place
|
|
223
|
+
|
|
224
|
+
5. **Performance**
|
|
225
|
+
- Database queries optimized
|
|
226
|
+
- Images optimized
|
|
227
|
+
- Caching implemented where needed
|
|
228
|
+
|
|
229
|
+
6. **Mobile Experience**
|
|
230
|
+
- Touch targets adequate (44x44px)
|
|
231
|
+
- Text readable without zooming
|
|
232
|
+
- Performance acceptable on mobile
|
|
233
|
+
- Interactions feel native
|
|
234
|
+
|
|
235
|
+
## Commit Guidelines
|
|
236
|
+
|
|
237
|
+
### Message Format
|
|
238
|
+
```
|
|
239
|
+
<type>(<scope>): <description>
|
|
240
|
+
|
|
241
|
+
[optional body]
|
|
242
|
+
|
|
243
|
+
[optional footer]
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Types
|
|
247
|
+
- `feat`: New feature
|
|
248
|
+
- `fix`: Bug fix
|
|
249
|
+
- `docs`: Documentation only
|
|
250
|
+
- `style`: Formatting, missing semicolons, etc.
|
|
251
|
+
- `refactor`: Code change that neither fixes a bug nor adds a feature
|
|
252
|
+
- `test`: Adding missing tests
|
|
253
|
+
- `chore`: Maintenance tasks
|
|
254
|
+
|
|
255
|
+
### Examples
|
|
256
|
+
```bash
|
|
257
|
+
git commit -m "feat(auth): Add remember me functionality"
|
|
258
|
+
git commit -m "fix(posts): Correct excerpt generation for short posts"
|
|
259
|
+
git commit -m "test(comments): Add tests for emoji reaction limits"
|
|
260
|
+
git commit -m "style(mobile): Improve button touch targets"
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Definition of Done
|
|
264
|
+
|
|
265
|
+
A task is complete when:
|
|
266
|
+
|
|
267
|
+
1. All code implemented to specification
|
|
268
|
+
2. Unit tests written and passing
|
|
269
|
+
3. Code coverage meets project requirements
|
|
270
|
+
4. Documentation complete (if applicable)
|
|
271
|
+
5. Code passes all configured linting and static analysis checks
|
|
272
|
+
6. Works beautifully on mobile (if applicable)
|
|
273
|
+
7. Implementation notes added to `plan.md`
|
|
274
|
+
8. Changes committed with proper message
|
|
275
|
+
9. Git note with task summary attached to the commit
|
|
276
|
+
|
|
277
|
+
## Emergency Procedures
|
|
278
|
+
|
|
279
|
+
### Critical Bug in Production
|
|
280
|
+
1. Create hotfix branch from main
|
|
281
|
+
2. Write failing test for bug
|
|
282
|
+
3. Implement minimal fix
|
|
283
|
+
4. Test thoroughly including mobile
|
|
284
|
+
5. Deploy immediately
|
|
285
|
+
6. Document in plan.md
|
|
286
|
+
|
|
287
|
+
### Data Loss
|
|
288
|
+
1. Stop all write operations
|
|
289
|
+
2. Restore from latest backup
|
|
290
|
+
3. Verify data integrity
|
|
291
|
+
4. Document incident
|
|
292
|
+
5. Update backup procedures
|
|
293
|
+
|
|
294
|
+
### Security Breach
|
|
295
|
+
1. Rotate all secrets immediately
|
|
296
|
+
2. Review access logs
|
|
297
|
+
3. Patch vulnerability
|
|
298
|
+
4. Notify affected users (if any)
|
|
299
|
+
5. Document and update security procedures
|
|
300
|
+
|
|
301
|
+
## Deployment Workflow
|
|
302
|
+
|
|
303
|
+
### Pre-Deployment Checklist
|
|
304
|
+
- [ ] All tests passing
|
|
305
|
+
- [ ] Coverage >80%
|
|
306
|
+
- [ ] No linting errors
|
|
307
|
+
- [ ] Mobile testing complete
|
|
308
|
+
- [ ] Environment variables configured
|
|
309
|
+
- [ ] Database migrations ready
|
|
310
|
+
- [ ] Backup created
|
|
311
|
+
|
|
312
|
+
### Deployment Steps
|
|
313
|
+
1. Merge feature branch to main
|
|
314
|
+
2. Tag release with version
|
|
315
|
+
3. Push to deployment service
|
|
316
|
+
4. Run database migrations
|
|
317
|
+
5. Verify deployment
|
|
318
|
+
6. Test critical paths
|
|
319
|
+
7. Monitor for errors
|
|
320
|
+
|
|
321
|
+
### Post-Deployment
|
|
322
|
+
1. Monitor analytics
|
|
323
|
+
2. Check error logs
|
|
324
|
+
3. Gather user feedback
|
|
325
|
+
4. Plan next iteration
|
|
326
|
+
|
|
327
|
+
## Continuous Improvement
|
|
328
|
+
|
|
329
|
+
- Review workflow weekly
|
|
330
|
+
- Update based on pain points
|
|
331
|
+
- Document lessons learned
|
|
332
|
+
- Optimize for user happiness
|
|
333
|
+
- Keep things simple and maintainable
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Gap Analyzer
|
|
3
|
+
* Uses LLM to identify logical omissions and vague sections in project context.
|
|
4
|
+
*/
|
|
5
|
+
class AIGapAnalyzer {
|
|
6
|
+
constructor(aiClient) {
|
|
7
|
+
this.aiClient = aiClient;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Analyzes project context for knowledge gaps using AI.
|
|
12
|
+
* @param {Object} context - The synthesized context object.
|
|
13
|
+
* @returns {Promise<string[]>} List of identified gaps as text descriptions.
|
|
14
|
+
*/
|
|
15
|
+
async analyze(context) {
|
|
16
|
+
const contextText = JSON.stringify(context, null, 2);
|
|
17
|
+
|
|
18
|
+
const prompt = `You are a senior technical architect. Analyze the following project context extracted from existing documentation.
|
|
19
|
+
Identify critical knowledge gaps, logical omissions, or vague sections that need clarification before development can start.
|
|
20
|
+
|
|
21
|
+
Project Context:
|
|
22
|
+
${contextText}
|
|
23
|
+
|
|
24
|
+
Guidelines for Analysis:
|
|
25
|
+
1. Look for missing technical details (databases, auth flows, error handling).
|
|
26
|
+
2. Look for vague functional requirements (user actions, success metrics).
|
|
27
|
+
3. Look for architectural inconsistencies.
|
|
28
|
+
|
|
29
|
+
Respond with a list of gaps, each prefixed with "[GAP]". Be concise but specific.
|
|
30
|
+
Example: - [GAP] Authentication flow is mentioned but not defined.`;
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
const response = await this.aiClient.sendMessage(prompt, {
|
|
34
|
+
maxTokens: 1000,
|
|
35
|
+
temperature: 0.3
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
return this.parseGaps(response.content);
|
|
39
|
+
} catch (error) {
|
|
40
|
+
// Return empty list if AI analysis fails
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Parses the AI response to extract gap descriptions.
|
|
47
|
+
* @param {string} content - The AI response content.
|
|
48
|
+
* @returns {string[]} List of gap strings.
|
|
49
|
+
*/
|
|
50
|
+
parseGaps(content) {
|
|
51
|
+
const lines = content.split(/\r?\n/);
|
|
52
|
+
const gaps = [];
|
|
53
|
+
|
|
54
|
+
for (const line of lines) {
|
|
55
|
+
const match = line.match(/\[GAP\]\s*(.*)/i);
|
|
56
|
+
if (match) {
|
|
57
|
+
gaps.push(match[1].trim());
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return gaps;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
module.exports = AIGapAnalyzer;
|
|
66
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
const { getQuestionsForFramework } = require('../frameworks/questions');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Dynamic Question Generator
|
|
5
|
+
* Creates a targeted questionnaire based on identified heuristic and AI knowledge gaps.
|
|
6
|
+
*/
|
|
7
|
+
class DynamicQuestionGenerator {
|
|
8
|
+
/**
|
|
9
|
+
* Generates a list of questions to fill the identified gaps.
|
|
10
|
+
* @param {Object} heuristicGaps - Output from HeuristicGapAnalyzer.
|
|
11
|
+
* @param {string[]} aiGaps - Output from AIGapAnalyzer.
|
|
12
|
+
* @returns {Object[]} List of question objects.
|
|
13
|
+
*/
|
|
14
|
+
static generate(heuristicGaps, aiGaps) {
|
|
15
|
+
const questions = [];
|
|
16
|
+
|
|
17
|
+
// 1. Add heuristic questions (from existing framework questions)
|
|
18
|
+
if (heuristicGaps.missingQuestions && heuristicGaps.missingQuestions.length > 0) {
|
|
19
|
+
// Get all possible questions across all frameworks to find the ones we need
|
|
20
|
+
const allFrameworkQuestions = [
|
|
21
|
+
...getQuestionsForFramework('rapid'),
|
|
22
|
+
...getQuestionsForFramework('balanced'),
|
|
23
|
+
...getQuestionsForFramework('comprehensive')
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
for (const qId of heuristicGaps.missingQuestions) {
|
|
27
|
+
const found = allFrameworkQuestions.find(q => q.id === qId);
|
|
28
|
+
if (found && !questions.some(q => q.id === qId)) {
|
|
29
|
+
questions.push({
|
|
30
|
+
...found,
|
|
31
|
+
phase: 'augmentation' // Override phase for unified augmented interview
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// 2. Add AI-identified gaps as new dynamic questions
|
|
38
|
+
for (let i = 0; i < aiGaps.length; i++) {
|
|
39
|
+
const gapDescription = aiGaps[i];
|
|
40
|
+
questions.push({
|
|
41
|
+
id: `aug-ai-${i + 1}`,
|
|
42
|
+
phase: 'augmentation',
|
|
43
|
+
text: `Regarding the identified gap: ${gapDescription}. Can you provide more details?`,
|
|
44
|
+
guidance: 'This gap was identified by AI analysis of your existing project context.',
|
|
45
|
+
goodExample: 'A specific technical or functional detail addressing the gap.',
|
|
46
|
+
badExample: 'Vague or non-committal answer.',
|
|
47
|
+
isDynamic: true
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return questions;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
module.exports = DynamicQuestionGenerator;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Heuristic Gap Analyzer
|
|
3
|
+
* Identifies missing mandatory project context based on framework levels.
|
|
4
|
+
*/
|
|
5
|
+
class HeuristicGapAnalyzer {
|
|
6
|
+
/**
|
|
7
|
+
* Maps context fields to framework question IDs.
|
|
8
|
+
*/
|
|
9
|
+
static get FIELD_MAPPING() {
|
|
10
|
+
return {
|
|
11
|
+
name: { id: 'prp-1', required: ['rapid', 'balanced', 'comprehensive'] },
|
|
12
|
+
overview: { id: 'prp-3', required: ['rapid', 'balanced', 'comprehensive'] },
|
|
13
|
+
techStack: { id: 'prp-8', required: ['rapid', 'balanced', 'comprehensive'] },
|
|
14
|
+
proposedChanges: { id: 'bal-28', required: ['balanced', 'comprehensive'] },
|
|
15
|
+
architecture: { id: 'bal-37', required: ['balanced', 'comprehensive'] }
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Analyzes context for missing mandatory fields.
|
|
21
|
+
* @param {Object} context - The synthesized context object.
|
|
22
|
+
* @param {string} framework - The target framework level.
|
|
23
|
+
* @returns {Object} Report of missing fields and question IDs.
|
|
24
|
+
*/
|
|
25
|
+
static analyze(context, framework) {
|
|
26
|
+
const missingFields = [];
|
|
27
|
+
const missingQuestions = [];
|
|
28
|
+
|
|
29
|
+
for (const [field, config] of Object.entries(this.FIELD_MAPPING)) {
|
|
30
|
+
if (config.required.includes(framework)) {
|
|
31
|
+
if (!context[field] || context[field].trim().length === 0) {
|
|
32
|
+
missingFields.push(field);
|
|
33
|
+
missingQuestions.push(config.id);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
missingFields,
|
|
40
|
+
missingQuestions
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
module.exports = HeuristicGapAnalyzer;
|