@looplia/looplia-cli 0.6.6

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.
Files changed (34) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.js +33216 -0
  3. package/package.json +55 -0
  4. package/plugins/looplia-core/.claude-plugin/plugin.json +10 -0
  5. package/plugins/looplia-core/commands/build-workflow.md +92 -0
  6. package/plugins/looplia-core/commands/build.md +71 -0
  7. package/plugins/looplia-core/commands/list-workflows.md +55 -0
  8. package/plugins/looplia-core/commands/run.md +50 -0
  9. package/plugins/looplia-core/hooks/hooks.json +27 -0
  10. package/plugins/looplia-core/scripts/hooks/compact-inject-state.sh +36 -0
  11. package/plugins/looplia-core/scripts/hooks/post-write-validate.sh +81 -0
  12. package/plugins/looplia-core/scripts/hooks/stop-guard.sh +56 -0
  13. package/plugins/looplia-core/skills/plugin-registry-scanner/SKILL.md +108 -0
  14. package/plugins/looplia-core/skills/plugin-registry-scanner/scripts/scan-plugins.ts +221 -0
  15. package/plugins/looplia-core/skills/plugin-registry-scanner/test/scan-plugins.test.ts +256 -0
  16. package/plugins/looplia-core/skills/search/SKILL.md +174 -0
  17. package/plugins/looplia-core/skills/skill-capability-matcher/SKILL.md +378 -0
  18. package/plugins/looplia-core/skills/workflow-executor/SKILL.md +469 -0
  19. package/plugins/looplia-core/skills/workflow-executor-inline/SKILL.md +217 -0
  20. package/plugins/looplia-core/skills/workflow-schema-composer/SCHEMA.md +214 -0
  21. package/plugins/looplia-core/skills/workflow-schema-composer/SKILL.md +373 -0
  22. package/plugins/looplia-core/skills/workflow-schema-composer/templates/workflow.md.template +44 -0
  23. package/plugins/looplia-core/skills/workflow-validator/SKILL.md +171 -0
  24. package/plugins/looplia-core/skills/workflow-validator/scripts/validate.ts +244 -0
  25. package/plugins/looplia-writer/.claude-plugin/plugin.json +10 -0
  26. package/plugins/looplia-writer/README.md +107 -0
  27. package/plugins/looplia-writer/skills/content-documenter/SKILL.md +189 -0
  28. package/plugins/looplia-writer/skills/id-generator/SKILL.md +120 -0
  29. package/plugins/looplia-writer/skills/idea-synthesis/SKILL.md +162 -0
  30. package/plugins/looplia-writer/skills/media-reviewer/SKILL.md +105 -0
  31. package/plugins/looplia-writer/skills/user-profile-reader/SKILL.md +94 -0
  32. package/plugins/looplia-writer/skills/writing-enhancer/SKILL.md +34 -0
  33. package/plugins/looplia-writer/skills/writing-kit-assembler/SKILL.md +206 -0
  34. package/plugins/looplia-writer/workflows/writing-kit.md +134 -0
