@mohammadhprp/system-prompt 0.11.1 → 0.12.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/framework/agents/backend-architect.md +1 -1
- package/framework/agents/researcher.md +1 -1
- package/framework/mcps/figma-mcp-go/README.md +0 -1
- package/framework/mcps/github-mcp/README.md +1 -1
- package/framework/mcps/github-mcp/configs/.env.example +1 -1
- package/framework/mcps/gitlab-mcp/README.md +0 -1
- package/framework/mcps/jira-mcp/README.md +0 -1
- package/framework/mcps/laravel-boost/README.md +0 -1
- package/framework/mcps/notion-mcp/README.md +0 -1
- package/framework/mcps/supabase-mcp/README.md +0 -1
- package/framework/plugins/opencode-goal-plugin/README.md +0 -1
- package/framework/plugins/ponytail/README.md +1 -1
- package/framework/plugins/ponytail/capabilities.md +1 -1
- package/framework/references/standards/api.md +0 -1
- package/framework/references/standards/architecture.md +0 -1
- package/framework/references/standards/database.md +0 -1
- package/framework/references/standards/debugging.md +0 -1
- package/framework/references/standards/documentation.md +0 -2
- package/framework/references/standards/logging.md +0 -1
- package/framework/references/standards/naming.md +0 -1
- package/framework/references/standards/observability.md +0 -1
- package/framework/references/standards/performance.md +0 -1
- package/framework/references/standards/pull-requests.md +1 -2
- package/framework/references/standards/security.md +0 -1
- package/framework/references/standards/testing.md +0 -1
- package/framework/skills/README.md +16 -4
- package/framework/skills/codenavi/SKILL.md +306 -0
- package/framework/skills/codenavi/examples.md +33 -0
- package/framework/skills/codenavi/references/coding-principles.md +143 -0
- package/framework/skills/codenavi/references/notebook-spec.md +171 -0
- package/framework/skills/create-adr/SKILL.md +429 -0
- package/framework/skills/create-adr/examples.md +35 -0
- package/framework/skills/diagram-design/SKILL.md +1 -1
- package/framework/skills/docs-writer/SKILL.md +39 -0
- package/framework/skills/docs-writer/examples.md +34 -0
- package/framework/skills/docs-writer/references/style-guide.md +72 -0
- package/framework/skills/frontend-design/SKILL.md +55 -0
- package/framework/skills/frontend-design/examples.md +45 -0
- package/framework/skills/humanizer/SKILL.md +412 -0
- package/framework/skills/humanizer/examples.md +46 -0
- package/framework/skills/learning-opportunities/SKILL.md +140 -0
- package/framework/skills/learning-opportunities/examples.md +34 -0
- package/framework/skills/learning-opportunities/references/PRINCIPLES.md +42 -0
- package/framework/skills/perf-web-optimization/SKILL.md +163 -0
- package/framework/skills/perf-web-optimization/examples.md +35 -0
- package/framework/skills/perf-web-optimization/references/bundle-optimization.md +180 -0
- package/framework/skills/perf-web-optimization/references/core-web-vitals.md +154 -0
- package/framework/skills/perf-web-optimization/references/image-optimization.md +170 -0
- package/framework/skills/security-best-practices/LICENSE.txt +201 -0
- package/framework/skills/security-best-practices/SKILL.md +89 -0
- package/framework/skills/security-best-practices/examples.md +35 -0
- package/framework/skills/security-best-practices/references/golang-general-backend-security.md +988 -0
- package/framework/skills/security-best-practices/references/javascript-express-web-server-security.md +1151 -0
- package/framework/skills/security-best-practices/references/javascript-general-web-frontend-security.md +725 -0
- package/framework/skills/security-best-practices/references/javascript-jquery-web-frontend-security.md +672 -0
- package/framework/skills/security-best-practices/references/javascript-typescript-nextjs-web-server-security.md +1138 -0
- package/framework/skills/security-best-practices/references/javascript-typescript-react-web-frontend-security.md +975 -0
- package/framework/skills/security-best-practices/references/javascript-typescript-vue-web-frontend-security.md +789 -0
- package/framework/skills/security-best-practices/references/python-django-web-server-security.md +880 -0
- package/framework/skills/security-best-practices/references/python-fastapi-web-server-security.md +1030 -0
- package/framework/skills/security-best-practices/references/python-flask-web-server-security.md +835 -0
- package/framework/skills/sentry/SKILL.md +127 -0
- package/framework/skills/sentry/examples.md +34 -0
- package/framework/skills/sentry/scripts/sentry_api.py +238 -0
- package/framework/skills/show-me/SKILL.md +127 -0
- package/framework/skills/show-me/examples.md +78 -0
- package/framework/skills/spec-driven-eval/SKILL.md +341 -0
- package/framework/skills/spec-driven-eval/examples.md +35 -0
- package/framework/skills/spec-driven-eval/references/quickstart.md +118 -0
- package/framework/skills/spec-driven-eval/references/reference.md +295 -0
- package/framework/skills/taste/SKILL.md +47 -0
- package/framework/skills/taste/examples.md +73 -0
- package/framework/skills/taste/references/brandkit.md +793 -0
- package/framework/skills/taste/references/design-taste-frontend-v1.md +221 -0
- package/framework/skills/taste/references/design-taste-frontend.md +1201 -0
- package/framework/skills/taste/references/full-output-enforcement.md +44 -0
- package/framework/skills/taste/references/gpt-taste.md +69 -0
- package/framework/skills/taste/references/high-end-visual-design.md +93 -0
- package/framework/skills/taste/references/image-to-code.md +1223 -0
- package/framework/skills/taste/references/imagegen-frontend-mobile.md +1460 -0
- package/framework/skills/taste/references/imagegen-frontend-web.md +982 -0
- package/framework/skills/taste/references/industrial-brutalist-ui.md +87 -0
- package/framework/skills/taste/references/minimalist-ui.md +80 -0
- package/framework/skills/taste/references/redesign-existing-projects.md +173 -0
- package/framework/skills/taste/references/stitch-design-taste-design.md +121 -0
- package/framework/skills/taste/references/stitch-design-taste.md +179 -0
- package/framework/skills/technical-design-doc-creator/README.md +411 -0
- package/framework/skills/technical-design-doc-creator/SKILL.md +1484 -0
- package/framework/skills/technical-design-doc-creator/examples.md +35 -0
- package/framework/skills/tlc-spec-driven/SKILL.md +184 -0
- package/framework/skills/tlc-spec-driven/examples.md +34 -0
- package/framework/skills/tlc-spec-driven/references/code-analysis.md +98 -0
- package/framework/skills/tlc-spec-driven/references/coding-principles.md +72 -0
- package/framework/skills/tlc-spec-driven/references/context-limits.md +31 -0
- package/framework/skills/tlc-spec-driven/references/design.md +199 -0
- package/framework/skills/tlc-spec-driven/references/discuss.md +159 -0
- package/framework/skills/tlc-spec-driven/references/implement.md +436 -0
- package/framework/skills/tlc-spec-driven/references/lessons.md +115 -0
- package/framework/skills/tlc-spec-driven/references/memory.md +144 -0
- package/framework/skills/tlc-spec-driven/references/specify.md +228 -0
- package/framework/skills/tlc-spec-driven/references/sub-agents.md +147 -0
- package/framework/skills/tlc-spec-driven/references/tasks.md +451 -0
- package/framework/skills/tlc-spec-driven/references/validate.md +355 -0
- package/framework/skills/tlc-spec-driven/scripts/check_commit.py +115 -0
- package/framework/skills/tlc-spec-driven/scripts/lessons.py +412 -0
- package/framework/skills/tlc-spec-driven/scripts/validate_spec.py +260 -0
- package/framework/skills/tlc-spec-driven/scripts/validate_state.py +162 -0
- package/framework/skills/tlc-spec-driven/scripts/validate_tasks.py +251 -0
- package/framework/skills/web-design-guidelines/SKILL.md +65 -0
- package/framework/skills/web-design-guidelines/examples.md +32 -0
- package/framework/skills/web-design-guidelines/references/guideline.md +174 -0
- package/package.json +1 -1
- package/src/agent-configs.js +6 -2
- package/src/catalog.js +16 -3
- package/src/cli.js +82 -2
- package/src/doctor.js +84 -0
- package/src/installer.js +337 -154
- package/framework/skills/backend-engineer/SKILL.md +0 -76
- package/framework/skills/backend-engineer/examples.md +0 -31
- package/framework/skills/documentation/SKILL.md +0 -74
- package/framework/skills/documentation/examples.md +0 -31
package/package.json
CHANGED
package/src/agent-configs.js
CHANGED
|
@@ -15,8 +15,12 @@ export async function loadMcpConfigs(selectedIds) {
|
|
|
15
15
|
if (parsed.mcp) {
|
|
16
16
|
Object.assign(entries, parsed.mcp);
|
|
17
17
|
}
|
|
18
|
-
} catch {
|
|
19
|
-
|
|
18
|
+
} catch (error) {
|
|
19
|
+
if (error.code === 'ENOENT') {
|
|
20
|
+
console.warn(` ⚠ No opencode.json config found for MCP: ${id}`);
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
throw error;
|
|
20
24
|
}
|
|
21
25
|
}
|
|
22
26
|
return entries;
|
package/src/catalog.js
CHANGED
|
@@ -6,20 +6,33 @@ export const categories = {
|
|
|
6
6
|
items: [
|
|
7
7
|
{ id: 'agent-browser', name: 'Agent Browser', description: 'Automate browser and Electron workflows for navigation, testing, screenshots, and data extraction' },
|
|
8
8
|
{ id: 'backend-best-practices', name: 'Backend Best Practices', description: 'Consolidated backend engineering practices across API, data, security, testing, and operations' },
|
|
9
|
-
{ id: 'backend-engineer', name: 'Backend Engineer', description: 'Analyze backend requirements, risks, and implementation plans' },
|
|
10
9
|
{ id: 'brainstorming', name: 'Brainstorming', description: 'Turn ideas into fully formed designs through dialogue' },
|
|
11
10
|
{ id: 'brand-guidelines', name: 'Brand Guidelines', description: 'Apply official brand colors and typography' },
|
|
12
11
|
{ id: 'code-review', name: 'Code Review', description: 'Review backend changes for correctness and maintainability' },
|
|
12
|
+
{ id: 'codenavi', name: 'CodeNavi', description: 'Navigate unknown codebases with precision, a persistent .notebook knowledge base, and surgical implementation' },
|
|
13
|
+
{ id: 'create-adr', name: 'Create ADR', description: 'Create Architecture Decision Records documenting significant architectural choices and rationale' },
|
|
13
14
|
{ id: 'design', name: 'Design Like Damien', description: 'Premium UI design philosophy and Lovable prompting' },
|
|
14
15
|
{ id: 'diagram-design', name: 'Diagram Design', description: 'Create technical and product diagrams as standalone HTML with inline SVG' },
|
|
15
|
-
{ id: '
|
|
16
|
+
{ id: 'docs-writer', name: 'Docs Writer', description: 'Write, review, and edit documentation files with consistent structure, tone, and technical accuracy' },
|
|
16
17
|
{ id: 'find-skills', name: 'Find Skills', description: 'Discover, evaluate, and install agent skills for specialized tasks' },
|
|
18
|
+
{ id: 'frontend-design', name: 'Frontend Design', description: 'Distinctive, intentional visual design for new UI or reshaping existing UI' },
|
|
17
19
|
{ id: 'gitlab-mcp', name: 'GitLab MCP', description: 'Work with GitLab via MCP for MRs, issues, pipelines' },
|
|
20
|
+
{ id: 'humanizer', name: 'Humanizer', description: 'Remove signs of AI-generated writing to make text sound more natural and human' },
|
|
18
21
|
{ id: 'jira-mcp', name: 'Jira MCP', description: 'Work with Jira MCP for issue management and JQL search' },
|
|
19
22
|
{ id: 'laravel-best-practices', name: 'Laravel Best Practices', description: 'Laravel patterns for Eloquent, validation, testing' },
|
|
23
|
+
{ id: 'learning-opportunities', name: 'Learning Opportunities', description: 'Facilitate deliberate skill development during AI-assisted coding with short, interactive exercises' },
|
|
20
24
|
{ id: 'lavish', name: 'Lavish', description: 'Turn complex responses into rich HTML artifacts' },
|
|
21
25
|
{ id: 'notion-mcp', name: 'Notion MCP', description: 'Work with Notion MCP for pages, databases, search' },
|
|
22
|
-
{ id: '
|
|
26
|
+
{ id: 'perf-web-optimization', name: 'Web Performance Optimization', description: 'Optimize web performance: bundle size, images, caching, lazy loading, and overall page speed' },
|
|
27
|
+
{ id: 'security-best-practices', name: 'Security Best Practices', description: 'Language and framework specific security best-practice reviews and secure-by-default coding help' },
|
|
28
|
+
{ id: 'sentry', name: 'Sentry', description: 'Inspect Sentry issues, summarize production errors, and pull health data via the Sentry API' },
|
|
29
|
+
{ id: 'show-me', name: 'Show Me', description: 'Explain the current topic visually with diagrams, code-shape sketches, and focused HTML artifacts' },
|
|
30
|
+
{ id: 'skill-creator', name: 'Skill Creator', description: 'Create and evaluate new agent skills' },
|
|
31
|
+
{ id: 'spec-driven-eval', name: 'Spec-Driven Eval', description: 'Score how completely an implementation fulfills a PRD/spec, case by case, into a single comparable grade' },
|
|
32
|
+
{ id: 'technical-design-doc-creator', name: 'Technical Design Doc Creator', description: 'Create comprehensive Technical Design Documents with mandatory and optional sections through interactive discovery' },
|
|
33
|
+
{ id: 'taste', name: 'Taste', description: 'Unified design-quality skill spanning anti-slop frontend, image generation and image-to-code, brand kits, minimalist and industrial UI, and Google Stitch design systems' },
|
|
34
|
+
{ id: 'tlc-spec-driven', name: 'TLC Spec-Driven', description: 'Feature planning and implementation with adaptive phases, EARS testable requirements, atomic commits, and independent verification' },
|
|
35
|
+
{ id: 'web-design-guidelines', name: 'Web Design Guidelines', description: 'Review UI code for Web Interface Guidelines compliance: accessibility, interaction patterns, and design best practices' }
|
|
23
36
|
],
|
|
24
37
|
},
|
|
25
38
|
|
package/src/cli.js
CHANGED
|
@@ -3,6 +3,57 @@ import { resolve } from 'node:path';
|
|
|
3
3
|
|
|
4
4
|
import { categories } from './catalog.js';
|
|
5
5
|
import { getPackageVersion, install, loadLockFile } from './installer.js';
|
|
6
|
+
import { doctor } from './doctor.js';
|
|
7
|
+
|
|
8
|
+
const CATEGORY_FLAGS = new Set(Object.keys(categories));
|
|
9
|
+
|
|
10
|
+
export function parseArgs(argv) {
|
|
11
|
+
const options = {
|
|
12
|
+
targetDir: '.opencode',
|
|
13
|
+
selections: {},
|
|
14
|
+
all: false,
|
|
15
|
+
dryRun: false,
|
|
16
|
+
force: false,
|
|
17
|
+
doctor: false,
|
|
18
|
+
includeAgentsMd: true,
|
|
19
|
+
};
|
|
20
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
21
|
+
const arg = argv[index];
|
|
22
|
+
if (arg === '--all') options.all = true;
|
|
23
|
+
else if (arg === '--dry-run') options.dryRun = true;
|
|
24
|
+
else if (arg === '--force') options.force = true;
|
|
25
|
+
else if (arg === '--doctor') options.doctor = true;
|
|
26
|
+
else if (arg === '--no-agents-md') options.includeAgentsMd = false;
|
|
27
|
+
else if (arg === '--target') {
|
|
28
|
+
const value = argv[++index];
|
|
29
|
+
if (!value || value.startsWith('--')) throw new Error('Missing value for --target');
|
|
30
|
+
options.targetDir = value;
|
|
31
|
+
}
|
|
32
|
+
else if (arg.startsWith('--target=')) {
|
|
33
|
+
const value = arg.slice('--target='.length);
|
|
34
|
+
if (!value) throw new Error('Missing value for --target');
|
|
35
|
+
options.targetDir = value;
|
|
36
|
+
}
|
|
37
|
+
else if (arg.startsWith('--')) {
|
|
38
|
+
const [flag, inlineValue] = arg.slice(2).split('=', 2);
|
|
39
|
+
if (!CATEGORY_FLAGS.has(flag)) throw new Error(`Unknown option: ${arg}`);
|
|
40
|
+
const value = inlineValue ?? argv[++index];
|
|
41
|
+
if (!value) throw new Error(`Missing value for --${flag}`);
|
|
42
|
+
options.selections[flag] = value.split(',').filter(Boolean);
|
|
43
|
+
} else {
|
|
44
|
+
throw new Error(`Unknown argument: ${arg}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
options.nonInteractive = options.all || Object.keys(options.selections).length > 0;
|
|
48
|
+
return options;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function allSelections() {
|
|
52
|
+
return Object.fromEntries(Object.entries(categories).map(([category, config]) => [
|
|
53
|
+
category,
|
|
54
|
+
config.items.filter(item => !item.removed).map(item => item.id),
|
|
55
|
+
]));
|
|
56
|
+
}
|
|
6
57
|
|
|
7
58
|
function buildSummary(selections) {
|
|
8
59
|
const lines = [];
|
|
@@ -86,12 +137,38 @@ function formatDiff(diff) {
|
|
|
86
137
|
return lines.join('\n');
|
|
87
138
|
}
|
|
88
139
|
|
|
89
|
-
export async function main() {
|
|
140
|
+
export async function main(argv = process.argv.slice(2)) {
|
|
141
|
+
const args = parseArgs(argv);
|
|
142
|
+
if (args.doctor) {
|
|
143
|
+
const healthy = await doctor(args.targetDir);
|
|
144
|
+
if (!healthy) process.exitCode = 1;
|
|
145
|
+
return healthy;
|
|
146
|
+
}
|
|
147
|
+
|
|
90
148
|
const version = await getPackageVersion();
|
|
91
149
|
intro(`System prompt (v${version})`);
|
|
92
150
|
|
|
93
151
|
const agentType = 'opencode';
|
|
94
|
-
const targetDir =
|
|
152
|
+
const targetDir = args.targetDir;
|
|
153
|
+
|
|
154
|
+
if (args.nonInteractive) {
|
|
155
|
+
const selections = args.all ? allSelections() : args.selections;
|
|
156
|
+
const absTarget = resolve(process.cwd(), targetDir);
|
|
157
|
+
const oldLock = await loadLockFile(absTarget);
|
|
158
|
+
if (!args.dryRun) console.log(`Installing selected components into ${absTarget}`);
|
|
159
|
+
await install({
|
|
160
|
+
targetDir,
|
|
161
|
+
agentType,
|
|
162
|
+
selections,
|
|
163
|
+
includeAgentsMd: args.includeAgentsMd,
|
|
164
|
+
oldSelections: oldLock?.selections,
|
|
165
|
+
oldLock,
|
|
166
|
+
force: args.force,
|
|
167
|
+
dryRun: args.dryRun,
|
|
168
|
+
});
|
|
169
|
+
console.log(args.dryRun ? 'Dry run complete.' : 'Installation complete.');
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
95
172
|
|
|
96
173
|
const categoryOptions = Object.entries(categories).map(([key, cat]) => {
|
|
97
174
|
const visible = cat.items.filter(i => !i.removed);
|
|
@@ -239,6 +316,9 @@ export async function main() {
|
|
|
239
316
|
selections,
|
|
240
317
|
includeAgentsMd,
|
|
241
318
|
oldSelections: oldLock?.selections,
|
|
319
|
+
oldLock,
|
|
320
|
+
force: args.force,
|
|
321
|
+
dryRun: args.dryRun,
|
|
242
322
|
});
|
|
243
323
|
|
|
244
324
|
s.stop('Installation complete!');
|
package/src/doctor.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { resolve } from 'node:path';
|
|
2
|
+
import { access, readFile } from 'node:fs/promises';
|
|
3
|
+
import { createHash } from 'node:crypto';
|
|
4
|
+
|
|
5
|
+
import { categories } from './catalog.js';
|
|
6
|
+
import { loadLockFile } from './installer.js';
|
|
7
|
+
|
|
8
|
+
async function exists(path) {
|
|
9
|
+
try {
|
|
10
|
+
await access(path);
|
|
11
|
+
return true;
|
|
12
|
+
} catch {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export async function inspectInstallation(targetDir) {
|
|
18
|
+
const absTarget = resolve(process.cwd(), targetDir);
|
|
19
|
+
const issues = [];
|
|
20
|
+
let lock;
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
lock = await loadLockFile(absTarget);
|
|
24
|
+
} catch (error) {
|
|
25
|
+
issues.push(error.message);
|
|
26
|
+
return { targetDir: absTarget, issues };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (!lock) {
|
|
30
|
+
issues.push('No system-prompt-lock.json found.');
|
|
31
|
+
return { targetDir: absTarget, issues };
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
for (const [path, expected] of Object.entries(lock.managedFiles || {})) {
|
|
35
|
+
try {
|
|
36
|
+
const actual = createHash('sha256').update(await readFile(resolve(absTarget, path))).digest('hex');
|
|
37
|
+
if (actual !== expected) issues.push(`Modified managed file: ${path}`);
|
|
38
|
+
} catch (error) {
|
|
39
|
+
if (error.code === 'ENOENT') issues.push(`Missing managed file: ${path}`);
|
|
40
|
+
else throw error;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
for (const [category, ids] of Object.entries(lock.selections)) {
|
|
45
|
+
const config = categories[category];
|
|
46
|
+
for (const id of ids) {
|
|
47
|
+
const item = config.items.find(entry => entry.id === id);
|
|
48
|
+
const relativePath = ['agents', 'commands', 'memory', 'modes', 'standards', 'templates'].includes(category)
|
|
49
|
+
? `${config.sourceDir.replace(/^framework\//, '')}/${id}.md`
|
|
50
|
+
: `${config.sourceDir.replace(/^framework\//, '')}/${id}`;
|
|
51
|
+
if (!item || !(await exists(resolve(absTarget, relativePath)))) {
|
|
52
|
+
issues.push(`Missing installed ${category} item: ${id}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (lock.agentType === 'opencode') {
|
|
58
|
+
for (const file of ['opencode.json', 'tui.json']) {
|
|
59
|
+
const path = resolve(absTarget, file);
|
|
60
|
+
if (!(await exists(path))) {
|
|
61
|
+
issues.push(`Missing generated file: ${file}`);
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
try {
|
|
65
|
+
JSON.parse(await readFile(path, 'utf-8'));
|
|
66
|
+
} catch {
|
|
67
|
+
issues.push(`Invalid JSON: ${file}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return { targetDir: absTarget, issues };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export async function doctor(targetDir = '.opencode', output = console.log) {
|
|
76
|
+
const result = await inspectInstallation(targetDir);
|
|
77
|
+
output(`Checking ${result.targetDir}`);
|
|
78
|
+
if (result.issues.length === 0) {
|
|
79
|
+
output('No issues found.');
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
for (const issue of result.issues) output(` ⚠ ${issue}`);
|
|
83
|
+
return false;
|
|
84
|
+
}
|