@memo-code/memo 0.7.3 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -8
- package/README.zh.md +39 -5
- package/dist/index.js +83 -94
- package/dist/task-prompts/init_agents.md +40 -0
- package/dist/task-prompts/review_pull_request.md +53 -0
- package/package.json +5 -2
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Generate a file named AGENTS.md that serves as a contributor guide for this repository.
|
|
2
|
+
Your goal is to produce a clear, concise, and well-structured document with descriptive headings and actionable explanations for each section.
|
|
3
|
+
Follow the outline below, but adapt as needed - add sections if relevant, and omit those that do not apply to this project.
|
|
4
|
+
|
|
5
|
+
Document Requirements
|
|
6
|
+
|
|
7
|
+
- Title the document "Repository Guidelines".
|
|
8
|
+
- Use Markdown headings (#, ##, etc.) for structure.
|
|
9
|
+
- Keep the document concise. 200-400 words is optimal.
|
|
10
|
+
- Keep explanations short, direct, and specific to this repository.
|
|
11
|
+
- Provide examples where helpful (commands, directory paths, naming patterns).
|
|
12
|
+
- Maintain a professional, instructional tone.
|
|
13
|
+
|
|
14
|
+
Recommended Sections
|
|
15
|
+
|
|
16
|
+
Project Structure & Module Organization
|
|
17
|
+
|
|
18
|
+
- Outline the project structure, including where the source code, tests, and assets are located.
|
|
19
|
+
|
|
20
|
+
Build, Test, and Development Commands
|
|
21
|
+
|
|
22
|
+
- List key commands for building, testing, and running locally (e.g., npm test, make build).
|
|
23
|
+
- Briefly explain what each command does.
|
|
24
|
+
|
|
25
|
+
Coding Style & Naming Conventions
|
|
26
|
+
|
|
27
|
+
- Specify indentation rules, language-specific style preferences, and naming patterns.
|
|
28
|
+
- Include any formatting or linting tools used.
|
|
29
|
+
|
|
30
|
+
Testing Guidelines
|
|
31
|
+
|
|
32
|
+
- Identify testing frameworks and coverage requirements.
|
|
33
|
+
- State test naming conventions and how to run tests.
|
|
34
|
+
|
|
35
|
+
Commit & Pull Request Guidelines
|
|
36
|
+
|
|
37
|
+
- Summarize commit message conventions found in the project's Git history.
|
|
38
|
+
- Outline pull request requirements (descriptions, linked issues, screenshots, etc.).
|
|
39
|
+
|
|
40
|
+
(Optional) Add other sections if relevant, such as Security & Configuration Tips, Architecture Overview, or Agent-Specific Instructions.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
You are running Memo's dedicated GitHub pull request review workflow.
|
|
2
|
+
|
|
3
|
+
Target PR number: {{pr_number}}
|
|
4
|
+
Backend strategy (selected by runtime): {{backend_strategy}}
|
|
5
|
+
Backend details: {{backend_details}}
|
|
6
|
+
|
|
7
|
+
Your job is to perform an end-to-end PR review and publish results directly to GitHub.
|
|
8
|
+
|
|
9
|
+
Required workflow
|
|
10
|
+
|
|
11
|
+
1. Connectivity preflight
|
|
12
|
+
|
|
13
|
+
- First verify the selected backend is usable for this PR operation.
|
|
14
|
+
- If backend preflight fails, stop and explain the exact failure and actionable fix.
|
|
15
|
+
|
|
16
|
+
2. Load PR context
|
|
17
|
+
|
|
18
|
+
- Read PR metadata, title, body, changed files, and full diff.
|
|
19
|
+
- Include enough context to evaluate correctness and risk.
|
|
20
|
+
|
|
21
|
+
3. Perform review
|
|
22
|
+
|
|
23
|
+
- Focus on: correctness regressions, potential bugs, security risks, API/behavior changes, missing edge-case handling, and maintainability issues.
|
|
24
|
+
- Ignore purely cosmetic style nits unless they hide a bug.
|
|
25
|
+
- Be specific and evidence-based; avoid speculative comments.
|
|
26
|
+
|
|
27
|
+
4. Publish GitHub review comments
|
|
28
|
+
|
|
29
|
+
- Post inline review comments for each concrete issue you found.
|
|
30
|
+
- Keep each comment concise and actionable.
|
|
31
|
+
- Use one comment per distinct issue.
|
|
32
|
+
|
|
33
|
+
5. Publish review summary
|
|
34
|
+
|
|
35
|
+
- Submit a final PR review summary comment.
|
|
36
|
+
- If no material issues were found, explicitly say so in the summary.
|
|
37
|
+
|
|
38
|
+
Backend policy
|
|
39
|
+
|
|
40
|
+
- If backend strategy is `github_mcp`:
|
|
41
|
+
- Prefer GitHub MCP tools for all GitHub operations.
|
|
42
|
+
- Prefer tools from the configured server prefix: `{{mcp_server_prefix}}_`.
|
|
43
|
+
- Do not switch to gh CLI unless MCP path is unavailable and you clearly explain why.
|
|
44
|
+
|
|
45
|
+
- If backend strategy is `gh_cli`:
|
|
46
|
+
- Use `exec_command` with GitHub CLI (`gh`) for all GitHub operations.
|
|
47
|
+
- Do not rely on GitHub MCP tools in this mode.
|
|
48
|
+
|
|
49
|
+
Result format to user
|
|
50
|
+
|
|
51
|
+
- Start with a short execution summary: backend used, PR inspected, and whether publishing succeeded.
|
|
52
|
+
- List key findings with file/line references.
|
|
53
|
+
- Confirm what was posted to GitHub (inline comments + final summary), or provide the exact failure reason.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memo-code/memo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "A lightweight coding agent that runs in your terminal",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
"dist/index.js",
|
|
12
12
|
"dist/prompt.md",
|
|
13
|
+
"dist/task-prompts/*.md",
|
|
13
14
|
"README.md",
|
|
14
15
|
"LICENSE"
|
|
15
16
|
],
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
"devDependencies": {
|
|
20
21
|
"@types/node": "^22.10.2",
|
|
21
22
|
"@types/react": "^19.2.14",
|
|
23
|
+
"@vitest/coverage-v8": "^2.1.9",
|
|
22
24
|
"prettier": "^3.3.3",
|
|
23
25
|
"tsup": "^8.3.5",
|
|
24
26
|
"tsx": "^4.19.2",
|
|
@@ -51,10 +53,11 @@
|
|
|
51
53
|
"format": "prettier --write \"{packages,site}/**/*.{ts,tsx,js,jsx,mjs,cjs,json,css,mdx}\" \"{package.json,pnpm-workspace.yaml,tsconfig.json,tsup.config.ts,vitest.config.ts,vitest.setup.ts,.prettierrc}\"",
|
|
52
54
|
"format:check": "prettier --check \"{packages,site}/**/*.{ts,tsx,js,jsx,mjs,cjs,json,css,mdx}\" \"{package.json,pnpm-workspace.yaml,tsconfig.json,tsup.config.ts,vitest.config.ts,vitest.setup.ts,.prettierrc}\"",
|
|
53
55
|
"test": "vitest run",
|
|
56
|
+
"test:coverage": "vitest run --coverage",
|
|
54
57
|
"test:core": "vitest run packages/core",
|
|
55
58
|
"test:tools": "vitest run packages/tools",
|
|
56
59
|
"test:tui": "vitest run packages/tui",
|
|
57
|
-
"ci": "pnpm run format:check && pnpm run test:
|
|
60
|
+
"ci": "pnpm run format:check && pnpm run test:coverage && pnpm run build",
|
|
58
61
|
"release:patch": "npm version patch && npm publish",
|
|
59
62
|
"release:minor": "npm version minor && npm publish",
|
|
60
63
|
"release:major": "npm version major && npm publish"
|