mcp-coder-utils 0.1.2__tar.gz
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.
- mcp_coder_utils-0.1.2/.claude/CLAUDE.md +87 -0
- mcp_coder_utils-0.1.2/.claude/agents/commit-pusher.md +24 -0
- mcp_coder_utils-0.1.2/.claude/knowledge_base/planning_principles.md +28 -0
- mcp_coder_utils-0.1.2/.claude/knowledge_base/python.md +6 -0
- mcp_coder_utils-0.1.2/.claude/knowledge_base/refactoring_principles.md +22 -0
- mcp_coder_utils-0.1.2/.claude/knowledge_base/software_engineering_principles.md +30 -0
- mcp_coder_utils-0.1.2/.claude/settings.local.json +68 -0
- mcp_coder_utils-0.1.2/.claude/skills/check_branch_status/SKILL.md +22 -0
- mcp_coder_utils-0.1.2/.claude/skills/commit_push/SKILL.md +48 -0
- mcp_coder_utils-0.1.2/.claude/skills/discuss/SKILL.md +16 -0
- mcp_coder_utils-0.1.2/.claude/skills/implement_direct/SKILL.md +72 -0
- mcp_coder_utils-0.1.2/.claude/skills/implementation_approve/SKILL.md +33 -0
- mcp_coder_utils-0.1.2/.claude/skills/implementation_finalise/SKILL.md +52 -0
- mcp_coder_utils-0.1.2/.claude/skills/implementation_needs_rework/SKILL.md +35 -0
- mcp_coder_utils-0.1.2/.claude/skills/implementation_new_tasks/SKILL.md +36 -0
- mcp_coder_utils-0.1.2/.claude/skills/implementation_review/SKILL.md +53 -0
- mcp_coder_utils-0.1.2/.claude/skills/implementation_review_supervisor/SKILL.md +75 -0
- mcp_coder_utils-0.1.2/.claude/skills/issue_analyse/SKILL.md +61 -0
- mcp_coder_utils-0.1.2/.claude/skills/issue_approve/SKILL.md +44 -0
- mcp_coder_utils-0.1.2/.claude/skills/issue_create/SKILL.md +46 -0
- mcp_coder_utils-0.1.2/.claude/skills/issue_requirements/SKILL.md +22 -0
- mcp_coder_utils-0.1.2/.claude/skills/issue_update/SKILL.md +57 -0
- mcp_coder_utils-0.1.2/.claude/skills/plan_approve/SKILL.md +21 -0
- mcp_coder_utils-0.1.2/.claude/skills/plan_review/SKILL.md +43 -0
- mcp_coder_utils-0.1.2/.claude/skills/plan_review_supervisor/SKILL.md +70 -0
- mcp_coder_utils-0.1.2/.claude/skills/plan_update/SKILL.md +28 -0
- mcp_coder_utils-0.1.2/.claude/skills/rebase/SKILL.md +107 -0
- mcp_coder_utils-0.1.2/.claude/skills/rebase/rebase_design.md +76 -0
- mcp_coder_utils-0.1.2/.gitattributes +95 -0
- mcp_coder_utils-0.1.2/.github/dependabot.yml +14 -0
- mcp_coder_utils-0.1.2/.github/workflows/approve-command.yml +82 -0
- mcp_coder_utils-0.1.2/.github/workflows/ci.yml +83 -0
- mcp_coder_utils-0.1.2/.github/workflows/label-new-issues.yml +22 -0
- mcp_coder_utils-0.1.2/.github/workflows/publish.yml +49 -0
- mcp_coder_utils-0.1.2/.gitignore +63 -0
- mcp_coder_utils-0.1.2/.importlinter +50 -0
- mcp_coder_utils-0.1.2/.large-files-allowlist +2 -0
- mcp_coder_utils-0.1.2/.mcp.json +44 -0
- mcp_coder_utils-0.1.2/.python-version +1 -0
- mcp_coder_utils-0.1.2/LICENSE +21 -0
- mcp_coder_utils-0.1.2/PKG-INFO +60 -0
- mcp_coder_utils-0.1.2/README.md +26 -0
- mcp_coder_utils-0.1.2/claude.bat +92 -0
- mcp_coder_utils-0.1.2/claude_local.bat +114 -0
- mcp_coder_utils-0.1.2/docs/architecture/architecture.md +56 -0
- mcp_coder_utils-0.1.2/pyproject.toml +125 -0
- mcp_coder_utils-0.1.2/setup.cfg +4 -0
- mcp_coder_utils-0.1.2/src/mcp_coder_utils/__init__.py +1 -0
- mcp_coder_utils-0.1.2/src/mcp_coder_utils/py.typed +0 -0
- mcp_coder_utils-0.1.2/src/mcp_coder_utils/subprocess_runner.py +754 -0
- mcp_coder_utils-0.1.2/src/mcp_coder_utils/subprocess_streaming.py +185 -0
- mcp_coder_utils-0.1.2/src/mcp_coder_utils.egg-info/PKG-INFO +60 -0
- mcp_coder_utils-0.1.2/src/mcp_coder_utils.egg-info/SOURCES.txt +64 -0
- mcp_coder_utils-0.1.2/src/mcp_coder_utils.egg-info/dependency_links.txt +1 -0
- mcp_coder_utils-0.1.2/src/mcp_coder_utils.egg-info/requires.txt +19 -0
- mcp_coder_utils-0.1.2/src/mcp_coder_utils.egg-info/top_level.txt +1 -0
- mcp_coder_utils-0.1.2/tests/__init__.py +0 -0
- mcp_coder_utils-0.1.2/tests/test_subprocess_runner.py +1095 -0
- mcp_coder_utils-0.1.2/tests/test_subprocess_runner_real.py +297 -0
- mcp_coder_utils-0.1.2/tests/test_subprocess_streaming.py +86 -0
- mcp_coder_utils-0.1.2/todo_issues.md +131 -0
- mcp_coder_utils-0.1.2/tools/read_github_deps.py +39 -0
- mcp_coder_utils-0.1.2/tools/reinstall_local.bat +125 -0
- mcp_coder_utils-0.1.2/tools/ruff_check.bat +14 -0
- mcp_coder_utils-0.1.2/tools/ruff_check.sh +12 -0
- mcp_coder_utils-0.1.2/vulture_whitelist.py +10 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
## About this repo
|
|
2
|
+
|
|
3
|
+
`mcp-coder-utils` is a **leaf library**: shared low-level Python helpers (subprocess, logging, fs) used by `mcp-coder`, `mcp-tools-py`, `mcp-workspace`, and `mcp-config`.
|
|
4
|
+
|
|
5
|
+
**Architectural rules:**
|
|
6
|
+
|
|
7
|
+
- Pure Python, language-agnostic. No ecosystem knowledge (no `pyproject.toml` parsing, no venv, no `.csproj`, no SQL).
|
|
8
|
+
- Zero internal dependencies. Stdlib + pinned third-party libs only.
|
|
9
|
+
- Every public function must have ≥2 real consumers. Single-user helpers stay in the consumer.
|
|
10
|
+
- Public API is stable. Renames and signature changes break all 4 downstream repos.
|
|
11
|
+
|
|
12
|
+
When in doubt, keep it in the consumer until a second consumer needs it.
|
|
13
|
+
|
|
14
|
+
## MCP Tools — mandatory
|
|
15
|
+
|
|
16
|
+
Use MCP tools for **all** operations. Never use `Read`, `Write`, `Edit`, or `Bash` for tasks that have an MCP equivalent.
|
|
17
|
+
|
|
18
|
+
### Tool mapping
|
|
19
|
+
|
|
20
|
+
| Task | MCP tool |
|
|
21
|
+
|------|----------|
|
|
22
|
+
| Read file | `mcp__workspace__read_file` |
|
|
23
|
+
| Edit file | `mcp__workspace__edit_file` |
|
|
24
|
+
| Write file | `mcp__workspace__save_file` |
|
|
25
|
+
| Append to file | `mcp__workspace__append_file` |
|
|
26
|
+
| Delete file | `mcp__workspace__delete_this_file` |
|
|
27
|
+
| Move file | `mcp__workspace__move_file` |
|
|
28
|
+
| List directory | `mcp__workspace__list_directory` |
|
|
29
|
+
| Search files | `mcp__workspace__search_files` |
|
|
30
|
+
| Read reference project | `mcp__workspace__read_reference_file` |
|
|
31
|
+
| List reference dir | `mcp__workspace__list_reference_directory` |
|
|
32
|
+
| Get reference projects | `mcp__workspace__get_reference_projects` |
|
|
33
|
+
| Run pytest | `mcp__tools-py__run_pytest_check` |
|
|
34
|
+
| Run pylint | `mcp__tools-py__run_pylint_check` |
|
|
35
|
+
| Run mypy | `mcp__tools-py__run_mypy_check` |
|
|
36
|
+
| Run lint-imports | `mcp__tools-py__run_lint_imports_check` |
|
|
37
|
+
| Run vulture | `mcp__tools-py__run_vulture_check` |
|
|
38
|
+
| Format code (black+isort) | `mcp__tools-py__run_format_code` |
|
|
39
|
+
| Get library source | `mcp__tools-py__get_library_source` |
|
|
40
|
+
| Refactoring | `mcp__tools-py__move_symbol`, `move_module`, `rename_symbol`, `list_symbols`, `find_references` |
|
|
41
|
+
|
|
42
|
+
### Reference projects
|
|
43
|
+
|
|
44
|
+
Read-only browse via `mcp__workspace__read_reference_file`:
|
|
45
|
+
|
|
46
|
+
- `p_mcp_coder` — `mcp_coder` source
|
|
47
|
+
- `p_workspace` — `mcp-workspace` source
|
|
48
|
+
- `p_config` — `mcp-config` source
|
|
49
|
+
- `p_tools` — `mcp-tools-py` source
|
|
50
|
+
|
|
51
|
+
## Code quality checks
|
|
52
|
+
|
|
53
|
+
After making code changes, run:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
mcp__tools-py__run_pylint_check
|
|
57
|
+
mcp__tools-py__run_pytest_check
|
|
58
|
+
mcp__tools-py__run_mypy_check
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
All checks must pass before proceeding.
|
|
62
|
+
|
|
63
|
+
**Pytest:** always use `extra_args: ["-n", "auto"]` for parallel execution. No integration test markers — run everything.
|
|
64
|
+
|
|
65
|
+
## Git operations
|
|
66
|
+
|
|
67
|
+
**Allowed commands via Bash:**
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
git status / diff / commit / log / fetch / ls-tree
|
|
71
|
+
gh issue view / gh run view
|
|
72
|
+
mcp-coder git-tool compact-diff # diff that detects moves, collapses unchanged blocks
|
|
73
|
+
mcp-coder check branch-status # CI status, rebase needs, task completion, labels
|
|
74
|
+
mcp-coder check file-size # find files exceeding line-count threshold
|
|
75
|
+
mcp-coder gh-tool set-status <label> # change issue workflow status label
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Before every commit:** run `mcp__tools-py__run_format_code`, then stage and commit.
|
|
79
|
+
|
|
80
|
+
**Bash discipline:** no `cd` prefix. Don't chain approved with unapproved commands. Run them separately.
|
|
81
|
+
|
|
82
|
+
**Commit messages:** standard format, clear and descriptive. No attribution footers.
|
|
83
|
+
|
|
84
|
+
## Writing style
|
|
85
|
+
|
|
86
|
+
Be concise. If one line works, don't use three.
|
|
87
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-pusher
|
|
3
|
+
description: Commits and pushes code changes with pre-approved git operations
|
|
4
|
+
tools:
|
|
5
|
+
- Bash
|
|
6
|
+
- Skill
|
|
7
|
+
permissionMode: bypassPermissions
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Commit-Pusher Agent
|
|
11
|
+
|
|
12
|
+
You are a commit and push specialist. Invoke the /commit_push skill.
|
|
13
|
+
|
|
14
|
+
Before committing, verify that only the expected files (as listed in your launch prompt) are modified. If unexpected files are changed, stop and report back.
|
|
15
|
+
|
|
16
|
+
## Why `bypassPermissions`?
|
|
17
|
+
|
|
18
|
+
This agent uses `bypassPermissions` so that git add/commit/push commands are auto-approved
|
|
19
|
+
without adding them to the global permissions allow list. This is intentional:
|
|
20
|
+
|
|
21
|
+
- The **main conversation** must NOT have git add/commit/push permissions
|
|
22
|
+
- Only this agent (reachable via `/commit_push` skill) should be able to commit
|
|
23
|
+
- `acceptEdits` only auto-approves file edit tools (Edit/Write), not Bash commands
|
|
24
|
+
- `bypassPermissions` auto-approves all tool calls within this agent's scope
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Planning Principles
|
|
2
|
+
|
|
3
|
+
## Step Design
|
|
4
|
+
|
|
5
|
+
- **Merge tiny or intertwined steps.** Steps that are trivially small or tightly coupled should be combined. However, prefer several small steps over fewer large ones — small steps fit better in LLM context windows.
|
|
6
|
+
- **Split large steps.** Ideally each step can be completed such that pylint/pytest/mypy still pass afterward.
|
|
7
|
+
- **One step = one commit.** Each step should produce exactly one commit: write tests, implement, verify checks pass. If a step needs multiple fix-and-commit cycles, split it into smaller steps.
|
|
8
|
+
- **No separate "fix all issues" steps.** Quality checks passing is an exit criterion for each step, not a separate step.
|
|
9
|
+
- **No "verify everything" cleanup steps.** If each step leaves checks green, a final verification step is unnecessary. If you find yourself planning one, the earlier steps are too large.
|
|
10
|
+
- **Every step must have tangible results.** No preparation steps like "read docs" or "explore codebase" — analysis happens as part of implementation.
|
|
11
|
+
- **No need to fill in task tracker during planning.** This is done automatically as step 0 of implementation.
|
|
12
|
+
- **No rollback options needed.** Don't plan for how to undo steps.
|
|
13
|
+
|
|
14
|
+
## Testing
|
|
15
|
+
|
|
16
|
+
- **No manual tests.** All tests must be automated.
|
|
17
|
+
- **Test structure mirrors src structure.** Tests for `src/foo/bar.py` go in `tests/foo/test_bar.py`.
|
|
18
|
+
- **Parameterized tests** are a good idea to reduce the number of required test functions while covering more cases.
|
|
19
|
+
|
|
20
|
+
## Code Quality
|
|
21
|
+
|
|
22
|
+
- **If uncertain about the codebase, analyze it.** Don't guess — read the code and understand before planning changes.
|
|
23
|
+
- **If a question implies worsening code quality**, include small refactorings in the plan to actually improve it.
|
|
24
|
+
|
|
25
|
+
## Documentation
|
|
26
|
+
|
|
27
|
+
- **Docstrings** should document functions well, without examples.
|
|
28
|
+
- **CLI commands** should be documented via CLI help text and in the `docs/` folder.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Python Guidelines
|
|
2
|
+
|
|
3
|
+
- **f-strings are preferred.**
|
|
4
|
+
- **Use type hint syntax appropriate for the project's minimum supported Python version.**
|
|
5
|
+
- **Avoid conditional imports.** If a dependency is missing, stop and escalate to the user rather than working around it.
|
|
6
|
+
- **Tests for optional resources should skip, not fake.** When a test depends on something that may not be available (an optional SDK, a database, an API, a CLI tool), use `pytest.importorskip` or `pytest.mark.skipif` to skip transparently. Don't mock the resource just to make the test run everywhere — skipping is honest and avoids false confidence.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Refactoring Principles
|
|
2
|
+
|
|
3
|
+
Quick reference for refactoring rules and tools. For detailed process, examples, and checklists, see the [Safe Refactoring Guide](../../docs/processes-prompts/refactoring-guide.md).
|
|
4
|
+
|
|
5
|
+
## Key Rules
|
|
6
|
+
|
|
7
|
+
- **Move, don't change.** Logic changes belong in a separate PR.
|
|
8
|
+
- **Only adjust imports.** Use `move_symbol` — it updates imports automatically.
|
|
9
|
+
- **Clean deletion, no legacy artifacts.** No stubs, no re-exports for backward compatibility.
|
|
10
|
+
- **Small steps.** One module per PR. Keep diffs under 25,000 tokens.
|
|
11
|
+
- **Tests mirror source structure.**
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
|
|
15
|
+
1. Plan target structure
|
|
16
|
+
2. Move source code — `move_symbol` / `move_module`
|
|
17
|
+
3. Move tests to mirror new structure
|
|
18
|
+
4. Review diff — `mcp-coder git-tool compact-diff` (remaining diff should be imports only)
|
|
19
|
+
5. Run all checks — pytest, pylint, mypy, ruff
|
|
20
|
+
6. Check file sizes — `mcp-coder check file-size --max-lines 750`
|
|
21
|
+
|
|
22
|
+
See [Safe Refactoring Guide](../../docs/processes-prompts/refactoring-guide.md) for the full checklist.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Software Engineering Principles
|
|
2
|
+
|
|
3
|
+
## Quality Baseline
|
|
4
|
+
|
|
5
|
+
- **Every change should leave the code better than before.** Not just "no worse" — actively better. This is the expectation, not a stretch goal.
|
|
6
|
+
- **Boy Scout Rule** — when you touch a file, look for one small improvement: fix a misleading name, remove dead code you just created, clean an import you just changed. One good deed per PR, not a renovation.
|
|
7
|
+
- **Don't change working code for cosmetic reasons** when it's already readable.
|
|
8
|
+
|
|
9
|
+
## Code Review Scope
|
|
10
|
+
|
|
11
|
+
- **Pre-existing issues are out of scope.** Note them if important, but don't block the review or create fix-up work. File a separate issue if needed.
|
|
12
|
+
- **Review findings fall into three buckets:**
|
|
13
|
+
1. **Critical** — must fix before merge (bugs, regressions, security)
|
|
14
|
+
2. **Accept** — worth fixing now, bounded effort (Boy Scout fixes)
|
|
15
|
+
3. **Skip** — cosmetic, speculative, or pre-existing
|
|
16
|
+
- **If a change only matters when someone makes a future mistake, it's speculative — skip it.**
|
|
17
|
+
|
|
18
|
+
## Code Style
|
|
19
|
+
|
|
20
|
+
- **Clean Code, DRY, KISS** — encourage these consistently.
|
|
21
|
+
- **YAGNI** — don't build for hypothetical future requirements.
|
|
22
|
+
- **Test behavior, not implementation.** Cover the contract, not every corner.
|
|
23
|
+
- **Prefer readable code over comments.** If the code needs a comment to be understood, first try to make the code clearer. Add comments only when the *why* isn't obvious from the code itself.
|
|
24
|
+
- **Code duplication should be avoided**, especially when refactoring. No need to keep old interfaces.
|
|
25
|
+
|
|
26
|
+
## Don't Worry About
|
|
27
|
+
|
|
28
|
+
- **Line count estimates** — precise line numbers and line counts are not crucial. The LLM is not good at counting. Minor updates are not relevant.
|
|
29
|
+
- **Commit messages** — no need to clean them up if they have minor issues.
|
|
30
|
+
- **pr_info/ folder** — deleted later during the process. Can be read as background information.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"mcp__tools-py__run_pylint_check",
|
|
5
|
+
"mcp__tools-py__run_pytest_check",
|
|
6
|
+
"mcp__tools-py__run_mypy_check",
|
|
7
|
+
"mcp__tools-py__run_lint_imports_check",
|
|
8
|
+
"mcp__tools-py__run_vulture_check",
|
|
9
|
+
"mcp__tools-py__run_format_code",
|
|
10
|
+
"mcp__tools-py__list_symbols",
|
|
11
|
+
"mcp__tools-py__find_references",
|
|
12
|
+
"mcp__tools-py__move_symbol",
|
|
13
|
+
"mcp__tools-py__rename_symbol",
|
|
14
|
+
"mcp__tools-py__move_module",
|
|
15
|
+
"mcp__tools-py__get_library_source",
|
|
16
|
+
"mcp__workspace__get_reference_projects",
|
|
17
|
+
"mcp__workspace__list_reference_directory",
|
|
18
|
+
"mcp__workspace__read_reference_file",
|
|
19
|
+
"mcp__workspace__list_directory",
|
|
20
|
+
"mcp__workspace__read_file",
|
|
21
|
+
"mcp__workspace__save_file",
|
|
22
|
+
"mcp__workspace__append_file",
|
|
23
|
+
"mcp__workspace__delete_this_file",
|
|
24
|
+
"mcp__workspace__move_file",
|
|
25
|
+
"mcp__workspace__edit_file",
|
|
26
|
+
"Bash(git status:*)",
|
|
27
|
+
"Bash(git diff:*)",
|
|
28
|
+
"Bash(git log:*)",
|
|
29
|
+
"Bash(git fetch:*)",
|
|
30
|
+
"Bash(git ls-tree:*)",
|
|
31
|
+
"Bash(gh run view:*)",
|
|
32
|
+
"Bash(gh issue view:*)",
|
|
33
|
+
"Bash(mcp-coder check file-size:*)",
|
|
34
|
+
"Bash(mcp-coder check branch-status:*)",
|
|
35
|
+
"Bash(mcp-coder gh-tool:*)",
|
|
36
|
+
"Bash(mcp-coder git-tool:*)",
|
|
37
|
+
"Bash(find:*)",
|
|
38
|
+
"Bash(ruff rule:*)",
|
|
39
|
+
"Bash(ruff check:*)",
|
|
40
|
+
"Skill(commit_push)",
|
|
41
|
+
"Skill(discuss)",
|
|
42
|
+
"Skill(implementation_approve)",
|
|
43
|
+
"Skill(implementation_finalise)",
|
|
44
|
+
"Skill(implementation_needs_rework)",
|
|
45
|
+
"Skill(implementation_new_tasks)",
|
|
46
|
+
"Skill(implementation_review)",
|
|
47
|
+
"Skill(implementation_review_supervisor)",
|
|
48
|
+
"Skill(issue_analyse)",
|
|
49
|
+
"Skill(issue_approve)",
|
|
50
|
+
"Skill(issue_create)",
|
|
51
|
+
"Skill(issue_update)",
|
|
52
|
+
"Skill(plan_approve)",
|
|
53
|
+
"Skill(plan_review)",
|
|
54
|
+
"Skill(plan_review_supervisor)",
|
|
55
|
+
"Skill(plan_update)",
|
|
56
|
+
"Skill(rebase)",
|
|
57
|
+
"Skill(check_branch_status)",
|
|
58
|
+
"Skill(implement_direct)",
|
|
59
|
+
"WebFetch(domain:*)",
|
|
60
|
+
"mcp__workspace__search_files"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"enableAllProjectMcpServers": true,
|
|
64
|
+
"enabledMcpjsonServers": [
|
|
65
|
+
"tools-py",
|
|
66
|
+
"workspace"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Check branch readiness including CI, rebase needs, tasks, and labels
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- "Bash(mcp-coder check branch-status *)"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
!`mcp-coder check branch-status --ci-timeout 180 --llm-truncate`
|
|
9
|
+
|
|
10
|
+
# Check Branch Status
|
|
11
|
+
|
|
12
|
+
Checks CI status, rebase needs, task completion, and GitHub labels. Reports actionable recommendations.
|
|
13
|
+
|
|
14
|
+
## Follow-Up Actions
|
|
15
|
+
|
|
16
|
+
| Status | Action |
|
|
17
|
+
|--------|--------|
|
|
18
|
+
| CI failures | Fix the issues shown in CI error details |
|
|
19
|
+
| Rebase needed | `/rebase` |
|
|
20
|
+
| Tasks incomplete | Complete remaining tasks manually |
|
|
21
|
+
| CI green + tasks done | `/commit_push` or create PR |
|
|
22
|
+
| Ready to merge | Create PR or merge via GitHub |
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Format code, review changes, commit, and push to remote
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- "Bash(git status *)"
|
|
6
|
+
- "Bash(git diff *)"
|
|
7
|
+
- "Bash(git add *)"
|
|
8
|
+
- "Bash(git commit *)"
|
|
9
|
+
- "Bash(git push *)"
|
|
10
|
+
- "Bash(git log *)"
|
|
11
|
+
- mcp__tools-py__run_format_code
|
|
12
|
+
- Read
|
|
13
|
+
- Glob
|
|
14
|
+
- Grep
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Commit and Push Changes
|
|
18
|
+
|
|
19
|
+
Follow this process to commit and push your changes:
|
|
20
|
+
|
|
21
|
+
## 1. Format Code
|
|
22
|
+
Use `mcp__tools-py__run_format_code` to format all code (black + isort).
|
|
23
|
+
|
|
24
|
+
## 2. Review Changes
|
|
25
|
+
```bash
|
|
26
|
+
git status
|
|
27
|
+
git diff
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## 3. Stage Changes
|
|
31
|
+
Stage all relevant changes (exclude any files that shouldn't be committed).
|
|
32
|
+
|
|
33
|
+
## 4. Commit
|
|
34
|
+
Create a commit with a clear, conventional commit message:
|
|
35
|
+
- Use format: `type(scope): description`
|
|
36
|
+
- Types: feat, fix, docs, style, refactor, test, chore
|
|
37
|
+
- Keep summary under 50 characters
|
|
38
|
+
- **No Claude Code footer or attribution in commit message**
|
|
39
|
+
|
|
40
|
+
## 5. Push
|
|
41
|
+
```bash
|
|
42
|
+
git push
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
If the branch doesn't exist on remote yet:
|
|
46
|
+
```bash
|
|
47
|
+
git push -u origin HEAD
|
|
48
|
+
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Step-by-step discussion of open questions and suggestions
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Step-by-step Discussion
|
|
7
|
+
|
|
8
|
+
Interactively walk through all open suggestions, questions, and proposed changes one by one.
|
|
9
|
+
|
|
10
|
+
Can we go through all open suggested changes and questions step by step?
|
|
11
|
+
You explain, ask and I answer until we discussed all topics?
|
|
12
|
+
Please offer, whenever possible, simple options like
|
|
13
|
+
- A
|
|
14
|
+
- B
|
|
15
|
+
- C
|
|
16
|
+
Always just ask ONE question
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: implement-direct
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
argument-hint: [issue-number]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- "Bash(gh issue view *)"
|
|
7
|
+
- "Bash(mcp-coder gh-tool *)"
|
|
8
|
+
- mcp__workspace__read_file
|
|
9
|
+
- mcp__tools-py__run_format_code
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Implement Direct
|
|
13
|
+
|
|
14
|
+
Implement a small, well-defined issue directly — no planning phase, no task tracker.
|
|
15
|
+
|
|
16
|
+
## Resolve Issue Number
|
|
17
|
+
|
|
18
|
+
The user may provide an issue number as the argument (available as `$ARGUMENTS`).
|
|
19
|
+
If no issue number is provided:
|
|
20
|
+
1. Read `.vscodeclaude_status.txt` and extract the issue number from the `Issue #NNN` line
|
|
21
|
+
2. If the file doesn't exist or has no issue number, ask the user
|
|
22
|
+
|
|
23
|
+
## Steps
|
|
24
|
+
|
|
25
|
+
1. **Fetch issue details**
|
|
26
|
+
```bash
|
|
27
|
+
gh issue view <issue_number>
|
|
28
|
+
```
|
|
29
|
+
Read the issue title, description, and acceptance criteria carefully.
|
|
30
|
+
|
|
31
|
+
2. **Checkout/create issue branch**
|
|
32
|
+
```bash
|
|
33
|
+
mcp-coder gh-tool checkout-issue-branch <issue_number>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
3. **Understand context**
|
|
37
|
+
- Read relevant source files referenced in the issue
|
|
38
|
+
- Understand the existing code patterns and conventions
|
|
39
|
+
- Identify the minimal set of changes needed
|
|
40
|
+
|
|
41
|
+
4. **Implement changes**
|
|
42
|
+
- Make the required code changes directly
|
|
43
|
+
- Follow existing code patterns and conventions
|
|
44
|
+
- Keep changes focused and minimal — only what the issue requires
|
|
45
|
+
|
|
46
|
+
5. **Run quality checks**
|
|
47
|
+
- `mcp__tools-py__run_pylint_check` — fix all issues
|
|
48
|
+
- `mcp__tools-py__run_pytest_check` (with `extra_args: ["-n", "auto"]`) — fix all failures
|
|
49
|
+
- `mcp__tools-py__run_mypy_check` — fix all issues
|
|
50
|
+
- `./tools/ruff_check.sh` — fix all issues
|
|
51
|
+
|
|
52
|
+
6. **Format code**
|
|
53
|
+
Use `mcp__tools-py__run_format_code` to format all code (black + isort).
|
|
54
|
+
|
|
55
|
+
7. **Update issue status**
|
|
56
|
+
```bash
|
|
57
|
+
mcp-coder gh-tool set-status status-07:code-review
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
8. **Suggest follow-up steps**
|
|
61
|
+
- `/commit_push` — commit and push changes
|
|
62
|
+
- `/check_branch_status` — verify branch is clean
|
|
63
|
+
- `/implementation_review` — request a review of the implementation
|
|
64
|
+
|
|
65
|
+
## Scope Guidance
|
|
66
|
+
|
|
67
|
+
This skill is designed for **small, well-defined issues** that can be implemented in a single pass. If the issue is complex or involves multiple components, recommend the full workflow instead:
|
|
68
|
+
|
|
69
|
+
1. `/create_plan` — create a detailed implementation plan
|
|
70
|
+
2. `/implement` — implement the plan step by step
|
|
71
|
+
|
|
72
|
+
**Note:** This skill has `disable-model-invocation` — it can only be run by the user typing `/implement_direct`.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Approve implementation and transition issue to PR-ready state
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- "Bash(mcp-coder gh-tool set-status *)"
|
|
6
|
+
- "Bash(mcp-coder check branch-status *)"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Approve Implementation
|
|
10
|
+
|
|
11
|
+
Approve the implementation and transition the issue to PR-ready state.
|
|
12
|
+
|
|
13
|
+
**Instructions:**
|
|
14
|
+
1. Run branch-status check:
|
|
15
|
+
```bash
|
|
16
|
+
mcp-coder check branch-status --ci-timeout 400 --pr-timeout 600 --llm-truncate
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
2. If `branch-status` reports a base branch other than `main`, ask the user to confirm this is intentional before proceeding.
|
|
20
|
+
|
|
21
|
+
3. Only if the branch-status check passes (exit code 0), run the set-status command and confirm it succeeded:
|
|
22
|
+
```bash
|
|
23
|
+
mcp-coder gh-tool set-status status-08:ready-pr
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Note:** If the branch-status check fails, report the failures to the user and do not set the label. If the set-status command fails, report the error to the user. Do not use `--force` unless explicitly asked.
|
|
27
|
+
|
|
28
|
+
**Effect:** Changes issue status from `status-07:code-review` to `status-08:ready-pr`.
|
|
29
|
+
|
|
30
|
+
4. After the label is set, poll for the PR to be created and pass CI. This runs in the background — the background process creates the PR while it polls (up to 600s):
|
|
31
|
+
```bash
|
|
32
|
+
mcp-coder check branch-status --ci-timeout 400 --pr-timeout 600 --llm-truncate --wait-for-pr
|
|
33
|
+
```
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Complete remaining unchecked tasks in the task tracker
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Implementation Finalise
|
|
7
|
+
|
|
8
|
+
Complete any remaining unchecked tasks in the task tracker before transitioning to code review.
|
|
9
|
+
|
|
10
|
+
## Process
|
|
11
|
+
|
|
12
|
+
### 1. Read Task Tracker
|
|
13
|
+
|
|
14
|
+
Read `pr_info/TASK_TRACKER.md` and identify all unchecked tasks (`- [ ]`).
|
|
15
|
+
|
|
16
|
+
If all tasks are already checked (`- [x]`), report that no finalisation is needed and exit.
|
|
17
|
+
|
|
18
|
+
### 2. Process Each Unchecked Task
|
|
19
|
+
|
|
20
|
+
For each unchecked task:
|
|
21
|
+
|
|
22
|
+
#### Commit Message Tasks
|
|
23
|
+
|
|
24
|
+
If the task contains "commit message" (case-insensitive):
|
|
25
|
+
|
|
26
|
+
- if the tasks before are already done, ignore this task by marking it as done `[x]`
|
|
27
|
+
|
|
28
|
+
#### Other Tasks
|
|
29
|
+
|
|
30
|
+
- Check `pr_info/steps/` for related step files that provide context
|
|
31
|
+
- If step files don't exist, analyse based on task name and codebase
|
|
32
|
+
- Verify if the task is already complete
|
|
33
|
+
- If not complete: implement the required work
|
|
34
|
+
- If complete or successfully implemented: mark as `[x]`
|
|
35
|
+
- If unable to complete: DO NOT mark as done - explain the issue
|
|
36
|
+
|
|
37
|
+
### 3. Quality Checks (If Code Changed)
|
|
38
|
+
|
|
39
|
+
If any code changes were made during this process:
|
|
40
|
+
|
|
41
|
+
- Run pylint checks using the MCP server (fix all errors)
|
|
42
|
+
- Run pytest checks using the MCP server (fix all failures)
|
|
43
|
+
- Run mypy checks using the MCP server (fix all type errors)
|
|
44
|
+
|
|
45
|
+
## Output
|
|
46
|
+
|
|
47
|
+
Report:
|
|
48
|
+
|
|
49
|
+
1. Which tasks were processed
|
|
50
|
+
2. Which tasks were marked complete
|
|
51
|
+
3. Any issues encountered
|
|
52
|
+
4. Summarize the changes in a commit message and report it
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Return issue to plan-ready status for re-implementation after major review issues
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- "Bash(mcp-coder gh-tool set-status *)"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Return to plan-ready after major review issues
|
|
9
|
+
|
|
10
|
+
Transitions the issue back to `plan-ready` status for re-implementation when code review identifies major issues that cannot be fixed with minor changes.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
| Situation | Action |
|
|
15
|
+
|-----------|--------|
|
|
16
|
+
| Minor fixes | Fix directly, re-run `/implementation_review` or `/implementation_review_supervisor` |
|
|
17
|
+
| **Major issues** | **This command** (after `/implementation_new_tasks` + `/commit_push`) |
|
|
18
|
+
| Approved | `/implementation_approve` |
|
|
19
|
+
|
|
20
|
+
## Prerequisites
|
|
21
|
+
|
|
22
|
+
- New implementation steps created (`/implementation_new_tasks`)
|
|
23
|
+
- Changes committed and pushed (`/commit_push`)
|
|
24
|
+
|
|
25
|
+
## Instructions
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
mcp-coder gh-tool set-status status-05:plan-ready
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Confirm the status change was successful. If it fails, report the error. Do not use `--force` unless explicitly asked.
|
|
32
|
+
|
|
33
|
+
## Next Steps
|
|
34
|
+
|
|
35
|
+
Run `mcp-coder implement` to process the new steps, then `/implementation_review` or `/implementation_review_supervisor`.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create additional implementation steps after code review findings
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- mcp__workspace__read_file
|
|
6
|
+
- mcp__workspace__save_file
|
|
7
|
+
- mcp__workspace__edit_file
|
|
8
|
+
- mcp__workspace__list_directory
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Create Further Implementation Tasks
|
|
12
|
+
|
|
13
|
+
Append new implementation tasks to the project plan after code review identified areas needing additional work.
|
|
14
|
+
|
|
15
|
+
## Instructions
|
|
16
|
+
|
|
17
|
+
Please expand the **implementation plan** stored under `pr_info/steps`
|
|
18
|
+
Update the `pr_info/steps/Decisions.md` with the decisions we took.
|
|
19
|
+
Please create additional self-contained steps (`pr_info/steps/step_1.md`, `pr_info/steps/step_2.md`, etc.).
|
|
20
|
+
Please update the **summary** (`pr_info/steps/summary.md`).
|
|
21
|
+
|
|
22
|
+
### Requirements for the new implementation steps:
|
|
23
|
+
- Follow **Test-Driven Development** where applicable.
|
|
24
|
+
Each step should have its own test implementation followed by related functionality implementation.
|
|
25
|
+
- Each step must include a **clear LLM prompt** that references the summary and that specific step
|
|
26
|
+
- Apply **KISS principle** - minimize complexity, maximize maintainability
|
|
27
|
+
- Keep code changes minimal and follow best practices
|
|
28
|
+
|
|
29
|
+
### Each Step Must Specify:
|
|
30
|
+
- **WHERE**: File paths and module structure
|
|
31
|
+
- **WHAT**: Main functions with signatures
|
|
32
|
+
- **HOW**: Integration points (decorators, imports, etc.)
|
|
33
|
+
- **ALGORITHM**: 5-6 line pseudocode for core logic (if any)
|
|
34
|
+
- **DATA**: Return values and data structures
|
|
35
|
+
|
|
36
|
+
Please also update the task tracker (`pr_info/TASK_TRACKER.md`).
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Code review of implementation with compact diff analysis
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- "Bash(git fetch *)"
|
|
6
|
+
- "Bash(git status *)"
|
|
7
|
+
- "Bash(git diff *)"
|
|
8
|
+
- "Bash(mcp-coder git-tool *)"
|
|
9
|
+
- "Bash(mcp-coder check branch-status *)"
|
|
10
|
+
- mcp__workspace__read_file
|
|
11
|
+
- mcp__workspace__list_directory
|
|
12
|
+
- Glob
|
|
13
|
+
- Grep
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Implementation Review (Code Review)
|
|
17
|
+
|
|
18
|
+
**First, ensure we're up to date:**
|
|
19
|
+
```bash
|
|
20
|
+
git fetch
|
|
21
|
+
git status
|
|
22
|
+
mcp-coder check branch-status --llm-truncate
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Confirm and display the current feature branch name.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
**Then run the code review:**
|
|
30
|
+
|
|
31
|
+
## Code Review Request
|
|
32
|
+
|
|
33
|
+
Run this command to get the changes to review:
|
|
34
|
+
```bash
|
|
35
|
+
mcp-coder git-tool compact-diff
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
No need to run all checks; do not use pylint warnings. Feel free to further analyse any mentioned files and/or the file structure.
|
|
39
|
+
|
|
40
|
+
### Focus Areas:
|
|
41
|
+
- Logic errors or bugs
|
|
42
|
+
- Tests for `__main__` functions should be removed (not needed)
|
|
43
|
+
- Unnecessary debug code or print statements
|
|
44
|
+
- Code that could break existing functionality
|
|
45
|
+
- Compliance with existing architecture principles, see `docs/architecture/architecture.md`
|
|
46
|
+
|
|
47
|
+
### Output Format:
|
|
48
|
+
1. **Summary** - What changed (1-2 sentences)
|
|
49
|
+
2. **Critical Issues** - Must fix before merging
|
|
50
|
+
3. **Suggestions** - Nice to have improvements
|
|
51
|
+
4. **Good** - What works well
|
|
52
|
+
|
|
53
|
+
Do not perform any action. Just present the code review.
|