claude-code-starter 0.14.0 → 0.14.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/cli.js +68 -231
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -511,38 +511,12 @@ function countSourceFiles(rootDir, _languages) {
|
|
|
511
511
|
countFiles(rootDir);
|
|
512
512
|
return count;
|
|
513
513
|
}
|
|
514
|
-
function summarizeTechStack(stack) {
|
|
515
|
-
const parts = [];
|
|
516
|
-
if (stack.primaryLanguage) {
|
|
517
|
-
parts.push(`Language: ${stack.primaryLanguage}`);
|
|
518
|
-
}
|
|
519
|
-
if (stack.primaryFramework) {
|
|
520
|
-
parts.push(`Framework: ${stack.primaryFramework}`);
|
|
521
|
-
}
|
|
522
|
-
if (stack.packageManager) {
|
|
523
|
-
parts.push(`Package Manager: ${stack.packageManager}`);
|
|
524
|
-
}
|
|
525
|
-
if (stack.testingFramework) {
|
|
526
|
-
parts.push(`Testing: ${stack.testingFramework}`);
|
|
527
|
-
}
|
|
528
|
-
if (stack.isMonorepo) {
|
|
529
|
-
parts.push("Monorepo: yes");
|
|
530
|
-
}
|
|
531
|
-
return parts.join(" | ");
|
|
532
|
-
}
|
|
533
514
|
|
|
534
515
|
// src/generator.ts
|
|
535
516
|
import fs2 from "fs";
|
|
536
517
|
import path2 from "path";
|
|
537
518
|
function ensureDirectories(rootDir) {
|
|
538
|
-
const dirs = [
|
|
539
|
-
".claude",
|
|
540
|
-
".claude/skills",
|
|
541
|
-
".claude/agents",
|
|
542
|
-
".claude/rules",
|
|
543
|
-
".claude/commands",
|
|
544
|
-
".claude/state"
|
|
545
|
-
];
|
|
519
|
+
const dirs = [".claude", ".claude/skills", ".claude/agents", ".claude/rules", ".claude/commands"];
|
|
546
520
|
for (const dir of dirs) {
|
|
547
521
|
fs2.mkdirSync(path2.join(rootDir, dir), { recursive: true });
|
|
548
522
|
}
|
|
@@ -658,14 +632,14 @@ ${templateVars}
|
|
|
658
632
|
|
|
659
633
|
1. Read this entire prompt to understand all phases
|
|
660
634
|
2. Execute Phase 1 completely - read files, analyze code, gather all data
|
|
661
|
-
3. Execute Phase 2 - generate the CLAUDE.md using only discovered information
|
|
635
|
+
3. Execute Phase 2 - generate the CLAUDE.md (max 120 lines) using only discovered information
|
|
662
636
|
4. Execute Phase 3 - verify quality before writing
|
|
663
637
|
5. Use the Write tool to create \`.claude/CLAUDE.md\` with the final content
|
|
664
|
-
6. Execute Phase 4 - generate ALL skill files
|
|
638
|
+
6. Execute Phase 4 - generate ALL skill files (4 core + framework-specific if detected)
|
|
665
639
|
7. Execute Phase 5 - generate agent files
|
|
666
640
|
8. Execute Phase 6 - generate rule files
|
|
667
|
-
9. Execute Phase 7 - generate command files
|
|
668
|
-
10. Run the Anti-Redundancy
|
|
641
|
+
9. Execute Phase 7 - generate command files (2 commands: analyze, code-review)
|
|
642
|
+
10. Run the Anti-Redundancy Enforcement checks one final time across ALL generated files \u2014 if any convention is restated, any command is duplicated, or any rule lacks a \`paths:\` filter, fix it before proceeding
|
|
669
643
|
11. Output a brief summary of what was generated and any gaps found
|
|
670
644
|
|
|
671
645
|
Do NOT output file contents to stdout. Write all files to disk using the Write tool.
|
|
@@ -830,14 +804,26 @@ frequencies, so place information where it costs the least while remaining acces
|
|
|
830
804
|
5. **Agents have zero main-context cost.** Put detailed checklists and review criteria in agent files \u2014 they run in subprocesses and don't consume the user's context window.
|
|
831
805
|
6. **Each piece of information must live in exactly ONE place.** If it's in CLAUDE.md, don't repeat it in rules, skills, or commands.
|
|
832
806
|
|
|
833
|
-
### Anti-Redundancy
|
|
807
|
+
### Anti-Redundancy Enforcement
|
|
834
808
|
|
|
835
|
-
Before writing EACH artifact,
|
|
836
|
-
|
|
837
|
-
-
|
|
838
|
-
-
|
|
839
|
-
-
|
|
840
|
-
-
|
|
809
|
+
Before writing EACH artifact, apply these hard constraints:
|
|
810
|
+
|
|
811
|
+
- **REJECT** any artifact that restates a convention from CLAUDE.md. If a convention appears in CLAUDE.md, it MUST NOT appear in any other file. Not paraphrased, not summarized, not restated in different words.
|
|
812
|
+
- **Test commands, lint commands, and build commands** MUST appear in exactly ONE place: CLAUDE.md's Common Commands section. Skills and agents MUST write "See Common Commands in CLAUDE.md" instead.
|
|
813
|
+
- **All rules MUST have a \`paths:\` filter** \u2014 no unfiltered rules.
|
|
814
|
+
- **Cross-references replace copies** \u2014 write "Follow conventions in CLAUDE.md" instead of restating any convention.
|
|
815
|
+
|
|
816
|
+
#### Forbidden Duplication List
|
|
817
|
+
|
|
818
|
+
The following MUST NOT appear in skills, agents, rules, or commands \u2014 they belong exclusively in CLAUDE.md:
|
|
819
|
+
- Test commands (the literal test runner invocation)
|
|
820
|
+
- Lint commands (the literal linter invocation)
|
|
821
|
+
- Build commands (the literal build invocation)
|
|
822
|
+
- Import convention descriptions (absolute vs relative, ordering, type imports)
|
|
823
|
+
- Naming convention descriptions (camelCase, PascalCase, file naming)
|
|
824
|
+
- Commit format descriptions (conventional commits, message format)
|
|
825
|
+
- Anti-patterns list (things to avoid)
|
|
826
|
+
- Testing framework syntax examples (describe/it/expect \u2014 belongs in test-writer agent only)
|
|
841
827
|
|
|
842
828
|
---
|
|
843
829
|
|
|
@@ -936,9 +922,13 @@ Read at least 3-5 source files and document the ACTUAL patterns used:
|
|
|
936
922
|
Using ONLY information discovered in Phase 1, generate the \`.claude/CLAUDE.md\` file.
|
|
937
923
|
Every section must contain PROJECT-SPECIFIC content. Skip sections that don't apply.
|
|
938
924
|
|
|
925
|
+
**The CLAUDE.md MUST NOT exceed 120 lines. Prioritize density over completeness.**
|
|
926
|
+
|
|
927
|
+
Do NOT include sections that duplicate information available in package.json, tsconfig.json, or other config files the agent can read directly.
|
|
928
|
+
|
|
939
929
|
### Output Structure
|
|
940
930
|
|
|
941
|
-
The CLAUDE.md MUST follow this structure:
|
|
931
|
+
The CLAUDE.md MUST follow this compact structure:
|
|
942
932
|
|
|
943
933
|
\`\`\`markdown
|
|
944
934
|
# {Project Name}
|
|
@@ -952,17 +942,9 @@ Written for an AI assistant that needs to understand PURPOSE to make good decisi
|
|
|
952
942
|
|
|
953
943
|
## Architecture
|
|
954
944
|
|
|
955
|
-
{
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
\\\`\\\`\\\`
|
|
960
|
-
{Actual directory tree, depth 3, with annotations}
|
|
961
|
-
\\\`\\\`\\\`
|
|
962
|
-
|
|
963
|
-
### Data Flow
|
|
964
|
-
|
|
965
|
-
{How a typical request flows through the system}
|
|
945
|
+
{1-2 sentences describing the actual architecture pattern found, then the Key Files table.
|
|
946
|
+
Do NOT include a Directory Structure ASCII tree or Data Flow subsection \u2014 the agent can
|
|
947
|
+
read the filesystem directly.}
|
|
966
948
|
|
|
967
949
|
### Key Files
|
|
968
950
|
|
|
@@ -970,42 +952,18 @@ Written for an AI assistant that needs to understand PURPOSE to make good decisi
|
|
|
970
952
|
|------|---------|
|
|
971
953
|
| \`path/to/file\` | What it does |
|
|
972
954
|
|
|
973
|
-
## Tech Stack
|
|
974
|
-
|
|
975
|
-
| Category | Technology | Notes |
|
|
976
|
-
|----------|-----------|-------|
|
|
977
|
-
| Language | X | Config details |
|
|
978
|
-
| Framework | Y | How it's used |
|
|
979
|
-
|
|
980
|
-
## Development Setup
|
|
981
|
-
|
|
982
|
-
### Prerequisites
|
|
983
|
-
|
|
984
|
-
{Exact versions and tools needed}
|
|
985
|
-
|
|
986
|
-
### Getting Started
|
|
987
|
-
|
|
988
|
-
\\\`\\\`\\\`bash
|
|
989
|
-
{Actual commands to get running}
|
|
990
|
-
\\\`\\\`\\\`
|
|
991
|
-
|
|
992
|
-
### Environment Variables
|
|
993
|
-
|
|
994
|
-
| Variable | Description | Example |
|
|
995
|
-
|----------|-------------|---------|
|
|
996
|
-
| \`VAR_NAME\` | What it's for | \`example_value\` |
|
|
997
|
-
|
|
998
955
|
## Common Commands
|
|
999
956
|
|
|
1000
957
|
\\\`\\\`\\\`bash
|
|
1001
|
-
{
|
|
958
|
+
{5 critical commands max, from package.json scripts or equivalent.
|
|
959
|
+
Only the commands developers use daily \u2014 not every script.}
|
|
1002
960
|
\\\`\\\`\\\`
|
|
1003
961
|
|
|
1004
962
|
## Code Conventions
|
|
1005
963
|
|
|
1006
964
|
### Naming
|
|
1007
965
|
|
|
1008
|
-
{ACTUAL naming patterns found}
|
|
966
|
+
{ACTUAL naming patterns found \u2014 be brief}
|
|
1009
967
|
|
|
1010
968
|
### Patterns to Follow
|
|
1011
969
|
|
|
@@ -1018,45 +976,16 @@ Written for an AI assistant that needs to understand PURPOSE to make good decisi
|
|
|
1018
976
|
> **This Code Conventions section is the single source of truth.**
|
|
1019
977
|
> Rules and skills cross-reference this section \u2014 they do not repeat it.
|
|
1020
978
|
|
|
1021
|
-
## Skills
|
|
1022
|
-
|
|
1023
|
-
{List each generated skill with a one-line description}
|
|
1024
|
-
|
|
1025
|
-
| Skill | Purpose |
|
|
1026
|
-
|-------|---------|
|
|
1027
|
-
| \`pattern-discovery\` | Discover and document codebase patterns |
|
|
1028
|
-
| ... | ... |
|
|
1029
|
-
|
|
1030
|
-
## Agents
|
|
1031
|
-
|
|
1032
|
-
{List each generated agent with a one-line description}
|
|
1033
|
-
|
|
1034
|
-
| Agent | Purpose |
|
|
1035
|
-
|-------|---------|
|
|
1036
|
-
| \`code-reviewer\` | Reviews code for quality and security |
|
|
1037
|
-
| \`test-writer\` | Generates tests for code |
|
|
1038
|
-
|
|
1039
979
|
## Testing
|
|
1040
980
|
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
\\\`\\\`\\\`bash
|
|
1044
|
-
{actual test commands}
|
|
1045
|
-
\\\`\\\`\\\`
|
|
1046
|
-
|
|
1047
|
-
### Writing Tests
|
|
1048
|
-
|
|
1049
|
-
{Testing patterns, utilities, fixtures available}
|
|
981
|
+
{2-3 lines: test command, test file location, key testing pattern.
|
|
982
|
+
NOT a full guide \u2014 the test-writer agent handles detailed test methodology.}
|
|
1050
983
|
|
|
1051
984
|
## Domain Knowledge
|
|
1052
985
|
|
|
1053
986
|
### Core Entities
|
|
1054
987
|
|
|
1055
|
-
{
|
|
1056
|
-
|
|
1057
|
-
### Key Workflows
|
|
1058
|
-
|
|
1059
|
-
{3-5 most important workflows}
|
|
988
|
+
{Brief list of main domain objects and relationships}
|
|
1060
989
|
|
|
1061
990
|
## Gotchas & Important Notes
|
|
1062
991
|
|
|
@@ -1070,12 +999,22 @@ Written for an AI assistant that needs to understand PURPOSE to make good decisi
|
|
|
1070
999
|
4. {project-specific rules discovered during analysis}
|
|
1071
1000
|
\`\`\`
|
|
1072
1001
|
|
|
1002
|
+
**Sections NOT to include** (the agent can read these from config files directly):
|
|
1003
|
+
- Directory Structure ASCII tree (agent uses Glob/Read)
|
|
1004
|
+
- Tech Stack table (available in package.json, tsconfig.json, etc.)
|
|
1005
|
+
- Development Setup / Getting Started / Prerequisites
|
|
1006
|
+
- Environment Variables table (available in .env.example)
|
|
1007
|
+
- Skills index table
|
|
1008
|
+
- Agents index table
|
|
1009
|
+
- Key Workflows (duplicates Data Flow / Architecture)
|
|
1010
|
+
|
|
1073
1011
|
---
|
|
1074
1012
|
|
|
1075
1013
|
## Phase 3: Quality Checklist
|
|
1076
1014
|
|
|
1077
1015
|
Before writing the CLAUDE.md, verify:
|
|
1078
1016
|
|
|
1017
|
+
- [ ] The file does NOT exceed 120 lines
|
|
1079
1018
|
- [ ] Every section contains PROJECT-SPECIFIC information (not generic boilerplate)
|
|
1080
1019
|
- [ ] File paths referenced actually exist in the project
|
|
1081
1020
|
- [ ] File references use \`path/to/file.ts (functionName)\` format, not line numbers
|
|
@@ -1084,12 +1023,13 @@ Before writing the CLAUDE.md, verify:
|
|
|
1084
1023
|
- [ ] The "Gotchas" section contains genuinely useful, non-obvious information
|
|
1085
1024
|
- [ ] An AI reading this CLAUDE.md could add a new feature following existing patterns
|
|
1086
1025
|
- [ ] Sections without real content have been omitted entirely
|
|
1026
|
+
- [ ] No section duplicates information available in config files the agent can read
|
|
1087
1027
|
|
|
1088
1028
|
### Cross-Artifact Deduplication Check
|
|
1089
1029
|
|
|
1090
1030
|
Before writing ANY artifact (rule, skill, agent, command), verify:
|
|
1091
1031
|
- [ ] No conventions from CLAUDE.md are restated (naming, commit format, import order, style)
|
|
1092
|
-
- [ ] No
|
|
1032
|
+
- [ ] No item from the Forbidden Duplication List appears outside CLAUDE.md
|
|
1093
1033
|
- [ ] No content from one artifact is duplicated in another
|
|
1094
1034
|
- [ ] Cross-references are used instead of copies (e.g., "Follow conventions in CLAUDE.md")
|
|
1095
1035
|
- [ ] Every rule file has a \`paths:\` filter \u2014 no unfiltered rules
|
|
@@ -1117,57 +1057,38 @@ var SKILLS_PROMPT = `---
|
|
|
1117
1057
|
Write each skill file to \`.claude/skills/\` using the Write tool. Every skill must have
|
|
1118
1058
|
YAML frontmatter with \`name\`, \`description\`, and optionally \`globs\` for file matching.
|
|
1119
1059
|
|
|
1120
|
-
**Tailor ALL skills to this specific project** \u2014 use the actual
|
|
1121
|
-
|
|
1060
|
+
**Tailor ALL skills to this specific project** \u2014 use the actual file patterns and
|
|
1061
|
+
conventions discovered during Phase 1.
|
|
1122
1062
|
|
|
1123
1063
|
### Skill Content Rules
|
|
1124
1064
|
|
|
1125
1065
|
1. **Cross-reference, don't copy** \u2014 write "Follow conventions in CLAUDE.md" instead of restating naming, style, or commit conventions. Skills focus on methodology (HOW to do something), not conventions (WHAT the conventions are).
|
|
1126
1066
|
2. **Use stable references** \u2014 reference code as \`path/to/file.ts (functionName)\`, not line numbers which become stale.
|
|
1127
1067
|
3. **No convention duplication** \u2014 if CLAUDE.md already documents commit format, import order, or naming rules, the skill must not repeat them.
|
|
1068
|
+
4. **No command duplication** \u2014 for test, lint, and build commands, write "See Common Commands in CLAUDE.md" instead of repeating the literal command.
|
|
1128
1069
|
|
|
1129
|
-
### 4.1 Core Skills (ALWAYS generate all
|
|
1130
|
-
|
|
1131
|
-
**\`.claude/skills/pattern-discovery.md\`**
|
|
1132
|
-
- Name: pattern-discovery
|
|
1133
|
-
- Description: Analyze codebase to discover and document patterns
|
|
1134
|
-
- Content: How to search for patterns in THIS project's structure. Include the actual source directories, key file patterns, and import conventions found.
|
|
1135
|
-
|
|
1136
|
-
**\`.claude/skills/systematic-debugging.md\`**
|
|
1137
|
-
- Name: systematic-debugging
|
|
1138
|
-
- Description: 4-phase debugging methodology \u2014 Reproduce, Locate, Diagnose, Fix
|
|
1139
|
-
- Content: Tailor reproduction steps to the project's actual test runner and dev server commands. Include how to use the project's logging/debugging setup.
|
|
1140
|
-
|
|
1141
|
-
**\`.claude/skills/testing-methodology.md\`**
|
|
1142
|
-
- Name: testing-methodology
|
|
1143
|
-
- Description: AAA testing pattern with project-specific framework syntax
|
|
1144
|
-
- Content: Use the project's actual testing framework syntax. Include real examples of test patterns found in the codebase (describe/it blocks, pytest fixtures, etc.). Reference the actual test command. Include mocking/stubbing patterns specific to the stack.
|
|
1070
|
+
### 4.1 Core Skills (ALWAYS generate all 4)
|
|
1145
1071
|
|
|
1146
1072
|
**\`.claude/skills/iterative-development.md\`**
|
|
1147
1073
|
- Name: iterative-development
|
|
1148
|
-
- Description: TDD workflow with
|
|
1149
|
-
- Content: The TDD loop
|
|
1150
|
-
|
|
1151
|
-
**\`.claude/skills/commit-hygiene.md\`**
|
|
1152
|
-
- Name: commit-hygiene
|
|
1153
|
-
- Description: Atomic commits, conventional format, size thresholds
|
|
1154
|
-
- Content: Size thresholds (\xB1300 lines per commit), when-to-commit triggers. For commit format, write "Follow the commit conventions in CLAUDE.md" \u2014 do NOT restate the format here. If the project uses commitlint or similar, reference its config.
|
|
1074
|
+
- Description: TDD workflow with debugging methodology and verification chain
|
|
1075
|
+
- Content: The TDD loop referencing "See Common Commands in CLAUDE.md" for actual commands. Include the project's verification steps (typecheck, build, etc.). Add a Debugging section with: 4-phase methodology (Reproduce, Locate, Diagnose, Fix), project-specific file-to-module mapping for tracing bugs, how to use the project's logging/debugging setup. Add commit guidance: size thresholds (\xB1300 lines per commit), when-to-commit triggers, "Follow commit conventions in CLAUDE.md" for format.
|
|
1155
1076
|
|
|
1156
1077
|
**\`.claude/skills/code-deduplication.md\`**
|
|
1157
1078
|
- Name: code-deduplication
|
|
1158
|
-
- Description: Check-before-write principle and
|
|
1159
|
-
- Content: Search existing code before writing new code. Include project-specific glob patterns for source files. Reference the actual directory structure for where to look.
|
|
1160
|
-
|
|
1161
|
-
**\`.claude/skills/simplicity-rules.md\`**
|
|
1162
|
-
- Name: simplicity-rules
|
|
1163
|
-
- Description: Function and file size limits, decomposition patterns
|
|
1164
|
-
- Content: Function length limits (40 lines), file limits (300 lines), cyclomatic complexity. Decomposition patterns appropriate for the project's architecture style.
|
|
1079
|
+
- Description: Check-before-write principle, search checklist, and size limits
|
|
1080
|
+
- Content: Search existing code before writing new code. Include project-specific glob patterns for source files. Reference the actual directory structure for where to look. Include a "Where to Look" checklist for discovering patterns in THIS project's structure (source directories, key file patterns). Add size limits: function length (40 lines), file length (300 lines), decomposition patterns appropriate for the project's architecture style.
|
|
1165
1081
|
|
|
1166
1082
|
**\`.claude/skills/security.md\`**
|
|
1167
1083
|
- Name: security
|
|
1168
1084
|
- Description: Security patterns and secrets management for this stack
|
|
1169
1085
|
- Content: .gitignore entries appropriate for the detected stack. Environment variable handling patterns. OWASP checklist items relevant to the detected framework. Include actual secrets patterns to watch for (API keys, database URLs, etc.).
|
|
1170
1086
|
|
|
1087
|
+
**\`.claude/skills/testing-methodology.md\`**
|
|
1088
|
+
- Name: testing-methodology
|
|
1089
|
+
- Description: Test design methodology \u2014 what to test, edge cases, test organization
|
|
1090
|
+
- Content: Focus on test DESIGN: what to test, how to identify edge cases, test organization strategy, when to use unit vs integration tests. Include project-specific test file naming and location conventions. Reference "See Common Commands in CLAUDE.md" for the test command. Do NOT include testing framework syntax examples (describe/it/expect, pytest fixtures, etc.) \u2014 those belong in the test-writer agent, not here. The \`testing-methodology\` skill focuses on test DESIGN (what to test, edge cases, test organization). The \`test-writer\` agent focuses on test EXECUTION (writing code, running tests). They must not overlap.
|
|
1091
|
+
|
|
1171
1092
|
### 4.2 Framework-Specific Skills (ONLY if detected)
|
|
1172
1093
|
|
|
1173
1094
|
Generate the matching skill ONLY if the framework was detected in the tech stack:
|
|
@@ -1255,7 +1176,8 @@ Body content \u2014 instructions for the test writer agent:
|
|
|
1255
1176
|
- Follow existing test file naming conventions
|
|
1256
1177
|
- Include edge cases: empty inputs, nulls, errors, boundaries
|
|
1257
1178
|
- Mock external dependencies following project patterns
|
|
1258
|
-
- Run tests after writing to verify they pass
|
|
1179
|
+
- Run tests after writing to verify they pass
|
|
1180
|
+
- Do NOT duplicate the testing-methodology skill content. The skill covers test design (what to test, edge cases, organization); this agent covers writing and running tests (framework syntax, assertions, execution).`;
|
|
1259
1181
|
var RULES_PROMPT = `---
|
|
1260
1182
|
|
|
1261
1183
|
## Phase 6: Generate Rules
|
|
@@ -1320,39 +1242,11 @@ var COMMANDS_PROMPT = `---
|
|
|
1320
1242
|
|
|
1321
1243
|
## Phase 7: Generate Commands
|
|
1322
1244
|
|
|
1323
|
-
Write
|
|
1245
|
+
Write 2 command files to \`.claude/commands/\`. Each needs YAML frontmatter with
|
|
1324
1246
|
\`allowed-tools\`, \`description\`, and optionally \`argument-hint\`.
|
|
1325
1247
|
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
---
|
|
1329
|
-
allowed-tools: ["Read", "Write", "Edit", "Glob"]
|
|
1330
|
-
description: "Start or switch to a new task"
|
|
1331
|
-
argument-hint: "<task description>"
|
|
1332
|
-
---
|
|
1333
|
-
\`\`\`
|
|
1334
|
-
Body: Instructions to read current \`.claude/state/task.md\`, update status to "In Progress",
|
|
1335
|
-
record the task description and timestamp. If starting a new task, archive the previous one.
|
|
1336
|
-
|
|
1337
|
-
### \`.claude/commands/status.md\`
|
|
1338
|
-
\`\`\`yaml
|
|
1339
|
-
---
|
|
1340
|
-
allowed-tools: ["Read", "Glob", "Grep", "Bash(git status)", "Bash(git diff --stat)"]
|
|
1341
|
-
description: "Show current task and session state"
|
|
1342
|
-
---
|
|
1343
|
-
\`\`\`
|
|
1344
|
-
Body: Read \`.claude/state/task.md\`, show git status, list recently modified files,
|
|
1345
|
-
summarize current state in a concise format.
|
|
1346
|
-
|
|
1347
|
-
### \`.claude/commands/done.md\`
|
|
1348
|
-
\`\`\`yaml
|
|
1349
|
-
---
|
|
1350
|
-
allowed-tools: ["Read", "Write", "Edit", "Glob", "Grep", "Bash(git:*)", "Bash({test_command})", "Bash({lint_command})"]
|
|
1351
|
-
description: "Mark current task complete"
|
|
1352
|
-
---
|
|
1353
|
-
\`\`\`
|
|
1354
|
-
Body: Run tests and lint checks. If they pass, update \`.claude/state/task.md\`
|
|
1355
|
-
status to "Done". Show a summary of what was accomplished. Suggest next steps.
|
|
1248
|
+
Do NOT generate task management commands (\`task.md\`, \`status.md\`, \`done.md\`) \u2014
|
|
1249
|
+
Claude Code has built-in TaskCreate/TaskUpdate/TaskList tools for task management.
|
|
1356
1250
|
|
|
1357
1251
|
### \`.claude/commands/analyze.md\`
|
|
1358
1252
|
\`\`\`yaml
|
|
@@ -1756,61 +1650,6 @@ function mapFormatter(linter) {
|
|
|
1756
1650
|
};
|
|
1757
1651
|
return mapping[linter] ?? null;
|
|
1758
1652
|
}
|
|
1759
|
-
function createTaskFile(projectInfo, preferences) {
|
|
1760
|
-
const taskPath = path3.join(projectInfo.rootDir, ".claude", "state", "task.md");
|
|
1761
|
-
fs3.mkdirSync(path3.dirname(taskPath), { recursive: true });
|
|
1762
|
-
if (fs3.existsSync(taskPath)) {
|
|
1763
|
-
return;
|
|
1764
|
-
}
|
|
1765
|
-
let content;
|
|
1766
|
-
if (projectInfo.isExisting) {
|
|
1767
|
-
content = `# Current Task
|
|
1768
|
-
|
|
1769
|
-
## Status: Ready
|
|
1770
|
-
|
|
1771
|
-
No active task. Start one with \`/task <description>\`.
|
|
1772
|
-
|
|
1773
|
-
## Project Summary
|
|
1774
|
-
|
|
1775
|
-
${projectInfo.name}${projectInfo.description ? ` - ${projectInfo.description}` : ""}
|
|
1776
|
-
|
|
1777
|
-
**Tech Stack:** ${summarizeTechStack(projectInfo.techStack)}
|
|
1778
|
-
|
|
1779
|
-
## Quick Commands
|
|
1780
|
-
|
|
1781
|
-
- \`/task\` - Start working on something
|
|
1782
|
-
- \`/status\` - See current state
|
|
1783
|
-
- \`/analyze\` - Deep dive into code
|
|
1784
|
-
- \`/done\` - Mark task complete
|
|
1785
|
-
`;
|
|
1786
|
-
} else {
|
|
1787
|
-
const description = preferences?.description || "Explore and set up project";
|
|
1788
|
-
content = `# Current Task
|
|
1789
|
-
|
|
1790
|
-
## Status: In Progress
|
|
1791
|
-
|
|
1792
|
-
**Task:** ${description}
|
|
1793
|
-
|
|
1794
|
-
## Context
|
|
1795
|
-
|
|
1796
|
-
New project - setting up from scratch.
|
|
1797
|
-
|
|
1798
|
-
${preferences?.framework ? `**Framework:** ${formatFramework(preferences.framework)}` : ""}
|
|
1799
|
-
${preferences?.primaryLanguage ? `**Language:** ${formatLanguage(preferences.primaryLanguage)}` : ""}
|
|
1800
|
-
|
|
1801
|
-
## Next Steps
|
|
1802
|
-
|
|
1803
|
-
1. Define project structure
|
|
1804
|
-
2. Set up development environment
|
|
1805
|
-
3. Start implementation
|
|
1806
|
-
|
|
1807
|
-
## Decisions
|
|
1808
|
-
|
|
1809
|
-
(None yet - starting fresh)
|
|
1810
|
-
`;
|
|
1811
|
-
}
|
|
1812
|
-
fs3.writeFileSync(taskPath, content);
|
|
1813
|
-
}
|
|
1814
1653
|
function formatLanguage(lang) {
|
|
1815
1654
|
const names = {
|
|
1816
1655
|
typescript: "TypeScript",
|
|
@@ -2039,7 +1878,6 @@ async function main() {
|
|
|
2039
1878
|
console.log(pc.green("Created:"));
|
|
2040
1879
|
console.log(pc.green(" + .claude/settings.json"));
|
|
2041
1880
|
console.log();
|
|
2042
|
-
createTaskFile(projectInfo, preferences);
|
|
2043
1881
|
const success = await runClaudeAnalysis(projectDir, projectInfo);
|
|
2044
1882
|
if (!success) {
|
|
2045
1883
|
console.error(pc.red("Claude analysis failed. Please try again."));
|
|
@@ -2097,7 +1935,6 @@ try {
|
|
|
2097
1935
|
}
|
|
2098
1936
|
export {
|
|
2099
1937
|
checkClaudeCli,
|
|
2100
|
-
createTaskFile,
|
|
2101
1938
|
formatFramework,
|
|
2102
1939
|
formatLanguage,
|
|
2103
1940
|
getVersion,
|