Skip to content

Commit 48ac762

Browse files
committed
chores: update project guidelines and docs
- Add TDD and implementation guidelines to CLAUDE.md - Create /creview slash command for code reviews - Update issue-744 feature doc to mark Phase 2.1 complete Issue SRVOCF-744 Signed-off-by: Stanislav Jakuschevskij <[email protected]>
1 parent d2c850f commit 48ac762

File tree

3 files changed

+55
-4
lines changed

3 files changed

+55
-4
lines changed

.claude/CLAUDE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
# Answer Style
22

33
- Always keep your answers short and concise unless I say to elaborate.
4+
5+
## Coding Guidelines
6+
7+
- We are using test driven development.
8+
- Never implement anything yourself unless I ask you to.
9+
- I do the implementation, you only provide guidance and reviews.

.claude/commands/creview.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
allowed-tools: Bash(git status:*), Bash(git log:*)
3+
description: Perform a code review
4+
---
5+
6+
## Context
7+
8+
- Current git status: !`git status`
9+
- Current git diff (staged and unstaged changes): !`git diff HEAD`
10+
- Current branch: !`git branch --show-current`
11+
12+
## Your Task
13+
14+
- Propose refactorings as documented by Martin Fowler in his books if code becomes easier to change with them.
15+
- Propose missing test cases for the implemented logic.
16+
- Point out for Golang security bugs.
17+
- Point out for general code bugs.
18+
- Apply the SOLID principles as documented by Robert C. Martin if the code becomes easier to change with them.
19+
- Propose refactorings towards design patterns as explained in the book "Refactoring to Patterns" by Joshua Kerievsky if they apply in the current context and will improve the maintainability of the code.

.claude/features/issue-744-github-actions-workflow.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,41 @@ Implementation:
193193
- `TestNewConfigCICmd_SuccessWhenInitialized`
194194
- Commit: `bd22332f` - feat: add config ci command and refactor interfaces
195195

196+
**Phase 2, Step 2.1: Workflow directory/file creation**
197+
- Created YAML structure types: `GithubWorkflow`, `WorkflowTriggers`, `PushTrigger`, `Job`, `Step`
198+
- Implemented workflow generation with hardcoded values:
199+
- Name: "Remote Build and Deploy"
200+
- Trigger: push to main branch
201+
- Runner: ubuntu-latest
202+
- Steps: checkout → func cli setup → deploy --remote
203+
- Created `cmd/ci` package for CI logic separation
204+
- `cmd/ci/config.go` - CIConfig with path resolution methods
205+
- `cmd/ci/workflow.go` - Workflow structs and generation logic
206+
- Added `NewGithubWorkflow(name)` factory function
207+
- Added `PersistToDisk()` function for file writing
208+
- Tests passing (5/5):
209+
- `TestNewConfigCICmd_CreatesGithubWorkflowDirectory`
210+
- `TestNewConfigCICmd_GeneratesLocalWorkflowFile`
211+
- `TestNewConfigCICmd_WorkflowYAMLHasCorrectStructure`
212+
- `TestNewConfigCICmd_WorkflowYAMLHasCustomName`
213+
- Plus 2 existing tests
214+
- Commits:
215+
- `e4541136` - feat: generate github workflow for remote build
216+
- `d2c850fc` - refactor: extract ci logic into dedicated package
217+
196218
### 🔄 In Progress
197219

198-
**Phase 2, Step 2.1: Workflow directory/file creation**
199-
- Next: Implement Tests 1-3 (directory creation, file generation, YAML structure)
220+
**Phase 2, Step 2.2: Go-specific workflow content**
221+
- Next: Detect runtime and conditionally add test step for Go functions
200222

201223
### ⏳ Next Steps
202224

203-
1. Complete Phase 2, Step 2.1 (3 tests)
204-
2. Complete Phase 2, Step 2.2 (4 tests for Go-specific content)
225+
1. Complete Phase 2, Step 2.2 (4 tests for Go-specific content):
226+
- Runtime detection from Function struct
227+
- Conditional test step for Go
228+
- Validate default triggers
229+
- Cluster config placeholders
230+
2. Begin Phase 3: Remote build support
205231

206232
---
207233

0 commit comments

Comments
 (0)