@momentiq/dark-factory-cli 2.1.0 → 2.2.1
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/dist/adapters/static-schema-lint.js +1 -1
- package/dist/cli.js +3 -3
- package/dist/cli.js.map +1 -1
- package/dist/commands/onboard.d.ts +64 -1
- package/dist/commands/onboard.d.ts.map +1 -1
- package/dist/commands/onboard.js +268 -53
- package/dist/commands/onboard.js.map +1 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +20 -0
- package/dist/doctor.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +2 -0
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools/onboard.d.ts +6 -0
- package/dist/mcp/tools/onboard.d.ts.map +1 -0
- package/dist/mcp/tools/onboard.js +115 -0
- package/dist/mcp/tools/onboard.js.map +1 -0
- package/dist/onboard/analyzers/ci.d.ts.map +1 -1
- package/dist/onboard/analyzers/ci.js +32 -0
- package/dist/onboard/analyzers/ci.js.map +1 -1
- package/dist/onboard/analyzers/lockfile.d.ts.map +1 -1
- package/dist/onboard/analyzers/lockfile.js +154 -74
- package/dist/onboard/analyzers/lockfile.js.map +1 -1
- package/dist/onboard/apply-plan.d.ts +29 -0
- package/dist/onboard/apply-plan.d.ts.map +1 -0
- package/dist/onboard/apply-plan.js +80 -0
- package/dist/onboard/apply-plan.js.map +1 -0
- package/dist/onboard/auto-profile.d.ts +3 -0
- package/dist/onboard/auto-profile.d.ts.map +1 -0
- package/dist/onboard/auto-profile.js +20 -0
- package/dist/onboard/auto-profile.js.map +1 -0
- package/dist/onboard/generate-plan.d.ts +18 -0
- package/dist/onboard/generate-plan.d.ts.map +1 -0
- package/dist/onboard/generate-plan.js +72 -0
- package/dist/onboard/generate-plan.js.map +1 -0
- package/dist/onboard/llm-client.d.ts +45 -0
- package/dist/onboard/llm-client.d.ts.map +1 -0
- package/dist/onboard/llm-client.js +101 -0
- package/dist/onboard/llm-client.js.map +1 -0
- package/dist/onboard/prompts/scaffold.md +93 -0
- package/dist/onboard/prompts.d.ts +13 -0
- package/dist/onboard/prompts.d.ts.map +1 -0
- package/dist/onboard/prompts.js +54 -0
- package/dist/onboard/prompts.js.map +1 -0
- package/dist/onboard/scaffold-schema.d.ts +194 -0
- package/dist/onboard/scaffold-schema.d.ts.map +1 -0
- package/dist/onboard/scaffold-schema.js +73 -0
- package/dist/onboard/scaffold-schema.js.map +1 -0
- package/dist/onboard/schema.d.ts +10 -0
- package/dist/onboard/schema.d.ts.map +1 -1
- package/dist/onboard/schema.js +23 -1
- package/dist/onboard/schema.js.map +1 -1
- package/dist/onboard/seeders/adr.d.ts +3 -0
- package/dist/onboard/seeders/adr.d.ts.map +1 -0
- package/dist/onboard/seeders/adr.js +212 -0
- package/dist/onboard/seeders/adr.js.map +1 -0
- package/dist/onboard/seeders/agent-review-config/cloud.canonical.json +22 -0
- package/dist/onboard/seeders/agent-review-config/local.canonical.json +21 -0
- package/dist/onboard/seeders/agent-review-config.d.ts +3 -0
- package/dist/onboard/seeders/agent-review-config.d.ts.map +1 -0
- package/dist/onboard/seeders/agent-review-config.js +38 -0
- package/dist/onboard/seeders/agent-review-config.js.map +1 -0
- package/dist/onboard/seeders/cycle1-bootstrap.d.ts +3 -0
- package/dist/onboard/seeders/cycle1-bootstrap.d.ts.map +1 -0
- package/dist/onboard/seeders/cycle1-bootstrap.js +76 -0
- package/dist/onboard/seeders/cycle1-bootstrap.js.map +1 -0
- package/dist/onboard/seeders/index.d.ts +47 -0
- package/dist/onboard/seeders/index.d.ts.map +1 -0
- package/dist/onboard/seeders/index.js +37 -0
- package/dist/onboard/seeders/index.js.map +1 -0
- package/dist/onboard/seeders/runbook.d.ts +13 -0
- package/dist/onboard/seeders/runbook.d.ts.map +1 -0
- package/dist/onboard/seeders/runbook.js +144 -0
- package/dist/onboard/seeders/runbook.js.map +1 -0
- package/dist/onboard/seeders/templates/adr.md.tmpl +26 -0
- package/dist/onboard/seeders/templates/cycle1-bootstrap.md.tmpl +64 -0
- package/dist/onboard/seeders/templates/runbook.md.tmpl +26 -0
- package/dist/onboard/template-loader.d.ts +20 -0
- package/dist/onboard/template-loader.d.ts.map +1 -0
- package/dist/onboard/template-loader.js +152 -0
- package/dist/onboard/template-loader.js.map +1 -0
- package/dist/onboard/template-ref.d.ts +15 -0
- package/dist/onboard/template-ref.d.ts.map +1 -0
- package/dist/onboard/template-ref.js +45 -0
- package/dist/onboard/template-ref.js.map +1 -0
- package/dist/onboard/validate.d.ts +19 -0
- package/dist/onboard/validate.d.ts.map +1 -0
- package/dist/onboard/validate.js +127 -0
- package/dist/onboard/validate.js.map +1 -0
- package/dist/onboard/writers/dry-run-renderer.d.ts +6 -0
- package/dist/onboard/writers/dry-run-renderer.d.ts.map +1 -0
- package/dist/onboard/writers/dry-run-renderer.js +88 -0
- package/dist/onboard/writers/dry-run-renderer.js.map +1 -0
- package/dist/onboard/writers/emit.d.ts +6 -0
- package/dist/onboard/writers/emit.d.ts.map +1 -0
- package/dist/onboard/writers/emit.js +29 -0
- package/dist/onboard/writers/emit.js.map +1 -0
- package/dist/onboard/writers/merge.d.ts +16 -0
- package/dist/onboard/writers/merge.d.ts.map +1 -0
- package/dist/onboard/writers/merge.js +142 -0
- package/dist/onboard/writers/merge.js.map +1 -0
- package/dist/onboard/writers/pr-writer.d.ts +44 -0
- package/dist/onboard/writers/pr-writer.d.ts.map +1 -0
- package/dist/onboard/writers/pr-writer.js +104 -0
- package/dist/onboard/writers/pr-writer.js.map +1 -0
- package/dist/onboard/writers/skip.d.ts +9 -0
- package/dist/onboard/writers/skip.d.ts.map +1 -0
- package/dist/onboard/writers/skip.js +9 -0
- package/dist/onboard/writers/skip.js.map +1 -0
- package/package.json +4 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adr.js","sourceRoot":"","sources":["../../../src/onboard/seeders/adr.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,E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
"codex-local-chief-engineer",
|
|
8
|
+
"gemini-local-chief-engineer",
|
|
9
|
+
"grok-local-chief-engineer"
|
|
10
|
+
],
|
|
11
|
+
"quorum": 3,
|
|
12
|
+
"modelParamOverrides": {
|
|
13
|
+
"codex-local-chief-engineer": {
|
|
14
|
+
"reasoning_effort": "medium"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"auth": {
|
|
18
|
+
"codex-local-chief-engineer": "api"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"profiles": {
|
|
4
|
+
"local": {
|
|
5
|
+
"criticIds": [
|
|
6
|
+
"cursor-cli-chief-engineer",
|
|
7
|
+
"codex-local-chief-engineer"
|
|
8
|
+
],
|
|
9
|
+
"quorum": 2,
|
|
10
|
+
"modelParamOverrides": {
|
|
11
|
+
"codex-local-chief-engineer": {
|
|
12
|
+
"reasoning_effort": "high"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"auth": {
|
|
16
|
+
"cursor-cli-chief-engineer": "chatgpt",
|
|
17
|
+
"codex-local-chief-engineer": "chatgpt"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-review-config.d.ts","sourceRoot":"","sources":["../../../src/onboard/seeders/agent-review-config.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,YAAY,CAAC;AAQtD,eAAO,MAAM,uBAAuB,EAAE,MAgBrC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// packages/cli/src/onboard/seeders/agent-review-config.ts
|
|
2
|
+
//
|
|
3
|
+
// 4th Phase C deterministic seeder. Owns the emission of
|
|
4
|
+
// `.agent-review/config.json` as a `FilePlan` entry. Per the cross-phase
|
|
5
|
+
// contract (Phase C plan Task 3.6 / Phase B PR #134 reconciliation),
|
|
6
|
+
// Phase B's LLM scaffold SKIPS this path unconditionally; this seeder is
|
|
7
|
+
// the single producer.
|
|
8
|
+
//
|
|
9
|
+
// The canonical JSON bodies live as production files under
|
|
10
|
+
// `./agent-review-config/{local,cloud}.canonical.json` — they ship inside
|
|
11
|
+
// the published npm package (covered by packages/cli/package.json's
|
|
12
|
+
// `files: ["src/**", ...]` entry). The seeder readFile's them at runtime;
|
|
13
|
+
// the test `readFile`s the same production path so tests reference what
|
|
14
|
+
// actually ships. One source of truth per profile.
|
|
15
|
+
import { readFile } from "node:fs/promises";
|
|
16
|
+
import { fileURLToPath } from "node:url";
|
|
17
|
+
import { dirname, join } from "node:path";
|
|
18
|
+
const CANONICAL_DIR = join(dirname(fileURLToPath(import.meta.url)), "agent-review-config");
|
|
19
|
+
async function loadCanonical(profile) {
|
|
20
|
+
return readFile(join(CANONICAL_DIR, `${profile}.canonical.json`), "utf8");
|
|
21
|
+
}
|
|
22
|
+
export const agentReviewConfigSeeder = {
|
|
23
|
+
name: "agent-review-config",
|
|
24
|
+
async seed(input) {
|
|
25
|
+
const profile = input.profile ?? "local";
|
|
26
|
+
const body = await loadCanonical(profile);
|
|
27
|
+
return [
|
|
28
|
+
{
|
|
29
|
+
path: ".agent-review/config.json",
|
|
30
|
+
action: "emit",
|
|
31
|
+
rationale: `agent-review config emitted for profile=${profile} (cycle 15 D3 row 5 / D7). ` +
|
|
32
|
+
`Phase C deterministic seeder; Phase B does NOT emit this path (cross-phase contract).`,
|
|
33
|
+
tailored_content: body,
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=agent-review-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-review-config.js","sourceRoot":"","sources":["../../../src/onboard/seeders/agent-review-config.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,EAAE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AO,MAAM,qBAAqB,EAAE,MA2DnC,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// packages/cli/src/onboard/seeders/cycle1-bootstrap.ts
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { basename, dirname, resolve } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
const TEMPLATE_PATH = resolve(HERE, "templates", "cycle1-bootstrap.md.tmpl");
|
|
7
|
+
function applyTemplate(template, bindings) {
|
|
8
|
+
return template.replace(/\{([a-z_]+)\}/g, (full, k) => bindings[k] ?? full);
|
|
9
|
+
}
|
|
10
|
+
function repoName(analysis) {
|
|
11
|
+
if (analysis.canonicalName.includes("/")) {
|
|
12
|
+
return analysis.canonicalName.split("/")[1] ?? "unnamed-repo";
|
|
13
|
+
}
|
|
14
|
+
const b = basename(analysis.repoRoot);
|
|
15
|
+
return b || "unnamed-repo";
|
|
16
|
+
}
|
|
17
|
+
function repoOwner(analysis) {
|
|
18
|
+
if (analysis.canonicalName.includes("/")) {
|
|
19
|
+
return analysis.canonicalName.split("/")[0] ?? "tbd";
|
|
20
|
+
}
|
|
21
|
+
return "tbd";
|
|
22
|
+
}
|
|
23
|
+
export const cycle1BootstrapSeeder = {
|
|
24
|
+
name: "cycle1-bootstrap",
|
|
25
|
+
async seed(input) {
|
|
26
|
+
const { analysis, now } = input;
|
|
27
|
+
const template = await readFile(TEMPLATE_PATH, "utf8");
|
|
28
|
+
const name = repoName(analysis);
|
|
29
|
+
const owner = repoOwner(analysis);
|
|
30
|
+
const date = now.toISOString().slice(0, 10);
|
|
31
|
+
const stack_bullets = analysis.stacks.length > 0
|
|
32
|
+
? analysis.stacks
|
|
33
|
+
.map((s) => `- **${s.language}** @ ${s.versionPin ?? "(unpinned)"} (\`${s.manifestPath}\`)`)
|
|
34
|
+
.join("\n")
|
|
35
|
+
: "- (no manifest-declared stacks detected — likely a docs-only or shell-script repo)";
|
|
36
|
+
const services_bullets = analysis.services.length > 0
|
|
37
|
+
? analysis.services
|
|
38
|
+
.map((s) => `- **${s.name}** at \`${s.path}\`${s.stack ? ` (${s.stack})` : ""}`)
|
|
39
|
+
.join("\n")
|
|
40
|
+
: "- (no services/ or apps/ directory — single-package repo)";
|
|
41
|
+
const deploy_story_body = analysis.ci.deployStory
|
|
42
|
+
? `Deploys via **${analysis.ci.deployStory.target}** from \`${analysis.ci.deployStory.workflowPath}\`:\n\n` +
|
|
43
|
+
"```\n" + analysis.ci.deployStory.command + "\n```\n\n" +
|
|
44
|
+
"See the seeded runbook at `docs/runbooks/deploy.md` for the operational walk-through."
|
|
45
|
+
: "(no deploy workflow detected — add one before standing up CD)";
|
|
46
|
+
const present = (b) => (b ? "present" : "missing");
|
|
47
|
+
const df_presence_body = [
|
|
48
|
+
`- \`.husky/\` hooks: **${present(analysis.dfPresence.hooks)}**`,
|
|
49
|
+
`- \`.agent-review/config.json\`: **${present(analysis.dfPresence.configJson)}**`,
|
|
50
|
+
`- \`dark-factory-pr.yml\` workflow: **${present(analysis.dfPresence.prWorkflow)}**`,
|
|
51
|
+
`- \`@momentiq/dark-factory-cli\` pin: ${analysis.dfPresence.cliPin ? `**${analysis.dfPresence.cliPin}**` : "**unset**"}`,
|
|
52
|
+
].join("\n");
|
|
53
|
+
const agent_context_body = analysis.docs.agentContextSetPresent
|
|
54
|
+
? "Already present — `df onboard` will only fill gaps, not overwrite existing files."
|
|
55
|
+
: "**MISSING** — `df onboard` is producing the initial set as part of this cycle. " +
|
|
56
|
+
"See the ADRs seeded under `docs/ADR/` for the per-decision context.";
|
|
57
|
+
const body = applyTemplate(template, {
|
|
58
|
+
repo_name: name,
|
|
59
|
+
canonical_name: analysis.canonicalName || `(unknown)/${name}`,
|
|
60
|
+
owner,
|
|
61
|
+
date,
|
|
62
|
+
stack_bullets,
|
|
63
|
+
services_bullets,
|
|
64
|
+
deploy_story_body,
|
|
65
|
+
df_presence_body,
|
|
66
|
+
agent_context_body,
|
|
67
|
+
});
|
|
68
|
+
return [{
|
|
69
|
+
path: `docs/roadmap/cycles/cycle1-${name}-bootstrap.md`,
|
|
70
|
+
action: "emit",
|
|
71
|
+
rationale: "Seeded from RepoAnalysis (services + stacks + deploy story + DF posture)",
|
|
72
|
+
tailored_content: body,
|
|
73
|
+
}];
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=cycle1-bootstrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cycle1-bootstrap.js","sourceRoot":"","sources":["../../../src/onboard/seeders/cycle1-bootstrap.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIzC,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACrD,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,0BAA0B,CAAC,CAAC;AAE7E,SAAS,aAAa,CAAC,QAAgB,EAAE,QAAgC;IACvE,OAAO,QAAQ,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,QAAQ,CAAC,QAAsB;IACtC,IAAI,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACzC,OAAO,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC;IAChE,CAAC;IACD,MAAM,CAAC,GAAG,QAA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E,CAAC;QAE1E,MAAM,IAAI,GAAG,aAAa,CAAC,QAAQ,EAAE;YACnC,SAAS,EAAE,IAAI;YACf,cAAc,EAAE,QAAQ,CAAC,aAAa,IAAI,aAAa,IAAI,EAAE;YAC7D,KAAK;YACL,IAAI;YACJ,aAAa;YACb,gBAAgB;YAChB,iBAAiB;YACjB,gBAAgB;YAChB,kBAAkB;SACnB,CAAC,CAAC;QAEH,OAAO,CAAC;gBACN,IAAI,EAAE,8BAA8B,IAAI,eAAe;gBACvD,MAAM,EAAE,MAAM;gBACd,SAAS,EAAE,0EAA0E;gBACrF,gBAAgB,EAAE,IAAI;aACvB,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { FilePlan } from "../scaffold-schema.js";
|
|
2
|
+
import type { RepoAnalysis } from "../schema.js";
|
|
3
|
+
export type { FilePlan } from "../scaffold-schema.js";
|
|
4
|
+
/**
|
|
5
|
+
* Input to a Phase C seeder.
|
|
6
|
+
*
|
|
7
|
+
* - `analysis`: the Phase A `RepoAnalysis` (the deterministic source of truth).
|
|
8
|
+
* - `existingAdrs` / `existingCycleDocs` / `existingRunbooks`: filenames
|
|
9
|
+
* already present in the target tree (basenames, not full paths). Used by
|
|
10
|
+
* seeders to auto-increment numeric prefixes and skip on slug collision.
|
|
11
|
+
* `cmdOnboard` populates these by scanning the target tree before fan-out.
|
|
12
|
+
* - `now`: a wallclock injected so tests can pin the date deterministically.
|
|
13
|
+
* - `profile`: resolved critic profile for the target repo (the
|
|
14
|
+
* `agent-review-config` seeder uses this to pick `local.canonical.json`
|
|
15
|
+
* vs `cloud.canonical.json`). Optional with default "local" so the prose
|
|
16
|
+
* seeders' unit tests need not specify the field; production callers
|
|
17
|
+
* (`cmdOnboard`) always set it explicitly to the resolved profile.
|
|
18
|
+
*/
|
|
19
|
+
export interface SeederInput {
|
|
20
|
+
readonly analysis: RepoAnalysis;
|
|
21
|
+
readonly existingAdrs: readonly string[];
|
|
22
|
+
readonly existingCycleDocs?: readonly string[];
|
|
23
|
+
readonly existingRunbooks?: readonly string[];
|
|
24
|
+
readonly now: Date;
|
|
25
|
+
readonly profile?: "local" | "cloud";
|
|
26
|
+
}
|
|
27
|
+
export interface Seeder {
|
|
28
|
+
readonly name: string;
|
|
29
|
+
seed(input: SeederInput): Promise<FilePlan[]>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Run every seeder in parallel, isolating individual failures to stderr so a
|
|
33
|
+
* single broken seeder does NOT block the rest of the merge. Phase C seeders
|
|
34
|
+
* are non-critical (their outputs augment Phase B's plan) — the orchestrator
|
|
35
|
+
* resolves to `[]` for any seeder that throws and concatenates the survivors.
|
|
36
|
+
*/
|
|
37
|
+
export declare function runSeeders(input: SeederInput, seeders: readonly Seeder[]): Promise<FilePlan[]>;
|
|
38
|
+
export { adrSeeder } from "./adr.js";
|
|
39
|
+
export { cycle1BootstrapSeeder } from "./cycle1-bootstrap.js";
|
|
40
|
+
export { runbookSeeder } from "./runbook.js";
|
|
41
|
+
export { agentReviewConfigSeeder } from "./agent-review-config.js";
|
|
42
|
+
/**
|
|
43
|
+
* The canonical seeder set wired into `cmdOnboard` (Task 4.5). Order is
|
|
44
|
+
* presentation-only — `runSeeders` runs them concurrently.
|
|
45
|
+
*/
|
|
46
|
+
export declare const ALL_SEEDERS_DEFAULT: readonly Seeder[];
|
|
47
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/onboard/seeders/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAOjD,YAAY,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/C,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC;IACnB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CACtC;AAED,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;CAC/C;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAC9B,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,OAAO,CAAC,QAAQ,EAAE,CAAC,CAcrB;AAED,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAKhD,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { adrSeeder } from "./adr.js";
|
|
2
|
+
import { cycle1BootstrapSeeder } from "./cycle1-bootstrap.js";
|
|
3
|
+
import { runbookSeeder } from "./runbook.js";
|
|
4
|
+
import { agentReviewConfigSeeder } from "./agent-review-config.js";
|
|
5
|
+
/**
|
|
6
|
+
* Run every seeder in parallel, isolating individual failures to stderr so a
|
|
7
|
+
* single broken seeder does NOT block the rest of the merge. Phase C seeders
|
|
8
|
+
* are non-critical (their outputs augment Phase B's plan) — the orchestrator
|
|
9
|
+
* resolves to `[]` for any seeder that throws and concatenates the survivors.
|
|
10
|
+
*/
|
|
11
|
+
export async function runSeeders(input, seeders) {
|
|
12
|
+
const results = await Promise.all(seeders.map(async (s) => {
|
|
13
|
+
try {
|
|
14
|
+
return await s.seed(input);
|
|
15
|
+
}
|
|
16
|
+
catch (e) {
|
|
17
|
+
process.stderr.write(`df onboard seeder ${s.name} failed: ${e instanceof Error ? e.message : String(e)}\n`);
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
}));
|
|
21
|
+
return results.flat();
|
|
22
|
+
}
|
|
23
|
+
export { adrSeeder } from "./adr.js";
|
|
24
|
+
export { cycle1BootstrapSeeder } from "./cycle1-bootstrap.js";
|
|
25
|
+
export { runbookSeeder } from "./runbook.js";
|
|
26
|
+
export { agentReviewConfigSeeder } from "./agent-review-config.js";
|
|
27
|
+
/**
|
|
28
|
+
* The canonical seeder set wired into `cmdOnboard` (Task 4.5). Order is
|
|
29
|
+
* presentation-only — `runSeeders` runs them concurrently.
|
|
30
|
+
*/
|
|
31
|
+
export const ALL_SEEDERS_DEFAULT = [
|
|
32
|
+
adrSeeder,
|
|
33
|
+
cycle1BootstrapSeeder,
|
|
34
|
+
runbookSeeder,
|
|
35
|
+
agentReviewConfigSeeder,
|
|
36
|
+
];
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/onboard/seeders/index.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAiCnE;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,KAAkB,EAClB,OAA0B;IAE1B,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAC/B,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;QACtB,IAAI,CAAC;YACH,OAAO,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,qBAAqB,CAAC,CAAC,IAAI,YAAY,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CACtF,CAAC;YACF,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC,CAAC,CACH,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,EAAE,CAAC;AACxB,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEnE;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAsB;IACpD,SAAS;IACT,qBAAqB;IACrB,aAAa;IACb,uBAAuB;CACxB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FilePlan } from "../scaffold-schema.js";
|
|
2
|
+
import type { RepoAnalysis } from "../schema.js";
|
|
3
|
+
export interface SeederInput {
|
|
4
|
+
analysis: RepoAnalysis;
|
|
5
|
+
existingAdrs: string[];
|
|
6
|
+
now: Date;
|
|
7
|
+
}
|
|
8
|
+
export interface Seeder {
|
|
9
|
+
name: string;
|
|
10
|
+
seed(input: SeederInput): Promise<FilePlan[]>;
|
|
11
|
+
}
|
|
12
|
+
export declare const runbookSeeder: Seeder;
|
|
13
|
+
//# sourceMappingURL=runbook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runbook.d.ts","sourceRoot":"","sources":["../../../src/onboard/seeders/runbook.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAY,MAAM,cAAc,CAAC;AAE3D,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,YAAY,CAAC;IACvB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,GAAG,EAAE,IAAI,CAAC;CACX;AAED,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;CAC/C;AAsDD,eAAO,MAAM,aAAa,EAAE,MA+E3B,CAAC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// packages/cli/src/onboard/seeders/runbook.ts
|
|
2
|
+
//
|
|
3
|
+
// Runbook seeder — cycle 15 Phase C Task 3.
|
|
4
|
+
//
|
|
5
|
+
// Deterministic emitter that produces `docs/runbooks/RUNBOOK-<workflow>.md`
|
|
6
|
+
// files per deploy-pattern CI workflow detected in `analysis.ci.workflows[]`,
|
|
7
|
+
// capped at MAX_RUNBOOKS total. The workflow that produced
|
|
8
|
+
// `analysis.ci.deployStory` gets the verbatim deploy command rendered into
|
|
9
|
+
// its Triggering section (Phase C exit criterion 3 — at least one runbook
|
|
10
|
+
// body contains a verbatim line from a CI workflow's `run:`).
|
|
11
|
+
//
|
|
12
|
+
// `Seeder` / `SeederInput` are declared inline here for Task 3 self-
|
|
13
|
+
// containment; Task 3.5 (seeder orchestrator) will surface them from
|
|
14
|
+
// `./index.ts` and the seeders will import them from there.
|
|
15
|
+
//
|
|
16
|
+
// Fix #138 — when every deploy-named workflow has only multi-line
|
|
17
|
+
// `run: |` blocks (so no single-line `run:` command exists to embed
|
|
18
|
+
// verbatim), append a "donor" non-deploy-named workflow whose
|
|
19
|
+
// `firstRunCommand` is non-null. The donor runbook embeds its own
|
|
20
|
+
// workflow's verbatim run line. This keeps Phase C metric 4 satisfiable
|
|
21
|
+
// without requiring `deployStory` to be non-null on every repo shape.
|
|
22
|
+
import { readFile } from "node:fs/promises";
|
|
23
|
+
import { dirname, resolve } from "node:path";
|
|
24
|
+
import { fileURLToPath } from "node:url";
|
|
25
|
+
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
26
|
+
// Templates live under `templates/` (plan-aligned, shared with adr + cycle1-bootstrap).
|
|
27
|
+
const TEMPLATE_PATH = resolve(HERE, "templates", "runbook.md.tmpl");
|
|
28
|
+
const DEPLOY_NAME_REGEX = /deploy|release|publish|promote/i;
|
|
29
|
+
const MAX_RUNBOOKS = 5;
|
|
30
|
+
function slugify(s) {
|
|
31
|
+
return s
|
|
32
|
+
.toLowerCase()
|
|
33
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
34
|
+
.replace(/^-+|-+$/g, "")
|
|
35
|
+
.slice(0, 60);
|
|
36
|
+
}
|
|
37
|
+
function applyTemplate(template, bindings) {
|
|
38
|
+
return template.replace(/\{([a-z_]+)\}/g, (full, k) => bindings[k] ?? full);
|
|
39
|
+
}
|
|
40
|
+
// Returns the subset of `workflows` that should each get a runbook emitted.
|
|
41
|
+
//
|
|
42
|
+
// Selection:
|
|
43
|
+
// 1. All deploy-named workflows (name matches DEPLOY_NAME_REGEX).
|
|
44
|
+
// 2. If NONE of the deploy-named workflows has a `firstRunCommand`,
|
|
45
|
+
// append the first non-deploy-named workflow that DOES have one.
|
|
46
|
+
// This ensures Phase C metric 4 ("runbook body contains a verbatim
|
|
47
|
+
// CI run: line") stays satisfiable on repos whose deploy is composite-
|
|
48
|
+
// action or gitops-driven (sage3c's promote-to-prod is all multi-line
|
|
49
|
+
// `run: |`; build-images is all multi-line — neither yields a
|
|
50
|
+
// verbatim single-line run candidate the validator's regex catches).
|
|
51
|
+
// The runbook for the "donor" workflow cites only that workflow's
|
|
52
|
+
// path and command; we don't synthesize cross-workflow attributions.
|
|
53
|
+
// 3. Capped at MAX_RUNBOOKS overall — when a donor is needed, cap the
|
|
54
|
+
// deploy-named slice to MAX_RUNBOOKS-1 first so the donor isn't
|
|
55
|
+
// sliced off (caught by gemini critic on the first round).
|
|
56
|
+
function selectRunbookWorkflows(workflows) {
|
|
57
|
+
const deployNamed = workflows.filter((w) => DEPLOY_NAME_REGEX.test(w.name));
|
|
58
|
+
const haveAVerbatimRun = deployNamed.some((w) => w.firstRunCommand);
|
|
59
|
+
if (haveAVerbatimRun || deployNamed.length === 0) {
|
|
60
|
+
return deployNamed.slice(0, MAX_RUNBOOKS);
|
|
61
|
+
}
|
|
62
|
+
const deployPaths = new Set(deployNamed.map((w) => w.path));
|
|
63
|
+
const donor = workflows.find((w) => !deployPaths.has(w.path) && w.firstRunCommand);
|
|
64
|
+
if (!donor)
|
|
65
|
+
return deployNamed.slice(0, MAX_RUNBOOKS);
|
|
66
|
+
// Reserve a slot for the donor so it isn't sliced off when the
|
|
67
|
+
// deploy-named set already meets/exceeds the cap.
|
|
68
|
+
const cappedDeploy = deployNamed.slice(0, MAX_RUNBOOKS - 1);
|
|
69
|
+
return [...cappedDeploy, donor];
|
|
70
|
+
}
|
|
71
|
+
export const runbookSeeder = {
|
|
72
|
+
name: "runbook",
|
|
73
|
+
async seed(input) {
|
|
74
|
+
const { analysis } = input;
|
|
75
|
+
const selected = selectRunbookWorkflows(analysis.ci.workflows);
|
|
76
|
+
if (selected.length === 0)
|
|
77
|
+
return [];
|
|
78
|
+
const template = await readFile(TEMPLATE_PATH, "utf8");
|
|
79
|
+
const out = [];
|
|
80
|
+
const seenSlugs = new Set();
|
|
81
|
+
for (const w of selected) {
|
|
82
|
+
const slug = slugify(w.name);
|
|
83
|
+
if (seenSlugs.has(slug))
|
|
84
|
+
continue;
|
|
85
|
+
seenSlugs.add(slug);
|
|
86
|
+
const isPrimaryDeploy = analysis.ci.deployStory?.workflowPath === w.path;
|
|
87
|
+
const triggers_note = w.triggers.length > 0
|
|
88
|
+
? ` — triggered by \`${w.triggers.join("\`, \`")}\``
|
|
89
|
+
: "";
|
|
90
|
+
// Triggering body precedence:
|
|
91
|
+
// 1. Primary deploy workflow → render the verbatim `deployStory.command`
|
|
92
|
+
// from the verb-matched `run:` step.
|
|
93
|
+
// 2. Otherwise, if the workflow has its own `firstRunCommand`, embed
|
|
94
|
+
// THAT verbatim line (provenance-correct: the runbook for
|
|
95
|
+
// workflow X cites a `run:` line from workflow X's own body).
|
|
96
|
+
// This is the path that flips Phase C metric 4 on repos whose
|
|
97
|
+
// deploy-named workflows lack a single-line `run:` (the donor
|
|
98
|
+
// pattern from #138).
|
|
99
|
+
// 3. Otherwise, a structural pointer to the workflow file.
|
|
100
|
+
let triggering_body;
|
|
101
|
+
if (isPrimaryDeploy && analysis.ci.deployStory) {
|
|
102
|
+
triggering_body =
|
|
103
|
+
`The workflow runs the following command (captured verbatim from \`${w.path}\`):\n\n` +
|
|
104
|
+
"```\n" + analysis.ci.deployStory.command + "\n```\n\n" +
|
|
105
|
+
"To trigger manually outside the workflow's normal triggers, use `gh workflow run`.";
|
|
106
|
+
}
|
|
107
|
+
else if (w.firstRunCommand) {
|
|
108
|
+
triggering_body =
|
|
109
|
+
`The workflow's first non-trivial \`run:\` step is (captured verbatim from \`${w.path}\`):\n\n` +
|
|
110
|
+
"```\n" + w.firstRunCommand + "\n```\n\n" +
|
|
111
|
+
"To trigger manually outside the workflow's normal triggers, use `gh workflow run`.";
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
triggering_body =
|
|
115
|
+
`See the workflow file at \`${w.path}\` for the trigger conditions and steps. ` +
|
|
116
|
+
"Manual trigger: `gh workflow run`.";
|
|
117
|
+
}
|
|
118
|
+
const verifying_body = "After the workflow completes, verify:\n\n" +
|
|
119
|
+
"- Workflow run status is success (`gh run list --workflow=" + w.path + " --limit=1`).\n" +
|
|
120
|
+
"- The deployed surface responds (smoke-test the user-facing endpoint).\n" +
|
|
121
|
+
"- No alert sources have fired (link the dashboard here once it exists).";
|
|
122
|
+
const rollback_body = "Rollback path (TODO: confirm this with the on-call rotation):\n\n" +
|
|
123
|
+
"1. Identify the previous successful run's SHA: `gh run list --workflow=" + w.path + " --status=success --limit=2`.\n" +
|
|
124
|
+
"2. Trigger this workflow against that SHA via `gh workflow run " + w.path + " --ref <sha>` (or the equivalent ref).\n" +
|
|
125
|
+
"3. Confirm the rollback via the Verifying section above.";
|
|
126
|
+
const body = applyTemplate(template, {
|
|
127
|
+
workflow_name: w.name,
|
|
128
|
+
workflow_path: w.path,
|
|
129
|
+
workflow_triggers_note: triggers_note,
|
|
130
|
+
triggering_body,
|
|
131
|
+
verifying_body,
|
|
132
|
+
rollback_body,
|
|
133
|
+
});
|
|
134
|
+
out.push({
|
|
135
|
+
path: `docs/runbooks/RUNBOOK-${slug}.md`,
|
|
136
|
+
action: "emit",
|
|
137
|
+
rationale: `Seeded from CI workflow ${w.path} (matches deploy-pattern heuristic)`,
|
|
138
|
+
tailored_content: body,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
return out;
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
//# sourceMappingURL=runbook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runbook.js","sourceRoot":"","sources":["../../../src/onboard/seeders/runbook.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,EAAE;AACF,4CAA4C;AAC5C,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,2DAA2D;AAC3D,2EAA2E;AAC3E,0EAA0E;AAC1E,8DAA8D;AAC9D,EAAE;AACF,qEAAqE;AACrE,qEAAqE;AACrE,4DAA4D;AAC5D,EAAE;AACF,kEAAkE;AAClE,oEAAoE;AACpE,8DAA8D;AAC9D,kEAAkE;AAClE,wEAAwE;AACxE,sEAAsE;AAEtE,OAAO,EAAE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C/E,oCAAoC,CAAC;YACzC,CAAC;YAED,MAAM,cAAc,GAClB,2CAA2C;gBAC3C,4DAA4D,GAAG,CAAC,CAAC,IAAI,GAAG,iBAAiB;gBACzF,0EAA0E;gBAC1E,yEAAyE,CAAC;YAE5E,MAAM,aAAa,GACjB,mEAAmE;gBACnE,yEAAyE,GAAG,CAAC,CAAC,IAAI,GAAG,iCAAiC;gBACtH,iEAAiE,GAAG,CAAC,CAAC,IAAI,GAAG,0CAA0C;gBACvH,0DAA0D,CAAC;YAE7D,MAAM,IAAI,GAAG,aAAa,CAAC,QAAQ,EAAE;gBACnC,aAAa,EAAE,CAAC,CAAC,IAAI;gBACrB,aAAa,EAAE,CAAC,CAAC,IAAI;gBACrB,sBAAsB,EAAE,aAAa;gBACrC,eAAe;gBACf,cAAc;gBACd,aAAa;aACd,CAAC,CAAC;YAEH,GAAG,CAAC,IAAI,CAAC;gBACP,IAAI,EAAE,yBAAyB,IAAI,KAAK;gBACxC,MAAM,EAAE,MAAM;gBACd,SAAS,EAAE,2BAA2B,CAAC,CAAC,IAAI,qCAAqC;gBACjF,gBAAgB,EAAE,IAAI;aACvB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,GAAG,CAAC;IACb,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# ADR {year}-{nn} — {title}
|
|
2
|
+
|
|
3
|
+
- **Status:** Proposed
|
|
4
|
+
- **Date:** {date}
|
|
5
|
+
- **Deciders:** {deciders}
|
|
6
|
+
- **Scope:** {scope}
|
|
7
|
+
|
|
8
|
+
## Context
|
|
9
|
+
|
|
10
|
+
This decision was surfaced from the deterministic Stage A analysis of the repo at {repo_root}.
|
|
11
|
+
The relevant evidence:
|
|
12
|
+
|
|
13
|
+
{evidence_bullets}
|
|
14
|
+
|
|
15
|
+
## Decision
|
|
16
|
+
|
|
17
|
+
{rationale}
|
|
18
|
+
|
|
19
|
+
## Consequences
|
|
20
|
+
|
|
21
|
+
{consequences}
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Generated by `df onboard` (cycle 15 Phase C). The maintainer should expand each
|
|
26
|
+
section with repo-specific nuance the deterministic analysis could not produce.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Cycle 1 — {repo_name} bootstrap"
|
|
3
|
+
status: "draft"
|
|
4
|
+
owner: "@{owner}-maintainers"
|
|
5
|
+
started: "{date}"
|
|
6
|
+
target: null
|
|
7
|
+
closed: null
|
|
8
|
+
related_issues: []
|
|
9
|
+
related_repos:
|
|
10
|
+
- "{canonical_name}"
|
|
11
|
+
tags:
|
|
12
|
+
- bootstrap
|
|
13
|
+
- cycle1
|
|
14
|
+
- agent-context
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Cycle 1 — {repo_name} bootstrap
|
|
18
|
+
|
|
19
|
+
> Generated by `df onboard` (cycle 15 Phase C) from the deterministic Stage A
|
|
20
|
+
> analysis of this repo. The maintainer should expand each section with the
|
|
21
|
+
> nuance the analyzer could not produce.
|
|
22
|
+
|
|
23
|
+
## Scope
|
|
24
|
+
|
|
25
|
+
Bootstrap the agent-context set for `{canonical_name}` so AI-driven development
|
|
26
|
+
(Claude Code, Cursor, Codex, Gemini) operates with the same architectural
|
|
27
|
+
context as a human maintainer. This cycle delivers the initial `CLAUDE.md`,
|
|
28
|
+
`AGENTS.md`, `docs/` skeleton, and the first ADRs surfaced from the repo's
|
|
29
|
+
existing decisions.
|
|
30
|
+
|
|
31
|
+
## Stack
|
|
32
|
+
|
|
33
|
+
{stack_bullets}
|
|
34
|
+
|
|
35
|
+
## Services
|
|
36
|
+
|
|
37
|
+
{services_bullets}
|
|
38
|
+
|
|
39
|
+
## Deploy story
|
|
40
|
+
|
|
41
|
+
{deploy_story_body}
|
|
42
|
+
|
|
43
|
+
## Dark Factory gate posture
|
|
44
|
+
|
|
45
|
+
{df_presence_body}
|
|
46
|
+
|
|
47
|
+
## Agent context set
|
|
48
|
+
|
|
49
|
+
{agent_context_body}
|
|
50
|
+
|
|
51
|
+
## Exit criteria
|
|
52
|
+
|
|
53
|
+
- [ ] `CLAUDE.md` lists every section relevant to this repo's actual stack + services.
|
|
54
|
+
- [ ] `AGENTS.md` documents the per-vendor critic posture this repo runs.
|
|
55
|
+
- [ ] `docs/PRINCIPLES.md` exists with the project's engineering principles.
|
|
56
|
+
- [ ] `docs/roadmap/` directory exists; this doc is its first entry.
|
|
57
|
+
- [ ] At least 3 ADRs under `docs/ADR/` (seeded from this repo's surfaced decisions).
|
|
58
|
+
- [ ] `df doctor` against this repo passes `agent_context_*` checks.
|
|
59
|
+
|
|
60
|
+
## Open questions
|
|
61
|
+
|
|
62
|
+
- Which on-call rotation owns this repo's deploy story?
|
|
63
|
+
- Are there security boundaries beyond the standard DF gate posture above?
|
|
64
|
+
- Does this repo need a separate runbook beyond the seeded deploy runbook?
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{{!-- packages/cli/src/onboard/seeders/runbook.md.tmpl --}}
|
|
2
|
+
# Runbook: {workflow_name}
|
|
3
|
+
|
|
4
|
+
> Generated by `df onboard` (cycle 15 Phase C) from the analysis of
|
|
5
|
+
> `{workflow_path}`. The maintainer should expand each section with the
|
|
6
|
+
> nuance the analyzer could not produce.
|
|
7
|
+
|
|
8
|
+
**Workflow:** [`{workflow_path}`]({workflow_path}){workflow_triggers_note}
|
|
9
|
+
|
|
10
|
+
## Triggering
|
|
11
|
+
|
|
12
|
+
{triggering_body}
|
|
13
|
+
|
|
14
|
+
## Verifying success
|
|
15
|
+
|
|
16
|
+
{verifying_body}
|
|
17
|
+
|
|
18
|
+
## Rollback
|
|
19
|
+
|
|
20
|
+
{rollback_body}
|
|
21
|
+
|
|
22
|
+
## On-call
|
|
23
|
+
|
|
24
|
+
- Who is paged when this workflow fails? (TODO: name the rotation)
|
|
25
|
+
- Where do alerts surface? (TODO: link the alert source)
|
|
26
|
+
- What is the SLO this workflow is meant to satisfy? (TODO)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { parseTemplateRef, type ParsedTemplateRef, type GhTemplateRef, type FileTemplateRef } from "./template-ref.js";
|
|
2
|
+
export { parseTemplateRef };
|
|
3
|
+
export type { ParsedTemplateRef, GhTemplateRef, FileTemplateRef };
|
|
4
|
+
export declare const MAX_TEMPLATE_FILES = 1000;
|
|
5
|
+
export declare const MAX_TEMPLATE_FILE_SIZE = 65536;
|
|
6
|
+
export interface TemplateFile {
|
|
7
|
+
path: string;
|
|
8
|
+
content: string;
|
|
9
|
+
}
|
|
10
|
+
export interface Template {
|
|
11
|
+
canonicalRef: string;
|
|
12
|
+
resolvedSha: string;
|
|
13
|
+
cacheDir: string;
|
|
14
|
+
files: TemplateFile[];
|
|
15
|
+
}
|
|
16
|
+
export interface LoadOptions {
|
|
17
|
+
cacheRoot?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function loadTemplate(canonicalRef: string, opts?: LoadOptions): Promise<Template>;
|
|
20
|
+
//# sourceMappingURL=template-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-loader.d.ts","sourceRoot":"","sources":["../../src/onboard/template-loader.ts"],"names":[],"mappings":"AAyBA,OAAO,EACL,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAWlE,eAAO,MAAM,kBAAkB,OAAO,CAAC;AACvC,eAAO,MAAM,sBAAsB,QAAS,CAAC;AAG7C,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAkGD,wBAAsB,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAalG"}
|