ragarciaruben 1.20.20 → 1.20.21
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/bin/install.js +406 -1969
- package/get-shit-done/templates/AGENTS.md +83 -0
- package/get-shit-done/templates/opencode/agents/executor.md +61 -0
- package/get-shit-done/templates/opencode/agents/planner.md +77 -0
- package/{.github/copilot-context/agents/product-owner.agent.md → get-shit-done/templates/opencode/agents/product-owner.md} +10 -43
- package/{.github/copilot-context/agents/verifier.agent.md → get-shit-done/templates/opencode/agents/verifier.md} +12 -38
- package/{.github/copilot-context/prompts/break-down-epic.prompt.md → get-shit-done/templates/opencode/commands/break-down-epic.md} +2 -7
- package/{.github/copilot-context/prompts/create-tickets.prompt.md → get-shit-done/templates/opencode/commands/create-tickets.md} +4 -22
- package/{.github/copilot-context/prompts/execute-phase.prompt.md → get-shit-done/templates/opencode/commands/execute-phase.md} +5 -33
- package/{.github/copilot-context/prompts/map-codebase.prompt.md → get-shit-done/templates/opencode/commands/map-codebase.md} +12 -41
- package/{.github/copilot-context/prompts/new-project.prompt.md → get-shit-done/templates/opencode/commands/new-project.md} +17 -33
- package/{.github/copilot-context/prompts/pause-work.prompt.md → get-shit-done/templates/opencode/commands/pause-work.md} +6 -19
- package/{.github/copilot-context/prompts/plan-phase.prompt.md → get-shit-done/templates/opencode/commands/plan-phase.md} +4 -27
- package/{.github/copilot-context/prompts/progress.prompt.md → get-shit-done/templates/opencode/commands/progress.md} +1 -4
- package/{.github/copilot-context/prompts/redefine-roadmap.prompt.md → get-shit-done/templates/opencode/commands/redefine-roadmap.md} +8 -21
- package/{.github/copilot-context/prompts/refine-backlog.prompt.md → get-shit-done/templates/opencode/commands/refine-backlog.md} +3 -14
- package/{.github/copilot-context/prompts/resume-work.prompt.md → get-shit-done/templates/opencode/commands/resume-work.md} +2 -13
- package/get-shit-done/templates/opencode/commands/set-profile.md +65 -0
- package/{.github/copilot-context/prompts/sync-instructions.prompt.md → get-shit-done/templates/opencode/commands/sync-instructions.md} +9 -13
- package/{.github/copilot-context/prompts/sync-jira.prompt.md → get-shit-done/templates/opencode/commands/sync-jira.md} +5 -17
- package/{.github/copilot-context/prompts/verify-work.prompt.md → get-shit-done/templates/opencode/commands/verify-work.md} +5 -33
- package/get-shit-done/templates/opencode.json +15 -0
- package/package.json +7 -17
- package/.github/copilot-context/README.md +0 -556
- package/.github/copilot-context/agents/executor.agent.md +0 -84
- package/.github/copilot-context/agents/planner.agent.md +0 -96
- package/.github/copilot-context/hooks/hooks.json +0 -11
- package/.github/copilot-context/hooks/inject-context.js +0 -107
- package/.github/copilot-context/instructions/architecture.instructions.md +0 -33
- package/.github/copilot-context/instructions/concerns.instructions.md +0 -30
- package/.github/copilot-context/instructions/conventions.instructions.md +0 -25
- package/.github/copilot-context/instructions/integrations.instructions.md +0 -30
- package/.github/copilot-context/instructions/stack.instructions.md +0 -30
- package/.github/copilot-context/instructions/structure.instructions.md +0 -32
- package/.github/copilot-context/instructions/testing.instructions.md +0 -25
- package/.github/copilot-context/skills/map-codebase/SKILL.md +0 -49
- package/.github/copilot-context/skills/project-history/SKILL.md +0 -46
- package/.vscode/settings.json +0 -9
- package/agents/gsd-codebase-mapper.md +0 -764
- package/agents/gsd-debugger.md +0 -1246
- package/agents/gsd-executor.md +0 -469
- package/agents/gsd-integration-checker.md +0 -443
- package/agents/gsd-phase-researcher.md +0 -546
- package/agents/gsd-plan-checker.md +0 -690
- package/agents/gsd-planner.md +0 -1275
- package/agents/gsd-project-researcher.md +0 -621
- package/agents/gsd-research-synthesizer.md +0 -239
- package/agents/gsd-roadmapper.md +0 -642
- package/agents/gsd-verifier.md +0 -573
- package/bin/setup-copilot-context.js +0 -244
- package/commands/gsd/add-phase.md +0 -43
- package/commands/gsd/add-tests.md +0 -41
- package/commands/gsd/add-todo.md +0 -47
- package/commands/gsd/audit-milestone.md +0 -36
- package/commands/gsd/check-todos.md +0 -45
- package/commands/gsd/cleanup.md +0 -18
- package/commands/gsd/complete-milestone.md +0 -136
- package/commands/gsd/debug.md +0 -167
- package/commands/gsd/discuss-phase.md +0 -83
- package/commands/gsd/execute-phase.md +0 -41
- package/commands/gsd/health.md +0 -22
- package/commands/gsd/help.md +0 -22
- package/commands/gsd/insert-phase.md +0 -32
- package/commands/gsd/join-discord.md +0 -18
- package/commands/gsd/list-phase-assumptions.md +0 -46
- package/commands/gsd/map-codebase.md +0 -71
- package/commands/gsd/new-milestone.md +0 -44
- package/commands/gsd/new-project.md +0 -42
- package/commands/gsd/new-project.md.bak +0 -1041
- package/commands/gsd/pause-work.md +0 -38
- package/commands/gsd/plan-milestone-gaps.md +0 -34
- package/commands/gsd/plan-phase.md +0 -45
- package/commands/gsd/progress.md +0 -24
- package/commands/gsd/quick.md +0 -41
- package/commands/gsd/reapply-patches.md +0 -110
- package/commands/gsd/remove-phase.md +0 -31
- package/commands/gsd/research-phase.md +0 -189
- package/commands/gsd/resume-work.md +0 -40
- package/commands/gsd/set-profile.md +0 -34
- package/commands/gsd/settings.md +0 -36
- package/commands/gsd/update.md +0 -37
- package/commands/gsd/verify-work.md +0 -38
- package/hooks/dist/gsd-check-update.js +0 -62
- package/hooks/dist/gsd-context-monitor.js +0 -122
- package/hooks/dist/gsd-statusline.js +0 -108
- package/scripts/build-hooks.js +0 -43
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Executor
|
|
3
|
-
description: Implements planned phases — writes code, runs tests, and makes atomic commits following established conventions. Use me to execute a ready plan.
|
|
4
|
-
tools:
|
|
5
|
-
- editFiles
|
|
6
|
-
- runInTerminal
|
|
7
|
-
- search
|
|
8
|
-
- geppetto/*
|
|
9
|
-
- geppetto-api/*
|
|
10
|
-
- jira/*
|
|
11
|
-
model: Claude Opus 4.6
|
|
12
|
-
handoffs:
|
|
13
|
-
- label: Verify This Work
|
|
14
|
-
agent: Verifier
|
|
15
|
-
prompt: "Implementation is complete. Please verify the completed phase against the requirements in .planning/REQUIREMENTS.md and the phase success criteria in .planning/ROADMAP.md."
|
|
16
|
-
- label: Pause & Save State
|
|
17
|
-
agent: Pause
|
|
18
|
-
prompt: "Please save the current session state to .planning/continue-here.md so we can resume in a new session."
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
# Executor Agent
|
|
22
|
-
|
|
23
|
-
I am an implementation specialist. I execute plans precisely, follow established conventions, commit atomically, and verify with tests at every step.
|
|
24
|
-
|
|
25
|
-
## My Approach
|
|
26
|
-
|
|
27
|
-
1. **Load context first:** Before writing a single line of code, I read:
|
|
28
|
-
- The plan files in `.planning/phases/[current-phase]/`
|
|
29
|
-
- `.planning/codebase/CONVENTIONS.md` — coding standards
|
|
30
|
-
- `.planning/codebase/STRUCTURE.md` — where to place files
|
|
31
|
-
- `.planning/codebase/CONCERNS.md` — fragile areas to handle carefully
|
|
32
|
-
|
|
33
|
-
2. **Pre-flight check:** Run `npm test` to confirm baseline before I start
|
|
34
|
-
|
|
35
|
-
3. **Implement step by step:** Follow the plan's steps in order — no shortcuts, no improvising architecture
|
|
36
|
-
|
|
37
|
-
4. **Test continuously:** Run tests after each meaningful change; fix failures immediately
|
|
38
|
-
|
|
39
|
-
5. **Commit per plan:** After each plan is complete, commit with a descriptive message
|
|
40
|
-
|
|
41
|
-
6. **Update ROADMAP.md:** Mark completed plans with `[x]`
|
|
42
|
-
|
|
43
|
-
7. **Hand off to Verifier when done**
|
|
44
|
-
|
|
45
|
-
## My Rules
|
|
46
|
-
|
|
47
|
-
- **Never skip tests** — if a plan says "write tests", tests are written before moving to the next step
|
|
48
|
-
- **Never improvise architecture** — if the plan is unclear, ask before implementing
|
|
49
|
-
- **Follow conventions exactly** — refer to `.planning/codebase/CONVENTIONS.md` on every new file
|
|
50
|
-
- **Atomic commits** — one commit per completed plan, not per file
|
|
51
|
-
- **If I hit a blocker** — document it in `.planning/STATE.md`, save state, and surface it to you
|
|
52
|
-
|
|
53
|
-
## Jira Integration
|
|
54
|
-
|
|
55
|
-
When executing work tied to Jira tickets, I:
|
|
56
|
-
|
|
57
|
-
- **Read ticket details** with `mcp_jira_jira_get_issue` for acceptance criteria and context
|
|
58
|
-
- **Comment progress** with `mcp_jira_jira_add_comment` after completing significant steps
|
|
59
|
-
- **Transition tickets** with `mcp_jira_jira_transition_issue` (e.g., To Do → In Progress → In Review)
|
|
60
|
-
- Reference Jira ticket IDs in commit messages: `feat(PROJ-123): implement user auth flow`
|
|
61
|
-
|
|
62
|
-
## Trigger Phrases
|
|
63
|
-
|
|
64
|
-
"Execute phase [N]", "Implement the plan", "Build [feature] from the plan", "Continue implementing"
|
|
65
|
-
|
|
66
|
-
## Corporate Context (Geppetto MCP)
|
|
67
|
-
|
|
68
|
-
When implementing with corporate frameworks, APIs, or services, use the Geppetto MCP tools to look up Inditex-specific patterns:
|
|
69
|
-
|
|
70
|
-
- **`mcp_geppetto_generic_search`** — Search all Inditex technical documentation (best general-purpose fallback)
|
|
71
|
-
- **`mcp_geppetto_api_search`** — Search Inditex API best practices, guidelines, and REST API specifications
|
|
72
|
-
|
|
73
|
-
Use these tools when:
|
|
74
|
-
- Implementing against AMIGA framework patterns (Java, Node, Python, Go, Web)
|
|
75
|
-
- Calling or building corporate REST APIs
|
|
76
|
-
- Setting up CI/CD pipelines, Dockerfiles, or infrastructure config
|
|
77
|
-
- Implementing authorization flows (Heimdal) or other internal service integrations
|
|
78
|
-
|
|
79
|
-
## Reference Documents
|
|
80
|
-
|
|
81
|
-
- [.planning/codebase/CONVENTIONS.md](../../../.planning/codebase/CONVENTIONS.md) — coding standards
|
|
82
|
-
- [.planning/codebase/STRUCTURE.md](../../../.planning/codebase/STRUCTURE.md) — file placement
|
|
83
|
-
- [.planning/codebase/CONCERNS.md](../../../.planning/codebase/CONCERNS.md) — fragile areas
|
|
84
|
-
- [.planning/codebase/TESTING.md](../../../.planning/codebase/TESTING.md) — test patterns
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Planner
|
|
3
|
-
description: Plans implementation phases — reads requirements and codebase context to produce executable step-by-step plans. Use me before starting new work.
|
|
4
|
-
tools:
|
|
5
|
-
- editFiles
|
|
6
|
-
- search
|
|
7
|
-
- geppetto/*
|
|
8
|
-
- geppetto-api/*
|
|
9
|
-
- jira/*
|
|
10
|
-
model: Claude Opus 4.6
|
|
11
|
-
handoffs:
|
|
12
|
-
- label: Start Executing
|
|
13
|
-
agent: Executor
|
|
14
|
-
prompt: "The plan is ready. Please execute the phase plan just created, following the steps in .planning/phases/ and the conventions in .planning/codebase/CONVENTIONS.md."
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
# Planner Agent
|
|
18
|
-
|
|
19
|
-
I am a planning specialist. My job is to analyze requirements (from Jira, roadmaps, or user input), study the codebase, and produce concrete, executable plans. **I write plan documents but never implementation code.**
|
|
20
|
-
|
|
21
|
-
## My Capabilities
|
|
22
|
-
|
|
23
|
-
- **Write plan files** to `.planning/phases/` and update `.planning/ROADMAP.md`, `.planning/STATE.md`
|
|
24
|
-
- **Read Jira tickets** to pull requirements, sprint items, and acceptance criteria
|
|
25
|
-
- **Search the codebase** to understand existing patterns and architecture
|
|
26
|
-
- **Search corporate docs** (Geppetto) for framework and API context
|
|
27
|
-
- I hand off to the Executor agent when a plan is ready
|
|
28
|
-
|
|
29
|
-
## How I Work
|
|
30
|
-
|
|
31
|
-
When you ask me to plan a phase, I will:
|
|
32
|
-
|
|
33
|
-
1. **Gather requirements from the source of truth:**
|
|
34
|
-
- If a Jira project/sprint is configured: pull tickets with `mcp_jira_jira_search` or `mcp_jira_jira_get_sprint_issues`
|
|
35
|
-
- If `.planning/REQUIREMENTS.md` exists: load requirement IDs and descriptions
|
|
36
|
-
- If neither: ask the user for requirements
|
|
37
|
-
|
|
38
|
-
2. **Read project context:** Load `.planning/ROADMAP.md`, `.planning/PROJECT.md`, and relevant codebase docs from `.planning/codebase/`
|
|
39
|
-
|
|
40
|
-
3. **Explore the code:** Search for existing patterns, find files that will need modification, understand the current architecture
|
|
41
|
-
|
|
42
|
-
4. **Ask clarifying questions** (if needed): Ambiguous requirements, tradeoffs, or scope boundaries
|
|
43
|
-
|
|
44
|
-
5. **Write the plan:** Create detailed step-by-step plan files in `.planning/phases/[NN]-[phase-name]/` with exact file paths, function signatures, and success criteria
|
|
45
|
-
|
|
46
|
-
6. **Update tracking docs:** Update `.planning/ROADMAP.md` with the plan, link to Jira ticket IDs where applicable
|
|
47
|
-
|
|
48
|
-
7. **Hand off:** Offer to hand off to the Executor agent to implement
|
|
49
|
-
|
|
50
|
-
## Trigger Phrases
|
|
51
|
-
|
|
52
|
-
"Plan phase [N]", "Plan the next phase", "Plan from Jira [PROJ-123]", "Create a plan for [feature]"
|
|
53
|
-
|
|
54
|
-
## What a Good Plan Includes
|
|
55
|
-
|
|
56
|
-
- **Jira ticket references** (if applicable) — link each plan step to its source ticket
|
|
57
|
-
- Exact file paths for files to create and modify
|
|
58
|
-
- Function/method signatures and their contracts
|
|
59
|
-
- Data structures and API schemas
|
|
60
|
-
- Test cases to write (not just "add tests")
|
|
61
|
-
- Success criteria that are verifiable
|
|
62
|
-
|
|
63
|
-
## Jira Integration
|
|
64
|
-
|
|
65
|
-
When tasks come from Jira, I use these tools:
|
|
66
|
-
|
|
67
|
-
- **`mcp_jira_jira_search`** — Find tickets by JQL (e.g., `project = PROJ AND sprint in openSprints()`)
|
|
68
|
-
- **`mcp_jira_jira_get_issue`** — Get full ticket details, acceptance criteria, and description
|
|
69
|
-
- **`mcp_jira_jira_get_sprint_issues`** — Get all issues in the current sprint
|
|
70
|
-
- **`mcp_jira_jira_get_project_issues`** — Get all issues in a project
|
|
71
|
-
- **`mcp_jira_jira_get_agile_boards`** — Find boards by project or name
|
|
72
|
-
- **`mcp_jira_jira_get_sprints_from_board`** — Find active/future sprints
|
|
73
|
-
|
|
74
|
-
I map Jira tickets to plan phases: each ticket (or group of related tickets) becomes a phase with clear steps.
|
|
75
|
-
|
|
76
|
-
## Corporate Context (Geppetto MCP)
|
|
77
|
-
|
|
78
|
-
When planning involves corporate frameworks, APIs, or services, use the Geppetto MCP tools to search Inditex documentation:
|
|
79
|
-
|
|
80
|
-
- **`mcp_geppetto_generic_search`** — Search all Inditex technical documentation (best general-purpose fallback)
|
|
81
|
-
- **`mcp_geppetto_api_search`** — Search Inditex API best practices, guidelines, and REST API specifications
|
|
82
|
-
|
|
83
|
-
Use these tools when:
|
|
84
|
-
- The project uses AMIGA frameworks (Java, Node, Python, Go, Web)
|
|
85
|
-
- You need to understand corporate API contracts or conventions
|
|
86
|
-
- Planning integration with internal Inditex services
|
|
87
|
-
- Researching corporate CI/CD, authorization (Heimdal), or infrastructure patterns
|
|
88
|
-
|
|
89
|
-
## Reference Documents
|
|
90
|
-
|
|
91
|
-
Always load relevant docs before planning:
|
|
92
|
-
- [.planning/PROJECT.md](../../../.planning/PROJECT.md) — requirements and constraints
|
|
93
|
-
- [.planning/REQUIREMENTS.md](../../../.planning/REQUIREMENTS.md) — requirement IDs
|
|
94
|
-
- [.planning/ROADMAP.md](../../../.planning/ROADMAP.md) — phase structure
|
|
95
|
-
- [.planning/codebase/ARCHITECTURE.md](../../../.planning/codebase/ARCHITECTURE.md) — layer design
|
|
96
|
-
- [.planning/codebase/STRUCTURE.md](../../../.planning/codebase/STRUCTURE.md) — where files go
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_comment": "Copilot Hooks — Preview feature (VS Code 1.109.3+). See: https://code.visualstudio.com/docs/copilot/chat/chat-hooks",
|
|
3
|
-
"_note": "SessionStart hook: Reads .planning/STATE.md and .planning/continue-here.md at session start and injects them as additional context. Every new chat session immediately knows where you left off.",
|
|
4
|
-
"hooks": [
|
|
5
|
-
{
|
|
6
|
-
"event": "SessionStart",
|
|
7
|
-
"command": "node .github/copilot-context/hooks/inject-context.js",
|
|
8
|
-
"description": "Inject project state and session continuity context at session start"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Copilot SessionStart Hook — Context Injector
|
|
4
|
-
*
|
|
5
|
-
* Reads .planning/STATE.md and .planning/continue-here.md, then outputs
|
|
6
|
-
* additionalContext JSON for Copilot to inject at session start.
|
|
7
|
-
*
|
|
8
|
-
* This ensures every new chat session automatically knows where you left off.
|
|
9
|
-
*
|
|
10
|
-
* Protocol: Read JSON from stdin, write JSON to stdout.
|
|
11
|
-
* See: https://code.visualstudio.com/docs/copilot/chat/chat-hooks
|
|
12
|
-
*
|
|
13
|
-
* Usage: Configured in .github/copilot-context/hooks/hooks.json as a SessionStart event hook.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
const fs = require('fs');
|
|
17
|
-
const path = require('path');
|
|
18
|
-
|
|
19
|
-
// Read hook input from stdin (Copilot passes session info here)
|
|
20
|
-
let stdin = '';
|
|
21
|
-
process.stdin.on('data', (chunk) => { stdin += chunk; });
|
|
22
|
-
|
|
23
|
-
process.stdin.on('end', () => {
|
|
24
|
-
const workspaceRoot = resolveWorkspaceRoot();
|
|
25
|
-
const contextParts = [];
|
|
26
|
-
|
|
27
|
-
// Load STATE.md
|
|
28
|
-
const statePath = path.join(workspaceRoot, '.planning', 'STATE.md');
|
|
29
|
-
if (fs.existsSync(statePath)) {
|
|
30
|
-
const content = fs.readFileSync(statePath, 'utf8');
|
|
31
|
-
// Extract just the essential sections (avoid dumping the whole file)
|
|
32
|
-
const essential = extractEssentialState(content);
|
|
33
|
-
if (essential) {
|
|
34
|
-
contextParts.push(`## Project State\n\n${essential}`);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Load continue-here.md if it exists (session resumption)
|
|
39
|
-
const continuePath = path.join(workspaceRoot, '.planning', 'continue-here.md');
|
|
40
|
-
if (fs.existsSync(continuePath)) {
|
|
41
|
-
const content = fs.readFileSync(continuePath, 'utf8');
|
|
42
|
-
contextParts.push(`## Resume Context\n\n${content}`);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if (contextParts.length === 0) {
|
|
46
|
-
// No context to inject — exit cleanly without output
|
|
47
|
-
process.exit(0);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Output additionalContext for Copilot to inject
|
|
51
|
-
const output = {
|
|
52
|
-
additionalContext: contextParts.join('\n\n---\n\n')
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
process.stdout.write(JSON.stringify(output));
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Extract essential sections from STATE.md to avoid injecting the whole file.
|
|
60
|
-
* Gets: core value, current position, last activity, next action.
|
|
61
|
-
*/
|
|
62
|
-
function extractEssentialState(content) {
|
|
63
|
-
const lines = content.split('\n');
|
|
64
|
-
const essential = [];
|
|
65
|
-
let inRelevantSection = false;
|
|
66
|
-
let sectionDepth = 0;
|
|
67
|
-
|
|
68
|
-
for (const line of lines) {
|
|
69
|
-
// Always include core value and current position lines
|
|
70
|
-
if (
|
|
71
|
-
line.includes('Core value:') ||
|
|
72
|
-
line.includes('Current focus:') ||
|
|
73
|
-
line.includes('Phase:') ||
|
|
74
|
-
line.includes('Status:') ||
|
|
75
|
-
line.includes('Last activity:') ||
|
|
76
|
-
line.includes('Next action:') ||
|
|
77
|
-
line.includes('Progress:')
|
|
78
|
-
) {
|
|
79
|
-
essential.push(line);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return essential.join('\n').trim();
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Resolve workspace root — walk up from script location until we find .planning/
|
|
88
|
-
*/
|
|
89
|
-
function resolveWorkspaceRoot() {
|
|
90
|
-
// Try to get from stdin (Copilot may pass workspace info)
|
|
91
|
-
try {
|
|
92
|
-
const input = JSON.parse(stdin || '{}');
|
|
93
|
-
if (input.workspaceFolder) return input.workspaceFolder;
|
|
94
|
-
} catch {}
|
|
95
|
-
|
|
96
|
-
// Walk up from script directory
|
|
97
|
-
let dir = __dirname;
|
|
98
|
-
for (let i = 0; i < 5; i++) {
|
|
99
|
-
if (fs.existsSync(path.join(dir, '.planning'))) return dir;
|
|
100
|
-
const parent = path.dirname(dir);
|
|
101
|
-
if (parent === dir) break;
|
|
102
|
-
dir = parent;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// Fallback to cwd
|
|
106
|
-
return process.cwd();
|
|
107
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: System Architecture
|
|
3
|
-
description: System architecture, layer organization, data flow, and component boundaries for backend, API, and refactoring work
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# System Architecture
|
|
7
|
-
|
|
8
|
-
> Full architecture reference: [.planning/codebase/ARCHITECTURE.md](../../../.planning/codebase/ARCHITECTURE.md)
|
|
9
|
-
>
|
|
10
|
-
> Read this document when: designing new features, deciding where logic belongs, refactoring, or resolving layer violations.
|
|
11
|
-
|
|
12
|
-
## Core Principle
|
|
13
|
-
|
|
14
|
-
Code belongs in the correct layer. Moving logic between layers is a refactoring task, not a shortcut.
|
|
15
|
-
|
|
16
|
-
## Layer Summary
|
|
17
|
-
|
|
18
|
-
Read `.planning/codebase/ARCHITECTURE.md` for the full diagram and data flow examples. Key rules:
|
|
19
|
-
|
|
20
|
-
- **Routes/Controllers:** parse input, validate, delegate to service — no business logic here
|
|
21
|
-
- **Services:** all business logic lives here — no direct DB calls, no HTTP knowledge
|
|
22
|
-
- **Repositories:** all database access here — raw queries or ORM calls only, no business logic
|
|
23
|
-
- **Middleware:** cross-cutting concerns (auth, logging, error handling) — applied at application level
|
|
24
|
-
- **Models:** data shapes and ORM definitions — no behavior
|
|
25
|
-
|
|
26
|
-
## Decision Guide
|
|
27
|
-
|
|
28
|
-
| Question | Answer in |
|
|
29
|
-
|----------|-----------|
|
|
30
|
-
| Where does this request flow? | `.planning/codebase/ARCHITECTURE.md` → Data Flow |
|
|
31
|
-
| What layer handles this logic? | `.planning/codebase/ARCHITECTURE.md` → Layers |
|
|
32
|
-
| What are the entry points? | `.planning/codebase/ARCHITECTURE.md` → Entry Points |
|
|
33
|
-
| How are errors propagated? | `.planning/codebase/ARCHITECTURE.md` → Cross-Cutting Concerns |
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Technical Concerns
|
|
3
|
-
description: Technical debt, known bugs, fragile code areas, security considerations, and areas to approach with caution
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Technical Concerns
|
|
7
|
-
|
|
8
|
-
> Full concerns reference: [.planning/codebase/CONCERNS.md](../../../.planning/codebase/CONCERNS.md)
|
|
9
|
-
>
|
|
10
|
-
> Read this document when: refactoring, touching legacy code, working near known fragile areas, or doing security-sensitive work.
|
|
11
|
-
|
|
12
|
-
## Core Rule
|
|
13
|
-
|
|
14
|
-
**Before modifying code in a warning area, check `.planning/codebase/CONCERNS.md`.** Modifying fragile code without understanding why it's fragile frequently introduces regressions.
|
|
15
|
-
|
|
16
|
-
## Quick Guide
|
|
17
|
-
|
|
18
|
-
Read `.planning/codebase/CONCERNS.md` for:
|
|
19
|
-
- **Critical issues:** Active bugs or broken functionality — don't make them worse
|
|
20
|
-
- **High-priority debt:** Significant friction or risk areas worth knowing about
|
|
21
|
-
- **Fragile areas table:** Specific files that are risky to modify and HOW to proceed safely
|
|
22
|
-
- **Security notes:** Known vulnerabilities, applied mitigations, what not to bypass
|
|
23
|
-
- **Performance bottlenecks:** Known slow paths and their workarounds
|
|
24
|
-
|
|
25
|
-
## Rules
|
|
26
|
-
|
|
27
|
-
- After fixing a known issue, **remove it from CONCERNS.md** or mark it resolved
|
|
28
|
-
- After discovering a new issue, **add it to CONCERNS.md** — don't leave land mines undocumented
|
|
29
|
-
- When a fix is deferred, add a `// TODO(issue-ref):` comment at the affected location
|
|
30
|
-
- **Never introduce new `any` types, disable linting rules, or skip test coverage** without documenting the reason in CONCERNS.md
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Coding Conventions
|
|
3
|
-
description: Coding style, naming conventions, error handling, and formatting standards for this codebase
|
|
4
|
-
applyTo: "**/*.{ts,tsx,js,jsx,mts,cts}"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Coding Conventions
|
|
8
|
-
|
|
9
|
-
> Full conventions reference: [.planning/codebase/CONVENTIONS.md](../../../.planning/codebase/CONVENTIONS.md)
|
|
10
|
-
>
|
|
11
|
-
> **This file is auto-loaded when you edit source files. Always follow these patterns.**
|
|
12
|
-
> When in doubt, look at existing files in the codebase and match their style.
|
|
13
|
-
|
|
14
|
-
## Quick Reference
|
|
15
|
-
|
|
16
|
-
Read `.planning/codebase/CONVENTIONS.md` for the full guide. Key rules:
|
|
17
|
-
|
|
18
|
-
- **Naming:** variables/functions = `camelCase`, classes = `PascalCase`, constants = `SCREAMING_SNAKE_CASE`, files = `kebab-case.ts`
|
|
19
|
-
- **Imports:** built-ins → external packages → internal (`@/`) → relative — always in this order
|
|
20
|
-
- **Error handling:** never swallow errors silently; use custom error classes; let `src/middleware/error.ts` handle HTTP errors
|
|
21
|
-
- **Functions:** single responsibility; max ~50 lines; prefer early returns over deep nesting; always annotate return types
|
|
22
|
-
- **Comments:** explain WHY not WHAT; JSDoc on all exported functions; include ticket ref in TODO comments
|
|
23
|
-
- **No `any`:** use `unknown` + type guards instead; strict TypeScript throughout
|
|
24
|
-
|
|
25
|
-
When writing new code, always check `.planning/codebase/CONVENTIONS.md` to confirm you're matching the exact patterns established in this codebase.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: External Integrations
|
|
3
|
-
description: External API integrations, third-party services, SDK usage patterns, and service configuration
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# External Integrations
|
|
7
|
-
|
|
8
|
-
> Full integrations reference: [.planning/codebase/INTEGRATIONS.md](../../../.planning/codebase/INTEGRATIONS.md)
|
|
9
|
-
>
|
|
10
|
-
> Read this document when: touching external service code, adding a new integration, debugging third-party API issues, or handling webhooks.
|
|
11
|
-
|
|
12
|
-
## Core Rule
|
|
13
|
-
|
|
14
|
-
**Before writing code that touches an external service, read the relevant section in `.planning/codebase/INTEGRATIONS.md`.** It documents which SDK is used, where the client is initialized, how errors are handled, and which environment variables are required.
|
|
15
|
-
|
|
16
|
-
## Quick Guide
|
|
17
|
-
|
|
18
|
-
Read `.planning/codebase/INTEGRATIONS.md` for:
|
|
19
|
-
- **Database:** ORM/client used, connection config location, migration commands
|
|
20
|
-
- **Authentication:** Provider, middleware location, how user identity is propagated
|
|
21
|
-
- **Payment / billing:** SDK, webhook handling location, key operations
|
|
22
|
-
- **Email:** Provider, template locations, key send operations
|
|
23
|
-
- **CI/CD:** Pipeline config, what triggers what
|
|
24
|
-
|
|
25
|
-
## Rules
|
|
26
|
-
|
|
27
|
-
- **Client singletons:** never create a new SDK client instance inside a function — use the initialized instance from `src/config/`
|
|
28
|
-
- **Environment variables:** required vars for each service are documented in INTEGRATIONS.md — ensure they're in `.env.example`
|
|
29
|
-
- **Webhook security:** always verify webhook signatures; never trust payload without verification
|
|
30
|
-
- New integrations: add the service to INTEGRATIONS.md with its SDK, config location, and env vars before implementing
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Technology Stack
|
|
3
|
-
description: Technology stack, framework choices, key dependencies, runtime environment, and configuration
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Technology Stack
|
|
7
|
-
|
|
8
|
-
> Full stack reference: [.planning/codebase/STACK.md](../../../.planning/codebase/STACK.md)
|
|
9
|
-
>
|
|
10
|
-
> Read this document when: adding dependencies, modifying configuration, setting up environments, or debugging infrastructure issues.
|
|
11
|
-
|
|
12
|
-
## Core Rule
|
|
13
|
-
|
|
14
|
-
**Do not introduce new dependencies or change the build configuration without first checking `.planning/codebase/STACK.md`.** The stack is intentional — changes to core dependencies have broad impact.
|
|
15
|
-
|
|
16
|
-
## Quick Guide
|
|
17
|
-
|
|
18
|
-
Read `.planning/codebase/STACK.md` for:
|
|
19
|
-
- **Runtime:** Language version, Node.js version, package manager
|
|
20
|
-
- **Key frameworks:** Web framework, ORM, auth library — and how they're configured
|
|
21
|
-
- **Dev toolchain:** TypeScript config, ESLint, Prettier, test runner setup
|
|
22
|
-
- **Infrastructure:** Database, cache, object storage, message queue details
|
|
23
|
-
- **Environment variables:** Full list of required env vars and their purpose
|
|
24
|
-
|
|
25
|
-
## Rules
|
|
26
|
-
|
|
27
|
-
- Always check if a required capability already exists in the stack before adding a new package
|
|
28
|
-
- New dependencies: add to the appropriate section in STACK.md after installation
|
|
29
|
-
- Breaking upgrades: document the upgrade decision in `.planning/PROJECT.md` Key Decisions
|
|
30
|
-
- **Never read `.env` file contents** — work only with `.env.example` and environment variable names
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: File Structure
|
|
3
|
-
description: File and directory organization, naming conventions, and where to place new code, components, routes, or modules
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# File Structure
|
|
7
|
-
|
|
8
|
-
> Full structure reference: [.planning/codebase/STRUCTURE.md](../../../.planning/codebase/STRUCTURE.md)
|
|
9
|
-
>
|
|
10
|
-
> Read this document when: creating new files, deciding on location for new code, or setting up new modules.
|
|
11
|
-
|
|
12
|
-
## Core Rule
|
|
13
|
-
|
|
14
|
-
**Always check `.planning/codebase/STRUCTURE.md` before creating a new file.** It contains a "Where to Put New Code" table that answers exactly where each type of file belongs and what naming convention to use.
|
|
15
|
-
|
|
16
|
-
## Quick Guide
|
|
17
|
-
|
|
18
|
-
| I'm creating... | Check STRUCTURE.md section |
|
|
19
|
-
|----------------|---------------------------|
|
|
20
|
-
| A new API endpoint | "Where to Put New Code" → routes row |
|
|
21
|
-
| A new service | "Where to Put New Code" → services row |
|
|
22
|
-
| A new component | "Where to Put New Code" → components row |
|
|
23
|
-
| A test for existing code | Mirror the source path in the `tests/` directory |
|
|
24
|
-
| A new database model | "Where to Put New Code" → models row |
|
|
25
|
-
| A utility function | "Where to Put New Code" → utilities row |
|
|
26
|
-
|
|
27
|
-
## Rules
|
|
28
|
-
|
|
29
|
-
- **Never create files at the root of `src/`** — always find the correct subdirectory
|
|
30
|
-
- **Follow the naming convention exactly** as specified in STRUCTURE.md for each file type
|
|
31
|
-
- **Use barrel exports (`index.ts`)** where the pattern exists — don't skip them for convenience
|
|
32
|
-
- When creating a feature that spans multiple layers (route + service + repository), create all files before wiring them together
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Testing Patterns
|
|
3
|
-
description: Test framework, patterns, mocking strategy, and test organization for writing and running tests
|
|
4
|
-
applyTo: "**/*.{test,spec}.{ts,tsx,js,jsx}"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Testing Patterns
|
|
8
|
-
|
|
9
|
-
> Full testing reference: [.planning/codebase/TESTING.md](../../../.planning/codebase/TESTING.md)
|
|
10
|
-
>
|
|
11
|
-
> **This file is auto-loaded when you edit test files. Always follow these patterns.**
|
|
12
|
-
|
|
13
|
-
## Quick Reference
|
|
14
|
-
|
|
15
|
-
Read `.planning/codebase/TESTING.md` for the full guide. Key rules:
|
|
16
|
-
|
|
17
|
-
- **Structure:** `describe('[ClassName/Function]')` → `describe('[methodName()]')` → `it('[readable description of behavior]')`
|
|
18
|
-
- **Pattern:** Arrange-Act-Assert — comment each section if the test is non-trivial
|
|
19
|
-
- **Test data:** always use factory functions from `tests/helpers/factories.ts`, never hardcoded raw objects
|
|
20
|
-
- **Mocking:** mock at the outermost layer (repositories for service tests, network for integration tests); use `vi.mock()` / `jest.mock()`
|
|
21
|
-
- **Isolation:** each test must pass in isolation and in any order; no shared mutable state between tests
|
|
22
|
-
- **What to test:** business logic, API contract (status codes + response shape), error paths, edge cases
|
|
23
|
-
- **What NOT to test:** framework internals, private implementation details, trivial getters/setters
|
|
24
|
-
|
|
25
|
-
When writing a new test, check `.planning/codebase/TESTING.md` for the exact patterns used in this project, including how the test database is set up for integration tests.
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: map-codebase
|
|
3
|
-
description: Analyzes a codebase and generates 7 structured context documents in .planning/codebase/ — covering architecture, file structure, conventions, testing, tech stack, integrations, and technical concerns
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Codebase Mapper Skill
|
|
7
|
-
|
|
8
|
-
This skill analyzes your codebase and generates 7 structured context documents that Copilot uses on every future request to provide project-aware assistance.
|
|
9
|
-
|
|
10
|
-
## What This Skill Produces
|
|
11
|
-
|
|
12
|
-
| Document | Contents |
|
|
13
|
-
|----------|---------|
|
|
14
|
-
| `ARCHITECTURE.md` | Layers, data flow, key abstractions, entry points |
|
|
15
|
-
| `STRUCTURE.md` | Directory tree, "where to put new code" table, naming conventions |
|
|
16
|
-
| `STACK.md` | Runtime, frameworks, dependencies, infrastructure, env vars |
|
|
17
|
-
| `CONVENTIONS.md` | Coding style, naming, error handling, TypeScript rules |
|
|
18
|
-
| `TESTING.md` | Test framework, patterns, mocking strategy, run commands |
|
|
19
|
-
| `INTEGRATIONS.md` | External services, SDKs, connection patterns, webhook handling |
|
|
20
|
-
| `CONCERNS.md` | Tech debt, known bugs, fragile areas, security notes |
|
|
21
|
-
|
|
22
|
-
## When To Use This Skill
|
|
23
|
-
|
|
24
|
-
- When first setting up context for an existing codebase
|
|
25
|
-
- After a major architectural change
|
|
26
|
-
- When onboarding a new project or team member
|
|
27
|
-
- When context documents feel stale (> 1 month since major changes)
|
|
28
|
-
|
|
29
|
-
## Incremental Refresh
|
|
30
|
-
|
|
31
|
-
To refresh only specific documents, specify the focus area:
|
|
32
|
-
- "Refresh just the conventions" → re-run quality focus
|
|
33
|
-
- "Update the tech stack docs" → re-run tech focus
|
|
34
|
-
- "Check for new concerns" → re-run concerns focus
|
|
35
|
-
|
|
36
|
-
## Related
|
|
37
|
-
|
|
38
|
-
Run corresponding prompt file: `/map-codebase`
|
|
39
|
-
|
|
40
|
-
## Resources
|
|
41
|
-
|
|
42
|
-
- [Analysis prompt template](.github/copilot-context/prompts/map-codebase.prompt.md)
|
|
43
|
-
- [Architecture template](.planning/codebase/ARCHITECTURE.md)
|
|
44
|
-
- [Structure template](.planning/codebase/STRUCTURE.md)
|
|
45
|
-
- [Stack template](.planning/codebase/STACK.md)
|
|
46
|
-
- [Conventions template](.planning/codebase/CONVENTIONS.md)
|
|
47
|
-
- [Testing template](.planning/codebase/TESTING.md)
|
|
48
|
-
- [Integrations template](.planning/codebase/INTEGRATIONS.md)
|
|
49
|
-
- [Concerns template](.planning/codebase/CONCERNS.md)
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: project-history
|
|
3
|
-
description: Accesses historical project context — phase summaries, decisions, retrospectives, and archived milestones. Use when you need to understand past decisions or trace why something was built a certain way.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Project History Skill
|
|
7
|
-
|
|
8
|
-
This skill provides access to historical project context — understanding past decisions, reviewing what was built in previous phases, and tracing the rationale behind architectural choices.
|
|
9
|
-
|
|
10
|
-
## What's Available
|
|
11
|
-
|
|
12
|
-
| Resource | Location | Contents |
|
|
13
|
-
|----------|----------|---------|
|
|
14
|
-
| Phase summaries | `.planning/phases/[NN]-[name]/*.SUMMARY.md` | What was implemented, files changed, decisions made |
|
|
15
|
-
| Verification reports | `.planning/phases/[NN]-[name]/VERIFICATION.md` | Test results, requirement coverage per phase |
|
|
16
|
-
| Key decisions | `.planning/PROJECT.md` → Key Decisions table | All major decisions with rationale |
|
|
17
|
-
| Milestone archives | `.planning/milestones/` (if exists) | Completed milestone documentation |
|
|
18
|
-
| Session logs | `.planning/phases/[NN]-[name]/.continue-here.md` | Saved session states |
|
|
19
|
-
|
|
20
|
-
## When To Use This Skill
|
|
21
|
-
|
|
22
|
-
- "Why was [X] implemented this way?"
|
|
23
|
-
- "What changed in Phase [N]?"
|
|
24
|
-
- "When was [feature] added?"
|
|
25
|
-
- "Did we consider [alternative approach]?"
|
|
26
|
-
- "What decisions locked in this constraint?"
|
|
27
|
-
|
|
28
|
-
## Usage Examples
|
|
29
|
-
|
|
30
|
-
**Trace a decision:**
|
|
31
|
-
"Show me all architectural decisions made in Phase 1-3"
|
|
32
|
-
→ I'll read the SUMMARY.md files and PROJECT.md Key Decisions table
|
|
33
|
-
|
|
34
|
-
**Understand past work:**
|
|
35
|
-
"What did we implement in Phase 2?"
|
|
36
|
-
→ I'll read `.planning/phases/02-name/*.SUMMARY.md`
|
|
37
|
-
|
|
38
|
-
**Check test history:**
|
|
39
|
-
"What was the test coverage when we finished Phase 1?"
|
|
40
|
-
→ I'll read `.planning/phases/01-name/VERIFICATION.md`
|
|
41
|
-
|
|
42
|
-
## Resources
|
|
43
|
-
|
|
44
|
-
- [Project decisions](.planning/PROJECT.md)
|
|
45
|
-
- [Current state](.planning/STATE.md)
|
|
46
|
-
- [Full roadmap](.planning/ROADMAP.md)
|
package/.vscode/settings.json
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// GSD Copilot Context — files live in VS Code's default scan locations,
|
|
3
|
-
// no custom configuration required.
|
|
4
|
-
//
|
|
5
|
-
// .github/prompts/ → slash commands (/map-codebase, /plan-phase, etc.)
|
|
6
|
-
// .github/instructions/ → conditional context injected by Copilot
|
|
7
|
-
// .github/agents/ → multi-step agents (planner, executor, verifier)
|
|
8
|
-
// .github/copilot-instructions.md → always-on project digest
|
|
9
|
-
}
|