@fentech/gitcontext 0.3.3

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.
Files changed (29) hide show
  1. package/dist/index.dev.js +42179 -0
  2. package/dist/index.js +42537 -0
  3. package/package.json +42 -0
  4. package/src/templates/claude-code/agents/branch-analyzer.md +113 -0
  5. package/src/templates/claude-code/agents/db-migration.md +100 -0
  6. package/src/templates/claude-code/agents/doc-generator.md +102 -0
  7. package/src/templates/claude-code/commands/analyze-pr.md +43 -0
  8. package/src/templates/claude-code/commands/capture-blocker.md +35 -0
  9. package/src/templates/claude-code/commands/capture-bug.md +35 -0
  10. package/src/templates/claude-code/commands/capture-convention.md +34 -0
  11. package/src/templates/claude-code/commands/capture-learning.md +32 -0
  12. package/src/templates/claude-code/commands/db-migrate.md +34 -0
  13. package/src/templates/claude-code/commands/doc-from-pr.md +45 -0
  14. package/src/templates/claude-code/commands/wrap-conversation.md +36 -0
  15. package/src/templates/claude-code/mcp.json +8 -0
  16. package/src/templates/cursor/commands/capture-blocker.md +27 -0
  17. package/src/templates/cursor/commands/capture-bug.md +28 -0
  18. package/src/templates/cursor/commands/capture-convention.md +24 -0
  19. package/src/templates/cursor/commands/capture-learning.md +27 -0
  20. package/src/templates/cursor/mcp.json +8 -0
  21. package/src/templates/cursor/rules/gitcontext.mdc +25 -0
  22. package/src/templates/gemini/commands/capture-blocker.md +27 -0
  23. package/src/templates/gemini/commands/capture-bug.md +28 -0
  24. package/src/templates/gemini/commands/capture-convention.md +24 -0
  25. package/src/templates/gemini/commands/capture-learning.md +27 -0
  26. package/src/templates/gemini/settings.json +8 -0
  27. package/src/templates/vscode/copilot-instructions-append.md +4 -0
  28. package/src/templates/vscode/mcp.json +9 -0
  29. package/src/templates/windsurf/windsurfrules +19 -0