@@ -0,0 +1,206 @@
1
+ ---
2
+ name: writing-kit-assembler
3
+ description: |
4
+ Looplia writer skill for assembling final writing kits.
5
+ Combines content analysis and ideas into structured output with suggested outlines.
6
+ Creates comprehensive WritingKit JSON with all components.
7
+ tools: Read, Write
8
+ ---
9
+
10
+ # Writing Kit Assembler Skill
11
+
12
+ Assemble comprehensive writing kits from analysis and ideas.
13
+
14
+ ## Purpose
15
+
16
+ Combine outputs from earlier workflow steps into a final, actionable writing kit:
17
+ - Content summary and metadata
18
+ - Generated ideas (hooks, angles, questions)
19
+ - Suggested outline with sections
20
+ - Supporting quotes and references
21
+
22
+ ## Process
23
+
24
+ ### Step 1: Read Analysis
25
+
26
+ Read content analysis JSON (first input):
27
+ - contentId
28
+ - source metadata
29
+ - summary (headline, tldr, bullets)
30
+ - keyThemes
31
+ - importantQuotes
32
+ - coreIdeas
33
+
34
+ ### Step 2: Read Ideas
35
+
36
+ Read idea synthesis JSON (second input):
37
+ - hooks
38
+ - angles
39
+ - questions
40
+ - personalization context
41
+
42
+ ### Step 3: Create Suggested Outline
43
+
44
+ Design a structured outline:
45
+
46
+ ```
47
+ Introduction
48
+ ├── Hook (from ideas)
49
+ ├── Context/Background
50
+ └── Thesis/Main Point
51
+
52
+ Body Sections (3-5)
53
+ ├── Section 1: {Theme from analysis}
54
+ │ ├── Key point
55
+ │ ├── Supporting quote
56
+ │ └── Transition
57
+ ├── Section 2: {Theme from analysis}
58
+ │ └── ...
59
+ └── Section N: {Theme from analysis}
60
+
61
+ Conclusion
62
+ ├── Summary of key points
63
+ ├── Call to action (from angles)
64
+ └── Closing thought
65
+ ```
66
+
67
+ ### Step 4: Map Content to Sections
68
+
69
+ For each body section:
70
+ 1. Choose a key theme from analysis
71
+ 2. Identify supporting quotes
72
+ 3. Connect to relevant ideas/angles
73
+ 4. Write section summary
74
+
75
+ ### Step 5: Assemble WritingKit
76
+
77
+ Combine all components into final structure.
78
+
79
+ ### Step 6: Write Output
80
+
81
+ Output complete WritingKit JSON.
82
+
83
+ ## Input
84
+
85
+ Two input files:
86
+ 1. Analysis JSON from media-reviewer
87
+ 2. Ideas JSON from idea-synthesis
88
+
89
+ ## Output Schema
90
+
91
+ ```json
92
+ {
93
+ "contentId": "string",
94
+ "source": {
95
+ "type": "video|audio|article|transcript",
96
+ "title": "Original content title",
97
+ "url": "Source URL if available",
98
+ "creator": "Author/creator name"
99
+ },
100
+ "summary": {
101
+ "headline": "One compelling sentence",
102
+ "tldr": "3-5 sentence summary",
103
+ "bullets": ["Key point 1", "Key point 2", "Key point 3"],
104
+ "keyThemes": ["theme1", "theme2"],
105
+ "importantQuotes": [
106
+ {
107
+ "text": "Exact quote from source",
108
+ "timestamp": "12:34",
109
+ "context": "What was being discussed"
110
+ }
111
+ ]
112
+ },
113
+ "ideas": {
114
+ "hooks": [
115
+ { "text": "Hook text", "type": "question" }
116
+ ],
117
+ "angles": [
118
+ { "perspective": "...", "approach": "..." }
119
+ ],
120
+ "questions": [
121
+ { "text": "...", "depth": "medium" }
122
+ ]
123
+ },
124
+ "suggestedOutline": {
125
+ "title": "Suggested article title",
126
+ "sections": [
127
+ {
128
+ "heading": "Introduction",
129
+ "type": "intro",
130
+ "points": ["Hook with question", "Establish context", "Preview main argument"],
131
+ "suggestedHook": "What if...?"
132
+ },
133
+ {
134
+ "heading": "Section title based on theme",
135
+ "type": "body",
136
+ "points": ["Main point", "Evidence/quote", "Analysis"],
137
+ "supportingQuote": {
138
+ "text": "Quote from source",
139
+ "timestamp": "5:23"
140
+ },
141
+ "theme": "Related theme from analysis"
142
+ },
143
+ {
144
+ "heading": "Conclusion",
145
+ "type": "conclusion",
146
+ "points": ["Summarize key insights", "Call to action", "Final thought"],
147
+ "suggestedAngle": "Skeptic's view"
148
+ }
149
+ ]
150
+ },
151
+ "meta": {
152
+ "generatedAt": "2025-01-15T10:30:00Z",
153
+ "workflowVersion": "2.0.0",
154
+ "stepsCompleted": ["analyze-content", "generate-ideas", "build-writing-kit"]
155
+ }
156
+ }
157
+ ```
158
+
159
+ ## Outline Design Guidelines
160
+
161
+ ### Introduction Section
162
+ - Start with a hook from ideas
163
+ - Establish why this matters
164
+ - Preview the structure
165
+
166
+ ### Body Sections (3-5)
167
+ - One theme per section
168
+ - Include supporting quote when available
169
+ - Build logical progression
170
+ - Connect to angles where relevant
171
+
172
+ ### Conclusion Section
173
+ - Summarize (don't repeat)
174
+ - Include call to action
175
+ - End with memorable thought
176
+
177
+ ## Section Mapping
178
+
179
+ | Analysis Component | Outline Usage |
180
+ |--------------------|---------------|
181
+ | keyThemes | Body section headings |
182
+ | importantQuotes | Section supporting quotes |
183
+ | coreIdeas | Section key points |
184
+ | hooks | Introduction opener |
185
+ | angles | Body perspectives, conclusion CTA |
186
+ | questions | Section discussion points |
187
+
188
+ ## Quality Checklist
189
+
190
+ Before outputting:
191
+ - [ ] All required fields present
192
+ - [ ] contentId matches across inputs
193
+ - [ ] At least 3 body sections
194
+ - [ ] Each body section has heading and points
195
+ - [ ] Quotes are properly attributed
196
+ - [ ] Meta includes timestamp
197
+ - [ ] JSON is valid
198
+
199
+ ## Important Rules
200
+
201
+ 1. **Include all components** - Don't omit summary, ideas, or outline
202
+ 2. **Preserve quotes exactly** - Never paraphrase
203
+ 3. **Keep timestamps** - If input has them, output has them
204
+ 4. **Match contentId** - Same ID across all components
205
+ 5. **Design actionable outlines** - Writer should be able to start immediately
206
+ 6. **Use sonnet model** - This requires synthesis and organization
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: writing-kit
3
+ version: 1.1.0
4
+ description: Transform content into structured writing kit with summary, ideas, and outline
5
+
6
+ steps:
7
+ - id: summary
8
+ skill: media-reviewer
9
+ mission: |
10
+ Deep analysis of content to extract key themes, concepts, and narrative structure.
11
+ Extract minimum 3 verbatim quotes with context, at least 5 key bullet points,
12
+ and analyze the narrative flow. Identify related concepts for exploration.
13
+ input: ${{ sandbox }}/inputs/content.md
14
+ output: ${{ sandbox }}/outputs/summary.json
15
+ validate:
16
+ required_fields: [contentId, headline, tldr, bullets, tags, sentiment, category, overview, keyThemes, detailedAnalysis, narrativeFlow, coreIdeas, importantQuotes, context, relatedConcepts]
17
+ min_quotes: 3
18
+ min_key_points: 5
19
+
20
+ - id: ideas
21
+ skill: idea-synthesis
22
+ mission: |
23
+ Generate creative writing ideas, hooks, and angles based on the content summary.
24
+ Create 5 types of hooks: emotional, curiosity, controversy, statistic, and story.
25
+ Develop multiple narrative angles with relevance scores.
26
+ Generate exploratory questions by type (analytical, practical, philosophical, comparative).
27
+ needs: [summary]
28
+ input: ${{ steps.summary.output }}
29
+ output: ${{ sandbox }}/outputs/ideas.json
30
+ validate:
31
+ required_fields: [contentId, hooks, angles, questions]
32
+ has_hooks: true
33
+
34
+ - id: writing-kit
35
+ skill: writing-kit-assembler
36
+ mission: |
37
+ Assemble final writing kit combining summary and ideas.
38
+ Create structured outline with estimated word counts.
39
+ Include meta information (difficulty, time to write, audience).
40
+ Calculate relevance scores based on user profile.
41
+ needs: [summary, ideas]
42
+ input:
43
+ - ${{ steps.summary.output }}
44
+ - ${{ steps.ideas.output }}
45
+ output: ${{ sandbox }}/outputs/writing-kit.json
46
+ final: true
47
+ validate:
48
+ required_fields: [contentId, source, summary, ideas, suggestedOutline, meta]
49
+ min_outline_sections: 4
50
+ has_hooks: true
51
+ ---
52
+
53
+ # Writing Kit Workflow
54
+
55
+ Transform raw content into a comprehensive writing kit with summary, creative ideas, and suggested outlines.
56
+
57
+ ## Pipeline Overview
58
+
59
+ ```
60
+ content.md
61
+
62
+
63
+ ┌─────────────────────┐
64
+ │ media-reviewer │ Step 1: Deep content analysis
65
+ │ (summary.json) │
66
+ └──────────┬──────────┘
67
+
68
+
69
+ ┌─────────────────────┐
70
+ │ idea-synthesis │ Step 2: Generate creative hooks and angles
71
+ │ (ideas.json) │
72
+ └──────────┬──────────┘
73
+
74
+
75
+ ┌─────────────────────────┐
76
+ │ writing-kit-assembler │ Step 3: Assemble final writing kit
77
+ │ (writing-kit.json) │
78
+ └─────────────────────────┘
79
+ ```
80
+
81
+ ## Step Details
82
+
83
+ ### Step 1: Summary (media-reviewer)
84
+
85
+ Deep analysis of content to extract:
86
+ - Key themes and concepts
87
+ - Minimum 3 verbatim quotes with context
88
+ - At least 5 key bullet points
89
+ - Narrative flow analysis
90
+ - Related concepts for exploration
91
+
92
+ ### Step 2: Ideas (idea-synthesis)
93
+
94
+ Generate creative writing inspiration:
95
+ - 5 types of hooks: emotional, curiosity, controversy, statistic, story
96
+ - Multiple narrative angles with relevance scores
97
+ - Exploratory questions by type (analytical, practical, philosophical, comparative)
98
+
99
+ ### Step 3: Writing Kit (writing-kit-assembler)
100
+
101
+ Assemble final kit with:
102
+ - Structured outline with estimated word counts
103
+ - All components from previous steps
104
+ - Meta information (difficulty, time to write, audience)
105
+ - Relevance scores based on user profile
106
+
107
+ ## Quality Standards
108
+
109
+ 1. **Accuracy**: Preserve original meaning without paraphrasing
110
+ 2. **Completeness**: Cover all major themes and ideas
111
+ 3. **Relevance**: Tailor output to user's interests and writing style
112
+ 4. **Creativity**: Provide diverse hooks and angles for inspiration
113
+
114
+ ## User Profile Integration
115
+
116
+ Read `user-profile.json` from workspace root to personalize:
117
+ - Calculate relevance scores based on user's topics of interest
118
+ - Adjust writing tone to match user's preferred style
119
+ - Target word count based on user's typical article length
120
+
121
+ ## Validation Criteria
122
+
123
+ | Step | Skill | Required Fields | Additional Checks |
124
+ |------|-------|-----------------|-------------------|
125
+ | summary | media-reviewer | contentId, headline, tldr, bullets... | min_quotes: 3, min_key_points: 5 |
126
+ | ideas | idea-synthesis | contentId, hooks, angles, questions | has_hooks: true |
127
+ | writing-kit | writing-kit-assembler | contentId, source, summary, ideas... | min_outline_sections: 4 |
128
+
129
+ ## Error Handling
130
+
131
+ If validation fails:
132
+ 1. Review the failed checks in validation result
133
+ 2. Retry the skill-executor with specific feedback
134
+ 3. Report to user if retry also fails