Expert guidance for working with projen-managed projects using ClickUp's custom project types. Handles task execution, file modifications, dependencies, and development workflows for TypeScript and CDK projects.
Expert assistant for working with projen-managed projects using ClickUp's custom project types (`clickup-projen`). Ensures proper task execution, configuration management, and adherence to project conventions.
**ALWAYS use projen for task execution** instead of direct package manager commands:
```bash
npx projen # Synthesize project configuration
npx projen build # Full build with tests
npx projen test # Run tests only
npx projen compile # Compile TypeScript only
```
**Before running any task:**
**NEVER manually edit generated files.** Files marked with "~~ Generated by projen. To modify..." are synthesized from `.projenrc`.
**Correct workflow for changes:**
1. Check if file is projen-managed (look for generation comment)
2. If managed, edit `.projenrc.ts` (or `.projenrc.py`/`.projenrc.json`)
3. Run `npx projen` to regenerate files
4. Review changes
5. Commit both `.projenrc` AND generated files
**Common generated files:**
**Add dependencies through projen configuration**, not package manager commands:
```typescript
// In .projenrc.ts
project.addDeps('lodash'); // Runtime dependency
project.addDevDeps('jest'); // Dev dependency
project.addPeerDeps('react'); // Peer dependency
```
After modifying dependencies:
```bash
npx projen # Regenerate package.json
pnpm install # Install new dependencies
```
Base TypeScript library project with ClickUp conventions.
**Key features:**
For reusable CDK construct libraries.
**Naming convention:** Use `cdk-*` prefix (e.g., `cdk-my-library`)
**Pre-configured with:**
For CDK applications.
**Naming convention:** Use `*-cdk` suffix (e.g., `my-app-cdk`)
**Pre-configured with:**
```bash
npx projen build
```
**Task is NOT complete until all criteria pass.**
```bash
npx projen test
pnpm test:watch
pnpm test path/to/test-file.test.ts
pnpm test -- -u
```
Test projen configuration changes locally before publishing:
```bash
pnpm build
projen new --from /path/to/clickup-projen/dist/js/[email protected] <project-type>
```
When modifying `clickup-projen` itself:
1. Create/modify module in `src/`
2. Add test in `test/` with snapshot testing
3. Export from `src/index.ts` if public API
4. Regenerate: `npx projen`
5. Update snapshots: `pnpm test -- -u`
6. Verify with local tarball in test project
**Wrong:**
```bash
vim package.json
```
**Right:**
```typescript
// ✅ Edit .projenrc.ts
const project = new ClickUpTypeScriptProject({
name: '@time-loop/my-project',
deps: ['lodash'], // Add dependency here
});
```
Then:
```bash
npx projen # Regenerate
pnpm install # Install dependencies
```
**Wrong:**
```bash
pnpm add lodash
```
**Right:**
```typescript
// ✅ In .projenrc.ts
project.addDeps('lodash');
```
```bash
npx projen
pnpm install
```
Workflows are generated automatically. To customize:
```typescript
// In .projenrc.ts
const project = new ClickUpCdkTypeScriptApp({
cdkDiffOptions: {
enableAutoDiff: true, // Add CDK diff workflow
},
});
```
Common generated workflows:
Consumers need GitHub Packages authentication:
```bash
cat >> ~/.npmrc <<EOF
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_PAT
@time-loop:registry=https://npm.pkg.github.com/
EOF
```
**Required PAT scope:** `read:packages` (minimum)
Ensure these secrets are configured:
All packages use `@time-loop/` scope (enforced by `normalizeName()`):
| Project Type | Convention | Example |
|-------------|-----------|---------|
| CDK Construct Library | `cdk-*` prefix | `@time-loop/cdk-my-library` |
| CDK Application | `*-cdk` suffix | `@time-loop/my-app-cdk` |
| TypeScript Library | No specific convention | `@time-loop/my-library` |
Centralized in `src/utils/parameters.ts`:
**Solution:** Don't edit the file directly. Edit `.projenrc.ts` and run `npx projen`.
**Solution:**
```bash
npx projen # Regenerate first
pnpm install # Then install
```
**If snapshot tests fail:**
1. Review snapshot diffs carefully
2. If changes are intentional: `pnpm test -- -u`
3. Commit updated snapshots with your changes
**Task completion checklist:**
```bash
npx projen compile # Must pass
npx projen test # Must pass
npx projen eslint # Must pass (or included in build)
npx projen build # Must pass
```
1. **Always use `npx projen <task>`** - Never run package manager tasks directly
2. **Check `.projen/tasks.json`** - Before running any task
3. **Never edit generated files** - Always modify `.projenrc.ts` instead
4. **Task not complete until all checks pass** - Build, test, lint must all succeed
5. **Commit both config and generated files** - Both `.projenrc.ts` and its outputs
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/projen-clickup-project-management/raw