@kamkom/awb-mcp 0.0.2 → 0.0.3

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 (59) hide show
  1. package/AGENTS.md +3 -0
  2. package/README.md +72 -0
  3. package/dist/server.js +2 -5
  4. package/dist/server.js.map +1 -1
  5. package/dist/templates/.github/agents/architect.agent.md +3 -0
  6. package/dist/templates/.github/agents/implementer.agent.md +3 -0
  7. package/dist/templates/.github/agents/reviewer.agent.md +3 -0
  8. package/dist/templates/.github/copilot-instructions.md +3 -0
  9. package/dist/templates/.github/instructions/general.instructions.md +3 -0
  10. package/dist/templates/.github/instructions/testing.instructions.md +3 -0
  11. package/dist/templates/.github/prompts/change-summary.prompt.md +3 -0
  12. package/dist/templates/.github/prompts/onboarding.prompt.md +3 -0
  13. package/dist/templates/.github/prompts/readme.prompt.md +3 -0
  14. package/dist/templates/AGENTS.md +3 -0
  15. package/dist/tools/applyBootstrap.d.ts +28 -0
  16. package/dist/tools/applyBootstrap.d.ts.map +1 -0
  17. package/dist/tools/applyBootstrap.js +171 -0
  18. package/dist/tools/applyBootstrap.js.map +1 -0
  19. package/dist/tools/baseline.d.ts +11 -0
  20. package/dist/tools/baseline.d.ts.map +1 -0
  21. package/dist/tools/baseline.js +27 -0
  22. package/dist/tools/baseline.js.map +1 -0
  23. package/dist/tools/index.d.ts +3 -0
  24. package/dist/tools/index.d.ts.map +1 -0
  25. package/dist/tools/index.js +39 -0
  26. package/dist/tools/index.js.map +1 -0
  27. package/dist/tools/loadTemplates.d.ts +6 -0
  28. package/dist/tools/loadTemplates.d.ts.map +1 -0
  29. package/dist/tools/loadTemplates.js +29 -0
  30. package/dist/tools/loadTemplates.js.map +1 -0
  31. package/dist/tools/planBootstrap.d.ts +33 -0
  32. package/dist/tools/planBootstrap.d.ts.map +1 -0
  33. package/dist/tools/planBootstrap.js +154 -0
  34. package/dist/tools/planBootstrap.js.map +1 -0
  35. package/dist/tools/validateRootPath.d.ts +6 -0
  36. package/dist/tools/validateRootPath.d.ts.map +1 -0
  37. package/dist/tools/validateRootPath.js +26 -0
  38. package/dist/tools/validateRootPath.js.map +1 -0
  39. package/package.json +3 -2
  40. package/src/server.ts +2 -5
  41. package/src/templates/.github/agents/architect.agent.md +3 -0
  42. package/src/templates/.github/agents/implementer.agent.md +3 -0
  43. package/src/templates/.github/agents/reviewer.agent.md +3 -0
  44. package/src/templates/.github/copilot-instructions.md +3 -0
  45. package/src/templates/.github/instructions/general.instructions.md +3 -0
  46. package/src/templates/.github/instructions/testing.instructions.md +3 -0
  47. package/src/templates/.github/prompts/change-summary.prompt.md +3 -0
  48. package/src/templates/.github/prompts/onboarding.prompt.md +3 -0
  49. package/src/templates/.github/prompts/readme.prompt.md +3 -0
  50. package/src/templates/AGENTS.md +3 -0
  51. package/src/tools/applyBootstrap.ts +219 -0
  52. package/src/tools/baseline.ts +30 -0
  53. package/src/tools/index.ts +51 -0
  54. package/src/tools/loadTemplates.ts +30 -0
  55. package/src/tools/planBootstrap.ts +216 -0
  56. package/src/tools/validateRootPath.ts +25 -0
  57. package/test/apply-bootstrap.ts +244 -0
  58. package/test/plan-bootstrap.ts +142 -0
  59. package/test/server-smoke.ts +60 -0
