@ghyper9023/pi-dev-workflow 0.1.7

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 ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@ghyper9023/pi-dev-workflow",
3
+ "version": "0.1.7",
4
+ "keywords": [
5
+ "pi-package"
6
+ ],
7
+ "description": "Developer workflow toolkit for pi: git agents, code review, Karpathy guidelines, themes",
8
+ "homepage": "https://github.com/cherish-ltt/pi-dev-workflow#readme",
9
+ "bugs": {
10
+ "url": "https://github.com/cherish-ltt/pi-dev-workflow/issues"
11
+ },
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+ssh://git@github.com/cherish-ltt/pi-dev-workflow.git"
18
+ },
19
+ "license": "MIT",
20
+ "author": "ghyper9023",
21
+ "type": "commonjs",
22
+ "main": "index.js",
23
+ "scripts": {
24
+ "test": "echo \"Error: no test specified\" && exit 1"
25
+ },
26
+ "pi": {
27
+ "extensions": [
28
+ "./extensions"
29
+ ],
30
+ "skills": [
31
+ "./skills"
32
+ ],
33
+ "prompts": [
34
+ "./prompts"
35
+ ],
36
+ "themes": [
37
+ "./themes"
38
+ ]
39
+ }
40
+ }
@@ -0,0 +1,12 @@
1
+ ## 必须严格遵守 - 全局适用
2
+
3
+ ### 语言
4
+
5
+ - 使用**简体中文+英文专业名词**
6
+
7
+ ### task完成
8
+
9
+ - 在完成task后不主动commit或push,但可以提醒用户:
10
+ 1. review刚才的改动(输入/skill:review-html或1)
11
+ 2. 提交commit,自动message(输入/git-commit或2)
12
+ 3. 提交commit,自动message,并push(输入/git-commit-push或3)
@@ -0,0 +1,2 @@
1
+ Review代码,最近提交的内容(时间相差6小时以内的),输出html,参照skill:review-html.
2
+ Focus on: {{focus}}
@@ -0,0 +1,2 @@
1
+ Review代码,当前git-diff,输出html,参照skill:review-html.
2
+ Focus on: {{focus}}
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: karpathy-guidelines
3
+ description: Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.
4
+ license: MIT
5
+ ---
6
+
7
+ # Karpathy Guidelines
8
+
9
+ Behavioral guidelines to reduce common LLM coding mistakes, derived from [Andrej Karpathy's observations](https://x.com/karpathy/status/2015883857489522876) on LLM coding pitfalls.
10
+
11
+ **Tradeoff:** These guidelines bias toward caution over speed. For trivial tasks, use judgment.
12
+
13
+ ## 1. Think Before Coding
14
+
15
+ **Don't assume. Don't hide confusion. Surface tradeoffs.**
16
+
17
+ Before implementing:
18
+ - State your assumptions explicitly. If uncertain, ask.
19
+ - If multiple interpretations exist, present them - don't pick silently.
20
+ - If a simpler approach exists, say so. Push back when warranted.
21
+ - If something is unclear, stop. Name what's confusing. Ask.
22
+
23
+ ## 2. Simplicity First
24
+
25
+ **Minimum code that solves the problem. Nothing speculative.**
26
+
27
+ - No features beyond what was asked.
28
+ - No abstractions for single-use code.
29
+ - No "flexibility" or "configurability" that wasn't requested.
30
+ - No error handling for impossible scenarios.
31
+ - If you write 200 lines and it could be 50, rewrite it.
32
+
33
+ Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
34
+
35
+ ## 3. Surgical Changes
36
+
37
+ **Touch only what you must. Clean up only your own mess.**
38
+
39
+ When editing existing code:
40
+ - Don't "improve" adjacent code, comments, or formatting.
41
+ - Don't refactor things that aren't broken.
42
+ - Match existing style, even if you'd do it differently.
43
+ - If you notice unrelated dead code, mention it - don't delete it.
44
+
45
+ When your changes create orphans:
46
+ - Remove imports/variables/functions that YOUR changes made unused.
47
+ - Don't remove pre-existing dead code unless asked.
48
+
49
+ The test: Every changed line should trace directly to the user's request.
50
+
51
+ ## 4. Goal-Driven Execution
52
+
53
+ **Define success criteria. Loop until verified.**
54
+
55
+ Transform tasks into verifiable goals:
56
+ - "Add validation" → "Write tests for invalid inputs, then make them pass"
57
+ - "Fix the bug" → "Write a test that reproduces it, then make it pass"
58
+ - "Refactor X" → "Ensure tests pass before and after"
59
+
60
+ For multi-step tasks, state a brief plan:
61
+ ```
62
+ 1. [Step] → verify: [check]
63
+ 2. [Step] → verify: [check]
64
+ 3. [Step] → verify: [check]
65
+ ```
66
+
67
+ Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: review-html
3
+ description: review 代码并输出交互式 HTML 报告。适用于代码审查,git-diff评审。
4
+ ---
5
+
6
+ 你是一个代码审查助手。用户要求你审查**当前代码库**的改动,具体包括:
7
+ - `git diff` 相对于 HEAD 的所有未提交改动(未指明范围时默认行为,如diff无变动则默认最近1次commit,默认不允许探索整个代码库除非用户明确要求)
8
+ - 最近 **2(或几个) 个 commit** 的完整改动(使用 `git log -p -n 2`)
9
+ - 完整的整个代码库
10
+
11
+ ## 硬性输出要求
12
+
13
+ **不要输出任何 Markdown 格式(包括代码块标记 ` ```html ` 等)**
14
+ **直接从 `<!DOCTYPE html>` 开始输出一个完整的、自包含的 HTML 文档。**
15
+ **使用中文+英文专业名词**
16
+
17
+ ### review 的约束
18
+
19
+ 1. **BUG**:发现潜在bug,重要程度:最高。
20
+ 2. **敏感信息**:敏感信息泄露,敏感信息文件在gitignore忘记添加,重要程度:高。
21
+ 3. **可维护性**:代码解耦,结构清晰,冗余代码优化,重要程度:中。
22
+ 4. **规范**:代码规范,代码风格,重要程度:低。
23
+ 6. **语法糖**:适合当前语言的高阶语法帮助优化代码,维持原逻辑和无bug>性能提升大>可读性>性能提升可忽略>缩短代码行数,重要程度:低。
24
+ 7. **其他**:其他问题。
25
+
26
+ ### HTML 内容的约束
27
+
28
+ 1. **外观**:使用简单的现代 CSS(白/灰背景,清晰字体)。
29
+ 2. **交互**:如需:提供折叠/展开功能,便于快速浏览多个文件的审查意见。
30
+ - 默认只展示文件名称和问题数量,点击文件名可展开详细审查意见。
31
+ 3. **内容**:对于每个改动文件,至少包含:
32
+ - 文件路径
33
+ - 改动摘要(+/- 行数)
34
+ - 具体审查意见(潜在 bug、代码风格、可维护性等)
35
+ 4. **轻量**:不引用外部 CDN,全部内联(CSS,JS少量)。总 HTML 大小控制在 300 行以内(最大700行),避免浪费 token。
36
+
37
+ ## 执行步骤
38
+
39
+ 1. 运行 `git diff` 获取未暂存/未提交的改动或运行 `git log -p -n 2` 获取最近 2 个 commit 的详细改动或查看完整项目。
40
+ 2. 合并上述改动,按文件分组。
41
+ 3. 对每个改动文件进行审查,并生成上述 HTML。
42
+
43
+ 请立即输出 HTML 文件到项目根目录的pi-review文件夹(没有则创建,同时添加文件夹到gitignore),不要加任何解释性文字,不需要输出大量md说明,简短说明工作完成和输出文件即可。
44
+ HTML文件名称格式:年月日时分-任务简述(极简10词以内)-index.html,有同名则index+1。
45
+ 如果review未发现必须需要修改(重要程度>=中)的问题,如果改动未提交,则html简约输出只说明改动总结即可,无需交互,并在开头附带规范的git-commit信息便于用户提交。
@@ -0,0 +1,90 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/earendil-works/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
3
+ "name": "claude-code-theme",
4
+ "vars": {
5
+ "amber": "#c9a84c",
6
+ "amberBright": "#dbb85a",
7
+ "violet": "#7c3aed",
8
+ "violetBright": "#a78bfa",
9
+ "green": "#4ade80",
10
+ "red": "#f87171",
11
+ "yellow": "#fbbf24",
12
+ "cyan": "#22d3ee",
13
+ "gray": "#6b7280",
14
+ "dimGray": "#4b5563",
15
+ "darkGray": "#374151",
16
+ "darkerBg": "#111827",
17
+ "darkBg": "#1f2937",
18
+ "midBg": "#1e1e2e",
19
+ "selectedBg": "#2d2d44",
20
+ "userMsgBg": "#1c1c2e",
21
+ "toolPendingBg": "#1a1a2e",
22
+ "toolSuccessBg": "#1a2e1a",
23
+ "toolErrorBg": "#2e1a1a",
24
+ "customMsgBg": "#221a2e"
25
+ },
26
+ "colors": {
27
+ "accent": "amber",
28
+ "border": "violet",
29
+ "borderAccent": "amberBright",
30
+ "borderMuted": "dimGray",
31
+ "success": "green",
32
+ "error": "red",
33
+ "warning": "yellow",
34
+ "muted": "gray",
35
+ "dim": "dimGray",
36
+ "text": "",
37
+ "thinkingText": "gray",
38
+
39
+ "selectedBg": "selectedBg",
40
+ "userMessageBg": "userMsgBg",
41
+ "userMessageText": "",
42
+ "customMessageBg": "customMsgBg",
43
+ "customMessageText": "",
44
+ "customMessageLabel": "violetBright",
45
+ "toolPendingBg": "toolPendingBg",
46
+ "toolSuccessBg": "toolSuccessBg",
47
+ "toolErrorBg": "toolErrorBg",
48
+ "toolTitle": "amber",
49
+ "toolOutput": "",
50
+
51
+ "mdHeading": "amberBright",
52
+ "mdLink": "violetBright",
53
+ "mdLinkUrl": "gray",
54
+ "mdCode": "amber",
55
+ "mdCodeBlock": "cyan",
56
+ "mdCodeBlockBorder": "dimGray",
57
+ "mdQuote": "gray",
58
+ "mdQuoteBorder": "dimGray",
59
+ "mdHr": "dimGray",
60
+ "mdListBullet": "amber",
61
+
62
+ "toolDiffAdded": "green",
63
+ "toolDiffRemoved": "red",
64
+ "toolDiffContext": "gray",
65
+
66
+ "syntaxComment": "#6b7280",
67
+ "syntaxKeyword": "#a78bfa",
68
+ "syntaxFunction": "#fbbf24",
69
+ "syntaxVariable": "#22d3ee",
70
+ "syntaxString": "#4ade80",
71
+ "syntaxNumber": "#f87171",
72
+ "syntaxType": "#2dd4bf",
73
+ "syntaxOperator": "#e5e7eb",
74
+ "syntaxPunctuation": "#9ca3af",
75
+
76
+ "thinkingOff": "darkGray",
77
+ "thinkingMinimal": "#4b5563",
78
+ "thinkingLow": "#6b7280",
79
+ "thinkingMedium": "#7c3aed",
80
+ "thinkingHigh": "#a78bfa",
81
+ "thinkingXhigh": "#c084fc",
82
+
83
+ "bashMode": "green"
84
+ },
85
+ "export": {
86
+ "pageBg": "#111827",
87
+ "cardBg": "#1f2937",
88
+ "infoBg": "#2d2d44"
89
+ }
90
+ }