prjct-cli 1.47.0 → 1.47.4
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/CHANGELOG.md +24 -0
- package/bin/prjct +8 -27
- package/dist/bin/prjct-core.mjs +519 -753
- package/dist/cli/jira.mjs +13 -13
- package/dist/cli/linear.mjs +12 -12
- package/dist/daemon/entry.mjs +506 -740
- package/dist/templates.json +1 -1
- package/package.json +1 -1
- package/templates/antigravity/SKILL.md +12 -31
- package/templates/codex/SKILL.md +7 -23
- package/templates/cursor/commands/bug.md +2 -4
- package/templates/cursor/commands/done.md +2 -2
- package/templates/cursor/commands/pause.md +2 -2
- package/templates/cursor/commands/resume.md +2 -2
- package/templates/cursor/commands/ship.md +3 -5
- package/templates/cursor/commands/sync.md +2 -2
- package/templates/cursor/commands/task.md +2 -4
- package/templates/cursor/p.md +2 -25
- package/templates/cursor/router.mdc +2 -21
- package/templates/global/ANTIGRAVITY.md +7 -8
- package/templates/global/CURSOR.mdc +7 -6
- package/templates/global/GEMINI.md +7 -8
- package/templates/global/WINDSURF.md +7 -8
- package/templates/windsurf/router.md +2 -21
- package/templates/windsurf/workflows/bug.md +2 -4
- package/templates/windsurf/workflows/done.md +2 -2
- package/templates/windsurf/workflows/pause.md +4 -2
- package/templates/windsurf/workflows/resume.md +2 -2
- package/templates/windsurf/workflows/ship.md +2 -4
- package/templates/windsurf/workflows/sync.md +2 -2
- package/templates/windsurf/workflows/task.md +2 -4
- package/templates/agentic/agent-routing.md +0 -45
- package/templates/agentic/agents/uxui.md +0 -63
- package/templates/baseline/anti-patterns/nextjs.json +0 -18
- package/templates/baseline/anti-patterns/react.json +0 -18
- package/templates/baseline/anti-patterns/typescript.json +0 -18
- package/templates/baseline/patterns/nextjs.json +0 -18
- package/templates/baseline/patterns/react.json +0 -18
- package/templates/baseline/patterns/typescript.json +0 -18
- package/templates/commands/analyze.md +0 -11
- package/templates/commands/auth.md +0 -15
- package/templates/commands/bug.md +0 -28
- package/templates/commands/cleanup.md +0 -11
- package/templates/commands/dash.md +0 -16
- package/templates/commands/design.md +0 -11
- package/templates/commands/done.md +0 -46
- package/templates/commands/enrich.md +0 -20
- package/templates/commands/git.md +0 -17
- package/templates/commands/history.md +0 -13
- package/templates/commands/idea.md +0 -13
- package/templates/commands/impact.md +0 -13
- package/templates/commands/init.md +0 -11
- package/templates/commands/jira.md +0 -94
- package/templates/commands/learnings.md +0 -11
- package/templates/commands/linear.md +0 -88
- package/templates/commands/merge.md +0 -25
- package/templates/commands/next.md +0 -12
- package/templates/commands/p.md +0 -62
- package/templates/commands/p.toml +0 -37
- package/templates/commands/pause.md +0 -16
- package/templates/commands/plan.md +0 -13
- package/templates/commands/prd.md +0 -21
- package/templates/commands/resume.md +0 -12
- package/templates/commands/review.md +0 -20
- package/templates/commands/serve.md +0 -11
- package/templates/commands/sessions.md +0 -13
- package/templates/commands/setup.md +0 -11
- package/templates/commands/ship.md +0 -46
- package/templates/commands/skill.md +0 -13
- package/templates/commands/spec.md +0 -20
- package/templates/commands/status.md +0 -11
- package/templates/commands/sync.md +0 -23
- package/templates/commands/task.md +0 -69
- package/templates/commands/test.md +0 -22
- package/templates/commands/update.md +0 -11
- package/templates/commands/verify.md +0 -11
- package/templates/commands/workflow.md +0 -69
- package/templates/global/CLAUDE.md +0 -20
- package/templates/global/modules/CLAUDE-commands.md +0 -1
- package/templates/global/modules/CLAUDE-core.md +0 -16
- package/templates/global/modules/CLAUDE-git.md +0 -1
- package/templates/global/modules/CLAUDE-intelligence.md +0 -1
- package/templates/global/modules/CLAUDE-storage.md +0 -1
- package/templates/global/modules/module-config.json +0 -12
- package/templates/subagents/agent-base.md +0 -21
- package/templates/subagents/domain/backend.md +0 -109
- package/templates/subagents/domain/database.md +0 -121
- package/templates/subagents/domain/devops.md +0 -152
- package/templates/subagents/domain/frontend.md +0 -103
- package/templates/subagents/domain/testing.md +0 -169
- package/templates/subagents/pm-expert.md +0 -366
- package/templates/subagents/workflow/chief-architect.md +0 -653
- package/templates/subagents/workflow/prjct-planner.md +0 -120
- package/templates/subagents/workflow/prjct-shipper.md +0 -175
- package/templates/subagents/workflow/prjct-workflow.md +0 -82
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
allowed-tools: [Bash, Read, AskUserQuestion]
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# p. sessions
|
|
6
|
-
|
|
7
|
-
## Step 1: Show recent sessions
|
|
8
|
-
```bash
|
|
9
|
-
prjct sessions --md
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
## Step 2: Offer to resume
|
|
13
|
-
If sessions exist, ask the user which one to resume. Then switch to that project directory and run `prjct resume --md`.
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
allowed-tools: [Bash, Read, AskUserQuestion]
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# p. ship $ARGUMENTS
|
|
6
|
-
|
|
7
|
-
## Step 0: Complete task (implicit)
|
|
8
|
-
The ship workflow automatically completes the current task before shipping.
|
|
9
|
-
This means `p. done` is implicit — you do NOT need to run it separately before shipping.
|
|
10
|
-
|
|
11
|
-
## Pre-flight (BLOCKING)
|
|
12
|
-
```bash
|
|
13
|
-
git branch --show-current
|
|
14
|
-
```
|
|
15
|
-
IF on main/master: STOP. Create a feature branch first.
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
gh auth status
|
|
19
|
-
```
|
|
20
|
-
IF not authenticated: STOP. Run `gh auth login`.
|
|
21
|
-
|
|
22
|
-
## Step 1: Quality checks
|
|
23
|
-
```bash
|
|
24
|
-
prjct ship "$ARGUMENTS" --md
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Step 2: Review changes
|
|
28
|
-
Show the user what will be committed, versioned, and PR'd.
|
|
29
|
-
|
|
30
|
-
## Step 3: Get approval (BLOCKING)
|
|
31
|
-
ASK: "Ready to ship?" Yes / No / Show diff
|
|
32
|
-
|
|
33
|
-
## Step 4: Ship
|
|
34
|
-
- Commit with prjct footer: `Generated with [p/](https://www.prjct.app/)`
|
|
35
|
-
- Push and create PR
|
|
36
|
-
- Update issue tracker if linked
|
|
37
|
-
- Every commit MUST include the prjct footer. No exceptions.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
## Presentation
|
|
41
|
-
Format the ship flow as:
|
|
42
|
-
|
|
43
|
-
1. `**Shipping**: {feature name}`
|
|
44
|
-
2. Quality checks as a table: | Check | Status |
|
|
45
|
-
3. Show the PR summary
|
|
46
|
-
4. Ask for approval with clear formatting
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
allowed-tools: [Bash, Read, Glob]
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# p. skill $ARGUMENTS
|
|
6
|
-
|
|
7
|
-
Supports: `list` (default), `search <query>`, `show <id>`, `invoke <id>`, `add <source>`, `remove <name>`, `init <name>`, `check`.
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
prjct skill $ARGUMENTS --md
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Follow the instructions in the CLI output.
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
allowed-tools: [Bash, Read, Write, AskUserQuestion, Task]
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# p. spec $ARGUMENTS
|
|
6
|
-
|
|
7
|
-
## Step 1: Validate
|
|
8
|
-
If $ARGUMENTS is empty, ASK the user for a feature name.
|
|
9
|
-
|
|
10
|
-
## Step 2: Create spec via CLI
|
|
11
|
-
```bash
|
|
12
|
-
prjct spec "$ARGUMENTS" --md
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Step 3: Follow CLI instructions
|
|
16
|
-
The CLI will guide through requirements, design decisions, and task breakdown.
|
|
17
|
-
Search the codebase for relevant patterns.
|
|
18
|
-
|
|
19
|
-
## Step 4: Get approval
|
|
20
|
-
Show the spec to the user and get explicit approval before adding tasks to queue.
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
allowed-tools: [Bash, AskUserQuestion]
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# p. sync $ARGUMENTS
|
|
6
|
-
|
|
7
|
-
## Step 1: Run CLI sync
|
|
8
|
-
```bash
|
|
9
|
-
prjct sync $ARGUMENTS --md
|
|
10
|
-
```
|
|
11
|
-
If CLI output is JSON with `options`, present the options to the user and execute the chosen command.
|
|
12
|
-
|
|
13
|
-
Follow ALL instructions in the CLI output (including LLM Analysis if present).
|
|
14
|
-
|
|
15
|
-
## Step 2: Present results
|
|
16
|
-
After all steps complete, present the output clearly:
|
|
17
|
-
- Use the tables and sections as-is from CLI markdown
|
|
18
|
-
- If LLM analysis was performed, summarize key findings:
|
|
19
|
-
- Architecture style and top insights
|
|
20
|
-
- Critical anti-patterns (high severity)
|
|
21
|
-
- Top tech debt items
|
|
22
|
-
- Key conventions discovered
|
|
23
|
-
- Add a brief interpretation of what changed and why
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
allowed-tools: [Bash, Read, Write, Edit, Glob, Grep, Task, AskUserQuestion]
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# p. task $ARGUMENTS
|
|
6
|
-
|
|
7
|
-
## Step 1: Validate
|
|
8
|
-
If $ARGUMENTS is empty, ASK the user what task to start.
|
|
9
|
-
|
|
10
|
-
## Step 2: Get task context
|
|
11
|
-
```bash
|
|
12
|
-
prjct task "$ARGUMENTS" --md
|
|
13
|
-
```
|
|
14
|
-
If CLI output is JSON with `options`, present the options to the user and execute the chosen command.
|
|
15
|
-
|
|
16
|
-
## Step 3: Understand before acting (USE YOUR INTELLIGENCE)
|
|
17
|
-
- Context7 is mandatory: for framework/library APIs, consult Context7 docs before implementation/refactor
|
|
18
|
-
- Read the relevant files from the CLI output
|
|
19
|
-
- If the task is ambiguous, ASK the user to clarify
|
|
20
|
-
- Explore beyond suggested files if needed
|
|
21
|
-
|
|
22
|
-
## Step 4: Pattern commitment (MANDATORY — do not skip)
|
|
23
|
-
|
|
24
|
-
Before writing ANY code, complete this checklist:
|
|
25
|
-
|
|
26
|
-
1. Read **Locked Decisions (NON-NEGOTIABLE)** from the Context Contract output. These are hard constraints — do not deviate.
|
|
27
|
-
2. Read **Pattern Briefing** — each pattern lists a VIOLATION line showing what NOT to do.
|
|
28
|
-
3. Read **Task Patterns (MUST follow)** — for each one, state HOW you will apply it to this specific task.
|
|
29
|
-
|
|
30
|
-
Output a commitment table:
|
|
31
|
-
|
|
32
|
-
| Pattern | Implementation plan for this task |
|
|
33
|
-
|---------|----------------------------------|
|
|
34
|
-
| (name from Task Patterns) | (concrete: which files, which types, which components) |
|
|
35
|
-
|
|
36
|
-
If no patterns were provided in the CLI output (e.g., project not yet synced), skip this step.
|
|
37
|
-
If the user corrects a commitment, update the table before proceeding.
|
|
38
|
-
|
|
39
|
-
## Step 5: Plan the approach
|
|
40
|
-
- For non-trivial changes, propose 2-3 approaches
|
|
41
|
-
- Consider existing patterns in the codebase
|
|
42
|
-
- If CLI output mentions domain agents, read them for project patterns
|
|
43
|
-
- Summarize anti-patterns from the CLI output before editing any file
|
|
44
|
-
|
|
45
|
-
## Step 6: Execute
|
|
46
|
-
- Create feature branch if on main: `git checkout -b {type}/{slug}`
|
|
47
|
-
- Work through subtasks in order
|
|
48
|
-
- When done with a subtask: `prjct done --md`
|
|
49
|
-
- Every git commit MUST include footer: `Generated with [p/](https://www.prjct.app/)`
|
|
50
|
-
- If a change may violate a high-severity anti-pattern, ask for confirmation and propose a safer alternative first
|
|
51
|
-
|
|
52
|
-
## Step 7: Ship (MANDATORY)
|
|
53
|
-
When all work is complete, you MUST execute the ship workflow:
|
|
54
|
-
ASK: "Work complete. Ready to ship?" Ship now / Continue working / Pause
|
|
55
|
-
- If Ship now: execute `p. ship` workflow (load and follow `~/.claude/commands/p/ship.md`)
|
|
56
|
-
- If Continue working: stay in Step 6
|
|
57
|
-
- If Pause: execute `p. pause`
|
|
58
|
-
|
|
59
|
-
NEVER end a task without asking about shipping. This is non-negotiable.
|
|
60
|
-
|
|
61
|
-
## Presentation
|
|
62
|
-
When showing task context to the user, format your response as:
|
|
63
|
-
|
|
64
|
-
1. Start with a brief status line: `**Task started**: {description}`
|
|
65
|
-
2. Show the subtask table from CLI output
|
|
66
|
-
3. List 2-3 key files you'll work on with `code formatting` for paths
|
|
67
|
-
4. End with your approach (concise, 2-3 bullets)
|
|
68
|
-
|
|
69
|
-
Keep responses scannable. Use tables for structured data. Use `code formatting` for file paths and commands.
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
allowed-tools: [Bash, Read]
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# p. test $ARGUMENTS
|
|
6
|
-
|
|
7
|
-
## Step 1: Run tests
|
|
8
|
-
```bash
|
|
9
|
-
prjct test $ARGUMENTS --md
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
If the CLI doesn't handle testing directly, detect and run:
|
|
13
|
-
- Node: `npm test` or `bun test`
|
|
14
|
-
- Python: `pytest`
|
|
15
|
-
- Rust: `cargo test`
|
|
16
|
-
- Go: `go test ./...`
|
|
17
|
-
|
|
18
|
-
## Step 2: Report results
|
|
19
|
-
Show pass/fail counts. If tests fail, show the relevant output.
|
|
20
|
-
|
|
21
|
-
## Fix mode (`p. test fix`)
|
|
22
|
-
Update test snapshots and re-run to verify.
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
allowed-tools: [Bash, AskUserQuestion]
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# p. workflow $ARGUMENTS
|
|
6
|
-
|
|
7
|
-
## Step 1: Parse intent
|
|
8
|
-
|
|
9
|
-
If $ARGUMENTS is empty, show current rules:
|
|
10
|
-
```bash
|
|
11
|
-
prjct workflow --md
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
**If $ARGUMENTS contains natural language, DO NOT pass it raw to the CLI.**
|
|
15
|
-
The CLI only accepts structured args — you must parse the intent yourself first.
|
|
16
|
-
|
|
17
|
-
Parse:
|
|
18
|
-
- **Action**: add / remove / list / create / delete / reset
|
|
19
|
-
- **Command**: the shell command to run (infer from description)
|
|
20
|
-
- **Position**: `before` or `after` (from words like "after", "después de", "before", "antes de")
|
|
21
|
-
- **Workflow**: `task` / `done` / `ship` / `sync` (infer from context)
|
|
22
|
-
|
|
23
|
-
**Inference examples**:
|
|
24
|
-
| Natural language | → | Structured |
|
|
25
|
-
|---|---|---|
|
|
26
|
-
| "después del merge revisa npm" | → | `add "npm view prjct-cli version" after ship` |
|
|
27
|
-
| "after ship check npm version" | → | `add "npm view prjct-cli version" after ship` |
|
|
28
|
-
| "before task run tests" | → | `add "npm test" before task` |
|
|
29
|
-
| "check lint before ship" | → | `add "npm run lint" before ship` |
|
|
30
|
-
| "after done show git log" | → | `add "git log --oneline -5" after done` |
|
|
31
|
-
|
|
32
|
-
If any of the three values (command, position, workflow) is ambiguous → ASK before running.
|
|
33
|
-
|
|
34
|
-
## Step 2: Execute
|
|
35
|
-
|
|
36
|
-
### Add a rule
|
|
37
|
-
```bash
|
|
38
|
-
prjct workflow add "$COMMAND" $POSITION $WORKFLOW --md
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### List rules
|
|
42
|
-
```bash
|
|
43
|
-
prjct workflow list --md
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### Remove a rule
|
|
47
|
-
```bash
|
|
48
|
-
prjct workflow rm $RULE_ID --md
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Create custom workflow
|
|
52
|
-
```bash
|
|
53
|
-
prjct workflow create "$NAME" "$DESCRIPTION" --md
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Delete custom workflow
|
|
57
|
-
```bash
|
|
58
|
-
prjct workflow delete "$NAME" --md
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Step 3: Confirm destructive actions
|
|
62
|
-
|
|
63
|
-
For `reset` (removes all rules): ASK "Remove all workflow rules?" Yes / Cancel
|
|
64
|
-
|
|
65
|
-
For `remove` with multiple matches: show matches and ASK which one to remove.
|
|
66
|
-
|
|
67
|
-
## Step 4: Present result
|
|
68
|
-
|
|
69
|
-
Show the CLI markdown output to the user.
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<!-- prjct:start - DO NOT REMOVE THIS MARKER -->
|
|
2
|
-
# p/ — Context layer for AI agents
|
|
3
|
-
|
|
4
|
-
Commands: `p. sync` `p. task` `p. done` `p. ship` `p. pause` `p. resume` `p. bug` `p. dash` `p. next` `p. jira` `p. linear` `p. status` + 25 more
|
|
5
|
-
|
|
6
|
-
When user types `p. <command>`, it invokes the `/p` slash command which loads and executes the correct template.
|
|
7
|
-
|
|
8
|
-
Rules:
|
|
9
|
-
- Never commit to main/master directly
|
|
10
|
-
- All commits include footer: `Generated with [p/](https://www.prjct.app/)`
|
|
11
|
-
- Path resolution: `.prjct/prjct.config.json` → `~/.prjct-cli/projects/{projectId}`
|
|
12
|
-
- All storage through `prjct` CLI (SQLite internally)
|
|
13
|
-
- For code tasks, always start with `p. task` and follow Context Contract from CLI output
|
|
14
|
-
- Context7 MCP is mandatory for framework/library API decisions
|
|
15
|
-
- Templates are MANDATORY workflows — follow every step
|
|
16
|
-
- WORKFLOW IS MANDATORY: After completing work, ALWAYS run `p. ship`
|
|
17
|
-
- NEVER end a session without shipping or pausing
|
|
18
|
-
|
|
19
|
-
**Auto-managed by prjct-cli** | https://prjct.app
|
|
20
|
-
<!-- prjct:end - DO NOT REMOVE THIS MARKER -->
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!-- Module deprecated: content moved to CLI --md output -->
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# p/ — Context layer for AI agents
|
|
2
|
-
|
|
3
|
-
Commands: `p. sync` `p. task` `p. done` `p. ship` `p. pause` `p. resume` `p. bug` `p. dash` `p. next` `p. jira` `p. linear` `p. status` + 25 more
|
|
4
|
-
|
|
5
|
-
When user types `p. <command>`, it invokes the `/p` slash command which loads and executes the correct template.
|
|
6
|
-
|
|
7
|
-
Rules:
|
|
8
|
-
- Never commit to main/master directly
|
|
9
|
-
- All commits include footer: `Generated with [p/](https://www.prjct.app/)`
|
|
10
|
-
- Path resolution: `.prjct/prjct.config.json` → `~/.prjct-cli/projects/{projectId}`
|
|
11
|
-
- All storage through `prjct` CLI (SQLite internally)
|
|
12
|
-
- For code tasks, always start with `p. task` and follow Context Contract from CLI output
|
|
13
|
-
- Context7 MCP is mandatory for framework/library API decisions
|
|
14
|
-
- Templates are MANDATORY workflows — follow every step
|
|
15
|
-
|
|
16
|
-
**Auto-managed by prjct-cli** | https://prjct.app
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!-- Module deprecated: content moved to CLI --md output -->
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!-- Module deprecated: content moved to CLI --md output -->
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!-- Module deprecated: content moved to CLI --md output -->
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"description": "Configuration for modular CLAUDE.md composition",
|
|
3
|
-
"version": "2.0.0",
|
|
4
|
-
"profiles": {
|
|
5
|
-
"default": {
|
|
6
|
-
"description": "Ultra-thin — CLI provides context via --md flag",
|
|
7
|
-
"modules": ["CLAUDE-core.md"]
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
"default": "default",
|
|
11
|
-
"commandProfiles": {}
|
|
12
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
## prjct Project Context
|
|
2
|
-
|
|
3
|
-
### Setup
|
|
4
|
-
1. Read `.prjct/prjct.config.json` → extract `projectId`
|
|
5
|
-
2. All data is in SQLite (`prjct.db`) — accessed via `prjct` CLI commands
|
|
6
|
-
|
|
7
|
-
### Data Access
|
|
8
|
-
|
|
9
|
-
| CLI Command | Data |
|
|
10
|
-
|-------------|------|
|
|
11
|
-
| `prjct dash compact` | Current task & state |
|
|
12
|
-
| `prjct next` | Task queue |
|
|
13
|
-
| `prjct task "desc"` | Start task |
|
|
14
|
-
| `prjct done` | Complete task |
|
|
15
|
-
| `prjct pause "reason"` | Pause task |
|
|
16
|
-
| `prjct resume` | Resume task |
|
|
17
|
-
|
|
18
|
-
### Rules
|
|
19
|
-
- All state is in **SQLite** — use `prjct` CLI for all data ops
|
|
20
|
-
- NEVER read/write JSON storage files directly
|
|
21
|
-
- NEVER hardcode timestamps — use system time
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: backend
|
|
3
|
-
description: Backend specialist for Node.js, Go, Python, REST APIs, and GraphQL. Use PROACTIVELY when user works on APIs, servers, or backend logic.
|
|
4
|
-
tools: Read, Write, Bash, Glob, Grep
|
|
5
|
-
model: sonnet
|
|
6
|
-
effort: medium
|
|
7
|
-
skills: [javascript-typescript]
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
You are a backend specialist agent for this project.
|
|
11
|
-
|
|
12
|
-
## Your Expertise
|
|
13
|
-
|
|
14
|
-
- **Runtimes**: Node.js, Bun, Deno, Go, Python, Rust
|
|
15
|
-
- **Frameworks**: Express, Fastify, Hono, Gin, FastAPI, Axum
|
|
16
|
-
- **APIs**: REST, GraphQL, gRPC, WebSockets
|
|
17
|
-
- **Auth**: JWT, OAuth, Sessions, API Keys
|
|
18
|
-
|
|
19
|
-
{{> agent-base }}
|
|
20
|
-
|
|
21
|
-
## Domain Analysis
|
|
22
|
-
|
|
23
|
-
When invoked, analyze the project's backend stack:
|
|
24
|
-
1. Read `package.json`, `go.mod`, `requirements.txt`, or `Cargo.toml`
|
|
25
|
-
2. Identify framework and patterns
|
|
26
|
-
3. Check for existing API structure
|
|
27
|
-
|
|
28
|
-
## Code Patterns
|
|
29
|
-
|
|
30
|
-
### API Structure
|
|
31
|
-
Follow project's existing patterns. Common patterns:
|
|
32
|
-
|
|
33
|
-
**Express/Fastify:**
|
|
34
|
-
```typescript
|
|
35
|
-
// Route handler
|
|
36
|
-
export async function getUser(req: Request, res: Response) {
|
|
37
|
-
const { id } = req.params
|
|
38
|
-
const user = await userService.findById(id)
|
|
39
|
-
res.json(user)
|
|
40
|
-
}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
**Go (Gin/Chi):**
|
|
44
|
-
```go
|
|
45
|
-
func GetUser(c *gin.Context) {
|
|
46
|
-
id := c.Param("id")
|
|
47
|
-
user, err := userService.FindByID(id)
|
|
48
|
-
if err != nil {
|
|
49
|
-
c.JSON(500, gin.H{"error": err.Error()})
|
|
50
|
-
return
|
|
51
|
-
}
|
|
52
|
-
c.JSON(200, user)
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Error Handling
|
|
57
|
-
- Use consistent error format
|
|
58
|
-
- Include error codes
|
|
59
|
-
- Log errors appropriately
|
|
60
|
-
- Never expose internal details to clients
|
|
61
|
-
|
|
62
|
-
### Validation
|
|
63
|
-
- Validate all inputs
|
|
64
|
-
- Use schema validation (Zod, Joi, etc.)
|
|
65
|
-
- Return meaningful validation errors
|
|
66
|
-
|
|
67
|
-
## Quality Guidelines
|
|
68
|
-
|
|
69
|
-
1. **Security**: Validate inputs, sanitize outputs, use parameterized queries
|
|
70
|
-
2. **Performance**: Use appropriate indexes, cache when needed
|
|
71
|
-
3. **Reliability**: Handle errors gracefully, implement retries
|
|
72
|
-
4. **Observability**: Log important events, add metrics
|
|
73
|
-
|
|
74
|
-
## Common Tasks
|
|
75
|
-
|
|
76
|
-
### Creating Endpoints
|
|
77
|
-
1. Check existing route structure
|
|
78
|
-
2. Follow RESTful conventions
|
|
79
|
-
3. Add validation middleware
|
|
80
|
-
4. Include error handling
|
|
81
|
-
5. Add to route registry/index
|
|
82
|
-
|
|
83
|
-
### Middleware
|
|
84
|
-
1. Check existing middleware patterns
|
|
85
|
-
2. Keep middleware focused (single responsibility)
|
|
86
|
-
3. Order matters - auth before business logic
|
|
87
|
-
|
|
88
|
-
### Services
|
|
89
|
-
1. Keep business logic in services
|
|
90
|
-
2. Services are testable units
|
|
91
|
-
3. Inject dependencies
|
|
92
|
-
|
|
93
|
-
## Output Format
|
|
94
|
-
|
|
95
|
-
When creating/modifying backend code:
|
|
96
|
-
```
|
|
97
|
-
✅ {action}: {endpoint/service}
|
|
98
|
-
|
|
99
|
-
Files: {count} | Routes: {affected routes}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Critical Rules
|
|
103
|
-
|
|
104
|
-
- NEVER expose sensitive data in responses
|
|
105
|
-
- ALWAYS validate inputs
|
|
106
|
-
- USE parameterized queries (prevent SQL injection)
|
|
107
|
-
- FOLLOW existing error handling patterns
|
|
108
|
-
- LOG errors but don't expose internals
|
|
109
|
-
- CHECK for existing similar endpoints/services
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: database
|
|
3
|
-
description: Database specialist for PostgreSQL, MySQL, MongoDB, Redis, Prisma, and ORMs. Use PROACTIVELY when user works on schemas, migrations, or queries.
|
|
4
|
-
tools: Read, Write, Bash
|
|
5
|
-
model: sonnet
|
|
6
|
-
effort: medium
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
You are a database specialist agent for this project.
|
|
10
|
-
|
|
11
|
-
## Your Expertise
|
|
12
|
-
|
|
13
|
-
- **SQL**: PostgreSQL, MySQL, SQLite
|
|
14
|
-
- **NoSQL**: MongoDB, Redis, DynamoDB
|
|
15
|
-
- **ORMs**: Prisma, Drizzle, TypeORM, Sequelize, GORM
|
|
16
|
-
- **Migrations**: Schema changes, data migrations
|
|
17
|
-
|
|
18
|
-
{{> agent-base }}
|
|
19
|
-
|
|
20
|
-
## Domain Analysis
|
|
21
|
-
|
|
22
|
-
When invoked, analyze the project's database setup:
|
|
23
|
-
1. Check for ORM config (prisma/schema.prisma, drizzle.config.ts)
|
|
24
|
-
2. Check for migration files
|
|
25
|
-
3. Identify database type from connection strings/config
|
|
26
|
-
|
|
27
|
-
## Code Patterns
|
|
28
|
-
|
|
29
|
-
### Prisma
|
|
30
|
-
```prisma
|
|
31
|
-
model User {
|
|
32
|
-
id String @id @default(cuid())
|
|
33
|
-
email String @unique
|
|
34
|
-
name String?
|
|
35
|
-
posts Post[]
|
|
36
|
-
createdAt DateTime @default(now())
|
|
37
|
-
updatedAt DateTime @updatedAt
|
|
38
|
-
}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### Drizzle
|
|
42
|
-
```typescript
|
|
43
|
-
export const users = pgTable('users', {
|
|
44
|
-
id: serial('id').primaryKey(),
|
|
45
|
-
email: varchar('email', { length: 255 }).notNull().unique(),
|
|
46
|
-
name: varchar('name', { length: 255 }),
|
|
47
|
-
createdAt: timestamp('created_at').defaultNow(),
|
|
48
|
-
})
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Raw SQL
|
|
52
|
-
```sql
|
|
53
|
-
CREATE TABLE users (
|
|
54
|
-
id SERIAL PRIMARY KEY,
|
|
55
|
-
email VARCHAR(255) UNIQUE NOT NULL,
|
|
56
|
-
name VARCHAR(255),
|
|
57
|
-
created_at TIMESTAMP DEFAULT NOW()
|
|
58
|
-
);
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Quality Guidelines
|
|
62
|
-
|
|
63
|
-
1. **Indexing**: Add indexes for frequently queried columns
|
|
64
|
-
2. **Normalization**: Avoid data duplication
|
|
65
|
-
3. **Constraints**: Use foreign keys, unique constraints
|
|
66
|
-
4. **Naming**: Consistent naming (snake_case for SQL, camelCase for ORM)
|
|
67
|
-
|
|
68
|
-
## Common Tasks
|
|
69
|
-
|
|
70
|
-
### Creating Tables/Models
|
|
71
|
-
1. Check existing schema patterns
|
|
72
|
-
2. Add appropriate indexes
|
|
73
|
-
3. Include timestamps (created_at, updated_at)
|
|
74
|
-
4. Define relationships
|
|
75
|
-
|
|
76
|
-
### Migrations
|
|
77
|
-
1. Generate migration with ORM tool
|
|
78
|
-
2. Review generated SQL
|
|
79
|
-
3. Test migration on dev first
|
|
80
|
-
4. Include rollback strategy
|
|
81
|
-
|
|
82
|
-
### Queries
|
|
83
|
-
1. Use ORM methods when available
|
|
84
|
-
2. Parameterize all inputs
|
|
85
|
-
3. Select only needed columns
|
|
86
|
-
4. Use pagination for large results
|
|
87
|
-
|
|
88
|
-
## Migration Commands
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
# Prisma
|
|
92
|
-
npx prisma migrate dev --name {name}
|
|
93
|
-
npx prisma generate
|
|
94
|
-
|
|
95
|
-
# Drizzle
|
|
96
|
-
npx drizzle-kit generate
|
|
97
|
-
npx drizzle-kit migrate
|
|
98
|
-
|
|
99
|
-
# TypeORM
|
|
100
|
-
npx typeorm migration:generate -n {Name}
|
|
101
|
-
npx typeorm migration:run
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
## Output Format
|
|
105
|
-
|
|
106
|
-
When creating/modifying database schemas:
|
|
107
|
-
```
|
|
108
|
-
✅ {action}: {table/model}
|
|
109
|
-
|
|
110
|
-
Migration: {name} | Indexes: {count}
|
|
111
|
-
Run: {migration command}
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## Critical Rules
|
|
115
|
-
|
|
116
|
-
- NEVER delete columns without data migration plan
|
|
117
|
-
- ALWAYS use parameterized queries
|
|
118
|
-
- ADD indexes for foreign keys
|
|
119
|
-
- BACKUP before destructive migrations
|
|
120
|
-
- TEST migrations on dev first
|
|
121
|
-
- USE transactions for multi-step operations
|