@igorlau/dotagents 0.0.0-stage → 1.0.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.
Files changed (43) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +81 -2
  3. package/THIRD_PARTY_NOTICES.md +73 -0
  4. package/content/rules/comments.md +13 -0
  5. package/content/rules/core.md +8 -0
  6. package/content/rules/ponytail.md +29 -0
  7. package/content/rules/ponytail.upstream.json +8 -0
  8. package/content/skills/code-review/SKILL.md +58 -0
  9. package/content/skills/commit/SKILL.md +77 -0
  10. package/content/skills/debug/SKILL.md +142 -0
  11. package/content/skills/debug/UPSTREAM.json +8 -0
  12. package/content/skills/debug/agents/openai.yaml +3 -0
  13. package/content/skills/debug/scripts/hitl-loop.template.sh +44 -0
  14. package/content/skills/docs-writing/SKILL.md +82 -0
  15. package/content/skills/docs-writing/references/formatting.md +150 -0
  16. package/content/skills/docs-writing/references/global-and-accessible.md +46 -0
  17. package/content/skills/docs-writing/references/word-list.md +112 -0
  18. package/content/skills/grill-me/SKILL.md +11 -0
  19. package/content/skills/grill-me/UPSTREAM.json +8 -0
  20. package/content/skills/grill-me/agents/openai.yaml +5 -0
  21. package/content/skills/grilling/SKILL.md +34 -0
  22. package/content/skills/grilling/UPSTREAM.json +8 -0
  23. package/content/skills/grilling/agents/openai.yaml +3 -0
  24. package/content/skills/handoff/SKILL.md +20 -0
  25. package/content/skills/handoff/UPSTREAM.json +8 -0
  26. package/content/skills/handoff/agents/openai.yaml +5 -0
  27. package/content/skills/plan/SKILL.md +58 -0
  28. package/content/skills/writing-for-agents/SKILL-MECHANICS.md +22 -0
  29. package/content/skills/writing-for-agents/SKILL.md +85 -0
  30. package/content/skills/writing-for-agents/UPSTREAM.json +8 -0
  31. package/content/skills/writing-for-agents/agents/openai.yaml +3 -0
  32. package/dist/apply.js +119 -0
  33. package/dist/blocks.js +28 -0
  34. package/dist/build-info.json +1 -0
  35. package/dist/catalog.js +50 -0
  36. package/dist/cli.js +80 -0
  37. package/dist/commands.js +181 -0
  38. package/dist/frontmatter.js +23 -0
  39. package/dist/git.js +7 -0
  40. package/dist/manifest.js +35 -0
  41. package/dist/paths.js +25 -0
  42. package/dist/targets.js +74 -0
  43. package/package.json +36 -4
@@ -0,0 +1,74 @@
1
+ import path from "node:path";
2
+ import { agentsHome, claudeHome, codexHome, copilotHome } from "./paths.js";
3
+ export const AGENTS = ["claude", "codex", "copilot"];
4
+ const HEADER = "<!-- Managed by dotagents. Run `dotagents update` instead of editing this file. -->";
5
+ const RULES_FILE = "dotagents.md";
6
+ const COPILOT_RULES_FILE = "dotagents.instructions.md";
7
+ function layout(mode, root) {
8
+ if (mode === "global") {
9
+ return {
10
+ skillDirs: {
11
+ claude: path.join(claudeHome(), "skills"),
12
+ codex: path.join(agentsHome(), "skills"),
13
+ copilot: path.join(agentsHome(), "skills"),
14
+ },
15
+ claudeRules: path.join(claudeHome(), "rules", RULES_FILE),
16
+ codexRules: path.join(codexHome(), "AGENTS.md"),
17
+ copilotRules: { kind: "file", path: path.join(copilotHome(), "instructions", COPILOT_RULES_FILE) },
18
+ };
19
+ }
20
+ // Copilot reads AGENTS.md too, so both agents share one block.
21
+ const agentsMd = path.join(root, "AGENTS.md");
22
+ return {
23
+ skillDirs: {
24
+ claude: path.join(root, ".claude", "skills"),
25
+ codex: path.join(root, ".agents", "skills"),
26
+ copilot: path.join(root, ".agents", "skills"),
27
+ },
28
+ claudeRules: path.join(root, ".claude", "rules", RULES_FILE),
29
+ codexRules: agentsMd,
30
+ copilotRules: { kind: "block", path: agentsMd },
31
+ };
32
+ }
33
+ export function planInstall(catalog, mode, agents, root = "") {
34
+ const target = layout(mode, root);
35
+ const ops = new Map();
36
+ const add = (op) => ops.set(op.path, op);
37
+ for (const agent of agents) {
38
+ for (const skill of catalog.skills) {
39
+ for (const file of skill.files) {
40
+ add({
41
+ kind: "file",
42
+ path: path.join(target.skillDirs[agent], skill.name, ...file.rel.split("/")),
43
+ content: file.content,
44
+ executable: file.executable,
45
+ });
46
+ }
47
+ }
48
+ }
49
+ const rules = catalog.rules.trim();
50
+ if (agents.includes("claude")) {
51
+ add({ kind: "file", path: target.claudeRules, content: `${HEADER}\n\n${rules}\n` });
52
+ }
53
+ if (agents.includes("codex"))
54
+ add({ kind: "block", path: target.codexRules, content: rules });
55
+ if (agents.includes("copilot")) {
56
+ const { kind, path: rulesPath } = target.copilotRules;
57
+ if (kind === "block")
58
+ add({ kind, path: rulesPath, content: rules });
59
+ else
60
+ add({ kind, path: rulesPath, content: `---\napplyTo: "**"\n---\n\n${HEADER}\n\n${rules}\n` });
61
+ }
62
+ return [...ops.values()];
63
+ }
64
+ export function parseAgents(value) {
65
+ if (!value)
66
+ return [...AGENTS];
67
+ const agents = value.split(",").map((agent) => agent.trim());
68
+ for (const agent of agents) {
69
+ if (!AGENTS.includes(agent)) {
70
+ throw new Error(`Unknown agent "${agent}". Use one or more of: ${AGENTS.join(", ")}.`);
71
+ }
72
+ }
73
+ return agents;
74
+ }
package/package.json CHANGED
@@ -1,6 +1,38 @@
1
1
  {
2
2
  "name": "@igorlau/dotagents",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.7",
4
+ "description": "Install a curated set of agent skills and rules into Claude Code, Codex, and GitHub Copilot.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/igorlau/dotagents.git"
9
+ },
10
+ "homepage": "https://github.com/igorlau/dotagents#readme",
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "type": "module",
15
+ "bin": {
16
+ "dotagents": "dist/cli.js"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "content",
21
+ "THIRD_PARTY_NOTICES.md"
22
+ ],
23
+ "engines": {
24
+ "node": ">=20"
25
+ },
26
+ "scripts": {
27
+ "build": "tsc -p tsconfig.build.json && node scripts/build-info.mjs",
28
+ "prepare": "npm run build",
29
+ "typecheck": "tsc -p tsconfig.json --noEmit",
30
+ "test": "node --test 'test/**/*.test.ts'",
31
+ "lint:content": "node scripts/lint-content.ts",
32
+ "check-upstream": "node scripts/check-upstream.ts"
33
+ },
34
+ "devDependencies": {
35
+ "@types/node": "^24.0.0",
36
+ "typescript": "^5.9.0"
37
+ }
38
+ }