package/AGENTS.md ADDED
@@ -0,0 +1,3 @@
1
+ # Agents
2
+
3
+ This repo uses agentic workflows. Prefer repo scripts, write tests, and avoid destructive commands.
package/README.md ADDED
@@ -0,0 +1,72 @@
1
+ # AWB MCP
2
+
3
+ AWB MCP Server — bootstrap agentic-ready repos via the [Model Context Protocol](https://modelcontextprotocol.io/) (MCP). Use it from VS Code, Cursor, or any MCP-capable client over stdio.
4
+
5
+ ## Install
6
+
7
+ - **Global install** (recommended for VS Code/Cursor):
8
+ ```bash
9
+ npm i -g @kamkom/awb-mcp
10
+ ```
11
+ The `awb-mcp` command will be on your PATH.
12
+
13
+ - **Run with npx** (no install):
14
+ ```bash
15
+ npx @kamkom/awb-mcp
16
+ ```
17
+
18
+ **Requirements:** Node.js 18 or later (see `engines` in `package.json`).
19
+
20
+ ## VS Code / Cursor MCP config
21
+
22
+ Add the server to your MCP settings with **only the command** — no env vars or args required for basic use.
23
+
24
+ Example (e.g. in Cursor: **Settings → MCP**, or in `settings.json` under `mcpServers`):
25
+
26
+ ```json
27
+ {
28
+ "mcpServers": {
29
+ "awb-mcp": {
30
+ "command": "awb-mcp"
31
+ }
32
+ }
33
+ }
34
+ ```
35
+
36
+ If you use `npx` instead of a global install:
37
+
38
+ ```json
39
+ {
40
+ "mcpServers": {
41
+ "awb-mcp": {
42
+ "command": "npx",
43
+ "args": ["@kamkom/awb-mcp"]
44
+ }
45
+ }
46
+ }
47
+ ```
48
+
49
+ ## Platforms
50
+
51
+ - **Windows and macOS** are the primary supported platforms.
52
+ - **Linux** is supported on a best-effort basis for v0.1; we do not guarantee fixing Linux-only issues in this milestone.
53
+
54
+ ## Tools
55
+
56
+ The server exposes AWB tools over stdio, including:
57
+
58
+ - `awb_plan_bootstrap` — compute a plan of file operations (create/update/skip) for bootstrapping an agentic-ready repo.
59
+ - `awb_apply_bootstrap` — apply a previously returned plan to disk (atomic writes, idempotent behavior).
60
+
61
+ ## Development
62
+
63
+ ```bash
64
+ npm install
65
+ npm run build # compile and chmod +x dist/server.js
66
+ npm run start # run with tsx: npx tsx src/server.ts
67
+ npm run dev # watch mode
68
+ ```
69
+
70
+ ## License
71
+
72
+ ISC
package/dist/server.js CHANGED
@@ -2,6 +2,7 @@
2
2
  import process from "node:process";
3
3
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
4
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
+ import { registerAwbTools } from "./tools/index.js";
5
6
  process.on("uncaughtException", (err) => {
6
7
  console.error("[awb-mcp] uncaughtException:", err?.message ?? err);
7
8
  process.exitCode = 1;
@@ -17,11 +18,7 @@ const server = new McpServer({
17
18
  version: "0.0.1",
18
19
  description: "AWB MCP Server — bootstrap agentic-ready repos via MCP",
19
20
  });
20
- server.registerTool("hello", {
21
- description: "Returns a hello world message",
22
- }, async () => ({
23
- content: [{ type: "text", text: "Hello, World!" }],
24
- }));
21
+ registerAwbTools(server);
25
22
  const transport = new StdioServerTransport();
26
23
  await server.connect(transport);
27
24
  //# sourceMappingURL=server.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AACA,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,CAAC,GAAG,EAAE,EAAE;IACtC,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,GAAG,EAAE,OAAO,IAAI,GAAG,CAAC,CAAC;IACnE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACrB,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACzC,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,MAAM,EAAE,EAAE;IAC1C,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,MAAM,CAAC,CAAC;IACvD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACrB,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACzC,CAAC,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IAC3B,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,wDAAwD;CACtE,CAAC,CAAC;AAEH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE;IAC3B,WAAW,EAAE,+BAA+B;CAC7C,EAAE,KAAK,IAA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,CAAC;AAEH,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAEzB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ # Architect agent
2
+
3
+ Focus on design and structure. Don't guess; prefer repo conventions and existing patterns.
@@ -0,0 +1,3 @@
1
+ # Implementer agent
2
+
3
+ Implement changes per spec. Use repo scripts; write tests; avoid destructive commands.
@@ -0,0 +1,3 @@
1
+ # Reviewer agent
2
+
3
+ Review for correctness and safety. Prefer repo scripts and tests; flag destructive or risky changes.
@@ -0,0 +1,3 @@
1
+ # Copilot instructions
2
+
3
+ Use repo scripts when available. Prefer existing test commands. Avoid destructive operations.
@@ -0,0 +1,3 @@
1
+ # General instructions
2
+
3
+ Don't guess; prefer repo scripts and documented behavior. Write tests when changing behavior.
@@ -0,0 +1,3 @@
1
+ # Testing instructions
2
+
3
+ Prefer the project's test runner and existing test commands. Avoid destructive commands.
@@ -0,0 +1,3 @@
1
+ # Change summary prompt
2
+
3
+ Use this prompt to summarize changes. Be concise and reference actual edits.
@@ -0,0 +1,3 @@
1
+ # Onboarding prompt
2
+
3
+ Use this prompt for onboarding new contributors. Reference repo scripts and docs.
@@ -0,0 +1,3 @@
1
+ # README prompt
2
+
3
+ Use this prompt to generate or update README content. Prefer repo conventions.
@@ -0,0 +1,3 @@
1
+ # Agents
2
+
3
+ This repo uses agentic workflows. Prefer repo scripts, write tests, and avoid destructive commands.
@@ -0,0 +1,28 @@
1
+ export type ApplyBootstrapApplyOptions = {
2
+ dryRun?: boolean;
3
+ writeMode?: "atomic";
4
+ failOnConflict?: boolean;
5
+ };
6
+ export type ApplyBootstrapArgs = {
7
+ rootPath: string;
8
+ planId?: string;
9
+ operations?: unknown[];
10
+ applyOptions?: unknown;
11
+ };
12
+ export type ApplyBootstrapResult = {
13
+ content: Array<{
14
+ type: "text";
15
+ text: string;
16
+ }>;
17
+ isError?: boolean;
18
+ };
19
+ export type ApplyResultItem = {
20
+ path: string;
21
+ status: "WRITTEN" | "SKIPPED" | "FAILED";
22
+ details?: string;
23
+ };
24
+ export type ApplyBootstrapSuccess = {
25
+ results: ApplyResultItem[];
26
+ };
27
+ export declare function handleApplyBootstrap(args: ApplyBootstrapArgs): Promise<ApplyBootstrapResult>;
28
+ //# sourceMappingURL=applyBootstrap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applyBootstrap.d.ts","sourceRoot":"","sources":["../../src/tools/applyBootstrap.ts"],"names":[],"mappings":"AAoBA,MAAM,MAAM,0BAA0B,GAAG;IACvC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B,CAAC;AA8CF,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,oBAAoB,CAAC,CA4H/B"}
@@ -0,0 +1,171 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import { z } from "zod";
4
+ import { validateRootPath } from "./validateRootPath.js";
5
+ const applyOptionsSchema = z.object({
6
+ dryRun: z.boolean().default(false),
7
+ writeMode: z.enum(["atomic"]).default("atomic"),
8
+ failOnConflict: z.boolean().default(true),
9
+ });
10
+ const operationSchema = z.object({
11
+ path: z.string(),
12
+ action: z.enum(["CREATE", "UPDATE_MANAGED", "SKIP"]),
13
+ content: z.string().optional(),
14
+ reason: z.string().optional(),
15
+ warnings: z.array(z.string()).default([]),
16
+ });
17
+ function parseApplyOptions(options) {
18
+ const parsed = applyOptionsSchema.safeParse(options ?? {});
19
+ if (!parsed.success) {
20
+ return { dryRun: false, writeMode: "atomic", failOnConflict: true };
21
+ }
22
+ return parsed.data;
23
+ }
24
+ function isUnderRoot(fullPath, resolvedRoot) {
25
+ const normalized = path.resolve(fullPath);
26
+ const root = path.resolve(resolvedRoot);
27
+ return normalized === root || normalized.startsWith(root + path.sep);
28
+ }
29
+ function parseOperation(raw) {
30
+ const parsed = operationSchema.safeParse(raw);
31
+ if (!parsed.success) {
32
+ const pathStr = typeof raw?.path === "string" ? raw.path : "<unknown>";
33
+ return { ok: false, path: pathStr, error: "Invalid operation shape." };
34
+ }
35
+ return {
36
+ ok: true,
37
+ op: {
38
+ path: parsed.data.path,
39
+ action: parsed.data.action,
40
+ content: parsed.data.content,
41
+ reason: parsed.data.reason,
42
+ warnings: parsed.data.warnings,
43
+ },
44
+ };
45
+ }
46
+ function atomicWrite(fullPath, content) {
47
+ const dir = path.dirname(fullPath);
48
+ fs.mkdirSync(dir, { recursive: true });
49
+ const tmpPath = fullPath + ".tmp";
50
+ fs.writeFileSync(tmpPath, content, "utf8");
51
+ fs.renameSync(tmpPath, fullPath);
52
+ }
53
+ export async function handleApplyBootstrap(args) {
54
+ try {
55
+ const error = validateRootPath(args?.rootPath);
56
+ if (error) {
57
+ return {
58
+ content: [{ type: "text", text: `Error: ${error}` }],
59
+ isError: true,
60
+ };
61
+ }
62
+ const rootPath = args.rootPath;
63
+ const resolvedRoot = path.resolve(rootPath);
64
+ const rawOperations = Array.isArray(args?.operations) ? args.operations : [];
65
+ if (rawOperations.length === 0) {
66
+ return {
67
+ content: [
68
+ {
69
+ type: "text",
70
+ text: "No operations to apply. Call plan_bootstrap first and pass the returned operations array to apply_bootstrap.",
71
+ },
72
+ ],
73
+ isError: true,
74
+ };
75
+ }
76
+ const applyOptions = parseApplyOptions(args?.applyOptions);
77
+ const results = [];
78
+ for (let i = 0; i < rawOperations.length; i++) {
79
+ const raw = rawOperations[i];
80
+ const parsed = parseOperation(raw);
81
+ if (!parsed.ok) {
82
+ if (applyOptions.failOnConflict) {
83
+ results.push({
84
+ path: parsed.path,
85
+ status: "FAILED",
86
+ details: parsed.error,
87
+ });
88
+ }
89
+ continue;
90
+ }
91
+ const op = parsed.op;
92
+ const fullPath = path.resolve(resolvedRoot, path.normalize(op.path));
93
+ if (!isUnderRoot(fullPath, resolvedRoot)) {
94
+ if (applyOptions.failOnConflict) {
95
+ results.push({
96
+ path: op.path,
97
+ status: "FAILED",
98
+ details: "Path is outside repository root.",
99
+ });
100
+ }
101
+ continue;
102
+ }
103
+ if (op.action === "SKIP") {
104
+ results.push({
105
+ path: op.path,
106
+ status: "SKIPPED",
107
+ details: op.reason ?? "Skipped.",
108
+ });
109
+ continue;
110
+ }
111
+ // CREATE or UPDATE_MANAGED
112
+ if (op.action === "CREATE" || op.action === "UPDATE_MANAGED") {
113
+ const content = op.content;
114
+ if (content === undefined || typeof content !== "string") {
115
+ if (applyOptions.failOnConflict) {
116
+ results.push({
117
+ path: op.path,
118
+ status: "FAILED",
119
+ details: "Missing or invalid content for CREATE/UPDATE_MANAGED.",
120
+ });
121
+ }
122
+ continue;
123
+ }
124
+ if (applyOptions.dryRun) {
125
+ results.push({
126
+ path: op.path,
127
+ status: "WRITTEN",
128
+ details: "Would write (dry run).",
129
+ });
130
+ continue;
131
+ }
132
+ try {
133
+ atomicWrite(fullPath, content);
134
+ results.push({
135
+ path: op.path,
136
+ status: "WRITTEN",
137
+ details: undefined,
138
+ });
139
+ }
140
+ catch (err) {
141
+ results.push({
142
+ path: op.path,
143
+ status: "FAILED",
144
+ details: err instanceof Error ? err.message : String(err),
145
+ });
146
+ }
147
+ }
148
+ }
149
+ const success = { results };
150
+ return {
151
+ content: [
152
+ {
153
+ type: "text",
154
+ text: JSON.stringify(success, null, 2),
155
+ },
156
+ ],
157
+ };
158
+ }
159
+ catch (err) {
160
+ return {
161
+ content: [
162
+ {
163
+ type: "text",
164
+ text: `Error: ${err instanceof Error ? err.message : String(err)}`,
165
+ },
166
+ ],
167
+ isError: true,
168
+ };
169
+ }
170
+ }
171
+ //# sourceMappingURL=applyBootstrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applyBootstrap.js","sourceRoot":"","sources":["../../src/tools/applyBootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAClC,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IAC/C,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CAC1C,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,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C,CAAC;gBACL,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACb,OAAO,CAAC,IAAI,CAAC;wBACX,IAAI,EAAE,EAAE,CAAC,IAAI;wBACb,MAAM,EAAE,QAAQ;wBAChB,OAAO,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;qBAC1D,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QAED,MAAM,OAAO,GAA0B,EAAE,OAAO,EAAE,CAAC;QACnD,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;iBACvC;aACF;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,UAAU,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;iBACnE;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Baseline scaffold paths and AWB managed-block detection.
3
+ * Paths are relative to repo root. See Story 5 for the full baseline tree.
4
+ */
5
+ export declare const BASELINE_PATHS: readonly string[];
6
+ /**
7
+ * Returns true if content contains both AWB managed block markers (managed).
8
+ * Malformed or partial (e.g. only start marker) is treated as unmanaged.
9
+ */
10
+ export declare function hasAwbManagedBlock(content: string): boolean;
11
+ //# sourceMappingURL=baseline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseline.d.ts","sourceRoot":"","sources":["../../src/tools/baseline.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAWlC,CAAC;AAMX;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAI3D"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Baseline scaffold paths and AWB managed-block detection.
3
+ * Paths are relative to repo root. See Story 5 for the full baseline tree.
4
+ */
5
+ export const BASELINE_PATHS = [
6
+ ".github/copilot-instructions.md",
7
+ ".github/instructions/general.instructions.md",
8
+ ".github/instructions/testing.instructions.md",
9
+ ".github/prompts/readme.prompt.md",
10
+ ".github/prompts/onboarding.prompt.md",
11
+ ".github/prompts/change-summary.prompt.md",
12
+ ".github/agents/architect.agent.md",
13
+ ".github/agents/implementer.agent.md",
14
+ ".github/agents/reviewer.agent.md",
15
+ "AGENTS.md",
16
+ ];
17
+ /** AWB managed block markers (both must be present for file to be considered managed). */
18
+ const AWB_MANAGED_BEGIN = "<!-- AWB MANAGED BEGIN -->";
19
+ const AWB_MANAGED_END = "<!-- AWB MANAGED END -->";
20
+ /**
21
+ * Returns true if content contains both AWB managed block markers (managed).
22
+ * Malformed or partial (e.g. only start marker) is treated as unmanaged.
23
+ */
24
+ export function hasAwbManagedBlock(content) {
25
+ return (content.includes(AWB_MANAGED_BEGIN) && content.includes(AWB_MANAGED_END));
26
+ }
27
+ //# sourceMappingURL=baseline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseline.js","sourceRoot":"","sources":["../../src/tools/baseline.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAsB;IAC/C,iCAAiC;IACjC,8CAA8C;IAC9C,8CAA8C;IAC9C,kCAAkC;IAClC,sCAAsC;IACtC,0CAA0C;IAC1C,mCAAmC;IACnC,qCAAqC;IACrC,kCAAkC;IAClC,WAAW;CACH,CAAC;AAEX,0FAA0F;AAC1F,MAAM,iBAAiB,GAAG,4BAA4B,CAAC;AACvD,MAAM,eAAe,GAAG,0BAA0B,CAAC;AAEnD;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAe;IAChD,OAAO,CACL,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CACzE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerAwbTools(server: McpServer): void;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKzE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA6CxD"}
@@ -0,0 +1,39 @@
1
+ import { z } from "zod";
2
+ import { handlePlanBootstrap } from "./planBootstrap.js";
3
+ import { handleApplyBootstrap } from "./applyBootstrap.js";
4
+ export function registerAwbTools(server) {
5
+ server.registerTool("awb_plan_bootstrap", {
6
+ description: "Compute a deterministic plan of file operations (create/update/skip) for bootstrapping an agentic-ready repo.",
7
+ inputSchema: {
8
+ rootPath: z.string().describe("Repository root directory path"),
9
+ options: z
10
+ .object({
11
+ mode: z.enum(["static", "prompt"]).optional(),
12
+ includeReadmeProposal: z.boolean().optional(),
13
+ overwritePolicy: z
14
+ .enum(["skip", "managed-only", "overwrite"])
15
+ .optional(),
16
+ files: z.array(z.string()).optional(),
17
+ })
18
+ .optional()
19
+ .describe("Optional: mode, includeReadmeProposal, overwritePolicy, files allowlist"),
20
+ },
21
+ }, async (args) => handlePlanBootstrap(args));
22
+ server.registerTool("awb_apply_bootstrap", {
23
+ description: "Apply a previously returned bootstrap plan to disk (atomic writes, idempotent behavior). Requires the operations array from a prior plan_bootstrap call.",
24
+ inputSchema: {
25
+ rootPath: z.string().describe("Repository root directory path"),
26
+ planId: z.string().optional().describe("Plan ID from plan_bootstrap"),
27
+ operations: z.array(z.unknown()).optional().describe("Operations to apply"),
28
+ applyOptions: z
29
+ .object({
30
+ dryRun: z.boolean().optional(),
31
+ writeMode: z.enum(["atomic"]).optional(),
32
+ failOnConflict: z.boolean().optional(),
33
+ })
34
+ .optional()
35
+ .describe("Optional: dryRun, writeMode (atomic), failOnConflict"),
36
+ },
37
+ }, async (args) => handleApplyBootstrap(args));
38
+ }
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAA0B,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAA2B,MAAM,qBAAqB,CAAC;AAEpF,MAAM,UAAU,gBAAgB,CAAC,MAAiB;IAChD,MAAM,CAAC,YAAY,CACjB,oBAAoB,EACpB;QACE,WAAW,EACT,+GAA+G;QACjH,WAAW,EAAE;YACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;YAC/D,OAAO,EAAE,CAAC;iBACP,MAAM,CAAC;gBACN,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE;gBAC7C,qBAAqB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;gBAC7C,eAAe,EAAE,CAAC;qBACf,IAAI,CAAC,CAAC,MAAM,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;qBAC3C,QAAQ,EAAE;gBACb,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;aACtC,CAAC;iBACD,QAAQ,EAAE;iBACV,QAAQ,CAAC,yEAAyE,CAAC;SACvF;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,mBAAmB,CAAC,IAAyB,CAAC,CAC/D,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,qBAAqB,EACrB;QACE,WAAW,EACT,0JAA0J;QAC5J,WAAW,EAAE;YACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;YAC/D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;YACrE,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;YAC3E,YAAY,EAAE,CAAC;iBACZ,MAAM,CAAC;gBACN,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;gBAC9B,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE;gBACxC,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;aACvC,CAAC;iBACD,QAAQ,EAAE;iBACV,QAAQ,CAAC,sDAAsD,CAAC;SACpE;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,oBAAoB,CAAC,IAA0B,CAAC,CACjE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns template content for a baseline relative path (e.g. ".github/copilot-instructions.md").
3
+ * Uses forward slashes in path; normalizes for the current platform.
4
+ */
5
+ export declare function getTemplateContent(relativePath: string): string;
6
+ //# sourceMappingURL=loadTemplates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadTemplates.d.ts","sourceRoot":"","sources":["../../src/tools/loadTemplates.ts"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAO/D"}
@@ -0,0 +1,29 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ let templatesDir = null;
5
+ /**
6
+ * Resolves the templates directory (dist/templates when built).
7
+ * Expects templates to be copied to dist/templates by the build.
8
+ */
9
+ function getTemplatesDir() {
10
+ if (templatesDir === null) {
11
+ const dir = path.dirname(fileURLToPath(import.meta.url));
12
+ templatesDir = path.join(dir, "..", "templates");
13
+ }
14
+ return templatesDir;
15
+ }
16
+ /**
17
+ * Returns template content for a baseline relative path (e.g. ".github/copilot-instructions.md").
18
+ * Uses forward slashes in path; normalizes for the current platform.
19
+ */
20
+ export function getTemplateContent(relativePath) {
21
+ const fullPath = path.join(getTemplatesDir(), relativePath);
22
+ try {
23
+ return fs.readFileSync(fullPath, "utf8");
24
+ }
25
+ catch {
26
+ return "";
27
+ }
28
+ }
29
+ //# sourceMappingURL=loadTemplates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadTemplates.js","sourceRoot":"","sources":["../../src/tools/loadTemplates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,IAAI,YAAY,GAAkB,IAAI,CAAC;AAEvC;;;GAGG;AACH,SAAS,eAAe;IACtB,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QACzD,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,YAAoB;IACrD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,YAAY,CAAC,CAAC;IAC5D,IAAI,CAAC;QACH,OAAO,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC3C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
@@ -0,0 +1,33 @@
1
+ export type PlanBootstrapOptions = {
2
+ mode: "static" | "prompt";
3
+ includeReadmeProposal: boolean;
4
+ overwritePolicy: "skip" | "managed-only" | "overwrite";
5
+ files?: string[];
6
+ };
7
+ export type PlanBootstrapArgs = {
8
+ rootPath: string;
9
+ options?: unknown;
10
+ };
11
+ export type BootstrapAction = "CREATE" | "UPDATE_MANAGED" | "SKIP";
12
+ export type PlanOperation = {
13
+ path: string;
14
+ action: BootstrapAction;
15
+ content?: string;
16
+ reason?: string;
17
+ warnings: string[];
18
+ };
19
+ export type PlanBootstrapResult = {
20
+ content: Array<{
21
+ type: "text";
22
+ text: string;
23
+ }>;
24
+ isError?: boolean;
25
+ };
26
+ export type PlanBootstrapSuccess = {
27
+ planId: string;
28
+ operations: PlanOperation[];
29
+ repoHints?: Record<string, unknown>;
30
+ readmeProposal?: string | null;
31
+ };
32
+ export declare function handlePlanBootstrap(args: PlanBootstrapArgs): Promise<PlanBootstrapResult>;
33
+ //# sourceMappingURL=planBootstrap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planBootstrap.d.ts","sourceRoot":"","sources":["../../src/tools/planBootstrap.ts"],"names":[],"mappings":"AAiBA,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC1B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,eAAe,EAAE,MAAM,GAAG,cAAc,GAAG,WAAW,CAAC;IACvD,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,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