@ia-ccun/code-agent-cli 0.0.47 → 0.0.49-beta.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/config/agent/skills/design-md/README.md +34 -0
- package/config/agent/skills/design-md/SKILL.md +172 -0
- package/config/agent/skills/design-md/examples/DESIGN.md +154 -0
- package/config/agent/skills/fireworks-tech-graph/LICENSE +21 -0
- package/config/agent/skills/fireworks-tech-graph/README.md +528 -0
- package/config/agent/skills/fireworks-tech-graph/README.zh.md +499 -0
- package/config/agent/skills/fireworks-tech-graph/SKILL.md +537 -0
- package/config/agent/skills/fireworks-tech-graph/agentloop-core.svg +101 -0
- package/config/agent/skills/fireworks-tech-graph/agents/openai.yaml +4 -0
- package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style1-flat.png +0 -0
- package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style2-dark.png +0 -0
- package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style3-blueprint.png +0 -0
- package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style4-notion.png +0 -0
- package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style5-glass.png +0 -0
- package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style6-claude.png +0 -0
- package/config/agent/skills/fireworks-tech-graph/assets/samples/sample-style7-openai.png +0 -0
- package/config/agent/skills/fireworks-tech-graph/fixtures/agent-memory-types-style4.json +181 -0
- package/config/agent/skills/fireworks-tech-graph/fixtures/api-flow-style7.json +40 -0
- package/config/agent/skills/fireworks-tech-graph/fixtures/mem0-style1.json +297 -0
- package/config/agent/skills/fireworks-tech-graph/fixtures/microservices-style3.json +64 -0
- package/config/agent/skills/fireworks-tech-graph/fixtures/multi-agent-style5.json +45 -0
- package/config/agent/skills/fireworks-tech-graph/fixtures/system-architecture-style6.json +48 -0
- package/config/agent/skills/fireworks-tech-graph/fixtures/tool-call-style2.json +182 -0
- package/config/agent/skills/fireworks-tech-graph/package.json +42 -0
- package/config/agent/skills/fireworks-tech-graph/references/icons.md +406 -0
- package/config/agent/skills/fireworks-tech-graph/references/style-1-flat-icon.md +108 -0
- package/config/agent/skills/fireworks-tech-graph/references/style-2-dark-terminal.md +107 -0
- package/config/agent/skills/fireworks-tech-graph/references/style-3-blueprint.md +113 -0
- package/config/agent/skills/fireworks-tech-graph/references/style-4-notion-clean.md +94 -0
- package/config/agent/skills/fireworks-tech-graph/references/style-5-glassmorphism.md +125 -0
- package/config/agent/skills/fireworks-tech-graph/references/style-6-claude-official.md +209 -0
- package/config/agent/skills/fireworks-tech-graph/references/style-7-openai.md +215 -0
- package/config/agent/skills/fireworks-tech-graph/references/style-diagram-matrix.md +135 -0
- package/config/agent/skills/fireworks-tech-graph/references/svg-layout-best-practices.md +100 -0
- package/config/agent/skills/fireworks-tech-graph/scripts/README.md +244 -0
- package/config/agent/skills/fireworks-tech-graph/scripts/generate-diagram.sh +157 -0
- package/config/agent/skills/fireworks-tech-graph/scripts/generate-from-template.py +1556 -0
- package/config/agent/skills/fireworks-tech-graph/scripts/test-all-styles.sh +135 -0
- package/config/agent/skills/fireworks-tech-graph/scripts/validate-svg.sh +292 -0
- package/config/agent/skills/fireworks-tech-graph/templates/agent-architecture.svg +28 -0
- package/config/agent/skills/fireworks-tech-graph/templates/architecture.svg +23 -0
- package/config/agent/skills/fireworks-tech-graph/templates/comparison-matrix.svg +14 -0
- package/config/agent/skills/fireworks-tech-graph/templates/data-flow.svg +28 -0
- package/config/agent/skills/fireworks-tech-graph/templates/er-diagram.svg +21 -0
- package/config/agent/skills/fireworks-tech-graph/templates/flowchart.svg +21 -0
- package/config/agent/skills/fireworks-tech-graph/templates/sequence.svg +20 -0
- package/config/agent/skills/fireworks-tech-graph/templates/state-machine.svg +20 -0
- package/config/agent/skills/fireworks-tech-graph/templates/timeline.svg +19 -0
- package/config/agent/skills/fireworks-tech-graph/templates/use-case.svg +21 -0
- package/config/agent/skills/impeccable/adapt/SKILL.md +205 -0
- package/config/agent/skills/impeccable/animate/SKILL.md +178 -0
- package/config/agent/skills/impeccable/arrange/SKILL.md +128 -0
- package/config/agent/skills/impeccable/audit/SKILL.md +129 -0
- package/config/agent/skills/impeccable/bolder/SKILL.md +120 -0
- package/config/agent/skills/impeccable/clarify/SKILL.md +186 -0
- package/config/agent/skills/impeccable/colorize/SKILL.md +146 -0
- package/config/agent/skills/impeccable/critique/SKILL.md +123 -0
- package/config/agent/skills/impeccable/delight/SKILL.md +307 -0
- package/config/agent/skills/impeccable/distill/SKILL.md +125 -0
- package/config/agent/skills/impeccable/extract/SKILL.md +95 -0
- package/config/agent/skills/impeccable/frontend-design/reference/color-and-contrast.md +132 -0
- package/config/agent/skills/impeccable/frontend-design/reference/interaction-design.md +123 -0
- package/config/agent/skills/impeccable/frontend-design/reference/motion-design.md +99 -0
- package/config/agent/skills/impeccable/frontend-design/reference/responsive-design.md +114 -0
- package/config/agent/skills/impeccable/frontend-design/reference/spatial-design.md +100 -0
- package/config/agent/skills/impeccable/frontend-design/reference/typography.md +133 -0
- package/config/agent/skills/impeccable/frontend-design/reference/ux-writing.md +107 -0
- package/config/agent/skills/impeccable/harden/SKILL.md +358 -0
- package/config/agent/skills/impeccable/normalize/SKILL.md +74 -0
- package/config/agent/skills/impeccable/onboard/SKILL.md +249 -0
- package/config/agent/skills/impeccable/optimize/SKILL.md +269 -0
- package/config/agent/skills/impeccable/overdrive/SKILL.md +145 -0
- package/config/agent/skills/impeccable/polish/SKILL.md +206 -0
- package/config/agent/skills/impeccable/quieter/SKILL.md +106 -0
- package/config/agent/skills/impeccable/teach-impeccable/SKILL.md +72 -0
- package/config/agent/skills/impeccable/typeset/SKILL.md +119 -0
- package/package.json +1 -1
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# SVG Diagram Generation - Validates and exports SVG diagrams with PNG export
|
|
3
|
+
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
# Colors
|
|
7
|
+
RED='\033[0;31m'
|
|
8
|
+
GREEN='\033[0;32m'
|
|
9
|
+
YELLOW='\033[1;33m'
|
|
10
|
+
BLUE='\033[0;34m'
|
|
11
|
+
NC='\033[0m'
|
|
12
|
+
|
|
13
|
+
# Default values
|
|
14
|
+
STYLE="1"
|
|
15
|
+
WIDTH="1920"
|
|
16
|
+
OUTPUT_DIR="."
|
|
17
|
+
VALIDATE=true
|
|
18
|
+
|
|
19
|
+
# Valid diagram types
|
|
20
|
+
VALID_TYPES="architecture|data-flow|flowchart|sequence|comparison|timeline|mind-map|agent|memory|use-case|class|state-machine|er-diagram|network-topology"
|
|
21
|
+
|
|
22
|
+
usage() {
|
|
23
|
+
cat << USAGE
|
|
24
|
+
Usage: $0 [OPTIONS]
|
|
25
|
+
|
|
26
|
+
Options:
|
|
27
|
+
-t, --type TYPE Diagram type ($VALID_TYPES)
|
|
28
|
+
-s, --style STYLE Style number (1-7, default: 1)
|
|
29
|
+
-o, --output PATH Output path (default: current directory)
|
|
30
|
+
-w, --width WIDTH PNG width in pixels (default: 1920)
|
|
31
|
+
--no-validate Skip validation
|
|
32
|
+
-h, --help Show this help
|
|
33
|
+
|
|
34
|
+
Examples:
|
|
35
|
+
$0 -t architecture -s 1 -o ./output/arch.svg
|
|
36
|
+
$0 -t class -s 2 -w 2400
|
|
37
|
+
$0 -t sequence -s 6
|
|
38
|
+
USAGE
|
|
39
|
+
exit 0
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
# Parse arguments
|
|
43
|
+
while [[ $# -gt 0 ]]; do
|
|
44
|
+
case $1 in
|
|
45
|
+
-t|--type)
|
|
46
|
+
TYPE="$2"
|
|
47
|
+
shift 2
|
|
48
|
+
;;
|
|
49
|
+
-s|--style)
|
|
50
|
+
STYLE="$2"
|
|
51
|
+
shift 2
|
|
52
|
+
;;
|
|
53
|
+
-o|--output)
|
|
54
|
+
OUTPUT_PATH="$2"
|
|
55
|
+
shift 2
|
|
56
|
+
;;
|
|
57
|
+
-w|--width)
|
|
58
|
+
WIDTH="$2"
|
|
59
|
+
shift 2
|
|
60
|
+
;;
|
|
61
|
+
--no-validate)
|
|
62
|
+
VALIDATE=false
|
|
63
|
+
shift
|
|
64
|
+
;;
|
|
65
|
+
-h|--help)
|
|
66
|
+
usage
|
|
67
|
+
;;
|
|
68
|
+
*)
|
|
69
|
+
echo -e "${RED}Unknown option: $1${NC}"
|
|
70
|
+
usage
|
|
71
|
+
;;
|
|
72
|
+
esac
|
|
73
|
+
done
|
|
74
|
+
|
|
75
|
+
# Check required parameters
|
|
76
|
+
if [ -z "${TYPE:-}" ]; then
|
|
77
|
+
echo -e "${RED}Error: Diagram type is required${NC}"
|
|
78
|
+
usage
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
# Validate type
|
|
82
|
+
VALID_TYPE=false
|
|
83
|
+
for t in architecture data-flow flowchart sequence comparison timeline mind-map agent memory use-case class state-machine er-diagram network-topology; do
|
|
84
|
+
if [ "$TYPE" = "$t" ]; then
|
|
85
|
+
VALID_TYPE=true
|
|
86
|
+
break
|
|
87
|
+
fi
|
|
88
|
+
done
|
|
89
|
+
|
|
90
|
+
if [ "$VALID_TYPE" = false ]; then
|
|
91
|
+
echo -e "${RED}Error: Invalid diagram type '$TYPE'${NC}"
|
|
92
|
+
echo "Valid types: $VALID_TYPES"
|
|
93
|
+
exit 1
|
|
94
|
+
fi
|
|
95
|
+
|
|
96
|
+
# Determine output path
|
|
97
|
+
if [ -z "${OUTPUT_PATH:-}" ]; then
|
|
98
|
+
BASENAME="${TYPE}-style${STYLE}"
|
|
99
|
+
SVG_FILE="${OUTPUT_DIR}/${BASENAME}.svg"
|
|
100
|
+
PNG_FILE="${OUTPUT_DIR}/${BASENAME}.png"
|
|
101
|
+
else
|
|
102
|
+
SVG_FILE="$OUTPUT_PATH"
|
|
103
|
+
PNG_FILE="${OUTPUT_PATH%.svg}.png"
|
|
104
|
+
fi
|
|
105
|
+
|
|
106
|
+
echo -e "${BLUE}Generating ${TYPE} diagram (style ${STYLE})...${NC}"
|
|
107
|
+
echo "Output: $SVG_FILE"
|
|
108
|
+
|
|
109
|
+
# Load style reference
|
|
110
|
+
SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
111
|
+
STYLE_FILE=$(find "${SKILL_DIR}/references" -maxdepth 1 -type f -name "style-${STYLE}-*.md" | head -n 1)
|
|
112
|
+
|
|
113
|
+
if [ -z "${STYLE_FILE:-}" ] || [ ! -f "$STYLE_FILE" ]; then
|
|
114
|
+
echo -e "${RED}Error: Style file not found: ${STYLE_FILE}${NC}"
|
|
115
|
+
echo "Available styles: 1-7"
|
|
116
|
+
exit 1
|
|
117
|
+
fi
|
|
118
|
+
|
|
119
|
+
# Note: Actual SVG generation is done by Claude Code
|
|
120
|
+
# This script provides validation and export only
|
|
121
|
+
|
|
122
|
+
echo -e "${YELLOW}Note: SVG content generation requires Claude Code${NC}"
|
|
123
|
+
echo -e "${YELLOW}This script provides validation and export only${NC}"
|
|
124
|
+
|
|
125
|
+
# Validate if SVG exists
|
|
126
|
+
if [ -f "$SVG_FILE" ]; then
|
|
127
|
+
if [ "$VALIDATE" = true ]; then
|
|
128
|
+
echo -e "\n${BLUE}Validating SVG...${NC}"
|
|
129
|
+
if "${SKILL_DIR}/scripts/validate-svg.sh" "$SVG_FILE"; then
|
|
130
|
+
echo -e "${GREEN}Validation passed${NC}"
|
|
131
|
+
else
|
|
132
|
+
echo -e "${RED}Validation failed${NC}"
|
|
133
|
+
exit 1
|
|
134
|
+
fi
|
|
135
|
+
fi
|
|
136
|
+
|
|
137
|
+
# Export PNG
|
|
138
|
+
echo -e "\n${BLUE}Exporting PNG (width: ${WIDTH}px)...${NC}"
|
|
139
|
+
if command -v rsvg-convert &> /dev/null; then
|
|
140
|
+
if rsvg-convert -w "$WIDTH" "$SVG_FILE" -o "$PNG_FILE" 2>/dev/null; then
|
|
141
|
+
PNG_SIZE=$(du -h "$PNG_FILE" | cut -f1)
|
|
142
|
+
echo -e "${GREEN}PNG exported: $PNG_FILE (${PNG_SIZE})${NC}"
|
|
143
|
+
else
|
|
144
|
+
echo -e "${RED}PNG export failed${NC}"
|
|
145
|
+
exit 1
|
|
146
|
+
fi
|
|
147
|
+
else
|
|
148
|
+
echo -e "${RED}Error: rsvg-convert not found${NC}"
|
|
149
|
+
echo "Install with: brew install librsvg"
|
|
150
|
+
exit 1
|
|
151
|
+
fi
|
|
152
|
+
else
|
|
153
|
+
echo -e "${YELLOW}SVG file not found. Generate it first with Claude Code.${NC}"
|
|
154
|
+
exit 1
|
|
155
|
+
fi
|
|
156
|
+
|
|
157
|
+
echo -e "\n${GREEN}Done${NC}"
|