@thuanphan2208/paper-pilot 1.0.0 → 1.0.2
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/.claude/commands/paper/cite.md +10 -0
- package/.claude/commands/paper/explore.md +10 -0
- package/.claude/commands/paper/plan.md +10 -0
- package/.claude/commands/paper/review.md +14 -0
- package/.claude/skills/paper-cite/SKILL.md +382 -0
- package/.claude/skills/paper-explore/SKILL.md +96 -1
- package/.claude/skills/paper-plan/SKILL.md +100 -2
- package/.claude/skills/paper-review/SKILL.md +1 -1
- package/.claude/skills/paper-teach-abstract/SKILL.md +1 -1
- package/.claude/skills/paper-teach-conclusion/SKILL.md +1 -1
- package/.claude/skills/paper-teach-experiment/SKILL.md +1 -1
- package/.claude/skills/paper-teach-intro/SKILL.md +107 -7
- package/.claude/skills/paper-teach-method/SKILL.md +1 -1
- package/.claude/skills/paper-teach-related/SKILL.md +2 -2
- package/.claude/skills/paper-teach-results/SKILL.md +1 -1
- package/.claude/skills/paper-write-abstract/SKILL.md +1 -1
- package/.claude/skills/paper-write-conclusion/SKILL.md +1 -1
- package/.claude/skills/paper-write-experiment/SKILL.md +1 -1
- package/.claude/skills/paper-write-intro/SKILL.md +30 -9
- package/.claude/skills/paper-write-method/SKILL.md +1 -1
- package/.claude/skills/paper-write-related/SKILL.md +132 -6
- package/.claude/skills/paper-write-results/SKILL.md +1 -1
- package/README.md +127 -2
- package/bin/cli.js +46 -46
- package/package.json +36 -29
- package/src/init.js +111 -111
package/README.md
CHANGED
|
@@ -1,2 +1,127 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
1
|
+
# paper-pilot
|
|
2
|
+
|
|
3
|
+
> Claude Code skills for writing research papers — from brainstorming to final draft.
|
|
4
|
+
> Works across all academic majors. Supports LaTeX, Word, and Markdown.
|
|
5
|
+
|
|
6
|
+
## Quick Start
|
|
7
|
+
|
|
8
|
+
Make sure you have [Claude Code](https://claude.ai/code) installed, then run:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx @thuanphan2208/paper-pilot init
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
That's it. Open the project in Claude Code and start with:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
/paper:explore
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## What Gets Installed
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
your-project/
|
|
26
|
+
├── .claude/
|
|
27
|
+
│ ├── commands/paper/ ← /paper:explore, plan, teach, write, review
|
|
28
|
+
│ └── skills/ ← 17 skill files
|
|
29
|
+
└── paper/
|
|
30
|
+
├── sections/ ← your drafts go here
|
|
31
|
+
└── notes/
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## The Writing Flow
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
/paper:explore Find your topic and research gap
|
|
40
|
+
↓
|
|
41
|
+
/paper:plan Plan structure, generate outline
|
|
42
|
+
↓
|
|
43
|
+
/paper:teach <section> Learn how to write each section
|
|
44
|
+
↓
|
|
45
|
+
/paper:write <section> Draft with guided Q&A
|
|
46
|
+
↓
|
|
47
|
+
/paper:review <section> Get reviewer-style feedback
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Sections supported
|
|
51
|
+
|
|
52
|
+
`intro` · `related` · `method` · `experiment` · `results` · `conclusion` · `abstract`
|
|
53
|
+
|
|
54
|
+
> Write **abstract last** — it summarizes everything else.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Paper Types Supported
|
|
59
|
+
|
|
60
|
+
| Type | What it is |
|
|
61
|
+
|------|-----------|
|
|
62
|
+
| `empirical` | Runs experiments, collects data, compares methods |
|
|
63
|
+
| `review` | Surveys and synthesizes existing literature |
|
|
64
|
+
| `theoretical` | Proposes a framework, model, or theory |
|
|
65
|
+
| `mixed` | Combines empirical work with theoretical framing |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Writing Formats Supported
|
|
70
|
+
|
|
71
|
+
| Format | How to write |
|
|
72
|
+
|--------|-------------|
|
|
73
|
+
| `latex` | Overleaf or `.tex` files |
|
|
74
|
+
| `word` | Microsoft Word or Google Docs |
|
|
75
|
+
| `markdown` | Obsidian, Notion, Pandoc |
|
|
76
|
+
|
|
77
|
+
Set your format once during `/paper:plan` — all sections will use it automatically.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Requirements
|
|
82
|
+
|
|
83
|
+
- [Claude Code](https://claude.ai/code) installed
|
|
84
|
+
- Node.js ≥ 18
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Install Options
|
|
89
|
+
|
|
90
|
+
**One-time use (recommended):**
|
|
91
|
+
```bash
|
|
92
|
+
npx @thuanphan2208/paper-pilot init
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Global install:**
|
|
96
|
+
```bash
|
|
97
|
+
npm install -g @thuanphan2208/paper-pilot
|
|
98
|
+
paper-pilot init
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Preview what will be installed:**
|
|
102
|
+
```bash
|
|
103
|
+
npx @thuanphan2208/paper-pilot init --dry-run
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Updating to the Latest Version
|
|
109
|
+
|
|
110
|
+
If you installed via **global install**:
|
|
111
|
+
```bash
|
|
112
|
+
npm install -g @thuanphan2208/paper-pilot@latest
|
|
113
|
+
paper-pilot init
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
If you used **npx**:
|
|
117
|
+
```bash
|
|
118
|
+
npx @thuanphan2208/paper-pilot@latest init
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
> `init` uses a merge strategy — it only adds new or updated files, never overwrites your existing `paper/` drafts or `context.yaml`.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
MIT
|
package/bin/cli.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
const { init } = require('../src/init');
|
|
5
|
-
|
|
6
|
-
const args = process.argv.slice(2);
|
|
7
|
-
const command = args[0];
|
|
8
|
-
const flags = args.slice(1);
|
|
9
|
-
const dryRun = flags.includes('--dry-run');
|
|
10
|
-
|
|
11
|
-
const BOLD = '\x1b[1m';
|
|
12
|
-
const RESET = '\x1b[0m';
|
|
13
|
-
|
|
14
|
-
switch (command) {
|
|
15
|
-
case 'init':
|
|
16
|
-
init({ dryRun });
|
|
17
|
-
break;
|
|
18
|
-
|
|
19
|
-
case '--version':
|
|
20
|
-
case '-v': {
|
|
21
|
-
const pkg = require('../package.json');
|
|
22
|
-
console.log(pkg.version);
|
|
23
|
-
break;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
case '--help':
|
|
27
|
-
case '-h':
|
|
28
|
-
case undefined:
|
|
29
|
-
console.log(`
|
|
30
|
-
${BOLD}paper-pilot${RESET} — Install Claude Code paper-writing skills into your project
|
|
31
|
-
|
|
32
|
-
Usage:
|
|
33
|
-
npx paper-pilot init Install skills into current directory
|
|
34
|
-
npx paper-pilot init --dry-run Preview what would be installed
|
|
35
|
-
npx paper-pilot --version Show version
|
|
36
|
-
npx paper-pilot --help Show this help
|
|
37
|
-
|
|
38
|
-
After init, open Claude Code and run /paper:explore to get started.
|
|
39
|
-
`);
|
|
40
|
-
break;
|
|
41
|
-
|
|
42
|
-
default:
|
|
43
|
-
console.error(`Unknown command: ${command}`);
|
|
44
|
-
console.error('Run "npx paper-pilot --help" for usage.');
|
|
45
|
-
process.exit(1);
|
|
46
|
-
}
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { init } = require('../src/init');
|
|
5
|
+
|
|
6
|
+
const args = process.argv.slice(2);
|
|
7
|
+
const command = args[0];
|
|
8
|
+
const flags = args.slice(1);
|
|
9
|
+
const dryRun = flags.includes('--dry-run');
|
|
10
|
+
|
|
11
|
+
const BOLD = '\x1b[1m';
|
|
12
|
+
const RESET = '\x1b[0m';
|
|
13
|
+
|
|
14
|
+
switch (command) {
|
|
15
|
+
case 'init':
|
|
16
|
+
init({ dryRun });
|
|
17
|
+
break;
|
|
18
|
+
|
|
19
|
+
case '--version':
|
|
20
|
+
case '-v': {
|
|
21
|
+
const pkg = require('../package.json');
|
|
22
|
+
console.log(pkg.version);
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
case '--help':
|
|
27
|
+
case '-h':
|
|
28
|
+
case undefined:
|
|
29
|
+
console.log(`
|
|
30
|
+
${BOLD}paper-pilot${RESET} — Install Claude Code paper-writing skills into your project
|
|
31
|
+
|
|
32
|
+
Usage:
|
|
33
|
+
npx paper-pilot init Install skills into current directory
|
|
34
|
+
npx paper-pilot init --dry-run Preview what would be installed
|
|
35
|
+
npx paper-pilot --version Show version
|
|
36
|
+
npx paper-pilot --help Show this help
|
|
37
|
+
|
|
38
|
+
After init, open Claude Code and run /paper:explore to get started.
|
|
39
|
+
`);
|
|
40
|
+
break;
|
|
41
|
+
|
|
42
|
+
default:
|
|
43
|
+
console.error(`Unknown command: ${command}`);
|
|
44
|
+
console.error('Run "npx paper-pilot --help" for usage.');
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|
package/package.json
CHANGED
|
@@ -1,29 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@thuanphan2208/paper-pilot",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Install Claude Code paper-writing skills into any project with one command.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@thuanphan2208/paper-pilot",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Install Claude Code paper-writing skills into any project with one command.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"claude",
|
|
7
|
+
"claude-code",
|
|
8
|
+
"research",
|
|
9
|
+
"paper",
|
|
10
|
+
"skills",
|
|
11
|
+
"academic"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/ThuanPne/Claude_Skills-for-Research",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/ThuanPne/Claude_Skills-for-Research.git"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"bin": {
|
|
20
|
+
"paper-pilot": "./bin/cli.js"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"bin/",
|
|
24
|
+
"src/",
|
|
25
|
+
".claude/"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"test": "node bin/cli.js init --dry-run"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=18.0.0"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
}
|
|
36
|
+
}
|
package/src/init.js
CHANGED
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
const GREEN = '\x1b[32m';
|
|
5
|
-
const YELLOW = '\x1b[33m';
|
|
6
|
-
const CYAN = '\x1b[36m';
|
|
7
|
-
const BOLD = '\x1b[1m';
|
|
8
|
-
const RESET = '\x1b[0m';
|
|
9
|
-
|
|
10
|
-
function log(msg) { process.stdout.write(msg + '\n'); }
|
|
11
|
-
function success(msg) { log(`${GREEN}✓${RESET} ${msg}`); }
|
|
12
|
-
function skip(msg) { log(`${YELLOW}─${RESET} ${msg} (already exists, skipped)`); }
|
|
13
|
-
function info(msg) { log(`${CYAN} ${msg}${RESET}`); }
|
|
14
|
-
|
|
15
|
-
function copyDirMerge(src, dest, dryRun = false) {
|
|
16
|
-
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
17
|
-
let copied = 0;
|
|
18
|
-
let skipped = 0;
|
|
19
|
-
|
|
20
|
-
for (const entry of entries) {
|
|
21
|
-
const srcPath = path.join(src, entry.name);
|
|
22
|
-
const destPath = path.join(dest, entry.name);
|
|
23
|
-
|
|
24
|
-
if (entry.isDirectory()) {
|
|
25
|
-
if (!dryRun && !fs.existsSync(destPath)) {
|
|
26
|
-
fs.mkdirSync(destPath, { recursive: true });
|
|
27
|
-
}
|
|
28
|
-
const result = copyDirMerge(srcPath, destPath, dryRun);
|
|
29
|
-
copied += result.copied;
|
|
30
|
-
skipped += result.skipped;
|
|
31
|
-
} else {
|
|
32
|
-
if (fs.existsSync(destPath)) {
|
|
33
|
-
skip(path.relative(process.cwd(), destPath));
|
|
34
|
-
skipped++;
|
|
35
|
-
} else {
|
|
36
|
-
if (!dryRun) {
|
|
37
|
-
fs.mkdirSync(dest, { recursive: true });
|
|
38
|
-
fs.copyFileSync(srcPath, destPath);
|
|
39
|
-
}
|
|
40
|
-
success(path.relative(process.cwd(), destPath));
|
|
41
|
-
copied++;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return { copied, skipped };
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function ensureDir(dirPath, dryRun = false) {
|
|
50
|
-
if (fs.existsSync(dirPath)) {
|
|
51
|
-
skip(path.relative(process.cwd(), dirPath) + '/');
|
|
52
|
-
} else {
|
|
53
|
-
if (!dryRun) fs.mkdirSync(dirPath, { recursive: true });
|
|
54
|
-
success(path.relative(process.cwd(), dirPath) + '/');
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function init({ dryRun = false } = {}) {
|
|
59
|
-
const packageRoot = path.join(__dirname, '..');
|
|
60
|
-
const destRoot = process.cwd();
|
|
61
|
-
|
|
62
|
-
log('');
|
|
63
|
-
log(`${BOLD}paper-pilot init${RESET}${dryRun ? ' (dry run)' : ''}`);
|
|
64
|
-
log('─'.repeat(50));
|
|
65
|
-
|
|
66
|
-
// 1. Copy .claude/ (skills + commands)
|
|
67
|
-
const claudeSrc = path.join(packageRoot, '.claude');
|
|
68
|
-
const claudeDest = path.join(destRoot, '.claude');
|
|
69
|
-
|
|
70
|
-
if (!fs.existsSync(claudeSrc)) {
|
|
71
|
-
log(`\x1b[31mError: .claude/ not found in package. Reinstall paper-pilot.\x1b[0m`);
|
|
72
|
-
process.exit(1);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
log(`\nInstalling skills into ${CYAN}.claude/${RESET}`);
|
|
76
|
-
const { copied, skipped } = copyDirMerge(claudeSrc, claudeDest, dryRun);
|
|
77
|
-
|
|
78
|
-
// 2. Create paper/sections/ directory
|
|
79
|
-
log(`\nCreating paper workspace`);
|
|
80
|
-
ensureDir(path.join(destRoot, 'paper'), dryRun);
|
|
81
|
-
ensureDir(path.join(destRoot, 'paper', 'sections'), dryRun);
|
|
82
|
-
|
|
83
|
-
// 3. Create paper/notes/.gitkeep if not present
|
|
84
|
-
const notesDir = path.join(destRoot, 'paper', 'notes');
|
|
85
|
-
const notesKeep = path.join(notesDir, '.gitkeep');
|
|
86
|
-
if (!fs.existsSync(notesKeep)) {
|
|
87
|
-
if (!dryRun) {
|
|
88
|
-
fs.mkdirSync(notesDir, { recursive: true });
|
|
89
|
-
fs.writeFileSync(notesKeep, '');
|
|
90
|
-
}
|
|
91
|
-
success('paper/notes/');
|
|
92
|
-
} else {
|
|
93
|
-
skip('paper/notes/');
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// 4. Summary
|
|
97
|
-
log('');
|
|
98
|
-
log('─'.repeat(50));
|
|
99
|
-
log(`${copied} file(s) installed, ${skipped} skipped`);
|
|
100
|
-
log('');
|
|
101
|
-
log(`${BOLD}You're ready! Open Claude Code and run:${RESET}`);
|
|
102
|
-
log('');
|
|
103
|
-
info('/paper:explore ← find your research topic');
|
|
104
|
-
info('/paper:plan ← plan your paper structure');
|
|
105
|
-
info('/paper:teach ← learn how to write each section');
|
|
106
|
-
info('/paper:write ← draft each section with AI guidance');
|
|
107
|
-
info('/paper:review ← get feedback on your drafts');
|
|
108
|
-
log('');
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
module.exports = { init };
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const GREEN = '\x1b[32m';
|
|
5
|
+
const YELLOW = '\x1b[33m';
|
|
6
|
+
const CYAN = '\x1b[36m';
|
|
7
|
+
const BOLD = '\x1b[1m';
|
|
8
|
+
const RESET = '\x1b[0m';
|
|
9
|
+
|
|
10
|
+
function log(msg) { process.stdout.write(msg + '\n'); }
|
|
11
|
+
function success(msg) { log(`${GREEN}✓${RESET} ${msg}`); }
|
|
12
|
+
function skip(msg) { log(`${YELLOW}─${RESET} ${msg} (already exists, skipped)`); }
|
|
13
|
+
function info(msg) { log(`${CYAN} ${msg}${RESET}`); }
|
|
14
|
+
|
|
15
|
+
function copyDirMerge(src, dest, dryRun = false) {
|
|
16
|
+
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
17
|
+
let copied = 0;
|
|
18
|
+
let skipped = 0;
|
|
19
|
+
|
|
20
|
+
for (const entry of entries) {
|
|
21
|
+
const srcPath = path.join(src, entry.name);
|
|
22
|
+
const destPath = path.join(dest, entry.name);
|
|
23
|
+
|
|
24
|
+
if (entry.isDirectory()) {
|
|
25
|
+
if (!dryRun && !fs.existsSync(destPath)) {
|
|
26
|
+
fs.mkdirSync(destPath, { recursive: true });
|
|
27
|
+
}
|
|
28
|
+
const result = copyDirMerge(srcPath, destPath, dryRun);
|
|
29
|
+
copied += result.copied;
|
|
30
|
+
skipped += result.skipped;
|
|
31
|
+
} else {
|
|
32
|
+
if (fs.existsSync(destPath)) {
|
|
33
|
+
skip(path.relative(process.cwd(), destPath));
|
|
34
|
+
skipped++;
|
|
35
|
+
} else {
|
|
36
|
+
if (!dryRun) {
|
|
37
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
38
|
+
fs.copyFileSync(srcPath, destPath);
|
|
39
|
+
}
|
|
40
|
+
success(path.relative(process.cwd(), destPath));
|
|
41
|
+
copied++;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return { copied, skipped };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function ensureDir(dirPath, dryRun = false) {
|
|
50
|
+
if (fs.existsSync(dirPath)) {
|
|
51
|
+
skip(path.relative(process.cwd(), dirPath) + '/');
|
|
52
|
+
} else {
|
|
53
|
+
if (!dryRun) fs.mkdirSync(dirPath, { recursive: true });
|
|
54
|
+
success(path.relative(process.cwd(), dirPath) + '/');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function init({ dryRun = false } = {}) {
|
|
59
|
+
const packageRoot = path.join(__dirname, '..');
|
|
60
|
+
const destRoot = process.cwd();
|
|
61
|
+
|
|
62
|
+
log('');
|
|
63
|
+
log(`${BOLD}paper-pilot init${RESET}${dryRun ? ' (dry run)' : ''}`);
|
|
64
|
+
log('─'.repeat(50));
|
|
65
|
+
|
|
66
|
+
// 1. Copy .claude/ (skills + commands)
|
|
67
|
+
const claudeSrc = path.join(packageRoot, '.claude');
|
|
68
|
+
const claudeDest = path.join(destRoot, '.claude');
|
|
69
|
+
|
|
70
|
+
if (!fs.existsSync(claudeSrc)) {
|
|
71
|
+
log(`\x1b[31mError: .claude/ not found in package. Reinstall paper-pilot.\x1b[0m`);
|
|
72
|
+
process.exit(1);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
log(`\nInstalling skills into ${CYAN}.claude/${RESET}`);
|
|
76
|
+
const { copied, skipped } = copyDirMerge(claudeSrc, claudeDest, dryRun);
|
|
77
|
+
|
|
78
|
+
// 2. Create paper/sections/ directory
|
|
79
|
+
log(`\nCreating paper workspace`);
|
|
80
|
+
ensureDir(path.join(destRoot, 'paper'), dryRun);
|
|
81
|
+
ensureDir(path.join(destRoot, 'paper', 'sections'), dryRun);
|
|
82
|
+
|
|
83
|
+
// 3. Create paper/notes/.gitkeep if not present
|
|
84
|
+
const notesDir = path.join(destRoot, 'paper', 'notes');
|
|
85
|
+
const notesKeep = path.join(notesDir, '.gitkeep');
|
|
86
|
+
if (!fs.existsSync(notesKeep)) {
|
|
87
|
+
if (!dryRun) {
|
|
88
|
+
fs.mkdirSync(notesDir, { recursive: true });
|
|
89
|
+
fs.writeFileSync(notesKeep, '');
|
|
90
|
+
}
|
|
91
|
+
success('paper/notes/');
|
|
92
|
+
} else {
|
|
93
|
+
skip('paper/notes/');
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// 4. Summary
|
|
97
|
+
log('');
|
|
98
|
+
log('─'.repeat(50));
|
|
99
|
+
log(`${copied} file(s) installed, ${skipped} skipped`);
|
|
100
|
+
log('');
|
|
101
|
+
log(`${BOLD}You're ready! Open Claude Code and run:${RESET}`);
|
|
102
|
+
log('');
|
|
103
|
+
info('/paper:explore ← find your research topic');
|
|
104
|
+
info('/paper:plan ← plan your paper structure');
|
|
105
|
+
info('/paper:teach ← learn how to write each section');
|
|
106
|
+
info('/paper:write ← draft each section with AI guidance');
|
|
107
|
+
info('/paper:review ← get feedback on your drafts');
|
|
108
|
+
log('');
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
module.exports = { init };
|