@mclawnet/agent 0.5.9 → 0.6.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/cli.js +168 -61
- package/dist/__tests__/cli.test.d.ts +2 -0
- package/dist/__tests__/cli.test.d.ts.map +1 -0
- package/dist/__tests__/service-config.test.d.ts +2 -0
- package/dist/__tests__/service-config.test.d.ts.map +1 -0
- package/dist/__tests__/service-linux.test.d.ts +2 -0
- package/dist/__tests__/service-linux.test.d.ts.map +1 -0
- package/dist/__tests__/service-macos.test.d.ts +2 -0
- package/dist/__tests__/service-macos.test.d.ts.map +1 -0
- package/dist/__tests__/service-windows.test.d.ts +2 -0
- package/dist/__tests__/service-windows.test.d.ts.map +1 -0
- package/dist/backend-adapter.d.ts +2 -0
- package/dist/backend-adapter.d.ts.map +1 -1
- package/dist/chunk-CBZIH6FY.js +93 -0
- package/dist/chunk-CBZIH6FY.js.map +1 -0
- package/dist/{chunk-KHPEQTWF.js → chunk-GLO5OZAY.js} +203 -213
- package/dist/chunk-GLO5OZAY.js.map +1 -0
- package/dist/chunk-RO47ET27.js +88 -0
- package/dist/chunk-RO47ET27.js.map +1 -0
- package/dist/hub-connection.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/linux-6AR7SXHW.js +176 -0
- package/dist/linux-6AR7SXHW.js.map +1 -0
- package/dist/macos-XVPWIH4C.js +174 -0
- package/dist/macos-XVPWIH4C.js.map +1 -0
- package/dist/service/config.d.ts +19 -0
- package/dist/service/config.d.ts.map +1 -0
- package/dist/service/index.d.ts +6 -0
- package/dist/service/index.d.ts.map +1 -0
- package/dist/service/index.js +47 -0
- package/dist/service/index.js.map +1 -0
- package/dist/service/linux.d.ts +18 -0
- package/dist/service/linux.d.ts.map +1 -0
- package/dist/service/macos.d.ts +18 -0
- package/dist/service/macos.d.ts.map +1 -0
- package/dist/service/types.d.ts +19 -0
- package/dist/service/types.d.ts.map +1 -0
- package/dist/service/windows.d.ts +18 -0
- package/dist/service/windows.d.ts.map +1 -0
- package/dist/session-manager.d.ts +4 -7
- package/dist/session-manager.d.ts.map +1 -1
- package/dist/skill-loader.d.ts +8 -0
- package/dist/skill-loader.d.ts.map +1 -0
- package/dist/start.d.ts.map +1 -1
- package/dist/start.js +2 -1
- package/dist/windows-NLONSCDA.js +165 -0
- package/dist/windows-NLONSCDA.js.map +1 -0
- package/package.json +7 -5
- package/skills/academic-search/SKILL.md +147 -0
- package/skills/architecture/SKILL.md +294 -0
- package/skills/changelog-generator/SKILL.md +112 -0
- package/skills/chart-visualization/SKILL.md +183 -0
- package/skills/code-review/SKILL.md +304 -0
- package/skills/codebase-health/SKILL.md +281 -0
- package/skills/consulting-analysis/SKILL.md +584 -0
- package/skills/content-research-writer/SKILL.md +546 -0
- package/skills/data-analysis/SKILL.md +194 -0
- package/skills/deep-research/SKILL.md +198 -0
- package/skills/docx/SKILL.md +211 -0
- package/skills/github-deep-research/SKILL.md +207 -0
- package/skills/image-generation/SKILL.md +209 -0
- package/skills/lead-research-assistant/SKILL.md +207 -0
- package/skills/mcp-builder/SKILL.md +304 -0
- package/skills/meeting-insights-analyzer/SKILL.md +335 -0
- package/skills/pair-programming/SKILL.md +196 -0
- package/skills/pdf/SKILL.md +309 -0
- package/skills/performance-analysis/SKILL.md +261 -0
- package/skills/podcast-generation/SKILL.md +224 -0
- package/skills/pptx/SKILL.md +497 -0
- package/skills/project-learnings/SKILL.md +280 -0
- package/skills/security-audit/SKILL.md +211 -0
- package/skills/skill-creator/SKILL.md +200 -0
- package/skills/technical-writing/SKILL.md +286 -0
- package/skills/testing/SKILL.md +363 -0
- package/skills/video-generation/SKILL.md +247 -0
- package/skills/web-design-guidelines/SKILL.md +203 -0
- package/skills/webapp-testing/SKILL.md +162 -0
- package/skills/workflow-automation/SKILL.md +299 -0
- package/skills/xlsx/SKILL.md +305 -0
- package/dist/chunk-KHPEQTWF.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mclawnet/agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -13,18 +13,20 @@
|
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
15
|
"dist",
|
|
16
|
-
"cli.js"
|
|
16
|
+
"cli.js",
|
|
17
|
+
"skills"
|
|
17
18
|
],
|
|
18
19
|
"publishConfig": {
|
|
19
20
|
"access": "public"
|
|
20
21
|
},
|
|
21
22
|
"dependencies": {
|
|
23
|
+
"commander": "^14.0.3",
|
|
22
24
|
"ws": "^8.19.0",
|
|
23
|
-
"@mclawnet/
|
|
25
|
+
"@mclawnet/claude-adapter": "0.1.1",
|
|
26
|
+
"@mclawnet/swarm": "0.1.0",
|
|
24
27
|
"@mclawnet/logger": "0.1.1",
|
|
25
28
|
"@mclawnet/memory": "0.1.0",
|
|
26
|
-
"@mclawnet/
|
|
27
|
-
"@mclawnet/claude-adapter": "0.1.1"
|
|
29
|
+
"@mclawnet/shared": "0.1.0"
|
|
28
30
|
},
|
|
29
31
|
"devDependencies": {
|
|
30
32
|
"@types/node": "^22",
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: academic-search
|
|
3
|
+
description: Search and analyze academic literature across arXiv, Google Scholar, Semantic Scholar, and PubMed. Use when asked to find research papers, conduct a literature review, summarize academic findings, or investigate the state of the art on a scientific or technical topic.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Academic Search
|
|
8
|
+
|
|
9
|
+
A systematic academic literature search and analysis skill that helps researchers find, evaluate, and synthesize scholarly papers across multiple databases. Follows a structured five-phase process: define scope, search, filter, analyze, and synthesize.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
Activate this skill when:
|
|
14
|
+
- Searching for academic papers on a specific topic
|
|
15
|
+
- Conducting a literature review or survey
|
|
16
|
+
- Investigating the state of the art in a research area
|
|
17
|
+
- Finding seminal or highly-cited papers on a subject
|
|
18
|
+
- Summarizing or explaining academic papers
|
|
19
|
+
- Comparing research methodologies or findings across studies
|
|
20
|
+
- Building a bibliography or reference list for a project
|
|
21
|
+
|
|
22
|
+
## When NOT to Use
|
|
23
|
+
|
|
24
|
+
- **General web research** — use the `deep-research` skill for non-academic topics
|
|
25
|
+
- **GitHub or open source research** — use the `github-deep-research` skill
|
|
26
|
+
- **News or current events** — use `deep-research` with web search
|
|
27
|
+
- **Internal codebase questions** — search the code directly
|
|
28
|
+
|
|
29
|
+
## Search Process
|
|
30
|
+
|
|
31
|
+
Follow these five phases in order. Complete each phase before moving to the next.
|
|
32
|
+
|
|
33
|
+
### Phase 1: Define Scope
|
|
34
|
+
|
|
35
|
+
Before searching, establish clear boundaries for the literature search.
|
|
36
|
+
|
|
37
|
+
- **Research question**: State the specific question in one or two sentences.
|
|
38
|
+
- **Key concepts**: Break the topic into 3-5 core concepts or themes.
|
|
39
|
+
- **Inclusion criteria**: Date range, languages, publication types, domains.
|
|
40
|
+
- **Exclusion criteria**: Non-peer-reviewed, tangentially related, outdated methods.
|
|
41
|
+
- **Depth target**: Broad survey (20-50 papers) or focused review (5-15 papers).
|
|
42
|
+
|
|
43
|
+
Ask the user to confirm scope before proceeding.
|
|
44
|
+
|
|
45
|
+
### Phase 2: Search
|
|
46
|
+
|
|
47
|
+
**Query formulation principles:**
|
|
48
|
+
- Use Boolean operators: `(transformer OR attention mechanism) AND (machine translation)`
|
|
49
|
+
- Include synonyms and alternate terminology for key concepts
|
|
50
|
+
- Start broad, then narrow based on initial result volume
|
|
51
|
+
|
|
52
|
+
**Database-specific guidance:**
|
|
53
|
+
|
|
54
|
+
| Database | Best For | Query Tips |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| **arXiv** | CS, physics, math | Search by category (cs.CL, cs.CV). Check recent preprints. |
|
|
57
|
+
| **Google Scholar** | Cross-disciplinary | Use "cited by" and "related articles" for discovery. |
|
|
58
|
+
| **Semantic Scholar** | AI/ML, NLP, biomedical | Leverage citation graphs and TLDR summaries. |
|
|
59
|
+
| **PubMed** | Biomedical, clinical | Use MeSH terms. Filter by study type (RCT, meta-analysis). |
|
|
60
|
+
|
|
61
|
+
**Search strategy:**
|
|
62
|
+
1. Run the primary query on 2-3 databases.
|
|
63
|
+
2. Identify 3-5 highly relevant seed papers from initial results.
|
|
64
|
+
3. Use citation chaining: check references (backward) and citing papers (forward).
|
|
65
|
+
4. Refine queries if initial results miss key aspects of the topic.
|
|
66
|
+
|
|
67
|
+
### Phase 3: Filter and Evaluate
|
|
68
|
+
|
|
69
|
+
**Quality signals (in order of reliability):**
|
|
70
|
+
1. **Venue**: Recognized peer-reviewed journal or top-tier conference (NeurIPS, ACL, Nature, JAMA).
|
|
71
|
+
2. **Citation count**: High citations relative to paper age. Normalize by field and year.
|
|
72
|
+
3. **Methodology rigor**: Clear experimental design, appropriate baselines, reproducible results.
|
|
73
|
+
4. **Recency**: For fast-moving fields, prefer last 2-3 years. For established fields, include seminal older works.
|
|
74
|
+
|
|
75
|
+
**Red flags:** Predatory journals, no experimental validation, unsupported claims, missing baselines.
|
|
76
|
+
|
|
77
|
+
### Phase 4: Analyze
|
|
78
|
+
|
|
79
|
+
For each selected paper, extract:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
### [Paper Title]
|
|
83
|
+
- **Authors**: [Names] | **Year**: [Year] | **Venue**: [Journal/Conference]
|
|
84
|
+
- **Citations**: [Count] | **URL/DOI**: [Link]
|
|
85
|
+
- **Problem**: What problem does this paper address?
|
|
86
|
+
- **Method**: What approach or technique is proposed?
|
|
87
|
+
- **Key results**: Main quantitative or qualitative findings
|
|
88
|
+
- **Limitations**: Acknowledged or observed limitations
|
|
89
|
+
- **Relevance**: [High/Medium/Low] to the research question
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Reading strategy:** Abstract and conclusion first, then figures and tables, then introduction. Read methodology only for High-relevance papers.
|
|
93
|
+
|
|
94
|
+
### Phase 5: Synthesize
|
|
95
|
+
|
|
96
|
+
- Identify common themes, agreements, and contradictions across studies.
|
|
97
|
+
- Group papers by methodology, finding, or perspective.
|
|
98
|
+
- Note gaps in the literature where further research is needed.
|
|
99
|
+
- Highlight how ideas in the field evolved over time.
|
|
100
|
+
- Draw conclusions supported by the body of evidence, not single papers.
|
|
101
|
+
|
|
102
|
+
## Output Format
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
# Literature Review: [Topic]
|
|
106
|
+
|
|
107
|
+
## Research Question
|
|
108
|
+
[1-2 sentence statement]
|
|
109
|
+
|
|
110
|
+
## Search Summary
|
|
111
|
+
- **Databases searched**: [List]
|
|
112
|
+
- **Date range**: [Start - End]
|
|
113
|
+
- **Papers screened**: [N] | **Papers included**: [N]
|
|
114
|
+
|
|
115
|
+
## Key Findings
|
|
116
|
+
### Theme 1: [Title]
|
|
117
|
+
[Summary across multiple papers. Cite using [Author, Year] format.]
|
|
118
|
+
### Theme 2: [Title]
|
|
119
|
+
[Summary]
|
|
120
|
+
|
|
121
|
+
## State of the Art
|
|
122
|
+
[Current best methods/results/understanding, with citations]
|
|
123
|
+
|
|
124
|
+
## Open Questions and Gaps
|
|
125
|
+
- [Gap 1]
|
|
126
|
+
- [Gap 2]
|
|
127
|
+
|
|
128
|
+
## References
|
|
129
|
+
1. Author A et al. (Year). "Title." *Venue*. DOI/URL
|
|
130
|
+
2. Author B et al. (Year). "Title." *Venue*. DOI/URL
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Citation Management
|
|
134
|
+
|
|
135
|
+
- Use **[Author, Year]** for in-text citations (e.g., [Vaswani et al., 2017]).
|
|
136
|
+
- For 3+ authors, use first author followed by "et al."
|
|
137
|
+
- In References, include: all authors, year, full title, venue, and DOI or URL.
|
|
138
|
+
- Sort references by first appearance or alphabetically, per user preference.
|
|
139
|
+
- Flag any paper lacking a DOI or stable URL so the user can verify access.
|
|
140
|
+
|
|
141
|
+
## Guidelines
|
|
142
|
+
|
|
143
|
+
- **Do not fabricate papers.** Never invent titles, authors, or results. If unsure whether a paper exists, say so.
|
|
144
|
+
- **Acknowledge knowledge limits.** For very recent work, recommend the user search databases directly and share results for analysis.
|
|
145
|
+
- **Prefer primary sources.** Cite the original paper, not a blog post or secondary summary.
|
|
146
|
+
- **Be explicit about uncertainty.** If you recall a result but not exact numbers, state the figures are approximate.
|
|
147
|
+
- **Adapt depth to the request.** A quick "find me 3 papers on X" needs a different response than "conduct a full literature review."
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: architecture
|
|
3
|
+
description: Analyze and design software architecture with focus on scalability, maintainability, and clean separation of concerns. Use when planning new features, refactoring systems, evaluating tech debt, or making architectural decisions that affect multiple components.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Software Architecture
|
|
7
|
+
|
|
8
|
+
Analyze and design software architecture for scalable, maintainable systems. This skill provides a systematic framework for architectural analysis, design principles, pattern selection, and decision documentation.
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Architecture work spans three activities:
|
|
13
|
+
|
|
14
|
+
1. **Analysis** — Understanding an existing system's structure, dependencies, and quality attributes
|
|
15
|
+
2. **Design** — Proposing changes or new structures that satisfy requirements and constraints
|
|
16
|
+
3. **Decision** — Choosing among alternatives with explicit trade-off reasoning and documentation
|
|
17
|
+
|
|
18
|
+
Every architectural recommendation should be grounded in concrete analysis of the codebase, not abstract theory. Read the code, map the dependencies, then advise.
|
|
19
|
+
|
|
20
|
+
## When to Use
|
|
21
|
+
|
|
22
|
+
- Planning a new feature that touches multiple modules or services
|
|
23
|
+
- Refactoring a system to reduce coupling or improve scalability
|
|
24
|
+
- Making technology choices (database, message broker, framework)
|
|
25
|
+
- Evaluating technical debt and prioritizing remediation
|
|
26
|
+
- Reviewing a proposed architecture before implementation begins
|
|
27
|
+
- Breaking a monolith into services or reorganizing a monorepo
|
|
28
|
+
- Designing API contracts between teams or systems
|
|
29
|
+
|
|
30
|
+
## When NOT to Use
|
|
31
|
+
|
|
32
|
+
- **Implementation details** — Use the pair-programming skill for writing code
|
|
33
|
+
- **Code-level review** — Use the code-review skill for reviewing diffs and PRs
|
|
34
|
+
- **Test design** — Use the testing skill for test strategy and coverage
|
|
35
|
+
- **Quick bug fixes** — Architecture analysis is overkill for isolated bug fixes
|
|
36
|
+
|
|
37
|
+
## Architecture Analysis Framework
|
|
38
|
+
|
|
39
|
+
Follow these five steps in order. Each step builds on the previous one.
|
|
40
|
+
|
|
41
|
+
### Step 1: Map Component Dependency Graph
|
|
42
|
+
|
|
43
|
+
Identify every module, package, or service and draw the dependency arrows between them.
|
|
44
|
+
|
|
45
|
+
**Actions:**
|
|
46
|
+
- List all top-level modules/packages and their stated responsibilities
|
|
47
|
+
- For each module, identify its imports/dependencies on other modules
|
|
48
|
+
- Identify external dependencies (third-party libraries, services, databases)
|
|
49
|
+
- Group tightly-connected modules into clusters
|
|
50
|
+
- Visualize as a directed graph
|
|
51
|
+
|
|
52
|
+
**What to look for:**
|
|
53
|
+
- Modules with many incoming edges (high afferent coupling) — foundational, high-risk to change
|
|
54
|
+
- Modules with many outgoing edges (high efferent coupling) — fragile, break when dependencies change
|
|
55
|
+
- Isolated modules with no connections — potentially dead code
|
|
56
|
+
- Unexpected dependencies that cross domain boundaries
|
|
57
|
+
|
|
58
|
+
### Step 2: Identify Coupling Points
|
|
59
|
+
|
|
60
|
+
Coupling is the degree to which modules depend on each other. Lower coupling means easier change.
|
|
61
|
+
|
|
62
|
+
**Types of coupling (worst to least harmful):**
|
|
63
|
+
|
|
64
|
+
1. **Content coupling** — One module modifies the internal state of another directly
|
|
65
|
+
2. **Common coupling** — Multiple modules read/write the same shared mutable state
|
|
66
|
+
3. **Temporal coupling** — Modules must be called in a specific order to work correctly
|
|
67
|
+
4. **Control coupling** — One module passes a flag that controls another's behavior
|
|
68
|
+
5. **Data coupling** — Modules share data through parameters (acceptable when minimal and well-defined)
|
|
69
|
+
|
|
70
|
+
**For each coupling point, document:**
|
|
71
|
+
- Which modules are involved
|
|
72
|
+
- What type of coupling it is
|
|
73
|
+
- What the concrete risk is
|
|
74
|
+
- A remediation suggestion
|
|
75
|
+
|
|
76
|
+
### Step 3: Check for Circular Dependencies
|
|
77
|
+
|
|
78
|
+
Circular dependencies make systems hard to understand, test, and deploy independently.
|
|
79
|
+
|
|
80
|
+
**Detection:** Walk the dependency graph and identify cycles, including indirect ones (A → B → C → A).
|
|
81
|
+
|
|
82
|
+
**Resolution strategies (simplest first):**
|
|
83
|
+
1. **Extract interface** — Define an abstraction that both modules depend on
|
|
84
|
+
2. **Dependency inversion** — Lower-level module defines interface, higher-level implements
|
|
85
|
+
3. **Event-based decoupling** — Replace direct calls with event publication/subscription
|
|
86
|
+
4. **Merge modules** — If truly inseparable, they may belong together
|
|
87
|
+
5. **Extract shared logic** — Move shared piece into a new lower-level module
|
|
88
|
+
|
|
89
|
+
### Step 4: Evaluate Separation of Concerns
|
|
90
|
+
|
|
91
|
+
Each module should have a single, well-defined responsibility.
|
|
92
|
+
|
|
93
|
+
**Check these boundaries:**
|
|
94
|
+
- **Presentation vs. Business Logic** — UI components should not contain business rules
|
|
95
|
+
- **Business Logic vs. Data Access** — Domain logic should not know how data is stored
|
|
96
|
+
- **Configuration vs. Runtime** — Configuration should be loaded once and injected
|
|
97
|
+
- **Cross-cutting concerns** — Logging, auth, error handling should be handled consistently
|
|
98
|
+
|
|
99
|
+
**Responsibility assignment check:**
|
|
100
|
+
- Can you describe each module's responsibility in one sentence without using "and"?
|
|
101
|
+
- If a requirement changes, how many modules need modification?
|
|
102
|
+
- Are there modules that change frequently for unrelated reasons?
|
|
103
|
+
|
|
104
|
+
### Step 5: Assess Scalability Bottlenecks
|
|
105
|
+
|
|
106
|
+
Identify where the system will strain under increased load.
|
|
107
|
+
|
|
108
|
+
**Categories:**
|
|
109
|
+
1. **I/O bound** — N+1 queries, unbounded result sets, synchronous I/O on hot paths, missing connection pooling
|
|
110
|
+
2. **Compute bound** — O(n²) algorithms on growing datasets, blocking event loops, missing caching
|
|
111
|
+
3. **State bound** — Unbounded caches, growing queues without backpressure, shared mutable state requiring locks
|
|
112
|
+
4. **Network bound** — Chatty inter-service communication, missing circuit breakers, no timeout/retry policies
|
|
113
|
+
|
|
114
|
+
**For each bottleneck, document:**
|
|
115
|
+
- Where it is and what triggers it
|
|
116
|
+
- Current impact and projected impact at 10x load
|
|
117
|
+
- Proposed mitigation with effort estimate
|
|
118
|
+
|
|
119
|
+
## Design Principles
|
|
120
|
+
|
|
121
|
+
### SOLID Principles
|
|
122
|
+
|
|
123
|
+
**Single Responsibility (SRP)** — Each module has exactly one reason to change.
|
|
124
|
+
- Good: `UserRepository` handles only persistence. `UserValidator` handles only validation.
|
|
125
|
+
- Bad: `UserService` handles validation, persistence, email, and logging.
|
|
126
|
+
- Watch for: "Manager" or "Handler" classes that grow without bound.
|
|
127
|
+
|
|
128
|
+
**Open/Closed (OCP)** — Open for extension, closed for modification.
|
|
129
|
+
- Good: Plugin system where new functionality is added by registering new plugins.
|
|
130
|
+
- Bad: Giant switch statement modified every time a new type is added.
|
|
131
|
+
- Watch for: Growing if/else chains based on type discrimination.
|
|
132
|
+
|
|
133
|
+
**Liskov Substitution (LSP)** — Subtypes must be usable wherever their base type is expected.
|
|
134
|
+
- Good: All `Logger` implementations can be swapped without changing calling code.
|
|
135
|
+
- Bad: `ReadOnlyRepository` extends `Repository` but throws on `save()`.
|
|
136
|
+
- Watch for: Subclasses that override methods to throw "not supported."
|
|
137
|
+
|
|
138
|
+
**Interface Segregation (ISP)** — No client should depend on methods it does not use.
|
|
139
|
+
- Good: Separate `Readable`, `Writable`, `Deletable` interfaces.
|
|
140
|
+
- Bad: `DataStore` interface with 30 methods where most implementations need 5.
|
|
141
|
+
- Watch for: Implementations leaving many methods as no-ops.
|
|
142
|
+
|
|
143
|
+
**Dependency Inversion (DIP)** — Depend on abstractions, not concretions.
|
|
144
|
+
- Good: `NotificationService` depends on `MessageSender` interface; concrete implementations injected.
|
|
145
|
+
- Bad: `NotificationService` directly imports and instantiates `SmtpClient`.
|
|
146
|
+
- Watch for: `new` keyword inside business logic creating infrastructure objects.
|
|
147
|
+
|
|
148
|
+
## Architecture Patterns
|
|
149
|
+
|
|
150
|
+
Choose patterns based on the problem. Every pattern has a cost; only use one when the problem it solves is real.
|
|
151
|
+
|
|
152
|
+
### Dependency Injection
|
|
153
|
+
**Use when:** Decoupling for testability or flexibility.
|
|
154
|
+
**Trade-off:** Adds indirection; constructor parameter lists can grow.
|
|
155
|
+
|
|
156
|
+
### Event-Driven Architecture
|
|
157
|
+
**Use when:** Components need loose coupling or asynchronous workflows.
|
|
158
|
+
**Trade-off:** Harder to trace execution flow. Eventual consistency. Requires correlation IDs.
|
|
159
|
+
|
|
160
|
+
### Repository Pattern
|
|
161
|
+
**Use when:** Abstracting data access from business logic.
|
|
162
|
+
**Trade-off:** Can become leaky if you need storage-specific features. Keep interfaces minimal.
|
|
163
|
+
|
|
164
|
+
### Strategy Pattern
|
|
165
|
+
**Use when:** Multiple interchangeable algorithms or behaviors selected at runtime.
|
|
166
|
+
**Trade-off:** Adds interfaces and classes. Only worth it with genuinely multiple strategies.
|
|
167
|
+
|
|
168
|
+
### Adapter Pattern
|
|
169
|
+
**Use when:** Integrating with external systems whose interface does not match yours.
|
|
170
|
+
**Trade-off:** One more layer. Keep adapters thin — translate only, no logic.
|
|
171
|
+
|
|
172
|
+
### CQRS
|
|
173
|
+
**Use when:** Read and write workloads have very different performance characteristics.
|
|
174
|
+
**Trade-off:** Significant complexity. Data synchronization between models. Only at scale.
|
|
175
|
+
|
|
176
|
+
### Saga Pattern
|
|
177
|
+
**Use when:** Coordinating multi-step processes across services where each step may fail.
|
|
178
|
+
**Trade-off:** Complex failure handling. Requires idempotent operations. Use only for genuine distributed transactions.
|
|
179
|
+
|
|
180
|
+
## Decision Framework
|
|
181
|
+
|
|
182
|
+
Every significant architectural decision should follow this process.
|
|
183
|
+
|
|
184
|
+
### 1. Establish Context
|
|
185
|
+
- Hard constraints (budget, timeline, team size, compliance)
|
|
186
|
+
- Quality attribute requirements (latency, throughput, availability, security)
|
|
187
|
+
- Existing architecture state
|
|
188
|
+
- Stakeholder priorities
|
|
189
|
+
|
|
190
|
+
### 2. Enumerate Options
|
|
191
|
+
- At least two viable options. Include "do nothing" when applicable.
|
|
192
|
+
- For each: effort estimate (T-shirt size), operational complexity, risk level.
|
|
193
|
+
|
|
194
|
+
### 3. Analyze Trade-offs
|
|
195
|
+
- What you gain and sacrifice per option.
|
|
196
|
+
- Quantify where possible ("adds ~200ms latency" > "adds some latency").
|
|
197
|
+
|
|
198
|
+
### 4. Make and Record the Decision
|
|
199
|
+
- Chosen option and primary rationale.
|
|
200
|
+
- Understandable to someone not in the room.
|
|
201
|
+
|
|
202
|
+
### 5. Plan Consequences
|
|
203
|
+
- Follow-up tasks. Migration steps if replacing existing approach.
|
|
204
|
+
- Review date or trigger condition for revisiting.
|
|
205
|
+
|
|
206
|
+
## ADR Template
|
|
207
|
+
|
|
208
|
+
```markdown
|
|
209
|
+
# ADR-[NUMBER]: [SHORT TITLE]
|
|
210
|
+
|
|
211
|
+
## Status
|
|
212
|
+
[Proposed | Accepted | Deprecated | Superseded by ADR-XXX]
|
|
213
|
+
|
|
214
|
+
## Date
|
|
215
|
+
[YYYY-MM-DD]
|
|
216
|
+
|
|
217
|
+
## Context
|
|
218
|
+
[What problem are we facing? What constraints exist?]
|
|
219
|
+
|
|
220
|
+
## Options Considered
|
|
221
|
+
|
|
222
|
+
### Option 1: [Name]
|
|
223
|
+
- Effort: [Low / Medium / High]
|
|
224
|
+
- Risk: [Low / Medium / High]
|
|
225
|
+
- Pros: [List]
|
|
226
|
+
- Cons: [List]
|
|
227
|
+
|
|
228
|
+
### Option 2: [Name]
|
|
229
|
+
- Effort: [Low / Medium / High]
|
|
230
|
+
- Risk: [Low / Medium / High]
|
|
231
|
+
- Pros: [List]
|
|
232
|
+
- Cons: [List]
|
|
233
|
+
|
|
234
|
+
## Decision
|
|
235
|
+
[Chosen option and rationale.]
|
|
236
|
+
|
|
237
|
+
## Consequences
|
|
238
|
+
- [What becomes easier]
|
|
239
|
+
- [What becomes harder]
|
|
240
|
+
- [Follow-up actions]
|
|
241
|
+
- [Review trigger]
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## Architecture Review Checklist
|
|
245
|
+
|
|
246
|
+
**Structural Integrity**
|
|
247
|
+
- [ ] All modules have a single, clearly stated responsibility
|
|
248
|
+
- [ ] Dependency graph has no circular dependencies
|
|
249
|
+
- [ ] Dependencies flow from high-level policy to low-level detail
|
|
250
|
+
- [ ] External dependencies are isolated behind adapters or interfaces
|
|
251
|
+
- [ ] No module depends on more than 5-7 other internal modules
|
|
252
|
+
|
|
253
|
+
**Quality Attributes**
|
|
254
|
+
- [ ] Latency-critical paths identified with performance budgets
|
|
255
|
+
- [ ] Failure modes identified with mitigation strategies
|
|
256
|
+
- [ ] Horizontally scalable at expected bottleneck points
|
|
257
|
+
- [ ] Security boundaries explicit (authentication, authorization, data isolation)
|
|
258
|
+
|
|
259
|
+
**Operability**
|
|
260
|
+
- [ ] Deployable incrementally (no big-bang releases)
|
|
261
|
+
- [ ] Health checks and monitoring points defined
|
|
262
|
+
- [ ] Configuration externalized and environment-specific
|
|
263
|
+
- [ ] Logging supports tracing requests across components
|
|
264
|
+
|
|
265
|
+
**Evolvability**
|
|
266
|
+
- [ ] New features addable without modifying core modules
|
|
267
|
+
- [ ] Known future requirements accommodatable without redesign
|
|
268
|
+
- [ ] Key decisions documented in ADRs
|
|
269
|
+
|
|
270
|
+
## Common Anti-Patterns
|
|
271
|
+
|
|
272
|
+
### God Class / God Module
|
|
273
|
+
**Symptom:** One module everything depends on, mixed responsibilities.
|
|
274
|
+
**Fix:** Decompose by responsibility. Extract focused modules one at a time.
|
|
275
|
+
|
|
276
|
+
### Distributed Monolith
|
|
277
|
+
**Symptom:** Microservices deployed together, sharing databases, synchronous call chains.
|
|
278
|
+
**Fix:** Make services truly independent or merge back into monolith.
|
|
279
|
+
|
|
280
|
+
### Leaky Abstractions
|
|
281
|
+
**Symptom:** Callers need to understand implementation details behind an interface.
|
|
282
|
+
**Fix:** Redesign interface to hide details. If impossible, remove the abstraction.
|
|
283
|
+
|
|
284
|
+
### Premature Optimization
|
|
285
|
+
**Symptom:** Complex caching or async patterns before any measured performance problem.
|
|
286
|
+
**Fix:** Start simple. Measure under realistic load. Optimize only the measured bottleneck.
|
|
287
|
+
|
|
288
|
+
### Golden Hammer
|
|
289
|
+
**Symptom:** Same technology applied to every problem regardless of fit.
|
|
290
|
+
**Fix:** Evaluate each problem on its merits. Different parts of a system can use different patterns.
|
|
291
|
+
|
|
292
|
+
### Accidental Complexity
|
|
293
|
+
**Symptom:** Codebase harder to work with than the problem domain requires.
|
|
294
|
+
**Fix:** Ask "what would we lose if we removed this layer?" If nothing, remove it.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: changelog-generator
|
|
3
|
+
description: Generate user-facing changelogs from git commit history by categorizing changes and transforming technical commits into clear release notes. Use when preparing release notes, creating product update summaries, or documenting changes for customers.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Changelog Generator
|
|
8
|
+
|
|
9
|
+
This skill transforms technical git commits into polished, user-friendly changelogs that your customers and users will actually understand and appreciate.
|
|
10
|
+
|
|
11
|
+
## When to Use This Skill
|
|
12
|
+
|
|
13
|
+
- Preparing release notes for a new version
|
|
14
|
+
- Creating weekly or monthly product update summaries
|
|
15
|
+
- Documenting changes for customers
|
|
16
|
+
- Writing changelog entries for app store submissions
|
|
17
|
+
- Generating update notifications
|
|
18
|
+
- Creating internal release documentation
|
|
19
|
+
- Maintaining a public changelog/product updates page
|
|
20
|
+
|
|
21
|
+
## When NOT to Use
|
|
22
|
+
|
|
23
|
+
- **Internal commit history review** — use `git log` directly
|
|
24
|
+
- **Technical documentation** — use the `technical-writing` skill
|
|
25
|
+
- **Blog posts or marketing announcements** — use the `content-research-writer` skill
|
|
26
|
+
- **Code review** — use the `code-review` skill
|
|
27
|
+
|
|
28
|
+
## What This Skill Does
|
|
29
|
+
|
|
30
|
+
1. **Scans Git History**: Analyzes commits from a specific time period or between versions
|
|
31
|
+
2. **Categorizes Changes**: Groups commits into logical categories (features, improvements, bug fixes, breaking changes, security)
|
|
32
|
+
3. **Translates Technical → User-Friendly**: Converts developer commits into customer language
|
|
33
|
+
4. **Formats Professionally**: Creates clean, structured changelog entries
|
|
34
|
+
5. **Filters Noise**: Excludes internal commits (refactoring, tests, etc.)
|
|
35
|
+
6. **Follows Best Practices**: Applies changelog guidelines and your brand voice
|
|
36
|
+
|
|
37
|
+
## How to Use
|
|
38
|
+
|
|
39
|
+
### Basic Usage
|
|
40
|
+
|
|
41
|
+
From your project repository:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
Create a changelog from commits since last release
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Generate changelog for all commits from the past week
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
Create release notes for version 2.5.0
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### With Specific Date Range
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
Create a changelog for all commits between March 1 and March 15
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### With Custom Guidelines
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Create a changelog for commits since v2.4.0, using my changelog
|
|
65
|
+
guidelines from CHANGELOG_STYLE.md
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Example
|
|
69
|
+
|
|
70
|
+
**User**: "Create a changelog for commits from the past 7 days"
|
|
71
|
+
|
|
72
|
+
**Output**:
|
|
73
|
+
```markdown
|
|
74
|
+
# Updates - Week of March 10, 2024
|
|
75
|
+
|
|
76
|
+
## ✨ New Features
|
|
77
|
+
|
|
78
|
+
- **Team Workspaces**: Create separate workspaces for different
|
|
79
|
+
projects. Invite team members and keep everything organized.
|
|
80
|
+
|
|
81
|
+
- **Keyboard Shortcuts**: Press ? to see all available shortcuts.
|
|
82
|
+
Navigate faster without touching your mouse.
|
|
83
|
+
|
|
84
|
+
## 🔧 Improvements
|
|
85
|
+
|
|
86
|
+
- **Faster Sync**: Files now sync 2x faster across devices
|
|
87
|
+
- **Better Search**: Search now includes file contents, not just titles
|
|
88
|
+
|
|
89
|
+
## 🐛 Fixes
|
|
90
|
+
|
|
91
|
+
- Fixed issue where large images wouldn't upload
|
|
92
|
+
- Resolved timezone confusion in scheduled posts
|
|
93
|
+
- Corrected notification badge count
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Inspired by:** Manik Aggarwal's use case from Lenny's Newsletter
|
|
97
|
+
|
|
98
|
+
## Tips
|
|
99
|
+
|
|
100
|
+
- Run from your git repository root
|
|
101
|
+
- Specify date ranges for focused changelogs
|
|
102
|
+
- Use your CHANGELOG_STYLE.md for consistent formatting
|
|
103
|
+
- Review and adjust the generated changelog before publishing
|
|
104
|
+
- Save output directly to CHANGELOG.md
|
|
105
|
+
|
|
106
|
+
## Related Use Cases
|
|
107
|
+
|
|
108
|
+
- Creating GitHub release notes
|
|
109
|
+
- Writing app store update descriptions
|
|
110
|
+
- Generating email updates for users
|
|
111
|
+
- Creating social media announcement posts
|
|
112
|
+
|