@devobsessed/code-captain 0.2.0 → 0.2.2
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/bin/install.js +146 -10
- package/copilot/Directory.Build.props +8 -0
- package/copilot/agents/Code Captain.agent.md +16 -18
- package/copilot/copilot-instructions.md +64 -0
- package/copilot/prompts/create-adr.prompt.md +18 -106
- package/copilot/prompts/create-spec.prompt.md +26 -113
- package/copilot/prompts/edit-spec.prompt.md +11 -180
- package/copilot/prompts/execute-task.prompt.md +7 -22
- package/copilot/prompts/explain-code.prompt.md +14 -139
- package/copilot/prompts/initialize.prompt.md +9 -12
- package/copilot/prompts/new-command.prompt.md +25 -213
- package/copilot/prompts/plan-product.prompt.md +15 -306
- package/copilot/prompts/research.prompt.md +12 -139
- package/copilot/prompts/status.prompt.md +37 -365
- package/copilot/prompts/swab.prompt.md +9 -135
- package/manifest.json +100 -84
- package/package.json +12 -13
package/bin/install.js
CHANGED
|
@@ -37,9 +37,10 @@ class CodeCaptainInstaller {
|
|
|
37
37
|
},
|
|
38
38
|
copilot: {
|
|
39
39
|
name: "Copilot",
|
|
40
|
-
description:
|
|
40
|
+
description:
|
|
41
|
+
"VS Code or Visual Studio with GitHub Copilot",
|
|
41
42
|
details:
|
|
42
|
-
"Uses .github/agents/ + .github/prompts/ + .code-captain/docs/",
|
|
43
|
+
"Uses .github/copilot-instructions.md + .github/agents/ + .github/prompts/ + .code-captain/docs/",
|
|
43
44
|
},
|
|
44
45
|
claude: {
|
|
45
46
|
name: "Claude Code",
|
|
@@ -125,7 +126,11 @@ class CodeCaptainInstaller {
|
|
|
125
126
|
".cursor/rules/cc.mdc",
|
|
126
127
|
".cursor/rules/",
|
|
127
128
|
],
|
|
128
|
-
"Copilot Integration": [
|
|
129
|
+
"Copilot Integration": [
|
|
130
|
+
".github/copilot-instructions.md",
|
|
131
|
+
".github/agents/",
|
|
132
|
+
".github/prompts/",
|
|
133
|
+
],
|
|
129
134
|
"Claude Integration": [
|
|
130
135
|
".code-captain/claude/",
|
|
131
136
|
"claude-code/",
|
|
@@ -679,8 +684,18 @@ class CodeCaptainInstaller {
|
|
|
679
684
|
case "copilot":
|
|
680
685
|
return [
|
|
681
686
|
...baseChoices,
|
|
687
|
+
{
|
|
688
|
+
name: "Copilot Instructions (.github/copilot-instructions.md)",
|
|
689
|
+
value: "instructions",
|
|
690
|
+
checked: true,
|
|
691
|
+
},
|
|
682
692
|
{ name: "Copilot Agents", value: "agents", checked: true },
|
|
683
693
|
{ name: "Copilot Prompts", value: "prompts", checked: true },
|
|
694
|
+
{
|
|
695
|
+
name: "VS Solution View (Directory.Build.props)",
|
|
696
|
+
value: "vs-solution",
|
|
697
|
+
checked: false,
|
|
698
|
+
},
|
|
684
699
|
];
|
|
685
700
|
|
|
686
701
|
case "claude":
|
|
@@ -842,6 +857,83 @@ class CodeCaptainInstaller {
|
|
|
842
857
|
}
|
|
843
858
|
}
|
|
844
859
|
|
|
860
|
+
// Install Directory.Build.props with merge support
|
|
861
|
+
async installDirectoryBuildProps() {
|
|
862
|
+
const targetPath = "Directory.Build.props";
|
|
863
|
+
const templateSource = "copilot/Directory.Build.props";
|
|
864
|
+
const marker = 'Label="Code Captain"';
|
|
865
|
+
|
|
866
|
+
// Read template content
|
|
867
|
+
let templateContent;
|
|
868
|
+
if (this.config.localSource) {
|
|
869
|
+
const localPath = path.join(this.config.localSource, templateSource);
|
|
870
|
+
if (!(await fs.pathExists(localPath))) {
|
|
871
|
+
throw new Error(`Template not found: ${localPath}`);
|
|
872
|
+
}
|
|
873
|
+
templateContent = await fs.readFile(localPath, "utf8");
|
|
874
|
+
} else {
|
|
875
|
+
const url = `${this.config.baseUrl}/${templateSource}`;
|
|
876
|
+
const response = await this.fetchWithTimeout(url, {}, 20000);
|
|
877
|
+
if (!response.ok) {
|
|
878
|
+
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
879
|
+
}
|
|
880
|
+
templateContent = await response.text();
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
// Extract the ItemGroup block from template
|
|
884
|
+
const itemGroupMatch = templateContent.match(
|
|
885
|
+
/[ \t]*<ItemGroup Label="Code Captain">[\s\S]*?<\/ItemGroup>/
|
|
886
|
+
);
|
|
887
|
+
if (!itemGroupMatch) {
|
|
888
|
+
throw new Error("Template missing Code Captain ItemGroup");
|
|
889
|
+
}
|
|
890
|
+
const itemGroupBlock = itemGroupMatch[0];
|
|
891
|
+
|
|
892
|
+
const exists = await fs.pathExists(targetPath);
|
|
893
|
+
|
|
894
|
+
if (!exists) {
|
|
895
|
+
// Case 1: File doesn't exist — create from template
|
|
896
|
+
await fs.writeFile(targetPath, templateContent);
|
|
897
|
+
return { action: "created" };
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
// File exists — read it
|
|
901
|
+
const existingContent = await fs.readFile(targetPath, "utf8");
|
|
902
|
+
|
|
903
|
+
if (existingContent.includes(marker)) {
|
|
904
|
+
// Case 3: Already has Code Captain content — replace if changed
|
|
905
|
+
const existingBlock = existingContent.match(
|
|
906
|
+
/[ \t]*<ItemGroup Label="Code Captain">[\s\S]*?<\/ItemGroup>/
|
|
907
|
+
);
|
|
908
|
+
if (existingBlock && existingBlock[0] === itemGroupBlock) {
|
|
909
|
+
return { action: "up-to-date" };
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
// Replace existing block
|
|
913
|
+
await fs.copy(targetPath, `${targetPath}.backup`);
|
|
914
|
+
const updatedContent = existingContent.replace(
|
|
915
|
+
/[ \t]*<ItemGroup Label="Code Captain">[\s\S]*?<\/ItemGroup>/,
|
|
916
|
+
itemGroupBlock
|
|
917
|
+
);
|
|
918
|
+
await fs.writeFile(targetPath, updatedContent);
|
|
919
|
+
return { action: "updated" };
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
// Case 2: File exists, no Code Captain content — inject before </Project>
|
|
923
|
+
await fs.copy(targetPath, `${targetPath}.backup`);
|
|
924
|
+
if (!existingContent.includes("</Project>")) {
|
|
925
|
+
throw new Error(
|
|
926
|
+
"Directory.Build.props is malformed (missing </Project>). Please fix manually."
|
|
927
|
+
);
|
|
928
|
+
}
|
|
929
|
+
const injectedContent = existingContent.replace(
|
|
930
|
+
/<\/Project>/,
|
|
931
|
+
`\n${itemGroupBlock}\n</Project>`
|
|
932
|
+
);
|
|
933
|
+
await fs.writeFile(targetPath, injectedContent);
|
|
934
|
+
return { action: "merged" };
|
|
935
|
+
}
|
|
936
|
+
|
|
845
937
|
// Get IDE-specific file list
|
|
846
938
|
getIDEFiles(selectedIDE, selectedComponents = null) {
|
|
847
939
|
const files = [];
|
|
@@ -897,6 +989,15 @@ class CodeCaptainInstaller {
|
|
|
897
989
|
break;
|
|
898
990
|
|
|
899
991
|
case "copilot":
|
|
992
|
+
// Instructions
|
|
993
|
+
if (includeAll || selectedComponents.includes("instructions")) {
|
|
994
|
+
files.push({
|
|
995
|
+
source: "copilot/copilot-instructions.md",
|
|
996
|
+
target: ".github/copilot-instructions.md",
|
|
997
|
+
component: "instructions",
|
|
998
|
+
});
|
|
999
|
+
}
|
|
1000
|
+
|
|
900
1001
|
// Agents
|
|
901
1002
|
if (includeAll || selectedComponents.includes("agents")) {
|
|
902
1003
|
files.push({
|
|
@@ -1010,6 +1111,17 @@ class CodeCaptainInstaller {
|
|
|
1010
1111
|
spinner.text = `Installing files... (${completed}/${files.length})`;
|
|
1011
1112
|
}
|
|
1012
1113
|
|
|
1114
|
+
// Handle Directory.Build.props for vs-solution component (opt-in only, not in installAll)
|
|
1115
|
+
let vsSolutionResult = null;
|
|
1116
|
+
if (
|
|
1117
|
+
!installOptions.installAll &&
|
|
1118
|
+
selectedComponents &&
|
|
1119
|
+
selectedComponents.includes("vs-solution")
|
|
1120
|
+
) {
|
|
1121
|
+
spinner.text = "Installing Directory.Build.props...";
|
|
1122
|
+
vsSolutionResult = await this.installDirectoryBuildProps();
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1013
1125
|
spinner.succeed(
|
|
1014
1126
|
`${this.ides[selectedIDE].name} integration installed successfully!`
|
|
1015
1127
|
);
|
|
@@ -1031,6 +1143,7 @@ class CodeCaptainInstaller {
|
|
|
1031
1143
|
installOptions.changeInfo.newFiles.length > 0),
|
|
1032
1144
|
backupsCreated: backupPaths.length > 0,
|
|
1033
1145
|
backupPaths: backupPaths,
|
|
1146
|
+
vsSolutionResult,
|
|
1034
1147
|
};
|
|
1035
1148
|
} catch (error) {
|
|
1036
1149
|
spinner.fail("Installation failed");
|
|
@@ -1101,21 +1214,32 @@ class CodeCaptainInstaller {
|
|
|
1101
1214
|
case "copilot":
|
|
1102
1215
|
console.log(
|
|
1103
1216
|
chalk.blue("1.") +
|
|
1104
|
-
" Restart
|
|
1105
|
-
|
|
1217
|
+
" Restart your IDE to load the new files"
|
|
1218
|
+
);
|
|
1219
|
+
console.log(
|
|
1220
|
+
chalk.blue("2.") +
|
|
1221
|
+
" " +
|
|
1222
|
+
chalk.cyan(".github/copilot-instructions.md") +
|
|
1223
|
+
" is automatically included in every Copilot request"
|
|
1224
|
+
);
|
|
1225
|
+
console.log(
|
|
1226
|
+
chalk.bold.yellow("\n VS Code:")
|
|
1106
1227
|
);
|
|
1107
|
-
console.log(chalk.blue("2.") + " Open Copilot Chat in VS Code");
|
|
1108
1228
|
console.log(
|
|
1109
1229
|
chalk.blue("3.") +
|
|
1110
1230
|
" Select the " +
|
|
1111
1231
|
chalk.cyan("Code Captain") +
|
|
1112
|
-
" agent from the agent picker"
|
|
1232
|
+
" agent from the agent picker, or invoke prompts with " +
|
|
1233
|
+
chalk.cyan("/command-name")
|
|
1234
|
+
);
|
|
1235
|
+
console.log(
|
|
1236
|
+
chalk.bold.yellow("\n Visual Studio:")
|
|
1113
1237
|
);
|
|
1114
1238
|
console.log(
|
|
1115
1239
|
chalk.blue("4.") +
|
|
1116
|
-
"
|
|
1117
|
-
chalk.cyan("
|
|
1118
|
-
"
|
|
1240
|
+
" Invoke prompts with " +
|
|
1241
|
+
chalk.cyan("#command-name") +
|
|
1242
|
+
" in Copilot Chat (agents are not supported)"
|
|
1119
1243
|
);
|
|
1120
1244
|
break;
|
|
1121
1245
|
|
|
@@ -1143,6 +1267,18 @@ class CodeCaptainInstaller {
|
|
|
1143
1267
|
break;
|
|
1144
1268
|
}
|
|
1145
1269
|
|
|
1270
|
+
// Show Directory.Build.props result if applicable
|
|
1271
|
+
if (installResult.vsSolutionResult) {
|
|
1272
|
+
const action = installResult.vsSolutionResult.action;
|
|
1273
|
+
const messages = {
|
|
1274
|
+
created: "Created Directory.Build.props — .github/ files now visible in VS Solution Explorer",
|
|
1275
|
+
merged: "Merged Code Captain items into existing Directory.Build.props (backup saved as .backup)",
|
|
1276
|
+
updated: "Updated Code Captain section in Directory.Build.props (backup saved as .backup)",
|
|
1277
|
+
"up-to-date": "Directory.Build.props is already up to date",
|
|
1278
|
+
};
|
|
1279
|
+
console.log(chalk.cyan("\n📁 VS Solution View:"), messages[action]);
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1146
1282
|
console.log(
|
|
1147
1283
|
"\n" + chalk.green("🚀 Ready to start building with Code Captain!")
|
|
1148
1284
|
);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<Project>
|
|
2
|
+
<!-- Code Captain: Make .github/ Copilot files visible in VS Solution Explorer -->
|
|
3
|
+
<ItemGroup Label="Code Captain">
|
|
4
|
+
<None Include=".github\copilot-instructions.md" Link="Code Captain\copilot-instructions.md" />
|
|
5
|
+
<None Include=".github\agents\**\*" Link="Code Captain\agents\%(RecursiveDir)%(Filename)%(Extension)" />
|
|
6
|
+
<None Include=".github\prompts\**\*" Link="Code Captain\prompts\%(RecursiveDir)%(Filename)%(Extension)" />
|
|
7
|
+
</ItemGroup>
|
|
8
|
+
</Project>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
2
|
+
description: "Code Captain - AI Development Partner"
|
|
3
3
|
tools:
|
|
4
4
|
[
|
|
5
5
|
"changes",
|
|
@@ -25,27 +25,25 @@ tools:
|
|
|
25
25
|
]
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
-
# Code Captain
|
|
28
|
+
# Code Captain Agent (VS Code)
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
This agent provides the Code Captain identity in VS Code's agent picker dropdown.
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
**Identity and behavioral rules are defined in `.github/copilot-instructions.md`** which is automatically included in every Copilot request.
|
|
33
33
|
|
|
34
|
-
##
|
|
34
|
+
## Welcome Messages
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
2. **Use available tools efficiently** with GitHub Copilot's capabilities
|
|
48
|
-
3. **Follow established patterns** from the prompt files for consistent execution
|
|
36
|
+
When starting a conversation, randomly select one of these greetings:
|
|
37
|
+
- "All aboard! Code Captain ready to steer your development ship."
|
|
38
|
+
- "Ahoy! Your Code Captain is charting the course to quality code."
|
|
39
|
+
- "Welcome aboard! Code Captain at your service, ready to navigate your codebase."
|
|
40
|
+
- "Greetings! Your Code Captain is here to guide you through smooth sailing."
|
|
41
|
+
- "Code Captain reporting for duty! Let's set sail toward exceptional software."
|
|
42
|
+
- "Ready to embark? Code Captain is here to navigate your development journey."
|
|
43
|
+
- "Permission to come aboard? Code Captain ready to chart your coding adventure."
|
|
44
|
+
- "Steady as she goes! Code Captain prepared to steer your project to success."
|
|
45
|
+
- "Anchors aweigh! Code Captain ready to lead your development expedition."
|
|
46
|
+
- "All hands on deck! Code Captain here to guide your coding voyage."
|
|
49
47
|
|
|
50
48
|
## Available Commands
|
|
51
49
|
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Code Captain - System Instructions
|
|
2
|
+
|
|
3
|
+
You are **Code Captain** - a methodical AI development partner who executes comprehensive software workflows. You challenge ideas that don't make technical or business sense, surface concerns early, and never just agree to be agreeable. You are direct, thorough, and opinionated when it matters.
|
|
4
|
+
|
|
5
|
+
## Command Execution Protocol
|
|
6
|
+
|
|
7
|
+
When a user invokes any Code Captain command, you MUST:
|
|
8
|
+
|
|
9
|
+
1. **Display a welcome greeting** - Randomly select one of these:
|
|
10
|
+
- "All aboard! Code Captain ready to steer your development ship."
|
|
11
|
+
- "Ahoy! Your Code Captain is charting the course to quality code."
|
|
12
|
+
- "Welcome aboard! Code Captain at your service, ready to navigate your codebase."
|
|
13
|
+
- "Greetings! Your Code Captain is here to guide you through smooth sailing."
|
|
14
|
+
- "Code Captain reporting for duty! Let's set sail toward exceptional software."
|
|
15
|
+
- "Ready to embark? Code Captain is here to navigate your development journey."
|
|
16
|
+
- "Permission to come aboard? Code Captain ready to chart your coding adventure."
|
|
17
|
+
- "Steady as she goes! Code Captain prepared to steer your project to success."
|
|
18
|
+
- "Anchors aweigh! Code Captain ready to lead your development expedition."
|
|
19
|
+
- "All hands on deck! Code Captain here to guide your coding voyage."
|
|
20
|
+
2. **Execute the command workflow immediately** - Follow the instructions in the prompt file exactly. Do NOT describe or summarize the instructions back to the user. Act on them.
|
|
21
|
+
3. **Use available tools efficiently** - Leverage all available IDE capabilities (codebase search, file editing, terminal commands, etc.)
|
|
22
|
+
|
|
23
|
+
## File Organization
|
|
24
|
+
|
|
25
|
+
All Code Captain output is organized under `.code-captain/`:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
.code-captain/
|
|
29
|
+
├── docs/ # Generated documentation (tech-stack, code-style, objective, architecture)
|
|
30
|
+
├── research/ # Technical research and analysis
|
|
31
|
+
├── decision-records/ # Architecture Decision Records
|
|
32
|
+
├── explanations/ # Code explanations with diagrams
|
|
33
|
+
├── specs/ # Requirements, specifications, and tasks
|
|
34
|
+
└── product/ # Product planning documents
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Available Commands
|
|
38
|
+
|
|
39
|
+
### Core Development Workflow
|
|
40
|
+
- `create-spec` - Generate feature specifications using a contract-first approach
|
|
41
|
+
- `edit-spec` - Modify existing specifications with change tracking
|
|
42
|
+
- `execute-task` - Execute implementation tasks using TDD from specifications
|
|
43
|
+
- `initialize` - Analyze and set up project foundation with documentation
|
|
44
|
+
- `plan-product` - Transform product ideas into comprehensive plans
|
|
45
|
+
|
|
46
|
+
### Analysis & Quality
|
|
47
|
+
- `create-adr` - Create Architecture Decision Records with research
|
|
48
|
+
- `research` - Conduct systematic research using structured phases
|
|
49
|
+
- `explain-code` - Generate comprehensive code explanations with diagrams
|
|
50
|
+
- `status` - Provide comprehensive project status with next actions
|
|
51
|
+
- `swab` - Make one focused code improvement (Boy Scout Rule)
|
|
52
|
+
|
|
53
|
+
### Meta
|
|
54
|
+
- `new-command` - Create new Code Captain commands following established patterns
|
|
55
|
+
|
|
56
|
+
## Behavioral Rules
|
|
57
|
+
|
|
58
|
+
- **Challenge ideas** - If a requirement seems technically infeasible, the scope is too large, or the approach conflicts with existing patterns, say so directly. Suggest alternatives.
|
|
59
|
+
- **Be methodical** - Follow structured phases. Don't skip steps. Track progress.
|
|
60
|
+
- **Contract-first** - For specification commands, establish agreement before creating files. Never presume what to build.
|
|
61
|
+
- **One question at a time** - During clarification rounds, ask a single focused question targeting the highest-impact unknown.
|
|
62
|
+
- **Codebase-aware** - Scan the existing codebase before making recommendations. Align with existing patterns and architecture.
|
|
63
|
+
- **Test-driven** - When implementing, write tests first. Zero tolerance for failing tests.
|
|
64
|
+
- **Conservative** - When uncertain, ask. When making changes, prefer small and safe over ambitious and risky.
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
agent:
|
|
2
|
+
agent: agent
|
|
3
|
+
description: "Create Architecture Decision Records with research and analysis"
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
# Create ADR
|
|
6
|
+
# You are executing the Create ADR command.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
You MUST follow these instructions exactly. Do NOT describe this process — execute it.
|
|
8
9
|
|
|
9
|
-
Create comprehensive Architecture Decision
|
|
10
|
+
Your mission: Create a comprehensive Architecture Decision Record (ADR) that documents an architectural decision with clear rationale, alternatives considered, and consequences through a structured analysis and review process.
|
|
10
11
|
|
|
11
12
|
## When to Use
|
|
12
13
|
|
|
@@ -20,14 +21,12 @@ Create comprehensive Architecture Decision Records (ADRs) that systematically do
|
|
|
20
21
|
|
|
21
22
|
## Prerequisites
|
|
22
23
|
|
|
23
|
-
**MANDATORY:**
|
|
24
|
+
**MANDATORY:** Automatically execute research if no relevant research exists. The ADR creation process will:
|
|
24
25
|
|
|
25
26
|
1. Check for existing research on the decision topic
|
|
26
27
|
2. If no research found: **automatically read and execute** the complete research workflow from `/research`
|
|
27
28
|
3. Only proceed with ADR creation after research is completed and documented
|
|
28
29
|
|
|
29
|
-
## Command Process
|
|
30
|
-
|
|
31
30
|
### Step 0: Check for Existing Research and Auto-Execute if Missing
|
|
32
31
|
|
|
33
32
|
**Objective:** Ensure comprehensive research exists before creating ADR - automatically execute research if missing
|
|
@@ -44,11 +43,11 @@ Create comprehensive Architecture Decision Records (ADRs) that systematically do
|
|
|
44
43
|
|
|
45
44
|
```
|
|
46
45
|
If no relevant research found:
|
|
47
|
-
"
|
|
46
|
+
"No existing research found for this architectural decision.
|
|
48
47
|
|
|
49
48
|
Architecture Decision Records require comprehensive research to document alternatives properly.
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
AUTOMATICALLY EXECUTING RESEARCH WORKFLOW FIRST...
|
|
52
51
|
|
|
53
52
|
Reading research workflow and executing complete research process..."
|
|
54
53
|
```
|
|
@@ -134,7 +133,7 @@ Create comprehensive Architecture Decision Records (ADRs) that systematically do
|
|
|
134
133
|
|
|
135
134
|
### Step 3: Research Alternatives and Evaluate Options
|
|
136
135
|
|
|
137
|
-
**Objective:** Systematically research and evaluate alternative approaches
|
|
136
|
+
**Objective:** Systematically research and evaluate alternative approaches
|
|
138
137
|
|
|
139
138
|
**Research Actions:**
|
|
140
139
|
|
|
@@ -241,58 +240,49 @@ Create markdown file: `.code-captain/decision-records/NNNN-decision-title.md` us
|
|
|
241
240
|
|
|
242
241
|
## Considered Options
|
|
243
242
|
|
|
244
|
-
### Option 1: [Name of option
|
|
243
|
+
### Option 1: [Name of option]
|
|
245
244
|
|
|
246
245
|
**Description:** [Brief description of this approach]
|
|
247
246
|
|
|
248
247
|
**Pros:**
|
|
249
|
-
|
|
250
248
|
- [Positive aspect 1]
|
|
251
249
|
- [Positive aspect 2]
|
|
252
250
|
|
|
253
251
|
**Cons:**
|
|
254
|
-
|
|
255
252
|
- [Negative aspect 1]
|
|
256
253
|
- [Negative aspect 2]
|
|
257
254
|
|
|
258
255
|
**Effort:** [Implementation effort assessment]
|
|
259
|
-
|
|
260
256
|
**Risk:** [Risk level and key risks]
|
|
261
257
|
|
|
262
|
-
### Option 2: [Name of option
|
|
258
|
+
### Option 2: [Name of option]
|
|
263
259
|
|
|
264
260
|
**Description:** [Brief description of this approach]
|
|
265
261
|
|
|
266
262
|
**Pros:**
|
|
267
|
-
|
|
268
263
|
- [Positive aspect 1]
|
|
269
264
|
- [Positive aspect 2]
|
|
270
265
|
|
|
271
266
|
**Cons:**
|
|
272
|
-
|
|
273
267
|
- [Negative aspect 1]
|
|
274
268
|
- [Negative aspect 2]
|
|
275
269
|
|
|
276
270
|
**Effort:** [Implementation effort assessment]
|
|
277
|
-
|
|
278
271
|
**Risk:** [Risk level and key risks]
|
|
279
272
|
|
|
280
|
-
### Option 3: [Name of option
|
|
273
|
+
### Option 3: [Name of option]
|
|
281
274
|
|
|
282
275
|
**Description:** [Brief description of this approach]
|
|
283
276
|
|
|
284
277
|
**Pros:**
|
|
285
|
-
|
|
286
278
|
- [Positive aspect 1]
|
|
287
279
|
- [Positive aspect 2]
|
|
288
280
|
|
|
289
281
|
**Cons:**
|
|
290
|
-
|
|
291
282
|
- [Negative aspect 1]
|
|
292
283
|
- [Negative aspect 2]
|
|
293
284
|
|
|
294
285
|
**Effort:** [Implementation effort assessment]
|
|
295
|
-
|
|
296
286
|
**Risk:** [Risk level and key risks]
|
|
297
287
|
|
|
298
288
|
## Decision Outcome
|
|
@@ -311,15 +301,15 @@ Create markdown file: `.code-captain/decision-records/NNNN-decision-title.md` us
|
|
|
311
301
|
|
|
312
302
|
### Positive Consequences
|
|
313
303
|
|
|
314
|
-
- [Positive outcome 1
|
|
315
|
-
- [Positive outcome 2
|
|
316
|
-
- [Positive outcome 3
|
|
304
|
+
- [Positive outcome 1]
|
|
305
|
+
- [Positive outcome 2]
|
|
306
|
+
- [Positive outcome 3]
|
|
317
307
|
|
|
318
308
|
### Negative Consequences
|
|
319
309
|
|
|
320
|
-
- [Negative outcome 1
|
|
321
|
-
- [Negative outcome 2
|
|
322
|
-
- [Negative outcome 3
|
|
310
|
+
- [Negative outcome 1]
|
|
311
|
+
- [Negative outcome 2]
|
|
312
|
+
- [Negative outcome 3]
|
|
323
313
|
|
|
324
314
|
### Mitigation Strategies
|
|
325
315
|
|
|
@@ -355,8 +345,6 @@ Create markdown file: `.code-captain/decision-records/NNNN-decision-title.md` us
|
|
|
355
345
|
- [Link to related ADRs]
|
|
356
346
|
- [Prior research documents from .code-captain/research/ (if applicable)]
|
|
357
347
|
- [External documentation, articles, or research]
|
|
358
|
-
- [Code repositories or examples]
|
|
359
|
-
- [Meeting notes or discussion records]
|
|
360
348
|
|
|
361
349
|
## Related Decisions
|
|
362
350
|
|
|
@@ -392,79 +380,3 @@ Create markdown file: `.code-captain/decision-records/NNNN-decision-title.md` us
|
|
|
392
380
|
- ADRs stored in `.code-captain/decision-records/`
|
|
393
381
|
- Research documents in `.code-captain/research/`
|
|
394
382
|
- Sequential numbering for easy reference
|
|
395
|
-
|
|
396
|
-
## Best Practices
|
|
397
|
-
|
|
398
|
-
### Decision Scope and Focus
|
|
399
|
-
|
|
400
|
-
- Focus on one significant architectural decision per ADR
|
|
401
|
-
- Clearly separate the problem from potential solutions
|
|
402
|
-
- Include sufficient context for future readers to understand the decision
|
|
403
|
-
- Document the decision even if it seems obvious at the time
|
|
404
|
-
- Consider both technical and business implications
|
|
405
|
-
|
|
406
|
-
### Alternatives Analysis
|
|
407
|
-
|
|
408
|
-
- Always include the "do nothing" or "status quo" option
|
|
409
|
-
- Research industry standards and best practices
|
|
410
|
-
- Consider both short-term and long-term implications
|
|
411
|
-
- Include effort and risk assessments for each option
|
|
412
|
-
- Seek diverse perspectives and expert opinions
|
|
413
|
-
|
|
414
|
-
### Decision Documentation
|
|
415
|
-
|
|
416
|
-
- Use clear, jargon-free language that new team members can understand
|
|
417
|
-
- Include relevant diagrams, code examples, or architectural sketches
|
|
418
|
-
- Reference external sources and supporting documentation
|
|
419
|
-
- Document both positive and negative consequences honestly
|
|
420
|
-
- Plan for decision review and potential revision
|
|
421
|
-
|
|
422
|
-
### Stakeholder Engagement
|
|
423
|
-
|
|
424
|
-
- Involve all teams affected by the architectural decision
|
|
425
|
-
- Allow time for thoughtful review and feedback
|
|
426
|
-
- Document dissenting opinions and how they were addressed
|
|
427
|
-
- Ensure decision makers have sufficient context and time
|
|
428
|
-
- Follow up on implementation and measure success
|
|
429
|
-
|
|
430
|
-
### ADR Management
|
|
431
|
-
|
|
432
|
-
- Maintain sequential numbering for easy reference
|
|
433
|
-
- Store ADRs in version control alongside code
|
|
434
|
-
- Link related ADRs to show decision evolution
|
|
435
|
-
- Update status when decisions are superseded or deprecated
|
|
436
|
-
- Regular review of ADR effectiveness and team satisfaction
|
|
437
|
-
|
|
438
|
-
## Common Pitfalls to Avoid
|
|
439
|
-
|
|
440
|
-
### Decision Process Issues
|
|
441
|
-
|
|
442
|
-
- Rushing to document a decision without proper analysis
|
|
443
|
-
- Making decisions in isolation without stakeholder input
|
|
444
|
-
- Failing to research alternative approaches thoroughly
|
|
445
|
-
- Not considering long-term consequences and evolution
|
|
446
|
-
- Avoiding difficult trade-off discussions
|
|
447
|
-
|
|
448
|
-
### Documentation Problems
|
|
449
|
-
|
|
450
|
-
- Writing ADRs that are too technical for business stakeholders
|
|
451
|
-
- Failing to include sufficient context for future understanding
|
|
452
|
-
- Not updating ADR status when decisions change
|
|
453
|
-
- Creating ADRs for trivial decisions that don't warrant documentation
|
|
454
|
-
- Writing overly long ADRs that obscure the key decision
|
|
455
|
-
|
|
456
|
-
### Team and Process Challenges
|
|
457
|
-
|
|
458
|
-
- Not establishing clear decision-making authority
|
|
459
|
-
- Failing to follow up on implementation and monitoring
|
|
460
|
-
- Creating ADRs after decisions are already implemented
|
|
461
|
-
- Not linking ADRs to related architectural documentation
|
|
462
|
-
- Ignoring dissenting opinions without proper consideration
|
|
463
|
-
|
|
464
|
-
### Maintenance and Evolution
|
|
465
|
-
|
|
466
|
-
- Letting ADRs become stale or outdated
|
|
467
|
-
- Not reviewing and learning from past decisions
|
|
468
|
-
- Failing to update related ADRs when superseding decisions
|
|
469
|
-
- Not considering the cumulative effect of multiple ADRs
|
|
470
|
-
- Avoiding difficult conversations about failed decisions
|