issue-flow 0.9.0 → 0.11.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/dist/{analyze-VSWAEVN3.js → analyze-7B5TORNK.js} +13 -8
- package/dist/analyze-7B5TORNK.js.map +1 -0
- package/dist/apply-WUJHDD7A.js +788 -0
- package/dist/apply-WUJHDD7A.js.map +1 -0
- package/dist/{chunk-NB6WKTBL.js → chunk-3BOHTH4V.js} +2 -2
- package/dist/chunk-3D4A4B46.js +2 -0
- package/dist/chunk-47VIN33V.js +983 -0
- package/dist/chunk-47VIN33V.js.map +1 -0
- package/dist/{chunk-DP43WJY4.js → chunk-6N7LZZ5U.js} +19 -13
- package/dist/chunk-6N7LZZ5U.js.map +1 -0
- package/dist/{chunk-KXAG24DD.js → chunk-AAY6KM7N.js} +6 -3
- package/dist/chunk-AAY6KM7N.js.map +1 -0
- package/dist/{chunk-VNKSMWDN.js → chunk-GANSDJV7.js} +4 -4
- package/dist/{chunk-57MH6RYJ.js → chunk-HC2MT7BX.js} +249 -181
- package/dist/chunk-HC2MT7BX.js.map +1 -0
- package/dist/chunk-HQYXVIH6.js +110 -0
- package/dist/chunk-HQYXVIH6.js.map +1 -0
- package/dist/{chunk-66ZGYXTH.js → chunk-JW7WLSZ6.js} +15 -11
- package/dist/chunk-JW7WLSZ6.js.map +1 -0
- package/dist/{chunk-M37YZYDO.js → chunk-LVKQ2AKT.js} +3 -3
- package/dist/{chunk-TLSIK656.js → chunk-MKD2D7WE.js} +12 -8
- package/dist/chunk-MKD2D7WE.js.map +1 -0
- package/dist/{chunk-WHEU55ZP.js → chunk-MSPUB635.js} +15 -11
- package/dist/chunk-MSPUB635.js.map +1 -0
- package/dist/chunk-OBLVLIUS.js +285 -0
- package/dist/chunk-OBLVLIUS.js.map +1 -0
- package/dist/{chunk-JGKPSWOA.js → chunk-PL6CNMVS.js} +2 -2
- package/dist/chunk-RKTEV6EG.js +246 -0
- package/dist/chunk-RKTEV6EG.js.map +1 -0
- package/dist/{chunk-TJMZWRS6.js → chunk-UBIQXCVE.js} +15 -11
- package/dist/chunk-UBIQXCVE.js.map +1 -0
- package/dist/{chunk-X7XBF5TS.js → chunk-VCKX262Z.js} +12 -8
- package/dist/chunk-VCKX262Z.js.map +1 -0
- package/dist/{chunk-MTJQOOMG.js → chunk-VQ5VN7DF.js} +123 -4
- package/dist/chunk-VQ5VN7DF.js.map +1 -0
- package/dist/cli.js +32 -21
- package/dist/cli.js.map +1 -1
- package/dist/{config-J5DW6HSY.js → config-4THHOXNN.js} +7 -3
- package/dist/execute-5OEKLM5X.js +15 -0
- package/dist/{generate-ERDPOTKX.js → generate-6RA2MFJB.js} +99 -12
- package/dist/generate-6RA2MFJB.js.map +1 -0
- package/dist/init-PRMOTQ7N.js +9 -0
- package/dist/plan-KENR6MJ3.js +17 -0
- package/dist/policy-XQW5NUIE.js +117 -0
- package/dist/policy-XQW5NUIE.js.map +1 -0
- package/dist/pr-KDGKG4BP.js +21 -0
- package/dist/pr-review-CAMAB7KO.js +17 -0
- package/dist/prd-V3MWDIHK.js +17 -0
- package/dist/review-7LN47SAN.js +15 -0
- package/dist/review-7LN47SAN.js.map +1 -0
- package/dist/{run-BRBFHVUO.js → run-H75MD5BQ.js} +26 -25
- package/dist/{run-BRBFHVUO.js.map → run-H75MD5BQ.js.map} +1 -1
- package/dist/{web-WQISLO66.js → web-ANQQTTRD.js} +5 -5
- package/package.json +1 -1
- package/prompts/analyze.md +24 -0
- package/prompts/execute.md +29 -1
- package/prompts/generate.md +61 -7
- package/prompts/plan.md +24 -1
- package/prompts/pr-review.md +65 -4
- package/prompts/pr.md +37 -3
- package/prompts/prd.md +17 -0
- package/prompts/review.md +40 -0
- package/dist/analyze-VSWAEVN3.js.map +0 -1
- package/dist/chunk-57MH6RYJ.js.map +0 -1
- package/dist/chunk-66ZGYXTH.js.map +0 -1
- package/dist/chunk-DP43WJY4.js.map +0 -1
- package/dist/chunk-DTNM3LTO.js +0 -101
- package/dist/chunk-DTNM3LTO.js.map +0 -1
- package/dist/chunk-KXAG24DD.js.map +0 -1
- package/dist/chunk-M72ZEPWD.js +0 -135
- package/dist/chunk-M72ZEPWD.js.map +0 -1
- package/dist/chunk-MTJQOOMG.js.map +0 -1
- package/dist/chunk-SLHZPB3C.js +0 -50
- package/dist/chunk-SLHZPB3C.js.map +0 -1
- package/dist/chunk-TJMZWRS6.js.map +0 -1
- package/dist/chunk-TLSIK656.js.map +0 -1
- package/dist/chunk-WHEU55ZP.js.map +0 -1
- package/dist/chunk-X7XBF5TS.js.map +0 -1
- package/dist/execute-Z2DKGVLR.js +0 -14
- package/dist/generate-ERDPOTKX.js.map +0 -1
- package/dist/init-UY6ZCIFT.js +0 -9
- package/dist/plan-REMAMCX4.js +0 -16
- package/dist/pr-KERP52TI.js +0 -20
- package/dist/pr-review-IU4N3TEK.js +0 -16
- package/dist/prd-SHVQW6RM.js +0 -16
- package/dist/review-L5F77QAC.js +0 -14
- /package/dist/{chunk-NB6WKTBL.js.map → chunk-3BOHTH4V.js.map} +0 -0
- /package/dist/{config-J5DW6HSY.js.map → chunk-3D4A4B46.js.map} +0 -0
- /package/dist/{chunk-VNKSMWDN.js.map → chunk-GANSDJV7.js.map} +0 -0
- /package/dist/{chunk-M37YZYDO.js.map → chunk-LVKQ2AKT.js.map} +0 -0
- /package/dist/{chunk-JGKPSWOA.js.map → chunk-PL6CNMVS.js.map} +0 -0
- /package/dist/{execute-Z2DKGVLR.js.map → config-4THHOXNN.js.map} +0 -0
- /package/dist/{init-UY6ZCIFT.js.map → execute-5OEKLM5X.js.map} +0 -0
- /package/dist/{plan-REMAMCX4.js.map → init-PRMOTQ7N.js.map} +0 -0
- /package/dist/{pr-KERP52TI.js.map → plan-KENR6MJ3.js.map} +0 -0
- /package/dist/{pr-review-IU4N3TEK.js.map → pr-KDGKG4BP.js.map} +0 -0
- /package/dist/{prd-SHVQW6RM.js.map → pr-review-CAMAB7KO.js.map} +0 -0
- /package/dist/{review-L5F77QAC.js.map → prd-V3MWDIHK.js.map} +0 -0
- /package/dist/{web-WQISLO66.js.map → web-ANQQTTRD.js.map} +0 -0
- /package/web/{CLAUDE.md → AGENTS.md} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/scaffold/apply.ts","../src/scaffold/plan.ts","../src/conventions/defaults.ts","../src/scaffold/assets.ts"],"sourcesContent":["import { access, mkdir, writeFile } from 'node:fs/promises';\nimport { basename, dirname, join } from 'node:path';\nimport { loadRepositoryPolicy } from '../policy/index.js';\nimport { getProjectRoot } from '../utils/git.js';\nimport { buildScaffoldPlan, type RepositoryState, type ScaffoldPlan } from './plan.js';\n\n/**\n * Turning a plan into files — and the one place that writes anything.\n *\n * Writing is deliberately dumber than planning: it creates what the plan marked\n * `create` and touches nothing else. Every judgement about whether a file should\n * exist was already made, from the resolved policy, in `plan.ts`.\n */\n\nexport interface ApplyResult {\n written: string[];\n /** Marked `create` but found on disk between planning and writing. */\n skipped: string[];\n}\n\nasync function exists(path: string): Promise<boolean> {\n try {\n await access(path);\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Write the `create` actions of a plan.\n *\n * Re-checks existence immediately before each write. The plan is built from the\n * resolved policy, which is cached for the process, so a file created between\n * the two would otherwise be overwritten — and \"initialization is\n * non-destructive\" has to hold even against itself.\n */\nexport async function applyScaffoldPlan(plan: ScaffoldPlan): Promise<ApplyResult> {\n const written: string[] = [];\n const skipped: string[] = [];\n\n for (const item of plan.actions) {\n if (item.kind !== 'create' || item.content === undefined) continue;\n\n const absolute = join(plan.root, item.path);\n if (await exists(absolute)) {\n skipped.push(item.path);\n continue;\n }\n\n await mkdir(dirname(absolute), { recursive: true });\n await writeFile(absolute, item.content, 'utf-8');\n written.push(item.path);\n }\n\n return { written, skipped };\n}\n\nexport interface ResolveStateOptions {\n /** Repository root. Defaults to the git project root. */\n root?: string;\n /** Subdirectory the conventions apply to, for monorepos. */\n scope?: string | null;\n}\n\n/**\n * The repository state the planner reads, assembled from the policy layer.\n *\n * There is no second discovery here on purpose: initialization sees exactly the\n * repository every other flow sees, so it can never propose a convention that\n * discovery already found.\n */\nexport async function resolveRepositoryState(\n options: ResolveStateOptions = {},\n): Promise<RepositoryState> {\n const root = options.root ?? (await getProjectRoot());\n const policy = await loadRepositoryPolicy({ root, scope: options.scope ?? null });\n\n return {\n policy,\n projectName: basename(root),\n exists: (relPath: string) => exists(join(root, relPath)),\n };\n}\n\n/** Resolve the state and build the plan, without writing anything. */\nexport async function planRepositoryScaffold(\n options: ResolveStateOptions = {},\n): Promise<ScaffoldPlan> {\n return buildScaffoldPlan(await resolveRepositoryState(options));\n}\n","import { readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { DEFAULT_ISSUE_TYPES } from '../conventions/defaults.js';\nimport type { RepositoryPolicy } from '../policy/types.js';\nimport {\n renderAgentsMd,\n renderClaudeMd,\n renderConventionsDoc,\n renderIssueForm,\n renderIssueTemplateConfig,\n renderLabelsFile,\n renderPullRequestTemplate,\n type ScaffoldAsset,\n} from './assets.js';\n\n/**\n * Deciding what a repository is missing — the shared core behind both the CLI\n * and the initialization skill.\n *\n * The plan is produced from the **resolved policy**, never from a fresh scan:\n * initialization and every other flow therefore see the same repository, and a\n * convention that discovery already found can never be proposed a second time.\n *\n * Two properties matter more than the file list.\n *\n * **Non-destructive.** Nothing that exists is ever overwritten. A repository\n * that already declares a convention keeps it, even when it differs from the\n * default — the whole point of the tool is to adapt to the repository, and\n * \"initialize\" must not become a euphemism for \"replace\".\n *\n * **Idempotent.** Running it twice changes nothing the second time, because the\n * plan is computed from what is present rather than from what a previous run\n * did.\n */\n\n/** What initialization intends to do with one file. */\nexport type ScaffoldActionKind =\n /** The file does not exist and the repository has no equivalent. */\n | 'create'\n /** Something equivalent already exists; initialization stays out of the way. */\n | 'keep'\n /**\n * Present, but inconsistent with the convention it claims to follow. Reported,\n * never rewritten: the repository may be right and the tool wrong.\n */\n | 'review';\n\nexport interface ScaffoldAction {\n path: string;\n kind: ScaffoldActionKind;\n tier: ScaffoldAsset['tier'];\n /** Why this action was chosen, in one sentence, for the report. */\n reason: string;\n /** Content to write. Only present for `create`. */\n content?: string;\n}\n\nexport interface ScaffoldPlan {\n root: string;\n /** Every action, in a stable order. */\n actions: ScaffoldAction[];\n /** Notes that are not tied to a single file. */\n notes: string[];\n}\n\n/** Everything the plan needs to know about the repository's current state. */\nexport interface RepositoryState {\n policy: RepositoryPolicy;\n /** Whether a repository-relative path exists. */\n exists(relPath: string): Promise<boolean>;\n /** Name to head `AGENTS.md` with. */\n projectName: string;\n}\n\nfunction action(\n path: string,\n kind: ScaffoldActionKind,\n tier: ScaffoldAsset['tier'],\n reason: string,\n content?: string,\n): ScaffoldAction {\n return content === undefined\n ? { path, kind, tier, reason }\n : { path, kind, tier, reason, content };\n}\n\n/**\n * Whether a `CLAUDE.md` is already the one-line bridge the convention asks for.\n *\n * A file that merely *mentions* `AGENTS.md` in the middle of its own\n * instructions is not a bridge — it is a second source that happens to cite the\n * first. The test is therefore about size and shape, not about a substring.\n */\nexport function isClaudeBridge(content: string): boolean {\n const meaningful = content\n .split('\\n')\n .map((line) => line.trim())\n .filter((line) => line !== '' && !line.startsWith('#'));\n\n if (meaningful.length === 0 || meaningful.length > 2) return false;\n return meaningful.every((line) => /agents\\.md/i.test(line));\n}\n\n/**\n * Build the plan.\n *\n * `write` is what the caller intends to do with it; the plan itself never\n * touches the filesystem, which is what lets the CLI show it and the skill\n * reason about it before anything happens.\n */\nexport async function buildScaffoldPlan(state: RepositoryState): Promise<ScaffoldPlan> {\n const { policy } = state;\n const actions: ScaffoldAction[] = [];\n const notes: string[] = [];\n\n // ── Issue Templates ───────────────────────────────────────────────────────\n const localTemplates = policy.issues.templates.filter((t) => t.origin === 'filesystem');\n const orgTemplates = policy.issues.templates.filter((t) => t.origin === 'organization');\n\n if (localTemplates.length > 0) {\n actions.push(\n action(\n '.github/ISSUE_TEMPLATE/',\n 'keep',\n 'required',\n `${localTemplates.length} Issue Template(s) already declared in this repository.`,\n ),\n );\n } else if (orgTemplates.length > 0) {\n // The organization already answered this, and a local copy would fork it:\n // the org file is then edited once and the repository silently stops\n // following it.\n actions.push(\n action(\n '.github/ISSUE_TEMPLATE/',\n 'keep',\n 'required',\n `The organization serves ${orgTemplates.length} Issue Template(s) to this repository; a local copy would fork them.`,\n ),\n );\n notes.push(\n 'Issue Templates come from the organization. Change them there, not here — a local copy stops tracking the original the moment either is edited.',\n );\n } else {\n for (const type of DEFAULT_ISSUE_TYPES) {\n const path = `.github/ISSUE_TEMPLATE/${type.order}-${type.slug}.yml`;\n actions.push(\n action(\n path,\n 'create',\n 'required',\n `Issue Form for the \"${type.name}\" type.`,\n renderIssueForm(type),\n ),\n );\n }\n const configPath = '.github/ISSUE_TEMPLATE/config.yml';\n actions.push(\n action(\n configPath,\n (await state.exists(configPath)) ? 'keep' : 'create',\n 'required',\n 'Template chooser: keeps blank issues enabled and links the conventions.',\n renderIssueTemplateConfig(),\n ),\n );\n }\n\n // ── Pull Request template ────────────────────────────────────────────────\n if (policy.pullRequests.templates.length > 0) {\n actions.push(\n action(\n policy.pullRequests.templates[0]?.path ?? '.github/PULL_REQUEST_TEMPLATE.md',\n 'keep',\n 'required',\n 'A Pull Request template already exists.',\n ),\n );\n } else {\n actions.push(\n action(\n '.github/PULL_REQUEST_TEMPLATE.md',\n 'create',\n 'required',\n 'Gives every Pull Request a body that review can rely on.',\n renderPullRequestTemplate(),\n ),\n );\n }\n\n // ── Agent entry points ───────────────────────────────────────────────────\n const agents = policy.docs.find((doc) => doc.kind === 'agents' && doc.scope === '');\n const claude = policy.docs.find((doc) => doc.kind === 'claude' && doc.scope === '');\n\n const referenced = policy.docs\n .filter((doc) => doc.kind === 'contributing' || doc.kind === 'referenced')\n .map((doc) => doc.path);\n\n if (agents === undefined) {\n actions.push(\n action(\n 'AGENTS.md',\n 'create',\n 'required',\n 'The canonical entry point for any coding agent, as an index of the real documentation.',\n renderAgentsMd(state.projectName, referenced),\n ),\n );\n } else {\n actions.push(action('AGENTS.md', 'keep', 'required', 'Already the canonical entry point.'));\n }\n\n if (claude === undefined) {\n actions.push(\n action(\n 'CLAUDE.md',\n 'create',\n 'recommended',\n 'One-line bridge to AGENTS.md, so Claude Code reads the canonical source.',\n renderClaudeMd(),\n ),\n );\n } else if (isClaudeBridge(claude.content)) {\n actions.push(action('CLAUDE.md', 'keep', 'recommended', 'Already a bridge to AGENTS.md.'));\n } else if (agents === undefined) {\n // The common migration: instructions live in CLAUDE.md and there is no\n // AGENTS.md. Promoting the content is the user's call — the tool says so\n // rather than moving text it did not write.\n notes.push(\n 'CLAUDE.md carries its own instructions and there is no AGENTS.md. Move that content into AGENTS.md and reduce CLAUDE.md to the one-line bridge; nothing here rewrites it for you.',\n );\n actions.push(\n action(\n 'CLAUDE.md',\n 'review',\n 'recommended',\n 'Holds instructions of its own; AGENTS.md should be the canonical source.',\n ),\n );\n } else {\n notes.push(\n 'AGENTS.md and CLAUDE.md both carry instructions. Two copies of the same rules diverge the first time only one is edited — keep AGENTS.md and reduce CLAUDE.md to the one-line bridge.',\n );\n actions.push(\n action(\n 'CLAUDE.md',\n 'review',\n 'recommended',\n 'Duplicates instructions that AGENTS.md already owns.',\n ),\n );\n }\n\n // ── Documented conventions ───────────────────────────────────────────────\n const hasContributing = policy.docs.some((doc) => doc.kind === 'contributing');\n const conventionsPath = 'docs/conventions.md';\n const conventionsExists = await state.exists(conventionsPath);\n\n if (conventionsExists) {\n actions.push(\n action(conventionsPath, 'keep', 'recommended', 'Conventions are already documented.'),\n );\n } else if (orgTemplates.length > 0) {\n // The conventions are the organization's, and they are documented wherever\n // the organization documents them. A per-repository copy would be a second\n // source that drifts from the one everybody else follows.\n actions.push(\n action(\n conventionsPath,\n 'keep',\n 'recommended',\n \"The conventions are the organization's; documenting them again here would fork them.\",\n ),\n );\n } else if (hasContributing && localTemplates.length > 0) {\n // The repository already says how it works, in its own words and its own\n // file. A second document would be a competing source, which is the exact\n // failure this tool exists to avoid.\n actions.push(\n action(\n conventionsPath,\n 'keep',\n 'recommended',\n 'CONTRIBUTING.md and the Issue Templates already document how this repository works.',\n ),\n );\n } else {\n actions.push(\n action(\n conventionsPath,\n 'create',\n 'recommended',\n 'The source of truth for issue types, labels, branches and commits.',\n renderConventionsDoc(policy.issues.types.length > 0),\n ),\n );\n }\n\n // ── Labels ───────────────────────────────────────────────────────────────\n const labelsPath = '.github/labels.json';\n if (policy.issues.labels.length > 0) {\n actions.push(\n action(\n labelsPath,\n 'keep',\n 'contextual',\n `This repository already has ${policy.issues.labels.length} label(s); Issue Flow never rewrites a taxonomy.`,\n ),\n );\n } else if (await state.exists(labelsPath)) {\n actions.push(action(labelsPath, 'keep', 'contextual', 'A labels file already exists.'));\n } else {\n const includeTypeLabels = policy.issues.types.length === 0;\n actions.push(\n action(\n labelsPath,\n 'create',\n 'contextual',\n includeTypeLabels\n ? 'A baseline label set, including type labels because this organization has no Issue Types.'\n : 'A baseline label set. Type labels are omitted: this organization has native Issue Types.',\n renderLabelsFile(includeTypeLabels),\n ),\n );\n }\n\n if (policy.issues.types.length === 0) {\n notes.push(\n 'No GitHub Issue Types were found. They are an organization-level setting and cannot be created from here; defining them there is better than the `type:*` labels this proposes as a fallback.',\n );\n }\n\n return { root: policy.root, actions, notes };\n}\n\n/** Load a repository file, or null. Used by the state adapter and by tests. */\nexport async function readIfPresent(root: string, relPath: string): Promise<string | null> {\n try {\n return await readFile(join(root, relPath), 'utf-8');\n } catch {\n return null;\n }\n}\n","/**\n * The default convention set — Issue Flow's fallback when a repository declares\n * nothing of its own.\n *\n * This is the **last** rung of the precedence ladder, and it only ever applies\n * where the repository, its organization and the user's configuration are all\n * silent. It exists so that a brand-new repository still gets a usable,\n * professional baseline instead of an empty one.\n *\n * Two rules shaped every choice here.\n *\n * **Native structure before textual convention.** The preference order is\n * `native feature > structured field > label > free text`. Anything GitHub\n * already models — the type of an issue, its priority, its state — is not\n * re-implemented as a title prefix or a label, because that creates a second\n * truth that ages on its own. GitHub's own defaults are `task`, `bug` and\n * `feature`, and an organization may define up to 25 Issue Types.\n *\n * **Do not fragment the backlog.** A type per flavour of work makes no query\n * better and every filter worse. Documentation, maintenance, refactoring and\n * technical debt are *characteristics*, not natures, and they belong on labels\n * over a real type.\n */\n\n/** A default Issue Type, with the reasoning a template and a report can quote. */\nexport interface DefaultIssueType {\n /** Display name, matching GitHub's Issue Type casing convention. */\n name: string;\n /** Slug used for the Issue Form file name, prefixed by `order`. */\n slug: string;\n /** Order in the template chooser: capture first, execution last. */\n order: number;\n /** One line: what this type is. */\n summary: string;\n /**\n * Whether an issue of this type is executable once it is ready.\n *\n * The distinction matters more than it looks: an open issue is not approved\n * work. `Idea`, `Research` and `Epic` record intent and never authorize an\n * agent to start implementing.\n */\n executable: boolean;\n /** GitHub's own default types, which exist in every organization. */\n native: boolean;\n}\n\n/**\n * Six types, not thirteen.\n *\n * `Bug`, `Feature` and `Task` are GitHub's native defaults and cover all\n * executable work. `Idea`, `Research` and `Epic` are added because each answers\n * a question the other three cannot: *is this even worth doing*, *what is the\n * answer*, and *what is the umbrella*. Everything else the user might expect —\n * documentation, maintenance, refactor, technical debt, security, spike — is\n * deliberately **not** a type; see {@link NON_TYPES}.\n */\nexport const DEFAULT_ISSUE_TYPES: readonly DefaultIssueType[] = [\n {\n name: 'Idea',\n slug: 'idea',\n order: 1,\n summary: 'A hypothesis, opportunity or perceived problem, not yet analysed.',\n executable: false,\n native: false,\n },\n {\n name: 'Research',\n slug: 'research',\n order: 2,\n summary: 'An investigation that produces knowledge: analysis, benchmark, feasibility.',\n executable: false,\n native: false,\n },\n {\n name: 'Epic',\n slug: 'epic',\n order: 3,\n summary: 'An umbrella objective delivered through sub-issues.',\n executable: false,\n native: false,\n },\n {\n name: 'Feature',\n slug: 'feature',\n order: 4,\n summary: 'A new capability or a change to what the product does.',\n executable: true,\n native: true,\n },\n {\n name: 'Bug',\n slug: 'bug',\n order: 5,\n summary: 'Existing behaviour that diverges from what is expected.',\n executable: true,\n native: true,\n },\n {\n name: 'Task',\n slug: 'task',\n order: 6,\n summary: 'Concrete work that is neither a feature nor a bug.',\n executable: true,\n native: true,\n },\n] as const;\n\n/** Something people often expect to be a type, and why it is not one here. */\nexport interface NonType {\n concept: string;\n /** How to represent it instead. */\n instead: string;\n why: string;\n}\n\n/**\n * The list is as much a part of the convention as the types themselves: without\n * it, every repository re-derives the same six arguments and reaches a different\n * answer.\n */\nexport const NON_TYPES: readonly NonType[] = [\n {\n concept: 'Documentation',\n instead: '`Task` + label `docs`',\n why: 'The work is a task; what varies is the area it touches.',\n },\n {\n concept: 'Maintenance, chore',\n instead: '`Task`',\n why: 'That is already what `Task` means.',\n },\n {\n concept: 'Refactor, technical debt',\n instead: '`Task` + label `tech-debt`',\n why: 'A cross-cutting characteristic, not a distinct nature of work.',\n },\n {\n concept: 'Security',\n instead: 'the real type (`Bug`/`Task`/`Feature`) + label `security`',\n why: 'It cuts across every type; as a type it would hide whether the item is a flaw or preventive work.',\n },\n {\n concept: 'Spike, investigation',\n instead: '`Research`',\n why: 'The same concept under a different name.',\n },\n {\n concept: 'Enhancement',\n instead: '`Feature`',\n why: 'A change to what the product does is a feature, whether it is new or an improvement.',\n },\n {\n concept: 'Proposal, RFC',\n instead: '`Research`, and an ADR for the decision it produces',\n why: 'The issue carries the investigation; the decision belongs in a document that outlives it.',\n },\n {\n concept: 'Question',\n instead: 'a Discussion, or `Research` when it needs work',\n why: 'A question that needs no work is not a backlog item.',\n },\n] as const;\n\n/** A default label, with the reason it exists. */\nexport interface DefaultLabel {\n name: string;\n description: string;\n /** Hex colour without `#`, matching GitHub's palette conventions. */\n color: string;\n}\n\n/**\n * A deliberately small vocabulary, for what has **no native representation**:\n * technical area, component and cross-cutting characteristic.\n *\n * Nothing here duplicates a field. There is no `priority`, no `status`, no\n * `type` and no size label: GitHub models all four, and a label alongside a\n * field is a second truth that drifts. The one exception is\n * {@link FALLBACK_TYPE_LABELS}, for repositories whose organization has no Issue\n * Types at all.\n */\nexport const DEFAULT_LABELS: readonly DefaultLabel[] = [\n { name: 'api', description: 'Public interfaces and contracts', color: '006b75' },\n { name: 'backend', description: 'Server-side code', color: '5319e7' },\n { name: 'frontend', description: 'User-facing code', color: 'bfd4f2' },\n { name: 'database', description: 'Schema, queries and migrations', color: 'c2e0c6' },\n { name: 'infra', description: 'Infrastructure, CI and deployment', color: 'f9d0c4' },\n { name: 'docs', description: 'Documentation', color: '0075ca' },\n { name: 'security', description: 'Security or privacy impact', color: 'd93f0b' },\n {\n name: 'tech-debt',\n description: 'Debt paid down rather than capability added',\n color: 'e4e669',\n },\n { name: 'blocked', description: 'Waiting on something outside this repository', color: 'b60205' },\n { name: 'good first issue', description: 'Good for newcomers', color: '7057ff' },\n] as const;\n\n/**\n * Type labels, used **only** where the organization has no Issue Types.\n *\n * A repository that cannot use the native field still needs the type to be\n * queryable, and a label is the next best representation. The moment Issue Types\n * exist, these become the second truth the convention warns about — which is why\n * scaffolding proposes them only after finding none.\n */\nexport const FALLBACK_TYPE_LABELS: readonly DefaultLabel[] = DEFAULT_ISSUE_TYPES.map((type) => ({\n name: `type:${type.slug}`,\n description: type.summary,\n color: type.executable ? '1d76db' : 'd4c5f9',\n}));\n\n/**\n * The sections an issue body is expected to carry, by default.\n *\n * Kept short on purpose. A twelve-section template is excellent for an\n * architectural proposal and hostile to capturing an idea, and a form nobody\n * fills in honestly is worse than no form. Each default Issue Form asks only\n * what its type actually needs; this list is what the *prose* fallback uses when\n * a repository has no forms at all.\n */\nexport const DEFAULT_BODY_SECTIONS: readonly string[] = [\n 'Context',\n 'Problem',\n 'Objective',\n 'Scope',\n 'Out of scope',\n 'Acceptance criteria',\n 'Dependencies',\n 'Risks',\n 'References',\n] as const;\n\n/** Branch naming Issue Flow has always used. */\nexport const DEFAULT_BRANCH_CONVENTION = 'issue/{N}-{slug}';\n\n/**\n * Commit convention.\n *\n * Conventional Commits is the closest thing to a lingua franca, and it is what\n * makes a changelog and a semver bump derivable from the history — which is\n * exactly why the type must reflect the change instead of always being `feat`.\n */\nexport const DEFAULT_COMMIT_CONVENTION = 'Conventional Commits — type(scope): subject';\n\n/**\n * Issue title convention.\n *\n * `null` on purpose: with Issue Types, a `[Bug]` prefix restates in text what a\n * structured field already carries. A repository whose organization has no Issue\n * Types may want one, and declares it.\n */\nexport const DEFAULT_ISSUE_TITLE_CONVENTION: string | null = null;\n\n/** Everything above, as one object, for the report and the scaffolding plan. */\nexport const DEFAULT_CONVENTIONS = {\n issueTypes: DEFAULT_ISSUE_TYPES,\n nonTypes: NON_TYPES,\n labels: DEFAULT_LABELS,\n fallbackTypeLabels: FALLBACK_TYPE_LABELS,\n bodySections: DEFAULT_BODY_SECTIONS,\n branchConvention: DEFAULT_BRANCH_CONVENTION,\n commitConvention: DEFAULT_COMMIT_CONVENTION,\n issueTitleConvention: DEFAULT_ISSUE_TITLE_CONVENTION,\n} as const;\n","import {\n DEFAULT_COMMIT_CONVENTION,\n DEFAULT_ISSUE_TYPES,\n DEFAULT_LABELS,\n type DefaultIssueType,\n FALLBACK_TYPE_LABELS,\n NON_TYPES,\n} from '../conventions/defaults.js';\n\n/**\n * The files initialization can write, rendered from the default convention set.\n *\n * Nothing here is a literal copy of a template: every asset is generated from\n * `conventions/defaults.ts`, so the convention and the files that express it can\n * never disagree. Changing a type or a label changes the forms, the labels file\n * and the documentation in one edit.\n */\n\nexport interface ScaffoldAsset {\n /** Repository-relative path, POSIX separators. */\n path: string;\n content: string;\n /**\n * Why this file exists. Shown in the plan, so a user can decline a specific\n * one and understand what they are declining.\n */\n purpose: string;\n /**\n * `required` files are what makes a repository legible to an agent at all.\n * `recommended` ones are worth having; `contextual` ones are only proposed\n * when the repository's state calls for them.\n */\n tier: 'required' | 'recommended' | 'contextual';\n}\n\n/** Fields every executable type needs, and no type should be without. */\nfunction acceptanceCriteriaField(): string {\n return [\n ' - type: textarea',\n ' id: acceptance',\n ' attributes:',\n ' label: Acceptance criteria',\n ' description: How anyone can tell this is done. Checks that fail today and pass afterwards.',\n ' value: |',\n ' - [ ] ',\n ' validations:',\n ' required: true',\n ].join('\\n');\n}\n\nfunction referencesField(): string {\n return [\n ' - type: textarea',\n ' id: references',\n ' attributes:',\n ' label: References',\n ' description: Links, related issues, prior discussion, evidence.',\n ].join('\\n');\n}\n\n/**\n * One Issue Form per default type.\n *\n * `type:` is emitted so that an organization with Issue Types gets the native\n * field filled in; GitHub ignores the key when the type does not exist, so the\n * same file works either way.\n *\n * Required fields are rationed on purpose. `Idea` asks for exactly one, because\n * the cost of recording a thought has to stay near zero — a capture form with\n * eight mandatory fields is a form nobody uses, and the ideas then live in\n * someone's head instead.\n */\nexport function renderIssueForm(type: DefaultIssueType): string {\n const header = [\n `name: \"${emojiFor(type.slug)} ${type.name}\"`,\n `description: \"${type.summary}\"`,\n `type: \"${type.name}\"`,\n 'body:',\n ];\n\n const bodies: Record<string, string[]> = {\n idea: [\n ' - type: markdown',\n ' attributes:',\n ' value: |',\n ' Quick capture. Only the first field is required — triage fills in the rest.',\n ' An Idea is **not approved work**: no agent implements it.',\n ' - type: textarea',\n ' id: idea',\n ' attributes:',\n ' label: The idea',\n ' description: What it is, in a few lines. It does not have to be solved or complete.',\n ' validations:',\n ' required: true',\n ' - type: textarea',\n ' id: problem',\n ' attributes:',\n ' label: Problem or opportunity',\n ' description: What pain or gain is behind it? Leave blank if you do not know yet.',\n referencesField(),\n ' - type: textarea',\n ' id: questions',\n ' attributes:',\n ' label: Open questions',\n ' description: What would have to be answered before deciding anything.',\n ],\n research: [\n ' - type: textarea',\n ' id: question',\n ' attributes:',\n ' label: Question to answer',\n ' description: The decision this investigation has to unblock.',\n ' validations:',\n ' required: true',\n ' - type: textarea',\n ' id: context',\n ' attributes:',\n ' label: Context',\n ' description: What is already known, and why the question is open.',\n ' - type: textarea',\n ' id: deliverable',\n ' attributes:',\n ' label: Expected deliverable',\n ' description: A conclusion and a recommendation. Say where durable knowledge will be written down.',\n ' validations:',\n ' required: true',\n referencesField(),\n ],\n epic: [\n ' - type: markdown',\n ' attributes:',\n ' value: |',\n ' An Epic is never executed directly: it is delivered through its sub-issues.',\n ' - type: textarea',\n ' id: objective',\n ' attributes:',\n ' label: Objective',\n ' description: The state of the product this Epic describes.',\n ' validations:',\n ' required: true',\n ' - type: textarea',\n ' id: scope',\n ' attributes:',\n ' label: Scope',\n ' validations:',\n ' required: true',\n ' - type: textarea',\n ' id: out-of-scope',\n ' attributes:',\n ' label: Out of scope',\n ' description: What this Epic deliberately does not cover. Absence here is what makes scope creep arguable.',\n ' - type: textarea',\n ' id: children',\n ' attributes:',\n ' label: Known sub-issues',\n ' description: Add them as sub-issues once they exist; list what you already foresee.',\n ],\n feature: [\n ' - type: textarea',\n ' id: problem',\n ' attributes:',\n ' label: Problem',\n ' description: What is not possible today, and for whom.',\n ' validations:',\n ' required: true',\n ' - type: textarea',\n ' id: objective',\n ' attributes:',\n ' label: Objective',\n ' description: What becomes true when this is done.',\n ' validations:',\n ' required: true',\n ' - type: textarea',\n ' id: scope',\n ' attributes:',\n ' label: Scope and out of scope',\n ' description: What is included, and what is deliberately not.',\n acceptanceCriteriaField(),\n ' - type: textarea',\n ' id: dependencies',\n ' attributes:',\n ' label: Dependencies and risks',\n ' description: What has to exist first, and what could go wrong.',\n referencesField(),\n ],\n bug: [\n ' - type: textarea',\n ' id: current',\n ' attributes:',\n ' label: Current behaviour',\n ' validations:',\n ' required: true',\n ' - type: textarea',\n ' id: expected',\n ' attributes:',\n ' label: Expected behaviour',\n ' validations:',\n ' required: true',\n ' - type: textarea',\n ' id: steps',\n ' attributes:',\n ' label: Steps to reproduce',\n ' value: |',\n ' 1.',\n ' 2.',\n ' 3.',\n ' validations:',\n ' required: true',\n ' - type: input',\n ' id: environment',\n ' attributes:',\n ' label: Environment',\n ' description: Where it happens — environment, version, component, browser.',\n ' validations:',\n ' required: true',\n ' - type: textarea',\n ' id: evidence',\n ' attributes:',\n ' label: Evidence',\n ' description: Logs, request and response, screenshot, trace id, affected URL.',\n ' - type: dropdown',\n ' id: impact',\n ' attributes:',\n ' label: Impact',\n ' options:',\n ' - \"Data loss or improper exposure\"',\n ' - \"Feature unavailable, no workaround\"',\n ' - \"Feature degraded, workaround exists\"',\n ' - \"Cosmetic or low consequence\"',\n ' validations:',\n ' required: true',\n ' - type: textarea',\n ' id: done',\n ' attributes:',\n ' label: How to tell it is fixed',\n ' description: The check that fails today and passes afterwards.',\n ' validations:',\n ' required: true',\n ],\n task: [\n ' - type: textarea',\n ' id: what',\n ' attributes:',\n ' label: What has to be done',\n ' validations:',\n ' required: true',\n ' - type: textarea',\n ' id: why',\n ' attributes:',\n ' label: Why',\n ' description: The reason this is worth doing now.',\n ' validations:',\n ' required: true',\n acceptanceCriteriaField(),\n referencesField(),\n ],\n };\n\n const body = bodies[type.slug];\n if (body === undefined) {\n throw new Error(`No Issue Form body defined for type \"${type.slug}\"`);\n }\n\n return `${[...header, ...body].join('\\n')}\\n`;\n}\n\nfunction emojiFor(slug: string): string {\n const map: Record<string, string> = {\n idea: '💡',\n research: '🔬',\n epic: '🗺️',\n feature: '✨',\n bug: '🐛',\n task: '🔧',\n };\n return map[slug] ?? '📌';\n}\n\n/**\n * The template chooser configuration.\n *\n * `blank_issues_enabled: true` is deliberate: a contributor who does not fit any\n * form should open the issue anyway. A closed chooser turns a report into\n * silence, which costs more than an unstructured issue.\n */\nexport function renderIssueTemplateConfig(): string {\n return [\n 'blank_issues_enabled: true',\n 'contact_links:',\n ' - name: How this backlog works',\n ' url: https://github.com/fabioassuncao/issue-flow/blob/main/docs/conventions.md',\n ' about: Issue types, what each one authorizes, labels and the lifecycle.',\n '',\n ].join('\\n');\n}\n\n/** The Pull Request template. */\nexport function renderPullRequestTemplate(): string {\n return [\n '## What changed',\n '',\n '<!-- What this Pull Request does, and why. One paragraph is enough. -->',\n '',\n '## How it was tested',\n '',\n '<!-- The checks you ran, and what they proved. \"CI is green\" is not a test plan. -->',\n '',\n '## Related issues',\n '',\n '<!--',\n 'One `Closes #N` per issue this resolves, each on its own line and as plain body',\n 'text — GitHub only auto-closes when the line is not inside a code fence.',\n '-->',\n '',\n '## Notes for reviewers',\n '',\n '<!-- Where to start, and anything you are unsure about. Write \"N/A\" rather than deleting a section. -->',\n '',\n ].join('\\n');\n}\n\n/** `AGENTS.md`, generated as an index and nothing else. */\nexport function renderAgentsMd(projectName: string, referenced: string[]): string {\n const lines = [\n `# ${projectName}`,\n '',\n 'This file is an **index**. It holds no rule, command or convention of its own —',\n 'those live in the documents referenced below, which are the source of truth.',\n '',\n '> Document once. Reference everywhere it is needed.',\n '',\n '## Start here',\n '',\n ];\n\n for (const path of referenced) {\n lines.push(`- [\\`${path}\\`](${path})`);\n }\n if (referenced.length === 0) {\n lines.push('- [`README.md`](README.md) — what this project is, and how to run it');\n }\n\n lines.push(\n '',\n '## Working on an issue',\n '',\n '- [`docs/conventions.md`](docs/conventions.md) — issue types, labels, branches,',\n ' commits and Pull Requests: what this repository expects and what it does not',\n '',\n '## What does not belong in this file',\n '',\n 'Anything that can live in a document of its own: build and test commands, code',\n 'style, architecture rules, testing strategy, operational procedures. If it is a',\n 'rule, a standard or reusable knowledge, it belongs in its own document and this',\n 'file only points at it.',\n '',\n 'An instruction that today exists **only** here does not stay here: move it to the',\n 'right document and leave a reference behind. Duplicated instructions in an agent',\n 'file age out of sight and start contradicting the source without anyone noticing.',\n '',\n );\n\n return lines.join('\\n');\n}\n\n/**\n * `CLAUDE.md`, which is one line by design.\n *\n * Claude Code reads `CLAUDE.md` as its memory file, and the temptation is to\n * put the instructions there too. That produces two copies of the same rules\n * which diverge the first time only one of them is edited — so this file is a\n * bridge, never a second source.\n */\nexport function renderClaudeMd(): string {\n return 'Read and follow the instructions in AGENTS.md.\\n';\n}\n\n/** The conventions document: the source of truth this scaffolding creates. */\nexport function renderConventionsDoc(hasIssueTypes: boolean): string {\n const typeRows = DEFAULT_ISSUE_TYPES.map(\n (t) =>\n `| **${t.name}** | ${t.summary} | ${t.executable ? 'Yes, once it is ready' : '**No**'} |`,\n ).join('\\n');\n\n const nonTypeRows = NON_TYPES.map((n) => `| ${n.concept} | ${n.instead} | ${n.why} |`).join('\\n');\n\n const labelRows = DEFAULT_LABELS.map((l) => `| \\`${l.name}\\` | ${l.description} |`).join('\\n');\n\n const typeMechanism = hasIssueTypes\n ? 'This organization has GitHub Issue Types, so the type lives in the **native field**.'\n : [\n 'This organization has no GitHub Issue Types, so the type is carried by a',\n '`type:*` label. If Issue Types are enabled later, move to them and drop these',\n 'labels — keeping both would create a second truth that drifts.',\n ].join('\\n');\n\n return `# Conventions\n\nHow work is recorded, classified and executed in this repository.\n\n## Principles\n\n1. **An open issue is not approved work.** Recording is cheap; executing requires\n explicit authorization.\n2. **Native structure before textual convention.** The order of preference is\n native feature > structured field > label > free text. Nothing GitHub already\n models is re-implemented as a title prefix or a label.\n3. **Each piece of information in one place.** If something has a field, it does\n not also have a label.\n4. **Capturing an idea is not bureaucratic.** The Idea form has one required\n field. The cost of recording a thought has to stay near zero.\n\n## Issue types\n\n${typeMechanism}\n\n| Type | What it is | Authorizes execution? |\n|---|---|---|\n${typeRows}\n\n### Choosing the type\n\nIn order — the first \"yes\" decides:\n\n1. **Is something broken?** → \\`Bug\\`, even if the expected behaviour never worked.\n2. **Is the question still unanswered?** → \\`Research\\`.\n3. **Is it just a record, with no analysis yet?** → \\`Idea\\`.\n4. **Is it large and delivered in parts?** → \\`Epic\\`, with sub-issues.\n5. **Does it change what the product does?** → \\`Feature\\`.\n6. **None of the above** → \\`Task\\`.\n\n### What is deliberately not a type\n\nA type per flavour of work fragments the backlog without improving a single\nquery.\n\n| Concept | Represent it as | Why |\n|---|---|---|\n${nonTypeRows}\n\n## Labels\n\nLabels are the last resort, for what has no native representation: technical\narea, component and cross-cutting characteristic.\n\n| Label | Meaning |\n|---|---|\n${labelRows}\n\n**Never use a label for** priority, type, state or size when a field exists for\nit: the label becomes a second truth that ages on its own.\n\n## Branches and commits\n\n- Branch: \\`issue/{N}-{slug}\\`\n- Commit: ${DEFAULT_COMMIT_CONVENTION}\n\nThe commit type must match the nature of the change. A bug fix committed as\n\\`feat:\\` corrupts the changelog and any version bump derived from the history.\n\n## Pull Requests\n\nFollow \\`.github/PULL_REQUEST_TEMPLATE.md\\`. Keep every section it defines and\nanswer the ones that do not apply with one line saying why — a deleted section\nreads as an unanswered one to automated review.\n\nLink the issues with one \\`Closes #N\\` per issue, as plain body text.\n\n## Agent entry points\n\n\\`AGENTS.md\\` is the canonical entry point for any coding agent, of any vendor.\nIt is an index: it says which documents to read, and holds no rule of its own.\n\n\\`CLAUDE.md\\` exists only as the Claude Code integration and contains a single\nline pointing at \\`AGENTS.md\\`. Any other agent adapter follows the same rule.\n\n\\`\\`\\`text\nCLAUDE.md → AGENTS.md → specialized documentation → single source of truth\n\\`\\`\\`\n`;\n}\n\n/** The labels file, consumed by the label sync step and readable by a human. */\nexport function renderLabelsFile(includeTypeLabels: boolean): string {\n const labels = includeTypeLabels ? [...FALLBACK_TYPE_LABELS, ...DEFAULT_LABELS] : DEFAULT_LABELS;\n\n return `${JSON.stringify(\n labels.map((label) => ({\n name: label.name,\n description: label.description,\n color: label.color,\n })),\n null,\n 2,\n )}\\n`;\n}\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,QAAQ,OAAO,iBAAiB;AACzC,SAAS,UAAU,SAAS,QAAAA,aAAY;;;ACDxC,SAAS,gBAAgB;AACzB,SAAS,YAAY;;;ACuDd,IAAM,sBAAmD;AAAA,EAC9D;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,QAAQ;AAAA,EACV;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,QAAQ;AAAA,EACV;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,IACT,YAAY;AAAA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A;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,gBAAgB;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,UAAU;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,gBAAgB;AAAA,IAClB;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,wBAAwB;AAAA,MACxB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,gBAAgB;AAAA,IAClB;AAAA,IACA,KAAK;AAAA,MACH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,M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|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HC2MT7BX.js";
|
|
11
11
|
|
|
12
12
|
// src/core/phase-runner.ts
|
|
13
13
|
import { readFile } from "fs/promises";
|
|
@@ -55,4 +55,4 @@ export {
|
|
|
55
55
|
runPhaseWithRetry,
|
|
56
56
|
readFileWithGrace
|
|
57
57
|
};
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
58
|
+
//# sourceMappingURL=chunk-3BOHTH4V.js.map
|