Skip to content

Commit 535441a

Browse files
committed
docs: consolidate developer workflow documentation into DEVELOPER_GUIDE.md
1 parent 89033a7 commit 535441a

2 files changed

Lines changed: 73 additions & 66 deletions

File tree

dev/DEVELOPER_GUIDE.md

Lines changed: 70 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,46 @@
22

33
Welcome, Clojure cult member! This guide provides practical instructions for developing, testing, and contributing to the Calva MCP Server project. Pair programming, data-orientation, and functional thinking are encouraged throughout.
44

5+
## Documentation-Driven Development
6+
7+
This project follows these principles:
8+
9+
1. Define the API and interfaces first
10+
2. Document expected behaviors and edge cases
11+
3. Implement against the documentation
12+
4. Validate implementation against documentation
13+
5. Update documentation based on implementation insights
14+
6. Repeat
15+
16+
This approach ensures that we have a clear destination before starting to code, and that our implementation aligns with our design intentions.
17+
18+
## Interactive Development Workflow
19+
20+
The project leverages ClojureScript's interactive development capabilities:
21+
- Use shadow-cljs for continuous hot reloading during development
22+
- Apply changes to the running extension without restarting
23+
- Utilize the REPL to experiment with and test code in real-time
24+
25+
### Complete Workflow
26+
27+
1. Start the REPL server:
28+
```sh
29+
npm run watch
30+
```
31+
- This only starts the server. The following steps must be performed by the human:
32+
2. Connect to the REPL using Calva (<kbd>Ctrl+Alt+C Ctrl+Alt+C</kbd>)
33+
3. Start the Extension Development Host (<kbd>F5</kbd> in VS Code)
34+
4. Activate the extension in the development host (run the command "Calva MCP Server: Say hello!" from Command Palette)
35+
5. Enjoy hot reloading and interactive development!
36+
37+
### Human/AI Collaboration Model
38+
39+
- **Initial development phase**: Human developer handles REPL connection and activation steps
40+
- **As functionality matures**: AI gradually leverages the interactive environment
41+
- **Eventually**: The AI assistant will use the very MCP server being developed
42+
43+
This creates a bootstrap process where the tool we're building ultimately empowers the AI collaborating on its development.
44+
545
## End-to-End (e2e) Testing
646

