Skip to content

Commit 693304a

Browse files
committed
planning: add issue enforce-variable-naming-conventions to 2.1
Add issue
1 parent 9c44ed1 commit 693304a

2 files changed

Lines changed: 73 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"status": "open", "targetBranch": "v2.1"}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Plan: enforce-variable-naming-conventions
2+
3+
## Current State
4+
5+
No naming convention exists specifying casing for variable names in Markdown vs Java files. This causes inconsistency:
6+
- Skill files (MD) use camelCase parameter names (e.g., `catAgentId`, `issueId`, `worktreePath`) when snake_case is
7+
the appropriate convention for Markdown-embedded variable references
8+
- Java source files already use camelCase by Java language convention, but this is not formally documented
9+
10+
## Target State
11+
12+
A project convention formally specifies:
13+
- Variable names referenced in Markdown (MD) files use **snake_case** (e.g., `cat_agent_id`, `issue_id`,
14+
`worktree_path`)
15+
- Variable names in Java source files use **camelCase** (e.g., `catAgentId`, `issueId`, `worktreePath`)
16+
17+
The convention is added to `.claude/rules/common.md` and all existing MD and Java files are audited and updated to
18+
comply.
19+
20+
## Satisfies
21+
22+
None
23+
24+
## Risk Assessment
25+
26+
- **Risk Level:** MEDIUM
27+
- **Breaking Changes:** Renaming parameter names in skill files may require updates to any skill that references those
28+
parameters by name
29+
- **Mitigation:** Search exhaustively for all usages of renamed variables before committing; update all call sites
30+
31+
## Files to Modify
32+
33+
- `.claude/rules/common.md` — Add naming convention section specifying snake_case for MD, camelCase for Java
34+
- `plugin/skills/**/*.md` — Update any variable/parameter names from camelCase to snake_case
35+
- `plugin/agents/**/*.md` — Update any variable/parameter names from camelCase to snake_case
36+
- `plugin/concepts/**/*.md` — Update any variable/parameter names from camelCase to snake_case
37+
- `plugin/rules/**/*.md` — Update any variable/parameter names from camelCase to snake_case
38+
- `.claude/rules/**/*.md` — Update any variable/parameter names from camelCase to snake_case
39+
- `client/src/main/java/**/*.java` — Verify camelCase compliance (likely already compliant)
40+
41+
## Post-conditions
42+
43+
- [ ] `.claude/rules/common.md` documents the snake_case (MD) and camelCase (Java) naming convention
44+
- [ ] All variable/parameter names in MD files use snake_case
45+
- [ ] All variable names in Java files use camelCase
46+
- [ ] All tests pass
47+
- [ ] No regressions introduced
48+
49+
## Sub-Agent Waves
50+
51+
### Wave 1
52+
53+
1. **Step 1:** Add naming convention to `.claude/rules/common.md`
54+
- Add a "Naming Conventions" section specifying snake_case for MD variables and camelCase for Java variables
55+
- Include examples of correct and incorrect usage
56+
- Files: `.claude/rules/common.md`
57+
58+
2. **Step 2:** Audit and update Markdown files
59+
- Search all `.md` files in `plugin/` and `.claude/` for camelCase variable/parameter names
60+
- Rename to snake_case where found (e.g., `catAgentId``cat_agent_id`, `issueId``issue_id`,
61+
`worktreePath``worktree_path`, `targetBranch``target_branch`)
62+
- Update all references to renamed variables in the same files and any other files that use them
63+
- Files: all `.md` files in `plugin/` and `.claude/`
64+
65+
3. **Step 3:** Audit Java files for camelCase compliance
66+
- Verify all local variable names in Java source files use camelCase
67+
- Fix any violations found
68+
- Files: `client/src/main/java/**/*.java`
69+
70+
4. **Step 4:** Run tests and commit
71+
- Run `mvn -f client/pom.xml test` to verify no regressions
72+
- Commit convention update and file changes

0 commit comments

Comments
 (0)