@dedesfr/prompter 0.8.23 β 1.0.0
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 +70 -0
- package/README.md +105 -77
- package/dist/cli/index.js +25 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +1 -7
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +60 -299
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/login.d.ts +4 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +56 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +4 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +14 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +31 -41
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/whoami.d.ts +4 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +42 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/core/auth-store.d.ts +10 -0
- package/dist/core/auth-store.d.ts.map +1 -0
- package/dist/core/auth-store.js +39 -0
- package/dist/core/auth-store.js.map +1 -0
- package/dist/core/configurators/slash/antigravity.d.ts +2 -5
- package/dist/core/configurators/slash/antigravity.d.ts.map +1 -1
- package/dist/core/configurators/slash/antigravity.js +2 -57
- package/dist/core/configurators/slash/antigravity.js.map +1 -1
- package/dist/core/configurators/slash/base.d.ts +6 -18
- package/dist/core/configurators/slash/base.d.ts.map +1 -1
- package/dist/core/configurators/slash/base.js +8 -77
- package/dist/core/configurators/slash/base.js.map +1 -1
- package/dist/core/configurators/slash/claude.d.ts +2 -5
- package/dist/core/configurators/slash/claude.d.ts.map +1 -1
- package/dist/core/configurators/slash/claude.js +2 -57
- package/dist/core/configurators/slash/claude.js.map +1 -1
- package/dist/core/configurators/slash/codex.d.ts +2 -5
- package/dist/core/configurators/slash/codex.d.ts.map +1 -1
- package/dist/core/configurators/slash/codex.js +2 -57
- package/dist/core/configurators/slash/codex.js.map +1 -1
- package/dist/core/configurators/slash/droid.d.ts +2 -5
- package/dist/core/configurators/slash/droid.d.ts.map +1 -1
- package/dist/core/configurators/slash/droid.js +2 -32
- package/dist/core/configurators/slash/droid.js.map +1 -1
- package/dist/core/configurators/slash/forge.d.ts +2 -5
- package/dist/core/configurators/slash/forge.d.ts.map +1 -1
- package/dist/core/configurators/slash/forge.js +2 -32
- package/dist/core/configurators/slash/forge.js.map +1 -1
- package/dist/core/configurators/slash/github-copilot.d.ts +2 -7
- package/dist/core/configurators/slash/github-copilot.d.ts.map +1 -1
- package/dist/core/configurators/slash/github-copilot.js +2 -96
- package/dist/core/configurators/slash/github-copilot.js.map +1 -1
- package/dist/core/configurators/slash/index.d.ts +1 -1
- package/dist/core/configurators/slash/index.d.ts.map +1 -1
- package/dist/core/configurators/slash/index.js +1 -1
- package/dist/core/configurators/slash/index.js.map +1 -1
- package/dist/core/configurators/slash/kilocode.d.ts +2 -5
- package/dist/core/configurators/slash/kilocode.d.ts.map +1 -1
- package/dist/core/configurators/slash/kilocode.js +2 -57
- package/dist/core/configurators/slash/kilocode.js.map +1 -1
- package/dist/core/configurators/slash/opencode.d.ts +2 -5
- package/dist/core/configurators/slash/opencode.d.ts.map +1 -1
- package/dist/core/configurators/slash/opencode.js +2 -57
- package/dist/core/configurators/slash/opencode.js.map +1 -1
- package/dist/core/configurators/slash/registry.d.ts +4 -4
- package/dist/core/configurators/slash/registry.d.ts.map +1 -1
- package/dist/core/configurators/slash/registry.js.map +1 -1
- package/dist/core/registry.d.ts +18 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +94 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/core/templates/index.d.ts +0 -1
- package/dist/core/templates/index.d.ts.map +1 -1
- package/dist/core/templates/index.js +0 -1
- package/dist/core/templates/index.js.map +1 -1
- package/package.json +7 -1
- package/AGENTS.md +0 -123
- package/CLAUDE.md +0 -17
- package/build.js +0 -20
- package/convex-setup.md +0 -403
- package/dist/core/templates/slash-command-templates.d.ts +0 -7
- package/dist/core/templates/slash-command-templates.d.ts.map +0 -1
- package/dist/core/templates/slash-command-templates.js +0 -1041
- package/dist/core/templates/slash-command-templates.js.map +0 -1
- package/prompt/ai-humanizer.md +0 -45
- package/prompt/api-contract-generator.md +0 -234
- package/prompt/apply.md +0 -17
- package/prompt/archive.md +0 -21
- package/prompt/design-system.md +0 -210
- package/prompt/document-explainer.md +0 -149
- package/prompt/epic-generator.md +0 -198
- package/prompt/epic-single.md +0 -47
- package/prompt/erd-generator.md +0 -130
- package/prompt/fsd-generator.md +0 -157
- package/prompt/prd-agent-generator.md +0 -147
- package/prompt/prd-generator.md +0 -195
- package/prompt/product-brief.md +0 -289
- package/prompt/proposal.md +0 -22
- package/prompt/qa-test-scenario.md +0 -133
- package/prompt/skill-creator.md +0 -350
- package/prompt/story-generator.md +0 -278
- package/prompt/story-single.md +0 -70
- package/prompt/tdd-generator.md +0 -294
- package/prompt/tdd-lite-generator.md +0 -224
- package/prompt/wireframe-generator.md +0 -219
- package/skills/ai-context-generator/SKILL.md +0 -54
- package/skills/ai-context-generator/references/AGENTS.template.md +0 -83
- package/skills/ai-context-generator/references/CLAUDE.template.md +0 -39
- package/skills/ai-context-generator/references/behavioral-guidelines.md +0 -71
- package/skills/ai-context-generator/references/discovery-checklist.md +0 -40
- package/skills/ai-context-generator/references/examples/AGENTS.good.md +0 -103
- package/skills/ai-context-generator/references/extraction-checklist.md +0 -23
- package/skills/ai-context-generator/references/overlays/laravel.md +0 -44
- package/skills/cerebro/SKILL.md +0 -187
- package/skills/cerebro/references/agents.md +0 -213
- package/skills/code-review/SKILL.md +0 -373
- package/skills/code-review/assets/report-template-agent.md +0 -212
- package/skills/code-review/assets/report-template-compact.md +0 -81
- package/skills/code-review/assets/report-template-full.md +0 -264
- package/skills/code-review/assets/report-template-human.md +0 -168
- package/skills/code-review/references/universal-patterns.md +0 -495
- package/skills/design-md/README.md +0 -34
- package/skills/design-md/SKILL.md +0 -172
- package/skills/design-md/examples/DESIGN.md +0 -154
- package/skills/design-system-generator/SKILL.md +0 -324
- package/skills/design-system-generator/assets/design-system-template.md +0 -348
- package/skills/design-system-generator/references/extraction-patterns.md +0 -321
- package/skills/doc-builder/SKILL.md +0 -115
- package/skills/doc-builder/references/ui-patterns.md +0 -394
- package/skills/document-translator/SKILL.md +0 -58
- package/skills/enhance-prompt/README.md +0 -34
- package/skills/enhance-prompt/SKILL.md +0 -204
- package/skills/enhance-prompt/references/KEYWORDS.md +0 -114
- package/skills/feature-planner/SKILL.md +0 -305
- package/skills/feature-planner/assets/implementation-plan-template.md +0 -85
- package/skills/frontend-design/LICENSE.txt +0 -177
- package/skills/frontend-design/SKILL.md +0 -42
- package/skills/gamma-builder/SKILL.md +0 -134
- package/skills/laravel-code-review/SKILL.md +0 -383
- package/skills/laravel-code-review/assets/report-template-agent.md +0 -195
- package/skills/laravel-code-review/assets/report-template-compact.md +0 -79
- package/skills/laravel-code-review/assets/report-template-full.md +0 -253
- package/skills/laravel-code-review/assets/report-template-human.md +0 -159
- package/skills/laravel-code-review/references/laravel-patterns.md +0 -571
- package/skills/laravel-code-review/references/php84-features.md +0 -442
- package/skills/mcp-builder/LICENSE.txt +0 -202
- package/skills/mcp-builder/SKILL.md +0 -236
- package/skills/mcp-builder/reference/evaluation.md +0 -602
- package/skills/mcp-builder/reference/mcp_best_practices.md +0 -249
- package/skills/mcp-builder/reference/node_mcp_server.md +0 -970
- package/skills/mcp-builder/reference/python_mcp_server.md +0 -719
- package/skills/mcp-builder/scripts/connections.py +0 -151
- package/skills/mcp-builder/scripts/evaluation.py +0 -373
- package/skills/mcp-builder/scripts/example_evaluation.xml +0 -22
- package/skills/mcp-builder/scripts/requirements.txt +0 -2
- package/skills/meeting-notes/SKILL.md +0 -159
- package/skills/meeting-notes/evals/evals.json +0 -23
- package/skills/project-orchestrator/SKILL.md +0 -487
- package/skills/project-orchestrator/assets/caddy-vps-setup.md +0 -180
- package/skills/project-orchestrator/assets/plan-summary-template.md +0 -159
- package/skills/prompter-specs/SKILL.md +0 -115
- package/skills/prompter-workflow/SKILL.md +0 -166
- package/skills/prompter-workflow/evals/evals.json +0 -89
- package/skills/sph-generator/SKILL.md +0 -488
- package/skills/ui-ux-pro/SKILL.md +0 -199
- package/skills/ui-ux-pro/assets/design-spec-template.md +0 -173
- package/skills/ui-ux-pro/references/component-patterns.md +0 -255
- package/skills/ui-ux-pro/references/design-principles.md +0 -167
- package/src/cli/index.ts +0 -223
- package/src/commands/archive.ts +0 -302
- package/src/commands/change.ts +0 -292
- package/src/commands/config.ts +0 -233
- package/src/commands/guide.ts +0 -50
- package/src/commands/init.ts +0 -899
- package/src/commands/list.ts +0 -194
- package/src/commands/show.ts +0 -138
- package/src/commands/spec.ts +0 -251
- package/src/commands/update.ts +0 -156
- package/src/commands/upgrade.ts +0 -30
- package/src/commands/validate.ts +0 -326
- package/src/core/artifact-graph/graph.ts +0 -167
- package/src/core/artifact-graph/index.ts +0 -44
- package/src/core/artifact-graph/instruction-loader.ts +0 -302
- package/src/core/artifact-graph/resolver.ts +0 -226
- package/src/core/artifact-graph/schema.ts +0 -124
- package/src/core/artifact-graph/state.ts +0 -64
- package/src/core/artifact-graph/types.ts +0 -65
- package/src/core/completions/command-registry.ts +0 -382
- package/src/core/completions/completion-provider.ts +0 -128
- package/src/core/completions/generators/bash-generator.ts +0 -191
- package/src/core/completions/generators/fish-generator.ts +0 -188
- package/src/core/completions/generators/powershell-generator.ts +0 -223
- package/src/core/completions/generators/zsh-generator.ts +0 -281
- package/src/core/completions/templates/bash-templates.ts +0 -24
- package/src/core/completions/templates/fish-templates.ts +0 -40
- package/src/core/completions/templates/powershell-templates.ts +0 -25
- package/src/core/completions/templates/zsh-templates.ts +0 -36
- package/src/core/completions/types.ts +0 -90
- package/src/core/config-schema.ts +0 -230
- package/src/core/config.ts +0 -181
- package/src/core/configurators/slash/antigravity.ts +0 -70
- package/src/core/configurators/slash/base.ts +0 -203
- package/src/core/configurators/slash/claude.ts +0 -70
- package/src/core/configurators/slash/codex.ts +0 -70
- package/src/core/configurators/slash/droid.ts +0 -44
- package/src/core/configurators/slash/forge.ts +0 -44
- package/src/core/configurators/slash/github-copilot.ts +0 -114
- package/src/core/configurators/slash/index.ts +0 -10
- package/src/core/configurators/slash/kilocode.ts +0 -70
- package/src/core/configurators/slash/opencode.ts +0 -70
- package/src/core/configurators/slash/registry.ts +0 -51
- package/src/core/converters/json-converter.ts +0 -62
- package/src/core/global-config.ts +0 -136
- package/src/core/parsers/change-parser.ts +0 -234
- package/src/core/parsers/markdown-parser.ts +0 -237
- package/src/core/parsers/requirement-blocks.ts +0 -234
- package/src/core/prompt-templates.ts +0 -3504
- package/src/core/schemas/base.schema.ts +0 -20
- package/src/core/schemas/change.schema.ts +0 -42
- package/src/core/schemas/index.ts +0 -20
- package/src/core/schemas/spec.schema.ts +0 -17
- package/src/core/skill-discovery.ts +0 -68
- package/src/core/specs-apply.ts +0 -483
- package/src/core/styles/palette.ts +0 -8
- package/src/core/templates/agents-template.ts +0 -459
- package/src/core/templates/claude-template.ts +0 -2
- package/src/core/templates/index.ts +0 -4
- package/src/core/templates/project-template.ts +0 -32
- package/src/core/templates/slash-command-templates.ts +0 -1068
- package/src/core/validation/constants.ts +0 -48
- package/src/core/validation/types.ts +0 -19
- package/src/core/validation/validator.ts +0 -449
- package/src/core/view.ts +0 -219
- package/src/index.ts +0 -1
- package/src/utils/change-metadata.ts +0 -171
- package/src/utils/change-utils.ts +0 -131
- package/src/utils/file-system.ts +0 -252
- package/src/utils/index.ts +0 -12
- package/src/utils/interactive.ts +0 -29
- package/src/utils/item-discovery.ts +0 -66
- package/src/utils/match.ts +0 -26
- package/src/utils/shell-detection.ts +0 -62
- package/src/utils/task-progress.ts +0 -43
- package/tsconfig.json +0 -28
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kilocode.js","sourceRoot":"","sources":["../../../../src/core/configurators/slash/kilocode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"kilocode.js","sourceRoot":"","sources":["../../../../src/core/configurators/slash/kilocode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,OAAO,oBAAqB,SAAQ,gBAAgB;IAC7C,MAAM,GAAG,UAAU,CAAC;IACpB,WAAW,GAAG,IAAI,CAAC;IAElB,iBAAiB,CAAC,SAAiB;QACzC,OAAO,oBAAoB,SAAS,EAAE,CAAC;IAC3C,CAAC;CACJ"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare class OpenCodeConfigurator extends SlashCommandConfigurator {
|
|
1
|
+
import { ToolConfigurator } from './base.js';
|
|
2
|
+
export declare class OpenCodeConfigurator extends ToolConfigurator {
|
|
4
3
|
readonly toolId = "opencode";
|
|
5
4
|
readonly isAvailable = true;
|
|
6
|
-
protected getRelativePath(id: SlashCommandId): string;
|
|
7
|
-
protected getFrontmatter(id: SlashCommandId): string | undefined;
|
|
8
5
|
protected getSkillTargetDir(skillName: string): string;
|
|
9
6
|
}
|
|
10
7
|
//# sourceMappingURL=opencode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../../../src/core/configurators/slash/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../../../src/core/configurators/slash/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,qBAAa,oBAAqB,SAAQ,gBAAgB;IACtD,QAAQ,CAAC,MAAM,cAAc;IAC7B,QAAQ,CAAC,WAAW,QAAQ;IAE5B,SAAS,CAAC,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;CAGzD"}
|
|
@@ -1,62 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
enhance: '.opencode/command/prompter-enhance.md',
|
|
4
|
-
'prd-generator': '.opencode/command/prd-generator.md',
|
|
5
|
-
'prd-agent-generator': '.opencode/command/prd-agent-generator.md',
|
|
6
|
-
'product-brief': '.opencode/command/product-brief.md',
|
|
7
|
-
'epic-single': '.opencode/command/epic-single.md',
|
|
8
|
-
'epic-generator': '.opencode/command/epic-generator.md',
|
|
9
|
-
'story-single': '.opencode/command/story-single.md',
|
|
10
|
-
'story-generator': '.opencode/command/story-generator.md',
|
|
11
|
-
'qa-test-scenario': '.opencode/command/qa-test-scenario.md',
|
|
12
|
-
'skill-creator': '.opencode/command/skill-creator.md',
|
|
13
|
-
'ai-humanizer': '.opencode/command/ai-humanizer.md',
|
|
14
|
-
'api-contract-generator': '.opencode/command/api-contract-generator.md',
|
|
15
|
-
'apply': '.opencode/command/apply.md',
|
|
16
|
-
'archive': '.opencode/command/archive.md',
|
|
17
|
-
'design-system': '.opencode/command/design-system.md',
|
|
18
|
-
'erd-generator': '.opencode/command/erd-generator.md',
|
|
19
|
-
'fsd-generator': '.opencode/command/fsd-generator.md',
|
|
20
|
-
'proposal': '.opencode/command/proposal.md',
|
|
21
|
-
'tdd-generator': '.opencode/command/tdd-generator.md',
|
|
22
|
-
'tdd-lite-generator': '.opencode/command/tdd-lite-generator.md',
|
|
23
|
-
'wireframe-generator': '.opencode/command/wireframe-generator.md',
|
|
24
|
-
'document-explainer': '.opencode/command/document-explainer.md'
|
|
25
|
-
};
|
|
26
|
-
const DESCRIPTIONS = {
|
|
27
|
-
enhance: 'Enhance a rough prompt into a professional specification',
|
|
28
|
-
'prd-generator': 'Generate a comprehensive Product Requirements Document (PRD)',
|
|
29
|
-
'prd-agent-generator': 'Generate a PRD with autonomous assumptions (non-interactive mode)',
|
|
30
|
-
'product-brief': 'Generate an executive-level product brief (1-page summary)',
|
|
31
|
-
'epic-single': 'Generate a single well-defined Jira Epic',
|
|
32
|
-
'epic-generator': 'Generate a comprehensive set of EPICs from documentation',
|
|
33
|
-
'story-single': 'Generate a single Jira User Story from requirements',
|
|
34
|
-
'story-generator': 'Generate comprehensive user stories from EPICs and FSD',
|
|
35
|
-
'qa-test-scenario': 'Generate focused QA test scenarios from PRD',
|
|
36
|
-
'skill-creator': 'Create a modular skill package that extends AI agent capabilities',
|
|
37
|
-
'ai-humanizer': 'Humanize and proofread AI-generated content for natural, publication-ready output',
|
|
38
|
-
'api-contract-generator': 'Generate OpenAPI specification from FSD and ERD',
|
|
39
|
-
'apply': 'Implement and apply an approved change proposal',
|
|
40
|
-
'archive': 'Archive a completed change and update specs',
|
|
41
|
-
'design-system': 'Generate comprehensive design system documentation for components and tokens',
|
|
42
|
-
'erd-generator': 'Generate Entity Relationship Diagram from FSD',
|
|
43
|
-
'fsd-generator': 'Generate Functional Specification Document from PRD',
|
|
44
|
-
'proposal': 'Create a new change proposal with spec deltas',
|
|
45
|
-
'tdd-generator': 'Generate comprehensive Technical Design Document',
|
|
46
|
-
'tdd-lite-generator': 'Generate lean Technical Design Document (TDD-Lite)',
|
|
47
|
-
'wireframe-generator': 'Generate UI/UX wireframes from technical specs',
|
|
48
|
-
'document-explainer': 'Analyze and explain complex documents into clear, actionable insights'
|
|
49
|
-
};
|
|
50
|
-
export class OpenCodeConfigurator extends SlashCommandConfigurator {
|
|
1
|
+
import { ToolConfigurator } from './base.js';
|
|
2
|
+
export class OpenCodeConfigurator extends ToolConfigurator {
|
|
51
3
|
toolId = 'opencode';
|
|
52
4
|
isAvailable = true;
|
|
53
|
-
getRelativePath(id) {
|
|
54
|
-
return FILE_PATHS[id];
|
|
55
|
-
}
|
|
56
|
-
getFrontmatter(id) {
|
|
57
|
-
const description = DESCRIPTIONS[id];
|
|
58
|
-
return `---\nagent: build\ndescription: ${description}\n---`;
|
|
59
|
-
}
|
|
60
5
|
getSkillTargetDir(skillName) {
|
|
61
6
|
return `.opencode/skills/${skillName}`;
|
|
62
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../../../src/core/configurators/slash/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../../../src/core/configurators/slash/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,OAAO,oBAAqB,SAAQ,gBAAgB;IAC7C,MAAM,GAAG,UAAU,CAAC;IACpB,WAAW,GAAG,IAAI,CAAC;IAElB,iBAAiB,CAAC,SAAiB;QACzC,OAAO,oBAAoB,SAAS,EAAE,CAAC;IAC3C,CAAC;CACJ"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ToolConfigurator } from './base.js';
|
|
2
2
|
export declare class ConfiguratorRegistry {
|
|
3
3
|
private configurators;
|
|
4
4
|
constructor();
|
|
5
|
-
get(toolId: string):
|
|
6
|
-
getAll():
|
|
7
|
-
getAvailable():
|
|
5
|
+
get(toolId: string): ToolConfigurator | undefined;
|
|
6
|
+
getAll(): ToolConfigurator[];
|
|
7
|
+
getAvailable(): ToolConfigurator[];
|
|
8
8
|
getToolIds(): string[];
|
|
9
9
|
}
|
|
10
10
|
export declare const registry: ConfiguratorRegistry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/core/configurators/slash/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/core/configurators/slash/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAU7C,qBAAa,oBAAoB;IAC7B,OAAO,CAAC,aAAa,CAA4C;;IAsBjE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAIjD,MAAM,IAAI,gBAAgB,EAAE;IAI5B,YAAY,IAAI,gBAAgB,EAAE;IAIlC,UAAU,IAAI,MAAM,EAAE;CAGzB;AAED,eAAO,MAAM,QAAQ,sBAA6B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/core/configurators/slash/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,OAAO,oBAAoB;IACrB,aAAa,
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/core/configurators/slash/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,iB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Ac;QACd,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED,MAAM;QACF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC;IACnD,CAAC;IAED,YAAY;QACR,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IACpD,CAAC;IAED,UAAU;QACN,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IACjD,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SkillMetadata } from './skill-discovery.js';
|
|
2
|
+
export declare function getRegistryUrl(): string;
|
|
3
|
+
interface SkillEntry {
|
|
4
|
+
name: string;
|
|
5
|
+
files: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare function fetchSkillList(token?: string | null): Promise<SkillEntry[]>;
|
|
8
|
+
export declare class RegistryAuthError extends Error {
|
|
9
|
+
constructor(message: string);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Fetch skill list from registry, download all skill files to local cache,
|
|
13
|
+
* and return SkillMetadata[] compatible with discoverSkills() output.
|
|
14
|
+
* Falls back to local cache on network failure.
|
|
15
|
+
*/
|
|
16
|
+
export declare function fetchAndCacheSkills(token?: string | null): Promise<SkillMetadata[]>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/core/registry.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAMrD,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,UAAU,UAAU;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,EAAE,CAAC;CACnB;AAUD,wBAAsB,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAajF;AAkCD,qBAAa,iBAAkB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAI9B;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CA6BzF"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { promises as fs } from 'fs';
|
|
2
|
+
import os from 'os';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
const DEFAULT_REGISTRY_URL = 'https://anvil.bezhoe.id/api/prompter';
|
|
6
|
+
const CACHE_DIR = path.join(os.homedir(), '.prompter', 'cache', 'skills');
|
|
7
|
+
const CACHE_TTL_MS = 24 * 60 * 60 * 1000; // 24 hours
|
|
8
|
+
export function getRegistryUrl() {
|
|
9
|
+
return process.env.PROMPTER_REGISTRY_URL ?? DEFAULT_REGISTRY_URL;
|
|
10
|
+
}
|
|
11
|
+
function authHeaders(token) {
|
|
12
|
+
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
13
|
+
}
|
|
14
|
+
export async function fetchSkillList(token) {
|
|
15
|
+
const url = `${getRegistryUrl()}/index.json`;
|
|
16
|
+
const res = await fetch(url, { headers: authHeaders(token) });
|
|
17
|
+
if (res.status === 401) {
|
|
18
|
+
throw new RegistryAuthError('Session expired. Run `prompter login`.');
|
|
19
|
+
}
|
|
20
|
+
if (!res.ok) {
|
|
21
|
+
throw new Error(`Registry returned ${res.status} for ${url}`);
|
|
22
|
+
}
|
|
23
|
+
const body = await res.json();
|
|
24
|
+
return body.skills ?? [];
|
|
25
|
+
}
|
|
26
|
+
async function isCacheFresh(skillCacheDir) {
|
|
27
|
+
try {
|
|
28
|
+
const skillMd = path.join(skillCacheDir, 'SKILL.md');
|
|
29
|
+
const stat = await fs.stat(skillMd);
|
|
30
|
+
return Date.now() - stat.mtimeMs < CACHE_TTL_MS;
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
async function downloadSkill(entry, token) {
|
|
37
|
+
const skillCacheDir = path.join(CACHE_DIR, entry.name);
|
|
38
|
+
if (await isCacheFresh(skillCacheDir))
|
|
39
|
+
return;
|
|
40
|
+
await fs.mkdir(skillCacheDir, { recursive: true });
|
|
41
|
+
const files = entry.files.includes('SKILL.md') ? entry.files : ['SKILL.md', ...entry.files];
|
|
42
|
+
const registryUrl = getRegistryUrl();
|
|
43
|
+
for (const file of files) {
|
|
44
|
+
const url = `${registryUrl}/${entry.name}/${file}`;
|
|
45
|
+
const res = await fetch(url, { headers: authHeaders(token) });
|
|
46
|
+
if (res.status === 401)
|
|
47
|
+
throw new RegistryAuthError('Session expired. Run `prompter login`.');
|
|
48
|
+
if (!res.ok)
|
|
49
|
+
continue; // skip non-critical files silently
|
|
50
|
+
const content = await res.text();
|
|
51
|
+
await fs.writeFile(path.join(skillCacheDir, file), content, 'utf-8');
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export class RegistryAuthError extends Error {
|
|
55
|
+
constructor(message) {
|
|
56
|
+
super(message);
|
|
57
|
+
this.name = 'RegistryAuthError';
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Fetch skill list from registry, download all skill files to local cache,
|
|
62
|
+
* and return SkillMetadata[] compatible with discoverSkills() output.
|
|
63
|
+
* Falls back to local cache on network failure.
|
|
64
|
+
*/
|
|
65
|
+
export async function fetchAndCacheSkills(token) {
|
|
66
|
+
let entries;
|
|
67
|
+
let usingCache = false;
|
|
68
|
+
try {
|
|
69
|
+
entries = await fetchSkillList(token);
|
|
70
|
+
await Promise.all(entries.map(e => downloadSkill(e, token)));
|
|
71
|
+
}
|
|
72
|
+
catch (err) {
|
|
73
|
+
if (err instanceof RegistryAuthError)
|
|
74
|
+
throw err;
|
|
75
|
+
// Network failure β fall back to cache
|
|
76
|
+
const cached = await loadFromCache();
|
|
77
|
+
if (cached.length > 0) {
|
|
78
|
+
console.log(chalk.yellow('β Registry unreachable β using cached skills.'));
|
|
79
|
+
usingCache = true;
|
|
80
|
+
return cached;
|
|
81
|
+
}
|
|
82
|
+
throw new Error(`Could not reach registry at ${getRegistryUrl()} and no local cache found.\n` +
|
|
83
|
+
` Check your internet connection or run with --offline to skip skill selection.`);
|
|
84
|
+
}
|
|
85
|
+
if (!usingCache) {
|
|
86
|
+
return loadFromCache();
|
|
87
|
+
}
|
|
88
|
+
return [];
|
|
89
|
+
}
|
|
90
|
+
async function loadFromCache() {
|
|
91
|
+
const { discoverSkills } = await import('./skill-discovery.js');
|
|
92
|
+
return discoverSkills(CACHE_DIR);
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/core/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,oBAAoB,GAAG,sCAAsC,CAAC;AACpE,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC1E,MAAM,YAAY,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,WAAW;AAErD,MAAM,UAAU,cAAc;IAC1B,OAA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AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,KAAqB;IAC3D,IAAI,OAAqB,CAAC;IAC1B,IAAI,UAAU,GAAG,KAAK,CAAC;IAEvB,IAAI,CAAC;QACD,OAAO,GAAG,MAAM,cAAc,CAAC,KAAK,CAAC,CAAC;QACtC,MAAM,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IACjE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACX,IAAI,GAAG,YAAY,iBAAiB;YAAE,MAAM,GAAG,CAAC;QAEhD,uCAAuC;QACvC,MAAM,MAAM,GAAG,MAAM,aAAa,EAAE,CAAC;QACrC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,gDAAgD,CAAC,CAAC,CAAC;YAC5E,UAAU,GAAG,IAAI,CAAC;YAClB,OAAO,MAAM,CAAC;QAClB,CAAC;QAED,MAAM,IAAI,KAAK,CACX,+BAA+B,cAAc,EAAE,8BAA8B;YAC7E,iFAAiF,CACpF,CAAC;IACN,CAAC;IAED,IAAI,CAAC,UAAU,EAAE,CAAC;QACd,OAAO,aAAa,EAAE,CAAC;IAC3B,CAAC;IAED,OAAO,EAAE,CAAC;AACd,CAAC;AAED,KAAK,UAAU,aAAa;IACxB,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,MAAM,CAAC,sBAAsB,CAAC,CAAC;IAChE,OAAO,cAAc,CAAC,SAAS,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dedesfr/prompter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Enhance prompts directly in your AI coding workflow",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist/",
|
|
9
|
+
"bin/",
|
|
10
|
+
"README.md",
|
|
11
|
+
"CHANGELOG.md"
|
|
12
|
+
],
|
|
7
13
|
"bin": {
|
|
8
14
|
"prompter": "./bin/prompter.js"
|
|
9
15
|
},
|
package/AGENTS.md
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
<!-- PROMPTER:START -->
|
|
2
|
-
# Prompter Instructions
|
|
3
|
-
|
|
4
|
-
These instructions are for AI assistants working in this project.
|
|
5
|
-
|
|
6
|
-
Always open `@/prompter/AGENTS.md` when the request:
|
|
7
|
-
- Mentions planning or proposals (words like proposal, spec, change, plan)
|
|
8
|
-
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
|
|
9
|
-
- Sounds ambiguous and you need the authoritative spec before coding
|
|
10
|
-
|
|
11
|
-
Use `@/prompter/AGENTS.md` to learn:
|
|
12
|
-
- How to create and apply change proposals
|
|
13
|
-
- Spec format and conventions
|
|
14
|
-
- Project structure and guidelines
|
|
15
|
-
- Show Remaining Tasks
|
|
16
|
-
|
|
17
|
-
<!-- PROMPTER:END -->
|
|
18
|
-
|
|
19
|
-
# AGENTS β Project Knowledge Base
|
|
20
|
-
## 1. π Project Summary
|
|
21
|
-
Prompter CLI is a local-first developer tool that scaffolds and maintains AI workflow prompt templates. It initializes a `prompter/` workspace, generates slash-command templates for multiple AI coding tools, and lists enhanced prompts created by those workflows.
|
|
22
|
-
|
|
23
|
-
## 2. π§± Tech Stack
|
|
24
|
-
- Language: TypeScript (ESM)
|
|
25
|
-
- Runtime: Node.js >= 20
|
|
26
|
-
- CLI Framework: `commander`
|
|
27
|
-
- Interactive Prompts: `@inquirer/prompts`
|
|
28
|
-
- Terminal Output: `chalk`
|
|
29
|
-
- Build: `tsc` via `build.js`
|
|
30
|
-
- Tests: `vitest` (configured, no tests present)
|
|
31
|
-
|
|
32
|
-
## 3. ποΈ Architecture Overview
|
|
33
|
-
- CLI entrypoint: `bin/prompter.js` β `dist/cli/index.js`.
|
|
34
|
-
- Commands: `init`, `update`, `list` implemented in `src/commands/`.
|
|
35
|
-
- Config and constants in `src/core/config.ts`.
|
|
36
|
-
- Template system in `src/core/templates/`, including slash-command bodies and project templates.
|
|
37
|
-
- Tool-specific workflow generation via configurators in `src/core/configurators/slash/`.
|
|
38
|
-
- Filesystem-only operations; no network or backend components.
|
|
39
|
-
|
|
40
|
-
## 4. π Folder Structure & Important Files
|
|
41
|
-
- `src/cli/index.ts`: CLI command definitions.
|
|
42
|
-
- `src/commands/init.ts`: initialization workflow and tool selection.
|
|
43
|
-
- `src/commands/update.ts`: update workflow files.
|
|
44
|
-
- `src/commands/list.ts`: list enhanced prompts.
|
|
45
|
-
- `src/core/config.ts`: constants, supported tools, prompter directory helpers.
|
|
46
|
-
- `src/core/templates/`: template bodies and markers for workflow files.
|
|
47
|
-
- `src/core/configurators/slash/`: tool-specific file paths and frontmatter.
|
|
48
|
-
- `bin/prompter.js`: production CLI entry.
|
|
49
|
-
- `docs/product-spec.md`: product specification reference.
|
|
50
|
-
|
|
51
|
-
## 5. π Core Business Logic & Domain Rules
|
|
52
|
-
- Initialization is idempotent: if `prompter/` exists, `prompter init` exits with a warning.
|
|
53
|
-
- Workflow files include managed markers: `<!-- prompter-managed-start -->` and `<!-- prompter-managed-end -->`.
|
|
54
|
-
- Updates only replace content between markers; missing markers are treated as errors.
|
|
55
|
-
- Enhanced prompts live at `prompter/<slug>/enhanced-prompt.md`.
|
|
56
|
-
|
|
57
|
-
## 6. ποΈ Data Models / Entities
|
|
58
|
-
- `ToolChoice`: tool selection metadata (name, id, availability, label).
|
|
59
|
-
- `EnhancedPrompt`: `{ id, path, createdAt }` derived from filesystem stats.
|
|
60
|
-
|
|
61
|
-
## 7. π§ Domain Vocabulary / Glossary
|
|
62
|
-
- **Prompter**: the CLI tool.
|
|
63
|
-
- **Enhanced Prompt**: AI-generated specification saved to `prompter/<slug>/enhanced-prompt.md`.
|
|
64
|
-
- **Workflow File**: tool-specific slash-command template file.
|
|
65
|
-
- **Markers**: managed section boundaries for safe updates.
|
|
66
|
-
|
|
67
|
-
## 8. π₯ Target Users & Personas
|
|
68
|
-
- Developers using AI coding assistants who want standardized prompt workflows.
|
|
69
|
-
- Team leads who need consistent prompt enhancement across repositories.
|
|
70
|
-
|
|
71
|
-
## 9. β¨ UI/UX Principles
|
|
72
|
-
- Clear CLI output with status icons and colorized feedback.
|
|
73
|
-
- Minimal prompts; optional non-interactive operation via flags.
|
|
74
|
-
|
|
75
|
-
## 10. π Security / Privacy Rules
|
|
76
|
-
- No authentication or authorization.
|
|
77
|
-
- Local filesystem only; no network calls.
|
|
78
|
-
- Avoid storing sensitive data in prompts unless repository policies allow it.
|
|
79
|
-
|
|
80
|
-
## 11. π€ Coding Conventions & Standards
|
|
81
|
-
- ESM imports with explicit `.js` extensions in compiled paths.
|
|
82
|
-
- Strict TypeScript (`tsconfig.json` uses `strict: true`).
|
|
83
|
-
- Prefer small, focused modules and clear command boundaries.
|
|
84
|
-
|
|
85
|
-
## 12. π§© Development Rules for AI Agents (must include rules: never invent endpoints/fields/models, match existing coding style and architecture, modify only necessary parts β never full rewrite, ask before executing risky changes, return diffs/patch format when editing)
|
|
86
|
-
- Never invent endpoints, fields, or models that do not exist in the repository.
|
|
87
|
-
- Match the existing coding style, module boundaries, and architecture.
|
|
88
|
-
- Modify only necessary parts; never do a full rewrite.
|
|
89
|
-
- Ask before executing risky or destructive changes.
|
|
90
|
-
- Return diffs/patch format when editing.
|
|
91
|
-
|
|
92
|
-
## 13. πΊοΈ Integration Map
|
|
93
|
-
- Supported AI tools and their workflow file paths:
|
|
94
|
-
- Antigravity: `.agent/workflows/prompter-enhance.md`
|
|
95
|
-
- Claude Code: `.claude/commands/prompter/enhance.md`
|
|
96
|
-
- Codex: `.codex/prompts/prompter-enhance.md`
|
|
97
|
-
- GitHub Copilot: `.github/prompts/prompter-enhance.md`
|
|
98
|
-
- OpenCode: `.opencode/prompts/prompter-enhance.md`
|
|
99
|
-
- Kilo Code: `.kilocode/workflows/prompter-enhance.md`
|
|
100
|
-
|
|
101
|
-
## 14. πΊοΈ Roadmap & Future Plans
|
|
102
|
-
- None documented in the repository.
|
|
103
|
-
|
|
104
|
-
## 15. β οΈ Known Issues / Limitations
|
|
105
|
-
- No tests present despite vitest configuration.
|
|
106
|
-
- `prompter update` runs across all known tools, not just configured ones.
|
|
107
|
-
- Update requires markers; files missing markers cannot be updated.
|
|
108
|
-
|
|
109
|
-
## 16. π§ͺ Testing Strategy
|
|
110
|
-
- Intended test runner: `vitest` (no test files currently present).
|
|
111
|
-
|
|
112
|
-
## 17. π§― Troubleshooting Guide
|
|
113
|
-
- If `prompter update` fails, verify the workflow file contains the managed markers.
|
|
114
|
-
- If `prompter list` is empty, ensure enhanced prompts exist at `prompter/<slug>/enhanced-prompt.md`.
|
|
115
|
-
- If `prompter init` says already initialized, remove or rename the existing `prompter/` directory only if safe.
|
|
116
|
-
|
|
117
|
-
## 18. π Ownership / Responsibility Map
|
|
118
|
-
- Not specified; treat as repository owner-maintained.
|
|
119
|
-
|
|
120
|
-
## β³ Missing Information Needed
|
|
121
|
-
- Business roadmap, release plans, or milestones.
|
|
122
|
-
- Ownership contacts and support process.
|
|
123
|
-
- Any data retention or compliance requirements.
|
package/CLAUDE.md
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<!-- PROMPTER:START -->
|
|
2
|
-
# Prompter Instructions
|
|
3
|
-
|
|
4
|
-
These instructions are for AI assistants working in this project.
|
|
5
|
-
|
|
6
|
-
Always open `@/prompter/CLAUDE.md` when the request:
|
|
7
|
-
- Mentions planning or proposals (words like proposal, spec, change, plan)
|
|
8
|
-
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
|
|
9
|
-
- Sounds ambiguous and you need the authoritative spec before coding
|
|
10
|
-
|
|
11
|
-
Use `@/prompter/CLAUDE.md` to learn:
|
|
12
|
-
- How to create and apply change proposals
|
|
13
|
-
- Spec format and conventions
|
|
14
|
-
- Project structure and guidelines
|
|
15
|
-
- Show Remaining Tasks
|
|
16
|
-
|
|
17
|
-
<!-- PROMPTER:END -->
|
package/build.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { execSync } from 'child_process';
|
|
2
|
-
import { rmSync, existsSync } from 'fs';
|
|
3
|
-
|
|
4
|
-
console.log('π¨ Building Prompter...\n');
|
|
5
|
-
|
|
6
|
-
// Clean dist directory
|
|
7
|
-
if (existsSync('dist')) {
|
|
8
|
-
console.log('Cleaning dist directory...');
|
|
9
|
-
rmSync('dist', { recursive: true });
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// Compile TypeScript
|
|
13
|
-
console.log('Compiling TypeScript...');
|
|
14
|
-
try {
|
|
15
|
-
execSync('npx tsc', { stdio: 'inherit' });
|
|
16
|
-
console.log('\nβ
Build completed successfully!');
|
|
17
|
-
} catch (error) {
|
|
18
|
-
console.error('\nβ Build failed');
|
|
19
|
-
process.exit(1);
|
|
20
|
-
}
|