opencode-plugin-team-agreements 0.1.4 → 0.2.0
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/CHANGELOG.md +16 -0
- package/dist/index.d.ts +15 -46
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -519
- package/dist/index.js.map +1 -1
- package/dist/index.test.js +49 -57
- package/dist/index.test.js.map +1 -1
- package/dist/utils.d.ts +58 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +572 -0
- package/dist/utils.js.map +1 -0
- package/package.json +1 -1
package/dist/utils.js
ADDED
|
@@ -0,0 +1,572 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal utility functions for the team-agreements plugin.
|
|
3
|
+
*
|
|
4
|
+
* NOTE: These are intentionally NOT exported from the main module entry point
|
|
5
|
+
* because OpenCode's plugin loader iterates through all exports and tries to
|
|
6
|
+
* call them as plugin functions. Only the plugin function should be exported
|
|
7
|
+
* from the main entry point.
|
|
8
|
+
*/
|
|
9
|
+
import { readFile, access } from "fs/promises";
|
|
10
|
+
import { join } from "path";
|
|
11
|
+
import { exec } from "child_process";
|
|
12
|
+
import { promisify } from "util";
|
|
13
|
+
export const execAsync = promisify(exec);
|
|
14
|
+
export const PLUGIN_REPO = "jwilger/opencode-plugin-team-agreements";
|
|
15
|
+
// Using array join to avoid esbuild/tsc issues with ## at start of lines in template literals
|
|
16
|
+
export const COMMAND_TEMPLATE = [
|
|
17
|
+
"You are helping establish or review team agreements for this project. Team agreements define how humans and LLM agents collaborate on the codebase.",
|
|
18
|
+
"",
|
|
19
|
+
"User's request: $ARGUMENTS",
|
|
20
|
+
"",
|
|
21
|
+
"## Overview",
|
|
22
|
+
"",
|
|
23
|
+
"Team agreements are stored in `AGENTS.md` in the project root. This file is automatically loaded by OpenCode, Claude Code, and other compatible agentic tools - no configuration needed.",
|
|
24
|
+
"",
|
|
25
|
+
"## Step 1: Analyze Existing Files",
|
|
26
|
+
"",
|
|
27
|
+
"First, check for existing agent instruction files:",
|
|
28
|
+
"",
|
|
29
|
+
"1. **Read `AGENTS.md`** (if it exists) - OpenCode's native format",
|
|
30
|
+
"2. **Read `CLAUDE.md`** (if it exists) - Claude Code's native format",
|
|
31
|
+
"",
|
|
32
|
+
"Analyze their contents to understand:",
|
|
33
|
+
"- What sections/topics already exist?",
|
|
34
|
+
"- Is there existing team agreement content?",
|
|
35
|
+
"- What's the overall structure and style?",
|
|
36
|
+
"",
|
|
37
|
+
"## Step 2: Determine the Scenario",
|
|
38
|
+
"",
|
|
39
|
+
"Based on what you find, you'll be in one of these scenarios:",
|
|
40
|
+
"",
|
|
41
|
+
"### Scenario A: No existing files",
|
|
42
|
+
"- You'll create a new `AGENTS.md` with team agreements",
|
|
43
|
+
"",
|
|
44
|
+
"### Scenario B: AGENTS.md exists (no CLAUDE.md)",
|
|
45
|
+
"- Present the user with options:",
|
|
46
|
+
" - **Review**: Display current content",
|
|
47
|
+
" - **Amend**: Modify or add to specific sections",
|
|
48
|
+
" - **Add Team Agreements**: Integrate new agreement sections into the existing structure",
|
|
49
|
+
"",
|
|
50
|
+
"### Scenario C: CLAUDE.md exists (no AGENTS.md)",
|
|
51
|
+
"- Analyze the CLAUDE.md content",
|
|
52
|
+
'- Ask the user: "I found a CLAUDE.md file. I\'ll migrate universal rules to AGENTS.md and keep any Claude-specific rules in CLAUDE.md. Does that sound good?"',
|
|
53
|
+
"- Create AGENTS.md with the universal content + team agreements",
|
|
54
|
+
"- Update CLAUDE.md to import AGENTS.md (add `@AGENTS.md` at the top)",
|
|
55
|
+
"- Keep only Claude-specific rules in CLAUDE.md",
|
|
56
|
+
"",
|
|
57
|
+
"### Scenario D: Both files exist",
|
|
58
|
+
"- Analyze both files for:",
|
|
59
|
+
" - **Universal rules** (apply to all agents) → belong in AGENTS.md",
|
|
60
|
+
" - **Claude-specific rules** → stay in CLAUDE.md",
|
|
61
|
+
"- Ask the user about any ambiguous content",
|
|
62
|
+
"- Ensure CLAUDE.md imports AGENTS.md",
|
|
63
|
+
"- Integrate team agreements into AGENTS.md",
|
|
64
|
+
"",
|
|
65
|
+
"## Step 3: Gather Team Agreements",
|
|
66
|
+
"",
|
|
67
|
+
"If establishing new agreements (or the user wants to add/amend), guide them through these core topics ONE question at a time:",
|
|
68
|
+
"",
|
|
69
|
+
"### Core Topics",
|
|
70
|
+
"",
|
|
71
|
+
"#### a. Programming Languages",
|
|
72
|
+
"- What programming language(s) will be used in this project?",
|
|
73
|
+
"- What is each language used for? (e.g., TypeScript for frontend, Rust for backend)",
|
|
74
|
+
"- Are there specific versions or language-specific style guides to follow?",
|
|
75
|
+
"",
|
|
76
|
+
"#### b. Code Quality Standards",
|
|
77
|
+
'- What does "great code" look like for this team?',
|
|
78
|
+
"- How should we prioritize: readability vs. performance vs. simplicity?",
|
|
79
|
+
"- Are there required patterns or anti-patterns to follow/avoid?",
|
|
80
|
+
"- What about error handling conventions?",
|
|
81
|
+
"- Naming conventions for files, functions, variables, types?",
|
|
82
|
+
"",
|
|
83
|
+
"#### c. Commit Message Conventions",
|
|
84
|
+
"- What format should commit messages follow? (Conventional Commits, custom, freeform)",
|
|
85
|
+
"- Are there required elements? (ticket numbers, scope, breaking change indicators)",
|
|
86
|
+
"- Any rules on length, tense, capitalization?",
|
|
87
|
+
"- Should commits be atomic (one logical change per commit)?",
|
|
88
|
+
"",
|
|
89
|
+
"#### d. Integration Workflow",
|
|
90
|
+
"- Trunk-based development or feature branches?",
|
|
91
|
+
"- Pull request requirements? (reviews, approvals, CI checks)",
|
|
92
|
+
"- Who can merge to main/trunk?",
|
|
93
|
+
"- What CI checks must pass before integration?",
|
|
94
|
+
"- Any branch naming conventions?",
|
|
95
|
+
"",
|
|
96
|
+
"#### e. Testing Requirements",
|
|
97
|
+
'- What testing is required before code is considered "done"?',
|
|
98
|
+
"- Are there coverage thresholds?",
|
|
99
|
+
"- What types of tests? (unit, integration, e2e, property-based)",
|
|
100
|
+
"- When should tests be written? (TDD, after implementation, etc.)",
|
|
101
|
+
"",
|
|
102
|
+
"#### f. Amendment Process",
|
|
103
|
+
"- How can these agreements be changed?",
|
|
104
|
+
"- Who has authority to propose/approve changes?",
|
|
105
|
+
"- What's the review/approval process for amendments?",
|
|
106
|
+
"- How should changes be communicated to the team?",
|
|
107
|
+
"",
|
|
108
|
+
"### Gathering Style",
|
|
109
|
+
"",
|
|
110
|
+
"For each topic:",
|
|
111
|
+
"- Ask ONE question at a time",
|
|
112
|
+
"- Discuss trade-offs when relevant",
|
|
113
|
+
"- Confirm understanding before moving on",
|
|
114
|
+
"- Record the team's decision clearly",
|
|
115
|
+
"",
|
|
116
|
+
"### Additional Topics",
|
|
117
|
+
"",
|
|
118
|
+
"After the core topics, ask:",
|
|
119
|
+
'"Are there any additional topics you\'d like to establish agreements for?"',
|
|
120
|
+
"",
|
|
121
|
+
"Suggest potential additional topics if helpful:",
|
|
122
|
+
"- **Architecture decisions** - How to document and track ADRs",
|
|
123
|
+
"- **Dependency management** - How to evaluate and approve new dependencies",
|
|
124
|
+
"- **Documentation standards** - What must be documented, where, in what format",
|
|
125
|
+
"- **LLM autonomy boundaries** - What can LLMs do without asking? What requires human approval?",
|
|
126
|
+
"- **Session handoff protocols** - How to summarize work for the next session/agent",
|
|
127
|
+
"- **Code review process** - What reviewers should look for, turnaround expectations",
|
|
128
|
+
"- **Planning and work breakdown** - How to break down work into tasks",
|
|
129
|
+
"- **Information sharing** - How to share context across sessions and team members",
|
|
130
|
+
"",
|
|
131
|
+
"Continue asking about each additional topic the user wants to cover.",
|
|
132
|
+
"",
|
|
133
|
+
'After discussing additional topics, ask: "Would you like to suggest any of these additional topics',
|
|
134
|
+
"(or others you thought of) to be included as standard topics in the team-agreements plugin?",
|
|
135
|
+
'I can file a GitHub issue for you if you\'d like."',
|
|
136
|
+
"",
|
|
137
|
+
"If the user wants to suggest a topic, use the `suggest_team_agreement_topic` tool to file an issue.",
|
|
138
|
+
"",
|
|
139
|
+
"## Step 4: Intelligent Merging",
|
|
140
|
+
"",
|
|
141
|
+
"When writing to AGENTS.md, **intelligently merge** with existing content:",
|
|
142
|
+
"",
|
|
143
|
+
"1. **Preserve existing structure** - Don't reorganize content the user already has",
|
|
144
|
+
"2. **Add new sections** - Place team agreement sections in logical locations",
|
|
145
|
+
"3. **Avoid duplication** - If similar content exists, enhance rather than duplicate",
|
|
146
|
+
"4. **Maintain voice** - Match the existing document's tone and style",
|
|
147
|
+
"5. **Use clear section headers** - Make team agreements easy to find",
|
|
148
|
+
"",
|
|
149
|
+
"### Merging Guidelines",
|
|
150
|
+
"",
|
|
151
|
+
'- If AGENTS.md has a "Code Standards" section and you\'re adding "Code Quality Standards", merge them',
|
|
152
|
+
"- If AGENTS.md describes the project structure, keep that and add team agreements as a new section",
|
|
153
|
+
"- Use `## Team Agreements` as a parent section if adding multiple agreement topics to an existing file",
|
|
154
|
+
"- If the file is empty or minimal, create a well-structured document from scratch",
|
|
155
|
+
"",
|
|
156
|
+
"## Step 5: Handle CLAUDE.md Coordination",
|
|
157
|
+
"",
|
|
158
|
+
"If CLAUDE.md exists or was created:",
|
|
159
|
+
"",
|
|
160
|
+
"1. Ensure it has `@AGENTS.md` at the top to import the shared rules",
|
|
161
|
+
"2. Keep only Claude-specific content in CLAUDE.md, such as:",
|
|
162
|
+
" - Claude-specific behavior instructions",
|
|
163
|
+
" - Claude-specific tool usage preferences",
|
|
164
|
+
" - Anything that shouldn't apply to other agents",
|
|
165
|
+
"",
|
|
166
|
+
"Example CLAUDE.md after coordination:",
|
|
167
|
+
"```markdown",
|
|
168
|
+
"@AGENTS.md",
|
|
169
|
+
"",
|
|
170
|
+
"# Claude-Specific Instructions",
|
|
171
|
+
"",
|
|
172
|
+
"[Any rules that only apply to Claude Code, not other agents]",
|
|
173
|
+
"```",
|
|
174
|
+
"",
|
|
175
|
+
"## Step 6: Offer Enforcement Setup",
|
|
176
|
+
"",
|
|
177
|
+
"After generating/updating the agreements, use the `detect_enforcement_mechanisms` tool to check what enforcement is already in place, then offer to set up automatic enforcement for agreements that can be enforced programmatically.",
|
|
178
|
+
"",
|
|
179
|
+
"### Enforcement Mechanisms",
|
|
180
|
+
"",
|
|
181
|
+
"#### Pre-commit Hooks (husky, lefthook, pre-commit)",
|
|
182
|
+
"Ideal for: Commit message validation, code formatting, linting, test execution",
|
|
183
|
+
"",
|
|
184
|
+
"#### CI Workflows (GitHub Actions, etc.)",
|
|
185
|
+
"Ideal for: Test coverage, build verification, security scanning, PR checks",
|
|
186
|
+
"",
|
|
187
|
+
"#### GitHub Rulesets / Branch Protection",
|
|
188
|
+
"Ideal for: PR requirements, review policies, merge restrictions",
|
|
189
|
+
"",
|
|
190
|
+
"#### Linting Rules (.eslintrc, biome.json, etc.)",
|
|
191
|
+
"Ideal for: Code style, naming conventions, import organization",
|
|
192
|
+
"",
|
|
193
|
+
"### When Offering Enforcement",
|
|
194
|
+
"",
|
|
195
|
+
"- Only offer enforcement for agreements that can actually be automated",
|
|
196
|
+
"- Explain what the enforcement will do and how it works",
|
|
197
|
+
"- Get explicit confirmation before making changes",
|
|
198
|
+
"- If enforcement tooling already exists, offer to update/extend it rather than replace it",
|
|
199
|
+
"",
|
|
200
|
+
"## Output Format",
|
|
201
|
+
"",
|
|
202
|
+
"When creating or updating AGENTS.md, integrate team agreements appropriately. If creating from scratch or the file is minimal, use this structure:",
|
|
203
|
+
"",
|
|
204
|
+
"```markdown",
|
|
205
|
+
"# Project Name",
|
|
206
|
+
"",
|
|
207
|
+
"[Brief project description if not already present]",
|
|
208
|
+
"",
|
|
209
|
+
"## Team Agreements",
|
|
210
|
+
"",
|
|
211
|
+
"This section defines how our team (humans and LLM agents) collaborates on this codebase.",
|
|
212
|
+
"",
|
|
213
|
+
"### Programming Languages",
|
|
214
|
+
"[Agreements about languages and their usage]",
|
|
215
|
+
"",
|
|
216
|
+
"### Code Quality Standards",
|
|
217
|
+
"[Agreements about what makes good code]",
|
|
218
|
+
"",
|
|
219
|
+
"### Commit Message Conventions",
|
|
220
|
+
"[Agreements about commit message format]",
|
|
221
|
+
"",
|
|
222
|
+
"### Integration Workflow",
|
|
223
|
+
"[Agreements about how code gets integrated]",
|
|
224
|
+
"",
|
|
225
|
+
"### Testing Requirements",
|
|
226
|
+
"[Agreements about testing]",
|
|
227
|
+
"",
|
|
228
|
+
"### Amendment Process",
|
|
229
|
+
"[Agreements about changing these agreements]",
|
|
230
|
+
"",
|
|
231
|
+
"### Additional Topics",
|
|
232
|
+
"[Any additional topics the team added]",
|
|
233
|
+
"",
|
|
234
|
+
"---",
|
|
235
|
+
"*Team agreements last updated: [date]*",
|
|
236
|
+
"```",
|
|
237
|
+
"",
|
|
238
|
+
"## Important Guidelines",
|
|
239
|
+
"",
|
|
240
|
+
"- Be conversational and collaborative",
|
|
241
|
+
"- ONE question at a time - don't overwhelm",
|
|
242
|
+
"- Respect the user's expertise and preferences",
|
|
243
|
+
"- If the user provides a specific request in their message, address that first",
|
|
244
|
+
"- The core topics are a starting point, not an exhaustive list",
|
|
245
|
+
'- Capture the "why" behind decisions, not just the "what"',
|
|
246
|
+
"- When merging, preserve the user's existing content and style",
|
|
247
|
+
"- Always explain what you're about to do before making file changes",
|
|
248
|
+
].join("\n");
|
|
249
|
+
/**
|
|
250
|
+
* Check if a file exists at the given path.
|
|
251
|
+
*/
|
|
252
|
+
export async function fileExists(path) {
|
|
253
|
+
try {
|
|
254
|
+
await access(path);
|
|
255
|
+
return true;
|
|
256
|
+
}
|
|
257
|
+
catch {
|
|
258
|
+
return false;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Check if the gh CLI is installed and authenticated.
|
|
263
|
+
*/
|
|
264
|
+
export async function isGhAvailable() {
|
|
265
|
+
try {
|
|
266
|
+
await execAsync("gh auth status");
|
|
267
|
+
return true;
|
|
268
|
+
}
|
|
269
|
+
catch {
|
|
270
|
+
return false;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Load team agreements from the project directory.
|
|
275
|
+
* Checks AGENTS.md first (primary), then CLAUDE.md (fallback).
|
|
276
|
+
* Returns the content if found, null otherwise.
|
|
277
|
+
*/
|
|
278
|
+
export async function loadTeamAgreements(directory) {
|
|
279
|
+
// Check AGENTS.md first (OpenCode native)
|
|
280
|
+
const agentsPath = join(directory, "AGENTS.md");
|
|
281
|
+
// Check CLAUDE.md as fallback (Claude Code native)
|
|
282
|
+
const claudePath = join(directory, "CLAUDE.md");
|
|
283
|
+
try {
|
|
284
|
+
const content = await readFile(agentsPath, "utf-8");
|
|
285
|
+
return ("## Team Agreements (from AGENTS.md)\n\nThe following team agreements are in effect for this project:\n\n" +
|
|
286
|
+
content);
|
|
287
|
+
}
|
|
288
|
+
catch {
|
|
289
|
+
// Try CLAUDE.md as fallback
|
|
290
|
+
try {
|
|
291
|
+
const content = await readFile(claudePath, "utf-8");
|
|
292
|
+
return ("## Team Agreements (from CLAUDE.md)\n\nThe following team agreements are in effect for this project:\n\n" +
|
|
293
|
+
content);
|
|
294
|
+
}
|
|
295
|
+
catch {
|
|
296
|
+
return null;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Format suggested questions as a markdown list.
|
|
302
|
+
*/
|
|
303
|
+
export function formatQuestionsAsMarkdown(questions) {
|
|
304
|
+
return questions.map((q) => "- " + q).join("\n");
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Build the issue body for a topic suggestion.
|
|
308
|
+
*/
|
|
309
|
+
export function buildTopicIssueBody(args) {
|
|
310
|
+
const questionsFormatted = formatQuestionsAsMarkdown(args.suggested_questions);
|
|
311
|
+
return [
|
|
312
|
+
"## Topic Name",
|
|
313
|
+
args.topic_name,
|
|
314
|
+
"",
|
|
315
|
+
"## Description",
|
|
316
|
+
args.description,
|
|
317
|
+
"",
|
|
318
|
+
"## Suggested Questions",
|
|
319
|
+
questionsFormatted,
|
|
320
|
+
"",
|
|
321
|
+
"## Example Agreement",
|
|
322
|
+
args.example_agreement || "_No example provided_",
|
|
323
|
+
"",
|
|
324
|
+
"## Additional Context",
|
|
325
|
+
"_This issue was automatically created via the team-agreements plugin._",
|
|
326
|
+
].join("\n");
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Detect existing enforcement mechanisms in the project.
|
|
330
|
+
*/
|
|
331
|
+
export async function detectEnforcementMechanisms(directory) {
|
|
332
|
+
const mechanisms = [];
|
|
333
|
+
// Pre-commit hooks
|
|
334
|
+
const huskyPath = join(directory, ".husky");
|
|
335
|
+
const lefthookPath = join(directory, "lefthook.yml");
|
|
336
|
+
const lefthookAltPath = join(directory, ".lefthook.yml");
|
|
337
|
+
const preCommitPath = join(directory, ".pre-commit-config.yaml");
|
|
338
|
+
if (await fileExists(huskyPath)) {
|
|
339
|
+
mechanisms.push({
|
|
340
|
+
type: "pre-commit",
|
|
341
|
+
name: "husky",
|
|
342
|
+
detected: true,
|
|
343
|
+
configFile: ".husky/",
|
|
344
|
+
notes: "Git hooks manager for Node.js projects",
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
if (await fileExists(lefthookPath)) {
|
|
348
|
+
mechanisms.push({
|
|
349
|
+
type: "pre-commit",
|
|
350
|
+
name: "lefthook",
|
|
351
|
+
detected: true,
|
|
352
|
+
configFile: "lefthook.yml",
|
|
353
|
+
notes: "Fast, cross-platform git hooks manager",
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
else if (await fileExists(lefthookAltPath)) {
|
|
357
|
+
mechanisms.push({
|
|
358
|
+
type: "pre-commit",
|
|
359
|
+
name: "lefthook",
|
|
360
|
+
detected: true,
|
|
361
|
+
configFile: ".lefthook.yml",
|
|
362
|
+
notes: "Fast, cross-platform git hooks manager",
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
if (await fileExists(preCommitPath)) {
|
|
366
|
+
mechanisms.push({
|
|
367
|
+
type: "pre-commit",
|
|
368
|
+
name: "pre-commit",
|
|
369
|
+
detected: true,
|
|
370
|
+
configFile: ".pre-commit-config.yaml",
|
|
371
|
+
notes: "Python-based pre-commit framework",
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
// Commit message validation
|
|
375
|
+
const commitlintPath = join(directory, "commitlint.config.js");
|
|
376
|
+
const commitlintCjsPath = join(directory, "commitlint.config.cjs");
|
|
377
|
+
const commitlintJsonPath = join(directory, ".commitlintrc.json");
|
|
378
|
+
if ((await fileExists(commitlintPath)) ||
|
|
379
|
+
(await fileExists(commitlintCjsPath)) ||
|
|
380
|
+
(await fileExists(commitlintJsonPath))) {
|
|
381
|
+
mechanisms.push({
|
|
382
|
+
type: "commit-validation",
|
|
383
|
+
name: "commitlint",
|
|
384
|
+
detected: true,
|
|
385
|
+
configFile: (await fileExists(commitlintPath))
|
|
386
|
+
? "commitlint.config.js"
|
|
387
|
+
: (await fileExists(commitlintCjsPath))
|
|
388
|
+
? "commitlint.config.cjs"
|
|
389
|
+
: ".commitlintrc.json",
|
|
390
|
+
notes: "Lint commit messages against conventional commit format",
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
// Linters
|
|
394
|
+
const eslintPath = join(directory, ".eslintrc.json");
|
|
395
|
+
const eslintJsPath = join(directory, "eslint.config.js");
|
|
396
|
+
const eslintMjsPath = join(directory, "eslint.config.mjs");
|
|
397
|
+
const biomePath = join(directory, "biome.json");
|
|
398
|
+
const biomeJsoncPath = join(directory, "biome.jsonc");
|
|
399
|
+
if ((await fileExists(eslintPath)) ||
|
|
400
|
+
(await fileExists(eslintJsPath)) ||
|
|
401
|
+
(await fileExists(eslintMjsPath))) {
|
|
402
|
+
mechanisms.push({
|
|
403
|
+
type: "linter",
|
|
404
|
+
name: "eslint",
|
|
405
|
+
detected: true,
|
|
406
|
+
configFile: (await fileExists(eslintPath))
|
|
407
|
+
? ".eslintrc.json"
|
|
408
|
+
: (await fileExists(eslintJsPath))
|
|
409
|
+
? "eslint.config.js"
|
|
410
|
+
: "eslint.config.mjs",
|
|
411
|
+
notes: "JavaScript/TypeScript linter",
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
if ((await fileExists(biomePath)) || (await fileExists(biomeJsoncPath))) {
|
|
415
|
+
mechanisms.push({
|
|
416
|
+
type: "linter",
|
|
417
|
+
name: "biome",
|
|
418
|
+
detected: true,
|
|
419
|
+
configFile: (await fileExists(biomePath)) ? "biome.json" : "biome.jsonc",
|
|
420
|
+
notes: "Fast formatter and linter for JS/TS/JSON",
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
// CI Workflows
|
|
424
|
+
const githubWorkflowsPath = join(directory, ".github", "workflows");
|
|
425
|
+
if (await fileExists(githubWorkflowsPath)) {
|
|
426
|
+
mechanisms.push({
|
|
427
|
+
type: "ci",
|
|
428
|
+
name: "github-actions",
|
|
429
|
+
detected: true,
|
|
430
|
+
configFile: ".github/workflows/",
|
|
431
|
+
notes: "GitHub Actions CI/CD workflows",
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
const gitlabCiPath = join(directory, ".gitlab-ci.yml");
|
|
435
|
+
if (await fileExists(gitlabCiPath)) {
|
|
436
|
+
mechanisms.push({
|
|
437
|
+
type: "ci",
|
|
438
|
+
name: "gitlab-ci",
|
|
439
|
+
detected: true,
|
|
440
|
+
configFile: ".gitlab-ci.yml",
|
|
441
|
+
notes: "GitLab CI/CD pipeline",
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
const circleCiPath = join(directory, ".circleci", "config.yml");
|
|
445
|
+
if (await fileExists(circleCiPath)) {
|
|
446
|
+
mechanisms.push({
|
|
447
|
+
type: "ci",
|
|
448
|
+
name: "circleci",
|
|
449
|
+
detected: true,
|
|
450
|
+
configFile: ".circleci/config.yml",
|
|
451
|
+
notes: "CircleCI pipeline",
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
// PR Templates
|
|
455
|
+
const prTemplatePath = join(directory, ".github", "pull_request_template.md");
|
|
456
|
+
const prTemplateAltPath = join(directory, ".github", "PULL_REQUEST_TEMPLATE.md");
|
|
457
|
+
if ((await fileExists(prTemplatePath)) ||
|
|
458
|
+
(await fileExists(prTemplateAltPath))) {
|
|
459
|
+
mechanisms.push({
|
|
460
|
+
type: "pr-template",
|
|
461
|
+
name: "github-pr-template",
|
|
462
|
+
detected: true,
|
|
463
|
+
configFile: (await fileExists(prTemplatePath))
|
|
464
|
+
? ".github/pull_request_template.md"
|
|
465
|
+
: ".github/PULL_REQUEST_TEMPLATE.md",
|
|
466
|
+
notes: "GitHub Pull Request template",
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
// OpenCode configuration
|
|
470
|
+
const opencodePath = join(directory, "opencode.json");
|
|
471
|
+
if (await fileExists(opencodePath)) {
|
|
472
|
+
mechanisms.push({
|
|
473
|
+
type: "opencode",
|
|
474
|
+
name: "opencode-config",
|
|
475
|
+
detected: true,
|
|
476
|
+
configFile: "opencode.json",
|
|
477
|
+
notes: "OpenCode configuration with hooks and plugins",
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
// Formatters
|
|
481
|
+
const prettierPath = join(directory, ".prettierrc");
|
|
482
|
+
const prettierJsonPath = join(directory, ".prettierrc.json");
|
|
483
|
+
const prettierJsPath = join(directory, "prettier.config.js");
|
|
484
|
+
if ((await fileExists(prettierPath)) ||
|
|
485
|
+
(await fileExists(prettierJsonPath)) ||
|
|
486
|
+
(await fileExists(prettierJsPath))) {
|
|
487
|
+
mechanisms.push({
|
|
488
|
+
type: "formatter",
|
|
489
|
+
name: "prettier",
|
|
490
|
+
detected: true,
|
|
491
|
+
configFile: (await fileExists(prettierPath))
|
|
492
|
+
? ".prettierrc"
|
|
493
|
+
: (await fileExists(prettierJsonPath))
|
|
494
|
+
? ".prettierrc.json"
|
|
495
|
+
: "prettier.config.js",
|
|
496
|
+
notes: "Code formatter for JS/TS/CSS/HTML/JSON/MD",
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
return mechanisms;
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Format enforcement detection results as markdown.
|
|
503
|
+
*/
|
|
504
|
+
export function formatEnforcementResults(mechanisms) {
|
|
505
|
+
if (mechanisms.length === 0) {
|
|
506
|
+
return [
|
|
507
|
+
"## Detected Enforcement Mechanisms",
|
|
508
|
+
"",
|
|
509
|
+
"No existing enforcement mechanisms detected. This is a great opportunity to set up automation for your team agreements!",
|
|
510
|
+
"",
|
|
511
|
+
"### Available Options",
|
|
512
|
+
"",
|
|
513
|
+
"You can set up any of the following:",
|
|
514
|
+
"",
|
|
515
|
+
"**Pre-commit Hooks**",
|
|
516
|
+
"- husky (Node.js projects)",
|
|
517
|
+
"- lefthook (cross-platform, fast)",
|
|
518
|
+
"- pre-commit (Python-based, language-agnostic)",
|
|
519
|
+
"",
|
|
520
|
+
"**Commit Message Validation**",
|
|
521
|
+
"- commitlint (conventional commits)",
|
|
522
|
+
"",
|
|
523
|
+
"**Linting/Formatting**",
|
|
524
|
+
"- ESLint (JavaScript/TypeScript)",
|
|
525
|
+
"- Biome (JS/TS/JSON, fast)",
|
|
526
|
+
"- Prettier (formatting)",
|
|
527
|
+
"",
|
|
528
|
+
"**CI/CD**",
|
|
529
|
+
"- GitHub Actions",
|
|
530
|
+
"- GitLab CI",
|
|
531
|
+
"- CircleCI",
|
|
532
|
+
"",
|
|
533
|
+
"**GitHub Features**",
|
|
534
|
+
"- Pull Request templates",
|
|
535
|
+
"- Branch protection rulesets",
|
|
536
|
+
].join("\n");
|
|
537
|
+
}
|
|
538
|
+
const byType = {};
|
|
539
|
+
for (const m of mechanisms) {
|
|
540
|
+
if (!byType[m.type])
|
|
541
|
+
byType[m.type] = [];
|
|
542
|
+
byType[m.type].push(m);
|
|
543
|
+
}
|
|
544
|
+
const lines = [
|
|
545
|
+
"## Detected Enforcement Mechanisms",
|
|
546
|
+
"",
|
|
547
|
+
"The following enforcement mechanisms are already in place:",
|
|
548
|
+
"",
|
|
549
|
+
];
|
|
550
|
+
const typeLabels = {
|
|
551
|
+
"pre-commit": "Pre-commit Hooks",
|
|
552
|
+
"commit-validation": "Commit Message Validation",
|
|
553
|
+
linter: "Linters",
|
|
554
|
+
ci: "CI/CD Pipelines",
|
|
555
|
+
"pr-template": "PR Templates",
|
|
556
|
+
opencode: "OpenCode Configuration",
|
|
557
|
+
formatter: "Formatters",
|
|
558
|
+
};
|
|
559
|
+
for (const [type, mechs] of Object.entries(byType)) {
|
|
560
|
+
lines.push("### " + (typeLabels[type] || type));
|
|
561
|
+
lines.push("");
|
|
562
|
+
for (const m of mechs) {
|
|
563
|
+
lines.push("- **" + m.name + "** (`" + m.configFile + "`): " + m.notes);
|
|
564
|
+
}
|
|
565
|
+
lines.push("");
|
|
566
|
+
}
|
|
567
|
+
lines.push("### Recommendations");
|
|
568
|
+
lines.push("");
|
|
569
|
+
lines.push("Based on what's already set up, consider extending or integrating with these existing tools rather than adding new ones.");
|
|
570
|
+
return lines.join("\n");
|
|
571
|
+
}
|
|
572
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAEhC,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAA;AAExC,MAAM,CAAC,MAAM,WAAW,GAAG,yCAAyC,CAAA;AAEpE,8FAA8F;AAC9F,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,qJAAqJ;IACrJ,EAAE;IACF,4BAA4B;IAC5B,EAAE;IACF,aAAa;IACb,EAAE;IACF,0LAA0L;IAC1L,EAAE;IACF,mCAAmC;IACnC,E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