@@ -0,0 +1,27 @@
1
+ # Capture Blocker
2
+
3
+ Capture a blocker doc — something that is blocking or has blocked progress on a task or feature.
4
+
5
+ ## Steps
6
+
7
+ 1. Gather context from the current conversation and recent git history:
8
+ ```bash
9
+ git log --oneline -10
10
+ ```
11
+
12
+ 2. Use the `gitcontext` MCP server to create the doc:
13
+ - Tool: `capture_doc`
14
+ - `type`: `blocker`
15
+ - `title`: concise description of what is blocked (e.g., "Cannot run migrations: DATABASE_URL_DIRECT not set in CI")
16
+ - `summary`: 2–4 sentences describing what is blocked, why, and current status
17
+ - `tags`: relevant keywords (e.g., `["ci", "migrations", "env"]`)
18
+ - `code_snippet` (optional): error output or relevant config
19
+
20
+ 3. After creating the doc, share the returned link.
21
+
22
+ ## Usage
23
+
24
+ ```
25
+ /capture-blocker
26
+ /capture-blocker <optional: brief description to seed context>
27
+ ```
@@ -0,0 +1,28 @@
1
+ # Capture Bug
2
+
3
+ Capture a bug doc — a bug that was found, diagnosed, and fixed (or is being fixed).
4
+
5
+ ## Steps
6
+
7
+ 1. Gather context from the current conversation and recent git history:
8
+ ```bash
9
+ git log --oneline -10
10
+ git diff HEAD~1
11
+ ```
12
+
13
+ 2. Use the `gitcontext` MCP server to create the doc:
14
+ - Tool: `capture_doc`
15
+ - `type`: `bug`
16
+ - `title`: concise description of the bug (e.g., "Auth token expiry check uses < instead of <=")
17
+ - `summary`: 2–4 sentences covering symptom, root cause, and fix
18
+ - `tags`: relevant keywords (e.g., `["auth", "token", "expiry"]`)
19
+ - `code_snippet` (optional): the fix or the problematic code
20
+
21
+ 3. After creating the doc, share the returned link.
22
+
23
+ ## Usage
24
+
25
+ ```
26
+ /capture-bug
27
+ /capture-bug <optional: brief description to seed context>
28
+ ```
@@ -0,0 +1,24 @@
1
+ # Capture Convention
2
+
3
+ Capture a convention doc — a decision about how code should be structured, named, or written in this project.
4
+
5
+ ## Steps
6
+
7
+ 1. Gather context from the current conversation and relevant files in the repo.
8
+
9
+ 2. Use the `gitcontext` MCP server to create the doc:
10
+ - Tool: `capture_doc`
11
+ - `type`: `convention`
12
+ - `title`: concise description of the convention (e.g., "Server functions must be defined in services/, not route files")
13
+ - `summary`: 2–4 sentences explaining the convention and why it exists
14
+ - `tags`: relevant keywords (e.g., `["architecture", "server-functions", "tanstack"]`)
15
+ - `code_snippet` (optional): example of the pattern in practice
16
+
17
+ 3. After creating the doc, share the returned link.
18
+
19
+ ## Usage
20
+
21
+ ```
22
+ /capture-convention
23
+ /capture-convention <optional: brief description to seed context>
24
+ ```
@@ -0,0 +1,27 @@
1
+ # Capture Learning
2
+
3
+ Capture a learning doc — a new insight, technique, or understanding gained during development.
4
+
5
+ ## Steps
6
+
7
+ 1. Gather context from the current conversation and recent git history:
8
+ ```bash
9
+ git log --oneline -10
10
+ ```
11
+
12
+ 2. Use the `gitcontext` MCP server to create the doc:
13
+ - Tool: `capture_doc`
14
+ - `type`: `learning`
15
+ - `title`: concise, specific (e.g., "Vite requires explicit file extensions for dynamic imports")
16
+ - `summary`: 2–4 sentences explaining the learning clearly
17
+ - `tags`: relevant keywords (e.g., `["vite", "esm", "bundler"]`)
18
+ - `code_snippet` (optional): illustrative code if applicable
19
+
20
+ 3. After creating the doc, share the returned link.
21
+
22
+ ## Usage
23
+
24
+ ```
25
+ /capture-learning
26
+ /capture-learning <optional: brief description to seed context>
27
+ ```
@@ -0,0 +1,8 @@
1
+ {
2
+ "mcpServers": {
3
+ "gitcontext": {
4
+ "command": "gitcontext",
5
+ "args": ["mcp", "serve"]
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: GitContext integration rules
3
+ globs:
4
+ alwaysApply: true
5
+ ---
6
+
7
+ # GitContext
8
+
9
+ This repository uses GitContext for AI-assisted knowledge capture.
10
+
11
+ ## Available MCP Tools
12
+
13
+ Use the `gitcontext` MCP server tools to capture knowledge as you work:
14
+
15
+ - `capture_doc` — capture a learning, bug, convention, or blocker doc
16
+ - `get_git_context` — get current branch, commit, and recent changes
17
+ - `get_git_diff` — get diff between branches
18
+ - `query_docs` — search existing docs
19
+
20
+ ## When to Capture
21
+
22
+ - **Bug**: after fixing a non-obvious issue — include root cause and fix
23
+ - **Convention**: after making a design decision or establishing a code pattern
24
+ - **Learning**: after understanding something that will help future work
25
+ - **Blocker**: when hitting a blocking dependency or external issue
@@ -0,0 +1,27 @@
1
+ # Capture Blocker
2
+
3
+ Capture a blocker doc — something that is blocking or has blocked progress on a task or feature.
4
+
5
+ ## Steps
6
+
7
+ 1. Gather context from the current conversation and recent git history:
8
+ ```bash
9
+ git log --oneline -10
10
+ ```
11
+
12
+ 2. Use the `gitcontext` MCP server to create the doc:
13
+ - Tool: `capture_doc`
14
+ - `type`: `blocker`
15
+ - `title`: concise description of what is blocked (e.g., "Cannot run migrations: DATABASE_URL_DIRECT not set in CI")
16
+ - `summary`: 2–4 sentences describing what is blocked, why, and current status
17
+ - `tags`: relevant keywords (e.g., `["ci", "migrations", "env"]`)
18
+ - `code_snippet` (optional): error output or relevant config
19
+
20
+ 3. After creating the doc, share the returned link.
21
+
22
+ ## Usage
23
+
24
+ ```
25
+ @capture-blocker
26
+ @capture-blocker <optional: brief description to seed context>
27
+ ```
@@ -0,0 +1,28 @@
1
+ # Capture Bug
2
+
3
+ Capture a bug doc — a bug that was found, diagnosed, and fixed (or is being fixed).
4
+
5
+ ## Steps
6
+
7
+ 1. Gather context from the current conversation and recent git history:
8
+ ```bash
9
+ git log --oneline -10
10
+ git diff HEAD~1
11
+ ```
12
+
13
+ 2. Use the `gitcontext` MCP server to create the doc:
14
+ - Tool: `capture_doc`
15
+ - `type`: `bug`
16
+ - `title`: concise description of the bug (e.g., "Auth token expiry check uses < instead of <=")
17
+ - `summary`: 2–4 sentences covering symptom, root cause, and fix
18
+ - `tags`: relevant keywords (e.g., `["auth", "token", "expiry"]`)
19
+ - `code_snippet` (optional): the fix or the problematic code
20
+
21
+ 3. After creating the doc, share the returned link.
22
+
23
+ ## Usage
24
+
25
+ ```
26
+ @capture-bug
27
+ @capture-bug <optional: brief description to seed context>
28
+ ```
@@ -0,0 +1,24 @@
1
+ # Capture Convention
2
+
3
+ Capture a convention doc — a decision about how code should be structured, named, or written in this project.
4
+
5
+ ## Steps
6
+
7
+ 1. Gather context from the current conversation and relevant files in the repo.
8
+
9
+ 2. Use the `gitcontext` MCP server to create the doc:
10
+ - Tool: `capture_doc`
11
+ - `type`: `convention`
12
+ - `title`: concise description of the convention (e.g., "Server functions must be defined in services/, not route files")
13
+ - `summary`: 2–4 sentences explaining the convention and why it exists
14
+ - `tags`: relevant keywords (e.g., `["architecture", "server-functions", "tanstack"]`)
15
+ - `code_snippet` (optional): example of the pattern in practice
16
+
17
+ 3. After creating the doc, share the returned link.
18
+
19
+ ## Usage
20
+
21
+ ```
22
+ @capture-convention
23
+ @capture-convention <optional: brief description to seed context>
24
+ ```
@@ -0,0 +1,27 @@
1
+ # Capture Learning
2
+
3
+ Capture a learning doc — a new insight, technique, or understanding gained during development.
4
+
5
+ ## Steps
6
+
7
+ 1. Gather context from the current conversation and recent git history:
8
+ ```bash
9
+ git log --oneline -10
10
+ ```
11
+
12
+ 2. Use the `gitcontext` MCP server to create the doc:
13
+ - Tool: `capture_doc`
14
+ - `type`: `learning`
15
+ - `title`: concise, specific (e.g., "Vite requires explicit file extensions for dynamic imports")
16
+ - `summary`: 2–4 sentences explaining the learning clearly
17
+ - `tags`: relevant keywords (e.g., `["vite", "esm", "bundler"]`)
18
+ - `code_snippet` (optional): illustrative code if applicable
19
+
20
+ 3. After creating the doc, share the returned link.
21
+
22
+ ## Usage
23
+
24
+ ```
25
+ @capture-learning
26
+ @capture-learning <optional: brief description to seed context>
27
+ ```
@@ -0,0 +1,8 @@
1
+ {
2
+ "mcpServers": {
3
+ "gitcontext": {
4
+ "command": "gitcontext",
5
+ "args": ["mcp", "serve"]
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,4 @@
1
+ ## GitContext
2
+
3
+ This repository uses GitContext for AI-assisted knowledge capture.
4
+ Use the `gitcontext` MCP tools (`capture_doc`, `get_git_context`, `query_docs`) to capture learnings, bugs, conventions, and blockers as you work.
@@ -0,0 +1,9 @@
1
+ {
2
+ "servers": {
3
+ "gitcontext": {
4
+ "type": "stdio",
5
+ "command": "gitcontext",
6
+ "args": ["mcp", "serve"]
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,19 @@
1
+ # GitContext
2
+
3
+ This repository uses GitContext for AI-assisted knowledge capture.
4
+
5
+ ## Available MCP Tools
6
+
7
+ Use the `gitcontext` MCP server tools to capture knowledge as you work:
8
+
9
+ - `capture_doc` — capture a learning, bug, convention, or blocker doc
10
+ - `get_git_context` — get current branch, commit, and recent changes
11
+ - `get_git_diff` — get diff between branches
12
+ - `query_docs` — search existing docs
13
+
14
+ ## When to Capture
15
+
16
+ - **Bug**: after fixing a non-obvious issue — include root cause and fix
17
+ - **Convention**: after making a design decision or establishing a code pattern
18
+ - **Learning**: after understanding something that will help future work
19
+ - **Blocker**: when hitting a blocking dependency or external issue