incitaciones 0.2.0 → 0.3.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 +57 -0
- package/content/distilled/close/SKILL.md +67 -0
- package/content/distilled/create-issues/SKILL.md +10 -0
- package/content/distilled/issue-review/SKILL.md +5 -4
- package/content/distilled/issue-review/references/pass-0-preflight.md +37 -0
- package/content/distilled/next/SKILL.md +54 -0
- package/content/distilled/park/SKILL.md +97 -0
- package/content/distilled/renew/SKILL.md +163 -0
- package/content/distilled/whisper/SKILL.md +83 -0
- package/content/distilled/whisper/references/check.md +33 -0
- package/content/distilled/whisper/references/decommission.md +53 -0
- package/content/distilled/whisper/references/init.md +103 -0
- package/content/distilled/whisper/references/link.md +70 -0
- package/content/distilled/whisper/references/status.md +49 -0
- package/content/manifest.json +101 -3
- package/package.json +2 -1
- package/pi-package/prompts/close.md +10 -0
- package/pi-package/prompts/next.md +10 -0
- package/pi-package/prompts/park.md +10 -0
- package/pi-package/prompts/renew.md +10 -0
- package/pi-package/prompts/whisper.md +10 -0
- package/pi-package/skills/close/SKILL.md +73 -0
- package/pi-package/skills/create-issues/SKILL.md +10 -0
- package/pi-package/skills/issue-review/SKILL.md +5 -4
- package/pi-package/skills/issue-review/references/pass-0-preflight.md +37 -0
- package/pi-package/skills/next/SKILL.md +60 -0
- package/pi-package/skills/park/SKILL.md +103 -0
- package/pi-package/skills/renew/SKILL.md +169 -0
- package/pi-package/skills/whisper/SKILL.md +89 -0
- package/pi-package/skills/whisper/references/check.md +33 -0
- package/pi-package/skills/whisper/references/decommission.md +53 -0
- package/pi-package/skills/whisper/references/init.md +103 -0
- package/pi-package/skills/whisper/references/link.md +70 -0
- package/pi-package/skills/whisper/references/status.md +49 -0
- package/scripts/generate-pi-resources.mjs +122 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Status
|
|
2
|
+
|
|
3
|
+
Show the state of the current workspace.
|
|
4
|
+
|
|
5
|
+
## Steps
|
|
6
|
+
|
|
7
|
+
1. Get repo URL and branch slug:
|
|
8
|
+
```bash
|
|
9
|
+
repo_url=$(git remote get-url origin 2>/dev/null | sed 's|https://||;s|git@||;s|\.git$||')
|
|
10
|
+
branch=$(git rev-parse --abbrev-ref HEAD)
|
|
11
|
+
branch_slug=$(echo "$branch" | sed 's|/|--|g')
|
|
12
|
+
context_path=~/.whisper/repos/"${repo_url}"/branches/"${branch_slug}"/context.md
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
2. If `context.md` doesn't exist, delegate to **check** mode and stop.
|
|
16
|
+
|
|
17
|
+
3. Read `context.md` and extract: repo, branch, path, beads-epic.
|
|
18
|
+
|
|
19
|
+
4. Show `env.md` info:
|
|
20
|
+
```bash
|
|
21
|
+
date -r ~/.whisper/repos/"${repo_url}"/env.md "+%Y-%m-%d %H:%M" 2>/dev/null
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
5. Show the branch epic's tree if beads is available:
|
|
25
|
+
```bash
|
|
26
|
+
bd children <beads-epic> --pretty 2>/dev/null
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
6. Show plan status: is `plan.md` a stub or does it have real content?
|
|
30
|
+
|
|
31
|
+
7. Show all active branch slots for this repo (most recently modified first):
|
|
32
|
+
```bash
|
|
33
|
+
ls -t ~/.whisper/repos/"${repo_url}"/branches/ 2>/dev/null
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Output format
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
── Whisper: <repo> ──
|
|
40
|
+
Branch: <branch> (branches/<slug>/)
|
|
41
|
+
Plan: [exists | stub]
|
|
42
|
+
Epic: <id> — <n> issues (<open> open) [or: none linked yet]
|
|
43
|
+
|
|
44
|
+
Active branch slots:
|
|
45
|
+
<ls output>
|
|
46
|
+
|
|
47
|
+
Epic tree:
|
|
48
|
+
<bd children --pretty output, or "none">
|
|
49
|
+
```
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = path.dirname(__filename);
|
|
8
|
+
const repoRoot = path.resolve(__dirname, "..");
|
|
9
|
+
const manifestPath = path.join(repoRoot, "content", "manifest.json");
|
|
10
|
+
const outRoot = path.join(repoRoot, "pi-package");
|
|
11
|
+
const skillsOut = path.join(outRoot, "skills");
|
|
12
|
+
const promptsOut = path.join(outRoot, "prompts");
|
|
13
|
+
|
|
14
|
+
function escapeYamlDoubleQuoted(value) {
|
|
15
|
+
return String(value).replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function ensureDir(dir) {
|
|
19
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function resetDir(dir) {
|
|
23
|
+
if (fs.existsSync(dir)) {
|
|
24
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
25
|
+
fs.rmSync(path.join(dir, entry.name), { recursive: true, force: true, maxRetries: 3, retryDelay: 50 });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function readText(filePath) {
|
|
32
|
+
return fs.readFileSync(filePath, "utf8");
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function generateSkill(prompt) {
|
|
36
|
+
const distilledPath = path.join(repoRoot, prompt.distilled);
|
|
37
|
+
const skillDir = path.join(skillsOut, prompt.name);
|
|
38
|
+
ensureDir(skillDir);
|
|
39
|
+
|
|
40
|
+
const frontmatter = [
|
|
41
|
+
"---",
|
|
42
|
+
`name: ${prompt.name}`,
|
|
43
|
+
`description: \"${escapeYamlDoubleQuoted(prompt.description || `Incitaciones prompt: ${prompt.name}`)}\"`,
|
|
44
|
+
"metadata:",
|
|
45
|
+
' installed-from: "incitaciones"',
|
|
46
|
+
"---",
|
|
47
|
+
"",
|
|
48
|
+
].join("\n");
|
|
49
|
+
|
|
50
|
+
fs.writeFileSync(path.join(skillDir, "SKILL.md"), frontmatter + readText(distilledPath), "utf8");
|
|
51
|
+
|
|
52
|
+
if (distilledPath.endsWith(`${path.sep}SKILL.md`)) {
|
|
53
|
+
const srcDir = path.dirname(distilledPath);
|
|
54
|
+
for (const entry of fs.readdirSync(srcDir, { withFileTypes: true })) {
|
|
55
|
+
if (entry.name === "SKILL.md") continue;
|
|
56
|
+
const src = path.join(srcDir, entry.name);
|
|
57
|
+
const dst = path.join(skillDir, entry.name);
|
|
58
|
+
if (entry.isDirectory()) {
|
|
59
|
+
fs.cpSync(src, dst, { recursive: true });
|
|
60
|
+
} else {
|
|
61
|
+
fs.copyFileSync(src, dst);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function generatePromptTemplate(prompt) {
|
|
68
|
+
const description = prompt.description || `Incitaciones prompt: ${prompt.name}`;
|
|
69
|
+
const template = [
|
|
70
|
+
"---",
|
|
71
|
+
`description: \"${escapeYamlDoubleQuoted(`Shortcut for the ${prompt.name} skill. ${description}`)}\"`,
|
|
72
|
+
"---",
|
|
73
|
+
"<!-- installed-from: incitaciones -->",
|
|
74
|
+
"",
|
|
75
|
+
`Use the installed \`${prompt.name}\` skill for this task.`,
|
|
76
|
+
"",
|
|
77
|
+
`If the skill is not automatically loaded, invoke \`/skill:${prompt.name}\` and follow it.`,
|
|
78
|
+
"",
|
|
79
|
+
"User context: $@",
|
|
80
|
+
"",
|
|
81
|
+
].join("\n");
|
|
82
|
+
|
|
83
|
+
fs.writeFileSync(path.join(promptsOut, `${prompt.name}.md`), template, "utf8");
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function main() {
|
|
87
|
+
const manifest = JSON.parse(readText(manifestPath));
|
|
88
|
+
resetDir(outRoot);
|
|
89
|
+
ensureDir(skillsOut);
|
|
90
|
+
ensureDir(promptsOut);
|
|
91
|
+
|
|
92
|
+
for (const prompt of manifest.prompts) {
|
|
93
|
+
generateSkill(prompt);
|
|
94
|
+
generatePromptTemplate(prompt);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const readme = [
|
|
98
|
+
"# Generated pi package resources",
|
|
99
|
+
"",
|
|
100
|
+
"This directory is generated by `node scripts/generate-pi-resources.mjs`.",
|
|
101
|
+
"The generated files are committed so `pi install .` works from a clean checkout.",
|
|
102
|
+
"Refresh them with `just generate-pi-resources` after changing distilled content or manifest entries.",
|
|
103
|
+
"Do not edit files here by hand.",
|
|
104
|
+
"",
|
|
105
|
+
"- `skills/` contains pi-compatible Agent Skills",
|
|
106
|
+
"- `prompts/` contains pi prompt templates",
|
|
107
|
+
"",
|
|
108
|
+
"## Install from npm",
|
|
109
|
+
"",
|
|
110
|
+
"```bash",
|
|
111
|
+
"pi install npm:incitaciones",
|
|
112
|
+
"```",
|
|
113
|
+
"",
|
|
114
|
+
"This package is published as [`incitaciones` on npm](https://www.npmjs.com/package/incitaciones).",
|
|
115
|
+
"",
|
|
116
|
+
].join("\n");
|
|
117
|
+
fs.writeFileSync(path.join(outRoot, "README.md"), readme, "utf8");
|
|
118
|
+
|
|
119
|
+
console.log(`Generated pi resources for ${manifest.prompts.length} prompts in ${path.relative(repoRoot, outRoot)}/`);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
main();
|