@codedrifters/configulator 0.0.184 → 0.0.186
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/lib/index.js +169 -2
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +169 -2
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -802,10 +802,23 @@ var githubWorkflowBundle = {
|
|
|
802
802
|
" - `fix:` \u2192 Bug",
|
|
803
803
|
" - `chore:`, `docs:`, `refactor:`, `release:`, `hotfix:` \u2192 Task",
|
|
804
804
|
"4. **Identify prerequisite issues** \u2014 if the user mentions dependencies or blockers, include a **Dependencies** section in the body with `Depends on: #<issue-number>`",
|
|
805
|
-
"5. **
|
|
805
|
+
"5. **Determine labels** \u2014 every issue must be created with the following labels:",
|
|
806
|
+
" - **`type:*`** \u2014 derived from the issue title prefix:",
|
|
807
|
+
" - `epic:` \u2192 `type:feat`",
|
|
808
|
+
" - `feat:` \u2192 `type:feat`",
|
|
809
|
+
" - `fix:` \u2192 `type:fix`",
|
|
810
|
+
" - `chore:` \u2192 `type:chore`",
|
|
811
|
+
" - `docs:` \u2192 `type:docs`",
|
|
812
|
+
" - `refactor:` \u2192 `type:refactor`",
|
|
813
|
+
" - `release:` \u2192 `type:release`",
|
|
814
|
+
" - `hotfix:` \u2192 `type:hotfix`",
|
|
815
|
+
' - **`priority:*`** \u2014 infer from the user\'s description when possible (e.g., "urgent"/"critical" \u2192 `priority:critical`, "important" \u2192 `priority:high`, "minor"/"low priority" \u2192 `priority:low`). If the priority is unclear, ask the user before creating the issue. Valid values: `priority:critical`, `priority:high`, `priority:medium`, `priority:low`, `priority:trivial`',
|
|
816
|
+
" - **`status:ready`** \u2014 always add unless the issue has dependencies or blockers, in which case use `status:blocked`",
|
|
817
|
+
"6. **Create the issue** using `gh issue create`:",
|
|
806
818
|
" - `--title '<type>: <description>'`",
|
|
807
819
|
" - `--body '<issue body>'`",
|
|
808
820
|
" - `--type '<GitHub issue type>'` (Epic, Feature, Bug, or Task)",
|
|
821
|
+
" - `--label '<type-label>' --label '<priority-label>' --label '<status-label>'`",
|
|
809
822
|
"",
|
|
810
823
|
"### Issue Body Template",
|
|
811
824
|
"",
|
|
@@ -827,7 +840,9 @@ var githubWorkflowBundle = {
|
|
|
827
840
|
"",
|
|
828
841
|
"- Always use the conventional prefix in the issue title",
|
|
829
842
|
"- Always assign the correct GitHub issue type",
|
|
843
|
+
"- Always include `type:*`, `priority:*`, and `status:*` labels",
|
|
830
844
|
"- If the user does not specify a type, ask before creating the issue",
|
|
845
|
+
"- If the priority cannot be inferred from the description, ask the user before creating the issue",
|
|
831
846
|
"- Keep titles concise and descriptive"
|
|
832
847
|
].join("\n"),
|
|
833
848
|
tags: ["workflow"]
|
|
@@ -1758,6 +1773,152 @@ var orchestratorSubAgent = {
|
|
|
1758
1773
|
"5. **Priority order:** critical > high > medium > low > trivial, then FIFO by issue number."
|
|
1759
1774
|
].join("\n")
|
|
1760
1775
|
};
|
|
1776
|
+
var issueWorkerSubAgent = {
|
|
1777
|
+
name: "issue-worker",
|
|
1778
|
+
description: "Selects the next ready issue from the queue, claims it, and implements the change end-to-end following repository conventions",
|
|
1779
|
+
model: AGENT_MODEL.POWERFUL,
|
|
1780
|
+
maxTurns: 50,
|
|
1781
|
+
canDelegateToAgents: [],
|
|
1782
|
+
platforms: { cursor: { exclude: true } },
|
|
1783
|
+
prompt: [
|
|
1784
|
+
"# Issue Worker",
|
|
1785
|
+
"",
|
|
1786
|
+
"You are the issue worker for **{{repository.owner}}/{{repository.name}}**.",
|
|
1787
|
+
"Your job is to pick the next issue from the queue, claim it, and implement",
|
|
1788
|
+
"the change end-to-end \u2014 from branch creation through to opening a PR.",
|
|
1789
|
+
"",
|
|
1790
|
+
"---",
|
|
1791
|
+
"",
|
|
1792
|
+
"## Phase 1: Select an Issue",
|
|
1793
|
+
"",
|
|
1794
|
+
"If an issue number was provided in your instructions, use that issue.",
|
|
1795
|
+
"Otherwise, find the next issue to work on:",
|
|
1796
|
+
"",
|
|
1797
|
+
"```bash",
|
|
1798
|
+
".claude/procedures/check-blocked.sh eligible",
|
|
1799
|
+
"```",
|
|
1800
|
+
"",
|
|
1801
|
+
"This returns issues sorted by priority (critical > high > medium > low > trivial),",
|
|
1802
|
+
"then by issue number (FIFO). Take the **first** `PICK` line.",
|
|
1803
|
+
"",
|
|
1804
|
+
"If the output is `NO_READY_ISSUES`, report that the queue is empty and stop.",
|
|
1805
|
+
"",
|
|
1806
|
+
"If any `SKIP` lines appear, ignore them \u2014 those issues have unresolved dependencies.",
|
|
1807
|
+
"",
|
|
1808
|
+
"## Phase 2: Claim the Issue",
|
|
1809
|
+
"",
|
|
1810
|
+
"```bash",
|
|
1811
|
+
'gh issue edit <number> --remove-label "status:ready" --add-label "status:in-progress"',
|
|
1812
|
+
"```",
|
|
1813
|
+
"",
|
|
1814
|
+
"Read the full issue details:",
|
|
1815
|
+
"```bash",
|
|
1816
|
+
"gh issue view <number>",
|
|
1817
|
+
"```",
|
|
1818
|
+
"",
|
|
1819
|
+
"## Phase 3: Set Up",
|
|
1820
|
+
"",
|
|
1821
|
+
"```bash",
|
|
1822
|
+
"git checkout {{repository.defaultBranch}} && git pull origin {{repository.defaultBranch}}",
|
|
1823
|
+
"```",
|
|
1824
|
+
"",
|
|
1825
|
+
"Determine the branch type from the issue's `type:*` label or title prefix:",
|
|
1826
|
+
"",
|
|
1827
|
+
"| Label / prefix | Branch type |",
|
|
1828
|
+
"|---------------|-------------|",
|
|
1829
|
+
"| `type:feat` / `feat:` | `feat/` |",
|
|
1830
|
+
"| `type:fix` / `fix:` | `fix/` |",
|
|
1831
|
+
"| `type:chore` / `chore:` | `chore/` |",
|
|
1832
|
+
"| `type:refactor` / `refactor:` | `refactor/` |",
|
|
1833
|
+
"| `type:docs` / `docs:` | `docs/` |",
|
|
1834
|
+
"| `type:release` / `release:` | `release/` |",
|
|
1835
|
+
"| `type:hotfix` / `hotfix:` | `hotfix/` |",
|
|
1836
|
+
"| No type label | `feat/` (default) |",
|
|
1837
|
+
"",
|
|
1838
|
+
"Create a branch following the naming convention:",
|
|
1839
|
+
"```bash",
|
|
1840
|
+
"git checkout -b <type>/<issue-number>-<slug>",
|
|
1841
|
+
"```",
|
|
1842
|
+
"",
|
|
1843
|
+
"The slug should be a short (3-5 word) kebab-case summary derived from the issue title.",
|
|
1844
|
+
"",
|
|
1845
|
+
"Link the branch to the issue:",
|
|
1846
|
+
"```bash",
|
|
1847
|
+
"gh issue comment <number> --body 'Branch: `<branch-name>`'",
|
|
1848
|
+
"```",
|
|
1849
|
+
"",
|
|
1850
|
+
"## Phase 4: Implement",
|
|
1851
|
+
"",
|
|
1852
|
+
"Read the issue body carefully. Understand the acceptance criteria.",
|
|
1853
|
+
"",
|
|
1854
|
+
"Implement the change following these guidelines based on issue type:",
|
|
1855
|
+
"",
|
|
1856
|
+
"- **feat**: Implement the new feature. Add tests. Export public APIs from `index.ts`.",
|
|
1857
|
+
"- **fix**: Reproduce the bug first. Write a failing test. Fix the bug. Verify the test passes.",
|
|
1858
|
+
"- **chore**: Make the maintenance change. Verify no regressions.",
|
|
1859
|
+
"- **refactor**: Restructure code without changing behavior. Existing tests must pass unchanged.",
|
|
1860
|
+
"- **docs**: Update documentation only. Do not change source code.",
|
|
1861
|
+
"",
|
|
1862
|
+
"Follow all conventions from CLAUDE.md and the project's agent rules.",
|
|
1863
|
+
"",
|
|
1864
|
+
"## Phase 5: Verify",
|
|
1865
|
+
"",
|
|
1866
|
+
"Run the appropriate verification commands depending on what changed:",
|
|
1867
|
+
"",
|
|
1868
|
+
"1. If Projen config was changed: `npx projen && pnpm install`",
|
|
1869
|
+
"2. Compile the affected package: `pnpm --filter @codedrifters/<package> compile`",
|
|
1870
|
+
"3. Test the affected package: `pnpm --filter @codedrifters/<package> test`",
|
|
1871
|
+
"4. If changes span multiple packages: `pnpm build:all`",
|
|
1872
|
+
"",
|
|
1873
|
+
"Fix any compilation errors, test failures, or lint errors before proceeding.",
|
|
1874
|
+
"",
|
|
1875
|
+
"## Phase 6: Commit and Push",
|
|
1876
|
+
"",
|
|
1877
|
+
"Use conventional commit messages:",
|
|
1878
|
+
"```bash",
|
|
1879
|
+
"git add <files>",
|
|
1880
|
+
'git commit -m "<type>: <description>"',
|
|
1881
|
+
"git push -u origin <branch-name>",
|
|
1882
|
+
"```",
|
|
1883
|
+
"",
|
|
1884
|
+
"## Phase 7: Open a PR",
|
|
1885
|
+
"",
|
|
1886
|
+
"```bash",
|
|
1887
|
+
'gh pr create --title "<type>(<scope>): <description>" --body "## Summary',
|
|
1888
|
+
"",
|
|
1889
|
+
"<bullet points>",
|
|
1890
|
+
"",
|
|
1891
|
+
'Closes #<issue-number>"',
|
|
1892
|
+
"```",
|
|
1893
|
+
"",
|
|
1894
|
+
"Enable auto-merge:",
|
|
1895
|
+
"```bash",
|
|
1896
|
+
"gh pr merge --auto --squash",
|
|
1897
|
+
"```",
|
|
1898
|
+
"",
|
|
1899
|
+
"## Phase 8: Update Status",
|
|
1900
|
+
"",
|
|
1901
|
+
"After the PR is created:",
|
|
1902
|
+
"```bash",
|
|
1903
|
+
'gh issue edit <number> --add-label "status:done"',
|
|
1904
|
+
"```",
|
|
1905
|
+
"",
|
|
1906
|
+
"---",
|
|
1907
|
+
"",
|
|
1908
|
+
"## Rules",
|
|
1909
|
+
"",
|
|
1910
|
+
"1. **One issue per session.** Process exactly ONE issue, then stop.",
|
|
1911
|
+
"2. **Use check-blocked.sh.** Always use the procedure script for issue selection.",
|
|
1912
|
+
"3. **Follow CLAUDE.md conventions** for branch naming, commits, and PRs.",
|
|
1913
|
+
"4. **Do not assign PRs to a project board** \u2014 this repo has no GitHub project.",
|
|
1914
|
+
"5. **Do not add AI co-author** attribution to commits.",
|
|
1915
|
+
"6. **On failure:** If you cannot complete the issue, update labels and leave a comment:",
|
|
1916
|
+
" ```bash",
|
|
1917
|
+
' gh issue edit <number> --remove-label "status:in-progress" --add-label "status:needs-attention"',
|
|
1918
|
+
' gh issue comment <number> --body "Worker could not complete: <reason>"',
|
|
1919
|
+
" ```"
|
|
1920
|
+
].join("\n")
|
|
1921
|
+
};
|
|
1761
1922
|
var orchestratorBundle = {
|
|
1762
1923
|
name: "orchestrator",
|
|
1763
1924
|
description: "Pipeline orchestrator agent for issue triage, PR review, and queue management",
|
|
@@ -1787,7 +1948,7 @@ var orchestratorBundle = {
|
|
|
1787
1948
|
tags: ["workflow"]
|
|
1788
1949
|
}
|
|
1789
1950
|
],
|
|
1790
|
-
subAgents: [orchestratorSubAgent],
|
|
1951
|
+
subAgents: [orchestratorSubAgent, issueWorkerSubAgent],
|
|
1791
1952
|
procedures: [checkBlockedProcedure],
|
|
1792
1953
|
claudePermissions: {
|
|
1793
1954
|
allow: [
|
|
@@ -3245,6 +3406,12 @@ var ClaudeRenderer = class _ClaudeRenderer {
|
|
|
3245
3406
|
if (agent.platforms?.claude?.memory) {
|
|
3246
3407
|
lines.push(`memory: ${agent.platforms.claude.memory}`);
|
|
3247
3408
|
}
|
|
3409
|
+
if (agent.canDelegateToAgents && agent.canDelegateToAgents.length > 0) {
|
|
3410
|
+
lines.push(`canDelegateToAgents:`);
|
|
3411
|
+
for (const delegateName of agent.canDelegateToAgents) {
|
|
3412
|
+
lines.push(` - "${delegateName}"`);
|
|
3413
|
+
}
|
|
3414
|
+
}
|
|
3248
3415
|
lines.push("---");
|
|
3249
3416
|
lines.push("");
|
|
3250
3417
|
lines.push(...agent.prompt.split("\n"));
|