@codedrifters/configulator 0.0.184 → 0.0.185
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 +153 -1
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +153 -1
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1817,6 +1817,152 @@ var orchestratorSubAgent = {
|
|
|
1817
1817
|
"5. **Priority order:** critical > high > medium > low > trivial, then FIFO by issue number."
|
|
1818
1818
|
].join("\n")
|
|
1819
1819
|
};
|
|
1820
|
+
var issueWorkerSubAgent = {
|
|
1821
|
+
name: "issue-worker",
|
|
1822
|
+
description: "Selects the next ready issue from the queue, claims it, and implements the change end-to-end following repository conventions",
|
|
1823
|
+
model: AGENT_MODEL.POWERFUL,
|
|
1824
|
+
maxTurns: 50,
|
|
1825
|
+
canDelegateToAgents: [],
|
|
1826
|
+
platforms: { cursor: { exclude: true } },
|
|
1827
|
+
prompt: [
|
|
1828
|
+
"# Issue Worker",
|
|
1829
|
+
"",
|
|
1830
|
+
"You are the issue worker for **{{repository.owner}}/{{repository.name}}**.",
|
|
1831
|
+
"Your job is to pick the next issue from the queue, claim it, and implement",
|
|
1832
|
+
"the change end-to-end \u2014 from branch creation through to opening a PR.",
|
|
1833
|
+
"",
|
|
1834
|
+
"---",
|
|
1835
|
+
"",
|
|
1836
|
+
"## Phase 1: Select an Issue",
|
|
1837
|
+
"",
|
|
1838
|
+
"If an issue number was provided in your instructions, use that issue.",
|
|
1839
|
+
"Otherwise, find the next issue to work on:",
|
|
1840
|
+
"",
|
|
1841
|
+
"```bash",
|
|
1842
|
+
".claude/procedures/check-blocked.sh eligible",
|
|
1843
|
+
"```",
|
|
1844
|
+
"",
|
|
1845
|
+
"This returns issues sorted by priority (critical > high > medium > low > trivial),",
|
|
1846
|
+
"then by issue number (FIFO). Take the **first** `PICK` line.",
|
|
1847
|
+
"",
|
|
1848
|
+
"If the output is `NO_READY_ISSUES`, report that the queue is empty and stop.",
|
|
1849
|
+
"",
|
|
1850
|
+
"If any `SKIP` lines appear, ignore them \u2014 those issues have unresolved dependencies.",
|
|
1851
|
+
"",
|
|
1852
|
+
"## Phase 2: Claim the Issue",
|
|
1853
|
+
"",
|
|
1854
|
+
"```bash",
|
|
1855
|
+
'gh issue edit <number> --remove-label "status:ready" --add-label "status:in-progress"',
|
|
1856
|
+
"```",
|
|
1857
|
+
"",
|
|
1858
|
+
"Read the full issue details:",
|
|
1859
|
+
"```bash",
|
|
1860
|
+
"gh issue view <number>",
|
|
1861
|
+
"```",
|
|
1862
|
+
"",
|
|
1863
|
+
"## Phase 3: Set Up",
|
|
1864
|
+
"",
|
|
1865
|
+
"```bash",
|
|
1866
|
+
"git checkout {{repository.defaultBranch}} && git pull origin {{repository.defaultBranch}}",
|
|
1867
|
+
"```",
|
|
1868
|
+
"",
|
|
1869
|
+
"Determine the branch type from the issue's `type:*` label or title prefix:",
|
|
1870
|
+
"",
|
|
1871
|
+
"| Label / prefix | Branch type |",
|
|
1872
|
+
"|---------------|-------------|",
|
|
1873
|
+
"| `type:feat` / `feat:` | `feat/` |",
|
|
1874
|
+
"| `type:fix` / `fix:` | `fix/` |",
|
|
1875
|
+
"| `type:chore` / `chore:` | `chore/` |",
|
|
1876
|
+
"| `type:refactor` / `refactor:` | `refactor/` |",
|
|
1877
|
+
"| `type:docs` / `docs:` | `docs/` |",
|
|
1878
|
+
"| `type:release` / `release:` | `release/` |",
|
|
1879
|
+
"| `type:hotfix` / `hotfix:` | `hotfix/` |",
|
|
1880
|
+
"| No type label | `feat/` (default) |",
|
|
1881
|
+
"",
|
|
1882
|
+
"Create a branch following the naming convention:",
|
|
1883
|
+
"```bash",
|
|
1884
|
+
"git checkout -b <type>/<issue-number>-<slug>",
|
|
1885
|
+
"```",
|
|
1886
|
+
"",
|
|
1887
|
+
"The slug should be a short (3-5 word) kebab-case summary derived from the issue title.",
|
|
1888
|
+
"",
|
|
1889
|
+
"Link the branch to the issue:",
|
|
1890
|
+
"```bash",
|
|
1891
|
+
"gh issue comment <number> --body 'Branch: `<branch-name>`'",
|
|
1892
|
+
"```",
|
|
1893
|
+
"",
|
|
1894
|
+
"## Phase 4: Implement",
|
|
1895
|
+
"",
|
|
1896
|
+
"Read the issue body carefully. Understand the acceptance criteria.",
|
|
1897
|
+
"",
|
|
1898
|
+
"Implement the change following these guidelines based on issue type:",
|
|
1899
|
+
"",
|
|
1900
|
+
"- **feat**: Implement the new feature. Add tests. Export public APIs from `index.ts`.",
|
|
1901
|
+
"- **fix**: Reproduce the bug first. Write a failing test. Fix the bug. Verify the test passes.",
|
|
1902
|
+
"- **chore**: Make the maintenance change. Verify no regressions.",
|
|
1903
|
+
"- **refactor**: Restructure code without changing behavior. Existing tests must pass unchanged.",
|
|
1904
|
+
"- **docs**: Update documentation only. Do not change source code.",
|
|
1905
|
+
"",
|
|
1906
|
+
"Follow all conventions from CLAUDE.md and the project's agent rules.",
|
|
1907
|
+
"",
|
|
1908
|
+
"## Phase 5: Verify",
|
|
1909
|
+
"",
|
|
1910
|
+
"Run the appropriate verification commands depending on what changed:",
|
|
1911
|
+
"",
|
|
1912
|
+
"1. If Projen config was changed: `npx projen && pnpm install`",
|
|
1913
|
+
"2. Compile the affected package: `pnpm --filter @codedrifters/<package> compile`",
|
|
1914
|
+
"3. Test the affected package: `pnpm --filter @codedrifters/<package> test`",
|
|
1915
|
+
"4. If changes span multiple packages: `pnpm build:all`",
|
|
1916
|
+
"",
|
|
1917
|
+
"Fix any compilation errors, test failures, or lint errors before proceeding.",
|
|
1918
|
+
"",
|
|
1919
|
+
"## Phase 6: Commit and Push",
|
|
1920
|
+
"",
|
|
1921
|
+
"Use conventional commit messages:",
|
|
1922
|
+
"```bash",
|
|
1923
|
+
"git add <files>",
|
|
1924
|
+
'git commit -m "<type>: <description>"',
|
|
1925
|
+
"git push -u origin <branch-name>",
|
|
1926
|
+
"```",
|
|
1927
|
+
"",
|
|
1928
|
+
"## Phase 7: Open a PR",
|
|
1929
|
+
"",
|
|
1930
|
+
"```bash",
|
|
1931
|
+
'gh pr create --title "<type>(<scope>): <description>" --body "## Summary',
|
|
1932
|
+
"",
|
|
1933
|
+
"<bullet points>",
|
|
1934
|
+
"",
|
|
1935
|
+
'Closes #<issue-number>"',
|
|
1936
|
+
"```",
|
|
1937
|
+
"",
|
|
1938
|
+
"Enable auto-merge:",
|
|
1939
|
+
"```bash",
|
|
1940
|
+
"gh pr merge --auto --squash",
|
|
1941
|
+
"```",
|
|
1942
|
+
"",
|
|
1943
|
+
"## Phase 8: Update Status",
|
|
1944
|
+
"",
|
|
1945
|
+
"After the PR is created:",
|
|
1946
|
+
"```bash",
|
|
1947
|
+
'gh issue edit <number> --add-label "status:done"',
|
|
1948
|
+
"```",
|
|
1949
|
+
"",
|
|
1950
|
+
"---",
|
|
1951
|
+
"",
|
|
1952
|
+
"## Rules",
|
|
1953
|
+
"",
|
|
1954
|
+
"1. **One issue per session.** Process exactly ONE issue, then stop.",
|
|
1955
|
+
"2. **Use check-blocked.sh.** Always use the procedure script for issue selection.",
|
|
1956
|
+
"3. **Follow CLAUDE.md conventions** for branch naming, commits, and PRs.",
|
|
1957
|
+
"4. **Do not assign PRs to a project board** \u2014 this repo has no GitHub project.",
|
|
1958
|
+
"5. **Do not add AI co-author** attribution to commits.",
|
|
1959
|
+
"6. **On failure:** If you cannot complete the issue, update labels and leave a comment:",
|
|
1960
|
+
" ```bash",
|
|
1961
|
+
' gh issue edit <number> --remove-label "status:in-progress" --add-label "status:needs-attention"',
|
|
1962
|
+
' gh issue comment <number> --body "Worker could not complete: <reason>"',
|
|
1963
|
+
" ```"
|
|
1964
|
+
].join("\n")
|
|
1965
|
+
};
|
|
1820
1966
|
var orchestratorBundle = {
|
|
1821
1967
|
name: "orchestrator",
|
|
1822
1968
|
description: "Pipeline orchestrator agent for issue triage, PR review, and queue management",
|
|
@@ -1846,7 +1992,7 @@ var orchestratorBundle = {
|
|
|
1846
1992
|
tags: ["workflow"]
|
|
1847
1993
|
}
|
|
1848
1994
|
],
|
|
1849
|
-
subAgents: [orchestratorSubAgent],
|
|
1995
|
+
subAgents: [orchestratorSubAgent, issueWorkerSubAgent],
|
|
1850
1996
|
procedures: [checkBlockedProcedure],
|
|
1851
1997
|
claudePermissions: {
|
|
1852
1998
|
allow: [
|
|
@@ -3304,6 +3450,12 @@ var ClaudeRenderer = class _ClaudeRenderer {
|
|
|
3304
3450
|
if (agent.platforms?.claude?.memory) {
|
|
3305
3451
|
lines.push(`memory: ${agent.platforms.claude.memory}`);
|
|
3306
3452
|
}
|
|
3453
|
+
if (agent.canDelegateToAgents && agent.canDelegateToAgents.length > 0) {
|
|
3454
|
+
lines.push(`canDelegateToAgents:`);
|
|
3455
|
+
for (const delegateName of agent.canDelegateToAgents) {
|
|
3456
|
+
lines.push(` - "${delegateName}"`);
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
3307
3459
|
lines.push("---");
|
|
3308
3460
|
lines.push("");
|
|
3309
3461
|
lines.push(...agent.prompt.split("\n"));
|