create-academic-research 0.1.2 → 0.1.4
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 +10 -8
- package/dist/src/capabilities.d.ts +1 -1
- package/dist/src/capabilities.js +5 -4
- package/dist/src/cli.d.ts +1 -0
- package/dist/src/cli.js +29 -4
- package/dist/src/project.js +2 -2
- package/package.json +1 -1
- package/template/README.md +2 -1
- package/template/configs/capabilities.yaml +1 -1
- package/template/docs/agent/capability-profile.md +1 -1
- package/template/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,10 +34,10 @@ software engineering, databases, theory, robotics, IR, PL, graphics, and
|
|
|
34
34
|
adjacent interdisciplinary CS.
|
|
35
35
|
|
|
36
36
|
The generated repository is agent-neutral. By default the wizard records
|
|
37
|
-
`agent:
|
|
38
|
-
generic MCP snippets. Use `--agent <name>` only when you want to
|
|
39
|
-
specific target recognized by the `skills` CLI, such as `claude-code`,
|
|
40
|
-
`cursor`, `windsurf`, or another supported local loader.
|
|
37
|
+
`agent: universal`, installs one shared project-local `.agents/skills` copy,
|
|
38
|
+
and writes generic MCP snippets. Use `--agent <name>` only when you want to
|
|
39
|
+
force a specific target recognized by the `skills` CLI, such as `claude-code`,
|
|
40
|
+
`codex`, `cursor`, `windsurf`, or another supported local loader.
|
|
41
41
|
|
|
42
42
|
## Default Experience
|
|
43
43
|
|
|
@@ -134,8 +134,10 @@ The create wizard can install that project-local package automatically.
|
|
|
134
134
|
Those skills are portable `SKILL.md` instructions, but they require an
|
|
135
135
|
agent/runtime that can load skills or include the relevant instructions in
|
|
136
136
|
context. They are not automatic capabilities of every raw model API.
|
|
137
|
-
Use `--agent <agent>` for explicit
|
|
138
|
-
|
|
137
|
+
Use `--agent <agent>` for explicit setup, for example `--agent codex` or
|
|
138
|
+
`--agent claude-code`.
|
|
139
|
+
Avoid `--agent auto` for unattended setup: the upstream `skills` CLI may expand
|
|
140
|
+
it to every agent it detects on the machine.
|
|
139
141
|
|
|
140
142
|
Preset intent:
|
|
141
143
|
|
|
@@ -164,8 +166,8 @@ Releases are tag-driven. Update `package.json` and `package-lock.json`, commit
|
|
|
164
166
|
the change, create `vX.Y.Z`, and push the tag:
|
|
165
167
|
|
|
166
168
|
```bash
|
|
167
|
-
git tag -a v0.1.
|
|
168
|
-
git push origin main v0.1.
|
|
169
|
+
git tag -a v0.1.4 -m "v0.1.4"
|
|
170
|
+
git push origin main v0.1.4
|
|
169
171
|
```
|
|
170
172
|
|
|
171
173
|
Once the GitHub repository is public, the release workflow validates the tag
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Runner } from "./runner.js";
|
|
2
2
|
import { type McpToolCommandKey } from "./stack.js";
|
|
3
|
-
export declare const DEFAULT_AGENT = "
|
|
3
|
+
export declare const DEFAULT_AGENT = "universal";
|
|
4
4
|
export interface CapabilityState {
|
|
5
5
|
agent: string;
|
|
6
6
|
preset: string;
|
package/dist/src/capabilities.js
CHANGED
|
@@ -3,7 +3,8 @@ import { join, relative } from "node:path";
|
|
|
3
3
|
import YAML from "yaml";
|
|
4
4
|
import { defaultRunner } from "./runner.js";
|
|
5
5
|
import { AGENT_STACK, presetMcpServers } from "./stack.js";
|
|
6
|
-
export const DEFAULT_AGENT = "
|
|
6
|
+
export const DEFAULT_AGENT = "universal";
|
|
7
|
+
const AUTO_AGENT = "auto";
|
|
7
8
|
export async function readCapabilities(root) {
|
|
8
9
|
try {
|
|
9
10
|
return readCapabilitiesFile(root);
|
|
@@ -293,7 +294,7 @@ async function writeCapabilityProfile(root, state) {
|
|
|
293
294
|
lines.push(`- \`${name}\` (${status}): ${server?.smoke_test ?? "Smoke-test before use."}`);
|
|
294
295
|
}
|
|
295
296
|
}
|
|
296
|
-
lines.push("", "## Rules", "", "- Skill installation is project-local by default.", "- Agent target `
|
|
297
|
+
lines.push("", "## Rules", "", "- Skill installation is project-local by default.", "- Agent target `universal` installs one shared project-local `.agents/skills` copy.", "- MCP enable/disable changes project records; install/uninstall changes external tools.", "- Keep API keys, tokens, cookies, and browser sessions out of git.", "- Cite repository source records, not raw MCP output alone.", "");
|
|
297
298
|
await writeFile(join(root, "docs/agent/capability-profile.md"), lines.join("\n"), "utf8");
|
|
298
299
|
}
|
|
299
300
|
async function appendCapabilityLog(root, state) {
|
|
@@ -307,7 +308,7 @@ function dedupe(values) {
|
|
|
307
308
|
}
|
|
308
309
|
function renderSkillCommand(command, agent) {
|
|
309
310
|
const normalized = normalizeAgent(agent);
|
|
310
|
-
const agentFlag = normalized ===
|
|
311
|
+
const agentFlag = normalized === AUTO_AGENT ? "" : `--agent '${normalized}'`;
|
|
311
312
|
return command.replaceAll("{agent_flag}", agentFlag).replaceAll("{agent}", normalized);
|
|
312
313
|
}
|
|
313
314
|
async function readCapabilitiesFile(root) {
|
|
@@ -402,7 +403,7 @@ function normalizeAgent(agent) {
|
|
|
402
403
|
}
|
|
403
404
|
function mcpSnippetFileName(agent) {
|
|
404
405
|
const normalized = normalizeAgent(agent);
|
|
405
|
-
return normalized === DEFAULT_AGENT ? "mcp.json" : `${normalized}-mcp.json`;
|
|
406
|
+
return normalized === DEFAULT_AGENT || normalized === AUTO_AGENT ? "mcp.json" : `${normalized}-mcp.json`;
|
|
406
407
|
}
|
|
407
408
|
async function removeInactiveMcpSnippets(outputDir, activeFile) {
|
|
408
409
|
const entries = await readdir(outputDir);
|
package/dist/src/cli.d.ts
CHANGED
package/dist/src/cli.js
CHANGED
|
@@ -16,8 +16,8 @@ const MCP_FLAGS = flagSchema(["help"], ["root", "agent"]);
|
|
|
16
16
|
export async function main(argv = process.argv.slice(2), mode = "create") {
|
|
17
17
|
try {
|
|
18
18
|
if (mode === "create")
|
|
19
|
-
return createMain(argv);
|
|
20
|
-
return lifecycleMain(argv);
|
|
19
|
+
return await createMain(argv);
|
|
20
|
+
return await lifecycleMain(argv);
|
|
21
21
|
}
|
|
22
22
|
catch (error) {
|
|
23
23
|
console.error(error instanceof Error ? error.message : String(error));
|
|
@@ -61,7 +61,7 @@ async function createMain(argv) {
|
|
|
61
61
|
: undefined;
|
|
62
62
|
const installMcpToolsLock = flagBool(parsed.flags, "install-mcp-tools") ? true : undefined;
|
|
63
63
|
const answers = interactive
|
|
64
|
-
? await
|
|
64
|
+
? await askInteractiveCreateOptions(defaults, {
|
|
65
65
|
installSkills: installSkillsLock,
|
|
66
66
|
installMcpTools: installMcpToolsLock
|
|
67
67
|
})
|
|
@@ -83,6 +83,10 @@ async function createMain(argv) {
|
|
|
83
83
|
console.log("Next: cd into the project and run `npx academic-research doctor`.");
|
|
84
84
|
return 0;
|
|
85
85
|
}
|
|
86
|
+
async function askInteractiveCreateOptions(defaults, locks) {
|
|
87
|
+
console.log(formatInteractiveCreateGuide());
|
|
88
|
+
return askCreateOptions(defaults, locks);
|
|
89
|
+
}
|
|
86
90
|
async function lifecycleMain(argv) {
|
|
87
91
|
const command = argv[0] ?? "help";
|
|
88
92
|
if (command === "--help" || command === "-h") {
|
|
@@ -388,6 +392,27 @@ function mcpInstallMode(installCommand, runtimeCommand) {
|
|
|
388
392
|
return installCommand;
|
|
389
393
|
return runtimeCommand ? "runtime-only" : "manual";
|
|
390
394
|
}
|
|
395
|
+
export function formatInteractiveCreateGuide() {
|
|
396
|
+
const presetLines = Object.entries(AGENT_STACK.presets).map(([name, preset]) => ` ${name.padEnd(10)} ${preset.description}`);
|
|
397
|
+
return [
|
|
398
|
+
"Setup choices:",
|
|
399
|
+
"",
|
|
400
|
+
"Capability presets:",
|
|
401
|
+
...presetLines,
|
|
402
|
+
"",
|
|
403
|
+
"Agent target:",
|
|
404
|
+
" universal Default. Installs one shared project-local .agents/skills copy.",
|
|
405
|
+
" codex Codex-specific project-local skill install.",
|
|
406
|
+
" auto Lets the upstream skills CLI detect agents; may install to multiple agent loaders.",
|
|
407
|
+
"",
|
|
408
|
+
"Skill and MCP behavior:",
|
|
409
|
+
" Skills are copied into the project, not installed globally.",
|
|
410
|
+
" MCP records are written into configs/capabilities.yaml and docs/agent/generated/.",
|
|
411
|
+
" MCP installers are optional and run only finite installer commands.",
|
|
412
|
+
" runtime-only MCP servers are configured for the MCP client but have no install step.",
|
|
413
|
+
""
|
|
414
|
+
].join("\n");
|
|
415
|
+
}
|
|
391
416
|
function printCreateHelp() {
|
|
392
417
|
console.log([
|
|
393
418
|
"Usage: create-academic-research <project-name> [options]",
|
|
@@ -401,7 +426,7 @@ function printCreateHelp() {
|
|
|
401
426
|
" --package <name> Python package name. Default: normalized project name.",
|
|
402
427
|
" --preset <name> Capability preset: minimal, default, enhanced, literature, writing, full.",
|
|
403
428
|
" --profile <name> Project profile metadata. Default: academic-general.",
|
|
404
|
-
" --agent <name> Agent target. Default:
|
|
429
|
+
" --agent <name> Agent target. Default: universal.",
|
|
405
430
|
" --install-skills Install project-local skills without prompting.",
|
|
406
431
|
" --no-install-skills Skip project-local skill installation.",
|
|
407
432
|
" --install-mcp-tools Run finite external MCP install commands after creation.",
|
package/dist/src/project.js
CHANGED
|
@@ -92,7 +92,7 @@ export async function createProject(options) {
|
|
|
92
92
|
const preset = options.preset ?? "default";
|
|
93
93
|
const agent = options.agent ?? DEFAULT_AGENT;
|
|
94
94
|
if (!AGENT_STACK.presets[preset]) {
|
|
95
|
-
throw new Error(`unknown capability preset: ${preset}`);
|
|
95
|
+
throw new Error(`unknown capability preset: ${preset}. Expected one of: ${Object.keys(AGENT_STACK.presets).join(", ")}`);
|
|
96
96
|
}
|
|
97
97
|
await mkdir(dirname(target), { recursive: true });
|
|
98
98
|
await copyDirectory(templateRoot, target);
|
|
@@ -205,7 +205,7 @@ async function writeGeneratedPackageJson(root, { slug }) {
|
|
|
205
205
|
const path = join(root, "package.json");
|
|
206
206
|
const data = await readJson(path);
|
|
207
207
|
const existingSpec = data.devDependencies?.["create-academic-research"];
|
|
208
|
-
const packageSpec = process.env.CREATE_ACADEMIC_RESEARCH_PACKAGE_SPEC ?? existingSpec ?? "
|
|
208
|
+
const packageSpec = process.env.CREATE_ACADEMIC_RESEARCH_PACKAGE_SPEC ?? existingSpec ?? "0.1.4";
|
|
209
209
|
data.name = slug;
|
|
210
210
|
data.devDependencies = {
|
|
211
211
|
...(data.devDependencies ?? {}),
|
package/package.json
CHANGED
package/template/README.md
CHANGED
|
@@ -16,7 +16,8 @@ actual discipline. The companion `academic-research-skills` package gives
|
|
|
16
16
|
first-class support to computer science research while keeping the repository
|
|
17
17
|
structure useful for broader academic work.
|
|
18
18
|
|
|
19
|
-
The repository is agent-neutral. Capability state uses `agent:
|
|
19
|
+
The repository is agent-neutral. Capability state uses `agent: universal` by
|
|
20
|
+
default, which installs one shared project-local `.agents/skills` copy unless a
|
|
20
21
|
specific agent target is selected with `--agent`.
|
|
21
22
|
|
|
22
23
|
## Quickstart
|