Skip to content

Commit 96965fb

Browse files
committed
updates
1 parent 97407e8 commit 96965fb

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

ai-project-notes.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,31 @@ This is a running log of notes, observations, decisions, and refinements related
2929

3030
---
3131

32+
## [2025-05-07] Coder Template Structure Investigation
33+
34+
- Coder templates require a specific structure not fully explained in documentation:
35+
- Registry modules use `agent_id` parameter, not `agent` (important distinction for claude-code module)
36+
- Modules function differently than raw resources (parameters don't match Terraform registry docs)
37+
- Docker templates should use `codercom/enterprise-base:ubuntu` for broader compatibility
38+
- Templates must include `data.coder_workspace.me.start_count` for proper lifecycle management
39+
- Claude Code module documentation incomplete - parameters not fully documented in examples
40+
- Documentation should explain that modules from registry.coder.com use different parameters than raw resources
41+
- AI integration documentation needs clearer examples showing correct module parameter syntax
42+
43+
## [2025-05-07] Claude Code Module Parameter Correction
44+
45+
- Major discovery: Claude Code module doesn't accept `anthropic_api_key` or `model` parameters directly
46+
- These parameters should instead be passed through environment variables via the `coder_env` resource
47+
- Required corrections:
48+
- Use `CLAUDE_API_KEY` env var instead of module parameter
49+
- Use `CLAUDE_MODEL` env var instead of module parameter
50+
- Use `CODER_MCP_CLAUDE_SYSTEM_PROMPT` for custom instructions
51+
- Use `CODER_MCP_INSTRUCTIONS` for tool configuration
52+
- Module documentation needs updates to clarify the proper usage pattern with `coder_env`
53+
- All AI integration examples should show this pattern to avoid confusion
54+
55+
---
56+
3257
## [TEMPLATE]
3358

3459
## [YYYY-MM-DD] Topic or Focus

architecture-notes.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,15 @@ This document provides a high-level overview of the Coder backend, CLI, agent sy
4242
### Template Architecture
4343
- Templates = Terraform modules with Coder extensions
4444
- Key custom resources:
45-
- `coder_agent`, `coder_app`, `coder_script`, `coder_parameter`, `coder_metadata`
46-
- Versioned: Each version is immutable and linked to a provisioner job
45+
- `coder_agent`: Core component that enables connectivity to workspaces
46+
- `coder_app`: Provides access to web applications (IDEs, docs, etc.)
47+
- `coder_parameter`: Enables user input when creating workspaces
48+
- `coder_metadata`: Displays contextual information in UI
49+
- Modules from Coder registry: Pre-built components (e.g., code-server, jetbrains-gateway, claude-code)
50+
- Resource lifecycle management:
51+
- Ephemeral: Uses `count = data.coder_workspace.me.start_count` to control start/stop
52+
- Persistent: Uses `lifecycle { ignore_changes = all }` to protect data
53+
- Versioned: Each template version is immutable and linked to a provisioner job
4754

4855
### Provisioning Workflow
4956
1. **Version upload**: Terraform code added

0 commit comments

Comments
 (0)