Write technical articles with web research, runnable companion projects, and translations in author's voice
Create technical articles with companion projects and multi-language support.
code/ folder)article_limits.max_words)Plan β Research β Draft (initial) β Create Companion Project β Update Draft β Review β Condense β Translate β Finalize
β β β
βββββββββ Iterate ββββββββββββββ β
β
(if over max_words)
content/articles/YYYY_MM_DD_slug/
βββ 00_context/ # author_profile.json
βββ 01_planning/ # classification.md, outline.md
βββ 02_research/
β βββ sources.json # All researched sources
β βββ research_notes.md
βββ 03_drafts/
β βββ draft_v1.{lang}.md # Initial draft
β βββ draft_v2.{lang}.md # After companion project integration
βββ 04_review/ # checklists
βββ 05_assets/images/
βββ code/ # COMPANION PROJECT
β βββ README.md # How to run the companion project
β βββ src/ # Companion project source code/files
β βββ tests/ # Tests (if applicable)
βββ {slug}.{primary_lang}.md # Primary article
βββ {slug}.{other_lang}.md # Translations
code/ directory for companion project00_context/article_limits.max_words from settings<!-- EXAMPLE: description -->03_drafts/draft_v1.{lang}.mdUse ALL author profile data when writing:
Manual Profile Data
tone.formality: 1=very casual, 10=very formaltone.opinionated: 1=always hedge, 10=strong opinionsphrases.signature: Use naturally (don't overdo)phrases.avoid: Never use thesevocabulary.use_freely: Assume reader knows thesevocabulary.always_explain: Explain on first useVoice Analysis Data (if present in voice_analysis)
sentence_structure.avg_length: Target this sentence lengthsentence_structure.variety: Match style (short/moderate/long)communication_style: Reflect top traits in tonecharacteristic_expressions: Sprinkle these naturallysentence_starters: Use these patternssignature_vocabulary: Prefer these wordsExample:
For author with:
{
"tone": { "formality": 4, "opinionated": 7 },
"voice_analysis": {
"sentence_structure": { "avg_length": 14, "variety": "moderate" },
"communication_style": [{ "trait": "enthusiasm", "percentage": 32 }],
"characteristic_expressions": ["na prΓ‘tica", "o ponto Γ©"],
"sentence_starters": ["EntΓ£o", "O interessante Γ©"]
}
}
Write with:
Use Skill(companion-project-creator) for this phase
CRITICAL: Companion projects must be COMPLETE, RUNNABLE, and VERIFIED.
A Laravel companion project is a FULL Laravel installation. A Node companion project is a FULL Node project.
The companion project is NOT complete until you have actually run and tested it.
Load settings from database first:
# View defaults for the companion project type
bun run "${CLAUDE_PLUGIN_ROOT}"/scripts/show.ts settings code
Or read JSON and extract:
// Settings are loaded from the database via show.ts or article-stats.ts
const codeDefaults = settings.companion_project_defaults.code;
// codeDefaults.scaffold_command
// codeDefaults.verification.install_command
// codeDefaults.verification.run_command
// codeDefaults.verification.test_command
If article task has companion_project field, those values override settings defaults.
# From settings.companion_project_defaults.code.scaffold_command
composer create-project laravel/laravel code --prefer-dist
Add your custom code on top of the scaffolded project:
Never create partial projects with just a few files.
You MUST actually run these commands and confirm they succeed:
cd code
# 1. Install dependencies - MUST SUCCEED
composer install
# β Check: No errors, vendor/ directory exists
# 2. Setup - MUST SUCCEED
cp .env.example .env
php artisan key:generate
touch database/database.sqlite
php artisan migrate
# β Check: No errors
# 3. Run application - MUST START
php artisan serve &
# β Check: "Server running on http://127.0.0.1:8000"
# Stop the server after confirming
# 4. Run tests - ALL MUST PASS
php artisan test
# β Check: "Tests: X passed" with 0 failures
If ANY step fails:
DO NOT proceed to Phase 5 until verification passes.
| Article Topic | Project Type | What to Create |
|---|---|---|
| Laravel/PHP code | code |
Full Laravel project via composer create-project |
| JavaScript/Node | node |
Full Node project via npm init |
| Python | python |
Full Python project with venv |
| DevOps/Docker | config |
Complete docker-compose setup |
| Architecture | diagram |
Complete Mermaid diagrams |
| Project management | document |
Complete templates + filled examples |
Before proceeding to Phase 5:
install_command succeeded (vendor/node_modules exists)run_command starts application without errorstest_command runs with 0 failurescode/
βββ README.md # Setup and run instructions
βββ app/
β βββ ... # Minimal app code
βββ database/
β βββ migrations/
β βββ seeders/
βββ tests/
β βββ Feature/ # Pest tests for main features
βββ composer.json
βββ .env.example # SQLite by default
Standards for Laravel companion projects:
// See article section: "Rate Limiting Basics"code/
βββ README.md # What the documents demonstrate
βββ templates/
β βββ ... # Reusable templates
βββ examples/
βββ ... # Filled-in examples
<!-- EXAMPLE: --> markers with actual code snippetscode/app/Models/Post.php"03_drafts/draft_v2.{lang}.mdReview the article as a whole:
Explanation Flow
Companion Project Integration
Voice Compliance
Technical Accuracy
Completeness
CHECKPOINT: Confirm article + companion project are ready
This phase is MANDATORY if article exceeds max_words from settings.
# Count words in article (excluding frontmatter and code blocks)
# Frontmatter: lines between first --- and second ---
# Code blocks: lines between ``` markers
# Simple word count of prose content only:
sed '/^---$/,/^---$/d; /^```/,/^```$/d' draft_v2.{lang}.md | wc -w
# Read max_words from settings
bun run "${CLAUDE_PLUGIN_ROOT}"/scripts/show.ts settings
# Or read JSON directly:
# bun run "${CLAUDE_PLUGIN_ROOT}"/scripts/show.ts settings
If word count > max_words:
Identify Condensation Targets (in order of priority):
Condensation Techniques (preserve quality):
CRITICAL: Preserve Author Voice
DO NOT Remove:
After condensing:
# Save as draft_v3 (condensed version)
# 03_drafts/draft_v3.{lang}.md
If unable to condense below max_words without quality loss:
CHECKPOINT: Article is within word limit while maintaining quality
Only skip if a companion project makes absolutely no sense:
If skipping, document in task:
{
"companion_project": {
"skipped": true,
"skip_reason": "Opinion piece with no actionable code or templates"
}
}
# Companion Project: [Topic]
Demonstrates [what this companion project shows] from the article "[Article Title]".
## Requirements
- PHP 8.2+
- Composer
- (any other requirements)
## Setup
\`\`\`bash
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate --seed
\`\`\`
## Run Tests
\`\`\`bash
php artisan test
\`\`\`
## Key Files
| File | Description |
|------|-------------|
| `app/Models/Post.php` | Demonstrates eager loading |
| `tests/Feature/QueryTest.php` | Tests N+1 detection |
## Article Reference
This companion project accompanies the article:
- **Title**: [Article Title]
- **Section**: See "Implementing Eager Loading" section
<?php
// ===========================================
// ARTICLE: Rate Limiting in Laravel 11
// SECTION: Creating Custom Rate Limiters
// ===========================================
namespace App\Providers;
use Illuminate\Support\Facades\RateLimiter;
class AppServiceProvider extends ServiceProvider
{
public function boot(): void
{
// Custom rate limiter for API endpoints
// See article section: "Dynamic Rate Limits"
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
});
}
}
{
"companion_project": {
"type": "code",
"path": "code/",
"description": "Minimal Laravel app demonstrating rate limiting",
"technologies": ["Laravel 11", "SQLite", "Pest 3"],
"has_tests": true,
"files": [
"app/Providers/AppServiceProvider.php",
"routes/api.php",
"tests/Feature/RateLimitTest.php"
],
"run_instructions": "composer install && php artisan test"
}
}