Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,15 @@ node bin/stylekit-style-prompts-skill.js uninstall --target /tmp/stylekit-skill-
python3 scripts/audit_style_rule_conflicts.py --format text
python3 scripts/smoke_test.py
python3 scripts/run_pipeline.py --query "高端科技SaaS财务后台,玻璃质感,强调可读性" --stack nextjs --format json
python3 scripts/run_pipeline.py --workflow codegen --query "高端科技SaaS财务后台,玻璃质感,强调可读性" --stack nextjs --format json
```

说明:
- 默认是 `--workflow manual`(手册/知识库模式):输出设计简报 + 手册化建议,不强制走 prompt QA。
- 若要生成并严格审查 prompt,请显式加 `--workflow codegen`。
- 在 manual 模式下,会额外输出 `manual_assistant.decision_assistant`,包含:候选风格卡片、给新手的引导问题、以及用户选定风格后的下一步命令模板。
- 可直接复用对话模板:`references/cc-decision-conversation-template.md`。

## 3) 回归门禁

```bash
Expand Down
28 changes: 22 additions & 6 deletions SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,33 @@ Generate better-looking frontend output by combining StyleKit style identity, ac

## Quick One-shot Command

Run full flow in one command:
Run handbook mode in one command (default):

`python scripts/run_pipeline.py --query "<requirement>" --stack nextjs --format json`

Run prompt-generation mode with QA gate:

`python scripts/run_pipeline.py --workflow codegen --query "<requirement>" --stack nextjs --format json`

Force multi-style blend:

`python scripts/run_pipeline.py --query "<requirement>" --stack nextjs --blend-mode on --format json`
`python scripts/run_pipeline.py --workflow codegen --query "<requirement>" --stack nextjs --blend-mode on --format json`

Run targeted refinement (polish/debug/contrast/layout/component-fill):

`python scripts/run_pipeline.py --query "<requirement>" --stack nextjs --refine-mode debug --format json`
`python scripts/run_pipeline.py --workflow codegen --query "<requirement>" --stack nextjs --refine-mode debug --format json`

Run with screenshot/Figma reference constraints:

`python scripts/run_pipeline.py --query "<requirement>" --stack nextjs --reference-type screenshot --reference-notes "<what to preserve/fix>" --format json`
`python scripts/run_pipeline.py --workflow codegen --query "<requirement>" --stack nextjs --reference-type screenshot --reference-notes "<what to preserve/fix>" --format json`

Run with structured reference payload:

`python scripts/run_pipeline.py --query "<requirement>" --stack nextjs --reference-type screenshot --reference-file refs/screen-analysis.json --format json`
`python scripts/run_pipeline.py --workflow codegen --query "<requirement>" --stack nextjs --reference-type screenshot --reference-file refs/screen-analysis.json --format json`

Run strict schema mode for reference payload:

`python scripts/run_pipeline.py --query "<requirement>" --stack nextjs --reference-type screenshot --reference-file refs/screen-analysis.json --strict-reference-schema --format json`
`python scripts/run_pipeline.py --workflow codegen --query "<requirement>" --stack nextjs --reference-type screenshot --reference-file refs/screen-analysis.json --strict-reference-schema --format json`

Benchmark current quality:

Expand Down Expand Up @@ -75,6 +79,17 @@ CI one-command gate:
`python scripts/generate_brief.py --query "<requirement>" --stack nextjs --mode brief+prompt --reference-file refs/screen-analysis.json --strict-reference-schema`
9. If quality gate fails, run audit + fix workflow.

## Workflow 1.5: Novice Decision Assist (Recommended)

1. User only provides a high-level goal (example: "I want to build a blog").
2. Run handbook mode:
`python scripts/run_pipeline.py --query "<requirement>" --stack nextjs --format json`
3. Read `manual_assistant.decision_assistant.recommended_style_options` and explain 3-4 options with trade-offs.
4. Ask `manual_assistant.decision_assistant.decision_questions` to help user pick direction.
5. After user selects one option, run codegen mode with forced style:
`python scripts/run_pipeline.py --workflow codegen --query "<requirement>" --stack nextjs --style <slug> --blend-mode off --format json`
6. Follow `references/cc-decision-conversation-template.md` for a turn-by-turn assistant script.

## Workflow 2: Existing Prompt -> Quality Audit -> Fix Suggestions

1. Audit prompt text:
Expand Down Expand Up @@ -149,6 +164,7 @@ If stack is unknown, fallback to framework-agnostic Tailwind semantics.
- `references/frontend-design-principles.md`: distinctiveness and anti-generic design heuristics.
- `references/design-system-patterns.md`: token hierarchy and component architecture.
- `references/accessibility-gate.md`: WCAG + mobile touch baseline for prompt quality.
- `references/cc-decision-conversation-template.md`: assistant dialogue template for novice user decision flow.
- `scripts/refresh-style-prompts.sh`: rebuild style dataset from local repo.
- `scripts/search_stylekit.py`: query -> ranked style candidates.
- `scripts/generate_brief.py`: query -> design brief + prompts.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@anxforever/stylekit-style-prompts-skill",
"version": "0.1.0",
"version": "0.1.1",
"description": "Standalone StyleKit style-prompts skill installer for Codex and Claude.",
"license": "MIT",
"type": "commonjs",
Expand Down
52 changes: 52 additions & 0 deletions references/cc-decision-conversation-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# CC Decision Conversation Template

Use this when the user only has a high-level idea (for example: "I want a blog").

## Goal

Help non-frontend users make design decisions first, then generate implementation.

## Phase 1: Clarify Product Context

- Assistant prompt:
- "I will help narrow direction first. Who is the audience, and is the primary goal reading, conversion, or brand expression?"
- Expected output:
- product type
- target audience
- top 1-2 business goals

## Phase 2: Present Style Choices

- Input source:
- `manual_assistant.decision_assistant.recommended_style_options`
- Assistant prompt:
- "Here are 3-4 style options with complexity and risk. Pick A/B/C/D, and I will generate with that style."
- Explain each option in plain language:
- visual tone
- implementation complexity
- readability/risk trade-off

## Phase 3: Ask Guiding Questions

- Input source:
- `manual_assistant.decision_assistant.decision_questions`
- Ask 2-3 questions max:
- visual intensity
- content density preference
- motion level

## Phase 4: Lock Style and Generate

- After user picks a style option, run:
- `python scripts/run_pipeline.py --workflow codegen --query "<requirement>" --stack <stack> --style <slug> --blend-mode off --format json`
- Then generate implementation with:
- homepage
- detail page (for blog: post page)
- list page (for blog: article list page)

## Output Rules for Assistant

- Never force a style before user selects.
- Explain style differences in non-technical language first.
- Preserve user language (Chinese in -> Chinese out, English in -> English out).
- Keep decision loop short: propose options -> ask questions -> confirm -> generate.
2 changes: 2 additions & 0 deletions scripts/benchmark_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ def run_case(py: str, query: str, stack: str, blend_mode: str, bucket: str, refi
cmd = [
py,
str(PIPELINE_SCRIPT),
"--workflow",
"codegen",
"--query",
query,
"--stack",
Expand Down
Loading