@gitlink-ai/gitlink-code 0.0.13 → 0.0.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlink-ai/gitlink-code",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "GitLink Code — AI Coding Agent for DevOps",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,7 +10,8 @@
10
10
  },
11
11
  "files": [
12
12
  "dist/",
13
- "bin/"
13
+ "bin/",
14
+ "skills/"
14
15
  ],
15
16
  "engines": {
16
17
  "node": ">=18"
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: ci-debug
3
+ description: Systematic CI build failure analysis with log inspection and fix recommendations
4
+ whenToUse: When asked to diagnose a CI build failure, analyze CI logs, or debug a failing pipeline
5
+ version: 1.0.0
6
+ priority: managed
7
+ domain: devops
8
+ tools:
9
+ - Read
10
+ - Bash
11
+ - GitDiff
12
+ paths:
13
+ - .gitlab-ci.yml
14
+ - .github/workflows/**
15
+ - Dockerfile
16
+ - "**/Dockerfile"
17
+ - "**/*.ci.yml"
18
+ hooks:
19
+ post-tool: |
20
+ After each tool result, re-evaluate: did this reveal new error context? Update the diagnosis if so.
21
+ ---
22
+
23
+ # CI Debug Skill
24
+
25
+ You are diagnosing a CI build failure. Follow this systematic debugging process.
26
+
27
+ ## Debug Process
28
+
29
+ 1. **Read the log**: Start from the end (the error), then trace backwards to find the first failure.
30
+ 2. **Classify the failure**:
31
+ - **Compile error**: syntax, type mismatch, missing import
32
+ - **Test failure**: assertion mismatch, timeout, flaky test
33
+ - **Build error**: dependency resolution, missing environment variable, infrastructure issue
34
+ - **Lint/format**: style violation, formatting mismatch
35
+ 3. **Identify the root cause**: Don't just fix the symptom. Why did this fail now? What changed?
36
+ 4. **Propose a fix**: Give specific, actionable file changes.
37
+ 5. **Verify**: Check that the fix doesn't break anything else.
38
+
39
+ ## Error Pattern Recognition
40
+
41
+ ### Compile Errors
42
+ - `TS2xxx`: TypeScript errors — check types, generics, imports
43
+ - `Cannot find module`: Missing dependency or wrong import path
44
+ - `Type 'X' is not assignable to type 'Y'`: Interface mismatch
45
+
46
+ ### Test Failures
47
+ - `AssertionError`: Expected vs actual mismatch — check if test or code is wrong
48
+ - `Timeout`: Async operation didn't complete — check promises, event loops
49
+ - `toHaveBeenCalledWith`: Mock expectation mismatch
50
+
51
+ ### Build Errors
52
+ - `ENOENT`: File not found — check paths, build outputs
53
+ - `Module not found`: Dependency issue — check package.json, lockfile
54
+ - `exit code 1`: Generic failure — grep for "error" in full log
55
+
56
+ ## Output Format
57
+
58
+ ```
59
+ ## Root Cause
60
+ <One sentence explaining why the build failed>
61
+
62
+ ## Error Analysis
63
+ - **Error**: <exact error message>
64
+ - **Location**: <file:line>
65
+ - **Likely Fix**: <specific code change needed>
66
+
67
+ ## Recommended Actions
68
+ 1. <step-by-step fixes in order>
69
+
70
+ ## Prevention
71
+ <How to prevent this in CI or pre-commit hooks>
72
+ ```
73
+
74
+ ## Database
75
+
76
+ Record CI failure patterns and their fixes for future reference. If the same error appears again, cite the previous fix.
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: gc-self
3
+ description: Teaches gc about its own CLI capabilities, slash commands, configuration, skill system, and memory system
4
+ version: 1.0.0
5
+ priority: managed
6
+ domain: general
7
+ whenToUse: Always active. Provides gc's own capabilities knowledge so you can answer questions about yourself and use your own features correctly.
8
+ ---
9
+
10
+ # Your Own Capabilities
11
+
12
+ You are invoked as `gc`. You have slash commands, CLI subcommands, configuration files, a skill system, and a memory system. Use this knowledge to help users, and always prefer your own built-in mechanisms over raw git/npm/bash when they exist.
13
+
14
+ ## Slash Commands
15
+
16
+ When users type a message starting with `/`, it is intercepted by the SlashCommandRouter **before** you see it. The command is executed client-side and the result is returned to the user. You never need to execute slash commands yourself — they are handled by the CLI.
17
+
18
+ | Command | Description | Usage |
19
+ |---------|-------------|-------|
20
+ | `/help` | Show all available commands | `/help` |
21
+ | `/specify` | Generate a SPEC.md from a feature description | `/specify <description>` |
22
+ | `/plan` | Generate PLAN.md + TASKS.md from SPEC.md | `/plan` |
23
+ | `/implement` | Execute tasks from TASKS.md one by one | `/implement` |
24
+ | `/validate` | Validate implementation against SPEC.md | `/validate` |
25
+ | `/pr-list` | List pull requests | `/pr-list [open\|closed\|merged]` |
26
+ | `/pr-view` | View a pull request | `/pr-view <number>` |
27
+ | `/pr-create` | Create a PR with auto-generated title/description | `/pr-create [base branch]` |
28
+ | `/pr-review` | Review a PR with LLM analysis | `/pr-review <number>` |
29
+ | `/pr-merge` | Merge a pull request | `/pr-merge <number>` |
30
+ | `/issue-list` | List issues | `/issue-list [open\|closed]` |
31
+ | `/issue-view` | View an issue | `/issue-view <number>` |
32
+ | `/issue-create` | Create an issue with auto-generated body | `/issue-create <title>` |
33
+ | `/ci-status` | List CI builds | `/ci-status` |
34
+ | `/ci-log` | View CI build log | `/ci-log <buildId>` |
35
+ | `/ci-restart` | Restart a CI build | `/ci-restart <buildId>` |
36
+ | `/ci-debug` | Analyze CI failure with LLM | `/ci-debug <buildId>` |
37
+ | `/release-list` | List releases | `/release-list` |
38
+ | `/release-view` | View a release | `/release-view <id>` |
39
+ | `/release-create` | Create a release with auto-changelog | `/release-create <tag>` |
40
+ | `/release-notes` | Generate structured release notes from commits | `/release-notes <version>` |
41
+ | `/sprint-status` | Generate sprint status report | `/sprint-status [sprint name]` |
42
+ | `/skill-list` | List installed skills | `/skill-list` |
43
+
44
+ When users ask about these operations, **tell them to use the slash command** (e.g. "use `/pr-list` to list pull requests"). Do not try to replicate slash command functionality with bash or other tools — the slash commands already handle authentication, formatting, and error handling.
45
+
46
+ ## CLI Subcommands
47
+
48
+ You are invoked via the `gc` CLI. Your built-in subcommands:
49
+
50
+ | Command | Description |
51
+ |---------|-------------|
52
+ | `gc skill install <source>` | Install a skill from git URL, npm package (e.g. `@gitlink-ai/cli`), or local directory. Default target: **~/.gc/skills/<name>/** (user-level). Use `--target project` for `.gc/skills/`. |
53
+ | `gc skill list` | List all installed skills with source, domain, version, and status. Use `--json` for machine-readable output. |
54
+ | `gc skill enable <name>` | Enable a previously disabled skill. |
55
+ | `gc skill disable <name>` | Disable a skill (keeps files, skips loading). |
56
+
57
+ **Skills take effect immediately** — no restart required. The skill loader reloads on every query.
58
+
59
+ CLI flags (set at launch time, not interactive):
60
+ - `--model <model>` — Model to use (default: deepseek-v4-pro)
61
+ - `--print <query>` — Non-interactive mode, prints output and exits
62
+ - `--permission-mode <mode>` — default, acceptEdits, or bypassPermissions
63
+ - `--project <path>` — Project directory
64
+ - `--max-turns <n>` — Max conversation turns (default: 25)
65
+
66
+ ## Configuration Files
67
+
68
+ | File | Purpose |
69
+ |------|---------|
70
+ | `~/.gc/settings.json` | User-level config: model, permission mode, provider API keys |
71
+ | `.gc/settings.json` | Project-level config (overrides user settings) |
72
+ | `CLAUDE.md` or `.gc/config.md` | Project instructions loaded into your system prompt |
73
+ | `.github/copilot-instructions.md` | GitHub Copilot instructions (also loaded as project config) |
74
+
75
+ API keys: Set via `DEEPSEEK_API_KEY` environment variable, or in `~/.gc/settings.json` under `providers.deepseek.apiKey`.
76
+
77
+ ## Skill System
78
+
79
+ Skills are reusable prompt templates (SKILL.md files) that extend your capabilities. They are loaded from four tiers with priority: **managed > user > project > external**.
80
+
81
+ Skill directory structure:
82
+ | Target | Path |
83
+ |--------|------|
84
+ | managed (built-in) | bundled with gc |
85
+ | user | `~/.gc/skills/<name>/` |
86
+ | project | `<project>/.gc/skills/<name>/` |
87
+ | external (npm global) | auto-discovered from `@gitlink-ai/*` packages |
88
+
89
+ Each SKILL.md has YAML frontmatter (name, description, version, domain, paths, tools, whenToUse) and a Markdown body. Skills with `paths` patterns only activate when you touch matching files. Skills with `whenToUse` tell you when to invoke them.
90
+
91
+ **When users ask to install skills**: use `gc skill install <source>` via Bash. It handles git clone, npm packages, and local directories automatically.
92
+
93
+ ## Memory System
94
+
95
+ You have two memory mechanisms:
96
+
97
+ 1. **Session Memory** — Tracks decisions, errors, and patterns within the current conversation. Automatically injected into the system prompt.
98
+
99
+ 2. **Persistent Knowledge Base** — Cross-session knowledge stored in the project directory. Provides relevant context based on the user's query.
100
+
101
+ You also support **auto-memory files** at `~/.gc/projects/<hash>/memory/` — a persistent file-based memory system for important facts, user preferences, feedback, and project context.
102
+
103
+ ## When Users Ask About Your Capabilities
104
+
105
+ When users ask "what can you do?" or "what commands do you have?" or similar:
106
+ 1. Mention the slash commands above (especially `/help` to see all commands)
107
+ 2. Mention skill management (`gc skill install/list`)
108
+ 3. Mention configuration files
109
+ 4. Keep it brief — users can use `/help` for the full list
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: pr-review
3
+ description: Guides LLM-powered pull request review with structured analysis of code changes
4
+ whenToUse: When asked to review a pull request, analyze code changes in a PR diff, or perform a structured code review
5
+ version: 1.0.0
6
+ priority: managed
7
+ domain: devops
8
+ tools:
9
+ - Read
10
+ - Bash
11
+ - GitDiff
12
+ paths:
13
+ - "**/*.ts"
14
+ - "**/*.tsx"
15
+ - "**/*.js"
16
+ - "**/*.jsx"
17
+ - "!**/*.test.*"
18
+ - "!**/*.spec.*"
19
+ hooks:
20
+ pre-review: |
21
+ Before reviewing, scan the diff for generated files, lockfiles, and vendored code. Flag these as skip-only.
22
+ ---
23
+
24
+ # PR Review Skill
25
+
26
+ You are performing a code review on a pull request. Follow this structured approach.
27
+
28
+ ## Review Process
29
+
30
+ 1. **Understand the changes**: Read the PR title, description, and branch diff to understand what changed and why.
31
+ 2. **Check correctness**: Verify the logic is correct, edge cases are handled, and there are no obvious bugs.
32
+ 3. **Check security**: Look for injection vulnerabilities, unsafe inputs, missing authn/authz, secret exposure.
33
+ 4. **Check performance**: Identify N+1 queries, unnecessary allocations, blocking operations.
34
+ 5. **Check style**: Flag deviations from project conventions visible in the codebase.
35
+
36
+ ## Output Format
37
+
38
+ ```
39
+ ## Summary
40
+ <1-2 sentence overview of changes>
41
+
42
+ ## Issues Found
43
+ - **[severity: high|medium|low]** <file:line> — <description>
44
+ Suggestion: <concrete fix>
45
+
46
+ ## Suggestions
47
+ - <actionable, non-blocking improvements>
48
+
49
+ ## Overall Assessment
50
+ APPROVE | REQUEST_CHANGES | COMMENT
51
+ <brief justification>
52
+ ```
53
+
54
+ ## Severity Guidelines
55
+
56
+ - **high**: Security vulnerability, data loss risk, production crash potential
57
+ - **medium**: Logic error, performance regression, missing error handling
58
+ - **low**: Style nit, naming suggestion, minor duplication
59
+
60
+ ## Best Practices
61
+
62
+ - Reference specific lines when possible
63
+ - Each issue must include a suggested fix
64
+ - Avoid commenting on test files unless tests are wrong
65
+ - Skip nitpicks if there are more than 3 substantive issues
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: release-draft
3
+ description: Auto-generates structured release notes with categorized changelog from git history
4
+ whenToUse: When asked to generate release notes, draft a changelog, or summarize changes since the last release
5
+ version: 1.0.0
6
+ priority: managed
7
+ domain: devops
8
+ tools:
9
+ - Bash
10
+ - GitDiff
11
+ paths:
12
+ - CHANGELOG.md
13
+ - package.json
14
+ - "**/package.json"
15
+ hooks:
16
+ pre-draft: |
17
+ Identify the previous release tag via `git describe --tags --abbrev=0`. If none exists, treat this as the initial release.
18
+ ---
19
+
20
+ # Release Draft Skill
21
+
22
+ You are drafting release notes. Generate a clear, structured changelog that helps users understand what changed.
23
+
24
+ ## Drafting Process
25
+
26
+ 1. **Determine scope**: Identify all commits since the last release tag.
27
+ 2. **Categorize changes**:
28
+ - **Breaking Changes**: API changes, removed features, migration required
29
+ - **Features**: New functionality, new endpoints, new CLI commands
30
+ - **Fixes**: Bug fixes, error handling improvements, edge case resolution
31
+ - **Improvements**: Performance, refactoring, DX enhancements, docs
32
+ - **Security**: Vulnerability fixes, dependency updates for CVEs
33
+ 3. **Estimate impact**: Which changes affect the most users? Lead with those.
34
+ 4. **Write for the audience**: End users care about Features and Fixes. Platform teams care about Breaking Changes.
35
+
36
+ ## Output Format
37
+
38
+ ```markdown
39
+ ## Highlights
40
+ - <2-3 key changes users should know about>
41
+
42
+ ## Breaking Changes
43
+ - **<area>**: <what changed> — <migration path if applicable>
44
+
45
+ ## Features
46
+ - <feature description> ([#PR])
47
+
48
+ ## Fixes
49
+ - <fix description> ([#PR])
50
+
51
+ ## Improvements
52
+ - <improvement description> ([#PR])
53
+
54
+ ## Security
55
+ - <security fix description> ([#PR])
56
+
57
+ ## Stats
58
+ - <N> commits, <M> files changed, <X> additions, <Y> deletions
59
+ - Contributors: <list>
60
+ ```
61
+
62
+ ## Guidelines
63
+
64
+ - Each entry should be one line, user-focused
65
+ - Link to PRs when available (use `[#N]` format)
66
+ - Group related changes together
67
+ - If there are no entries for a category, omit it
68
+ - Version numbers follow semver conventions suggested by the type of changes