747
To validate the extension in a real VS Code environment, use the provided Babashka task for e2e tests:
@@ -10,6 +50,9 @@ To validate the extension in a real VS Code environment, use the provided Babash
1050
bb run-e2e-tests-ws
1151
```
1252

53+
- The test runner will automatically download and use VS Code Insiders (it does not need to be installed).
54+
- **Important:** VS Code Insiders must not be running when you start the e2e tests, or the test runner will fail.
55+
1356
This will:
1457
- Set up a test workspace
1558
- Launch VS Code with the extension and Joyride installed
@@ -21,16 +64,34 @@ Test runner logic: `e2e-test-ws/launch.js`, `e2e-test-ws/runTests.js`
2164

2265
> Use this workflow before merging or publishing to ensure the extension works as expected in a real VS Code environment.
2366
24-
## Development Workflow (Summary)
67+
## Testing Strategy
2568

26-
1. Start the REPL server:
27-
```sh
28-
npm run watch
29-
```
30-
2. Connect to the REPL using Calva (human action)
31-
3. Start the Extension Development Host (F5 in VS Code, human action)
32-
4. Activate the extension in the development host (human action)
33-
5. Enjoy hot reloading and interactive development!
69+
- **Unit tests**: Write tests for core functions (shadow-cljs automatically discovers and runs tests in namespaces ending with `-test`)
70+
- **Integration tests**: Test API endpoints and component interactions
71+
- **End-to-end tests**: Use the Babashka task as described above for full workflow validation
72+
- **Property-based tests**: Consider for robust behavior validation where appropriate
73+
74+
## Commit and Documentation Practices
75+
76+
- Make small, frequent commits with descriptive messages that tell the story of development
77+
- Keep code and documentation changes in sync
78+
- Ensure that each commit represents a coherent unit of work
79+
- Update the development log (`dev/DEVELOPMENT_LOG.md`) regularly with progress, decisions, and insights
80+
- Be super aware of when a decision point is reached. When a significant decision needs to be made, document the options and reasoning in the decision log (`dev/DECISION_LOG.md`) before proceeding.
81+
82+
## Deployment and Distribution
83+
84+
- Automated publishing workflow is configured in the project
85+
- It includes linting, formatting check, unit testing and end-to-end testing
86+
- The extension will be available through VS Code Marketplace
87+
- Distribution occurs through standard VS Code extension mechanisms
88+
- Version compatibility information will be included in documentation
89+
90+
## References
91+
92+
- For architectural and protocol details, see `dev/MCP_OVERVIEW.md` and `dev/EVENT_LOOP_ARCHITECTURE.md`
93+
- For project requirements and philosophy, see `dev/PROJECT_REQUIREMENTS.md`
94+
- For template-based setup and onboarding, see `doc/TEMPLATE_README.md`
3495

3596
## More to Come
3697

dev/PROJECT_REQUIREMENTS.md

Lines changed: 3 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -141,60 +141,6 @@ Errors will be handled gracefully and returned in a structured format:
141141

142142
## 7. Development Approach
143143

144-
### 7.1 Documentation Driven Development
145-
Following the principles of Documentation Driven Development:
146-
1. Define the API and interfaces first
147-
2. Document expected behaviors and edge cases
148-
3. Implement against the documentation
149-
4. Validate implementation against documentation
150-
5. Update documentation based on implementation insights
151-
6. Repeat
152-
153-
Alongside this approach, the project will:
154-
- Make frequent, small commits with descriptive messages
155-
- Chain git commands (add, commit, push) for efficiency
156-
- Keep code and documentation changes in sync
157-
- Ensure that each commit represents a coherent unit of work
158-
- Maintain history that clearly tells the story of development
159-
160-
### 7.2 Interactive Development
161-
The project will leverage ClojureScript's interactive development capabilities:
162-
- Use shadow-cljs for continuous hot reloading during development
163-
- Apply changes to the running extension without restarting
164-
- Utilize the REPL to experiment with and test code in real-time
165-
166-
The development workflow follows these steps:
167-
1. **Start the REPL server**: Run `npm run watch` to start the nREPL server (this does not automatically connect the REPL)
168-
2. **Connect to the REPL**: Use Calva to connect to the running REPL server
169-
3. **Start the Extension Host**: Launch the Development Extension Host with F5
170-
4. **Activate the Extension**: Run a command that activates our extension in the host
171-
5. **Verify REPL Connection**: Confirm Calva is connected to the extension's REPL
172-
173-
Development roles during this process:
174-
- **Initial development phase**: Human developer handles REPL connection and activation steps
175-
- **Development communication**: AI assistant explicitly requests human intervention when these steps are needed
176-
- **As functionality matures**: AI assistant will increasingly leverage the REPL capabilities
177-
- **Eventually**: The AI assistant will use the very MCP server being developed
178-
179-
This approach creates a bootstrap process where the tool we're building (Calva MCP Server) will eventually empower the AI assistant collaborating on its development.
180-
181-
### 7.3 Development Log
182-
183-
The project will maintain a detailed development log to:
184-
- Track progress and decisions made during implementation
185-
- Record challenges encountered and solutions applied
186-
- Document insights gained throughout the development process
187-
- Serve as a historical record for future reference
188-
- Complement the PRD by documenting the actual path taken
189-
190-
### 7.4 Testing Strategy
191-
- Unit tests for core functions
192-
- Integration tests for API endpoints
193-
- End-to-end tests for full workflows
194-
- Property-based tests for robust behavior validation
195-
196-
### 7.5 Deployment and Distribution
197-
- Available through VS Code Marketplace
198-
- Clear installation and setup instructions
199-
- Version compatibility information
200-
- Updates managed through standard VS Code extension mechanisms
144+
The development approach for this project follows documentation-driven development, interactive development with REPL, comprehensive testing, and regular documentation updates.
145+
146+
For detailed development workflow, testing procedures, and contributor guidelines, please refer to [DEVELOPER_GUIDE.md](./DEVELOPER_GUIDE.md).

0 commit comments

Comments
 (0)