with one click
ln-140-test-docs-creator
// Creates test documentation (testing-strategy.md, tests/README.md) with Risk-Based Testing philosophy. Use when setting up test strategy for a project.
// Creates test documentation (testing-strategy.md, tests/README.md) with Risk-Based Testing philosophy. Use when setting up test strategy for a project.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | ln-140-test-docs-creator |
| description | Creates test documentation (testing-strategy.md, tests/README.md) with Risk-Based Testing philosophy. Use when setting up test strategy for a project. |
| license | MIT |
| model | claude-sonnet-4-6 |
Paths: File paths (
references/,../ln-*) are relative to this skill directory.
Type: L2 Worker
This skill creates and validates test documentation: testing-strategy.md (universal testing philosophy) + tests/README.md (test organization structure with tests/automated/ + Story-Level Test Task Pattern).
Creates and validates test documentation (testing-strategy.md + tests/README.md) establishing universal testing philosophy, Risk-Based Testing strategy, tests/automated/ as the default automated-test root, and the Story-Level Test Task Pattern for any project.
This skill is a L2 WORKER invoked by ln-100-documents-pipeline orchestrator.
This skill should be used directly when:
The skill follows a 3-phase workflow: CREATE ā VALIDATE STRUCTURE ā VALIDATE CONTENT. Each phase builds on the previous, ensuring complete structure and semantic validation.
MANDATORY READ: Load references/docs_quality_contract.md, and references/markdown_read_protocol.md.
Optional rule catalog: load references/docs_quality_rules.json only when exact rule IDs, path matrices, or allowlisted placeholder exceptions are needed.
Objective: Establish test philosophy and documentation structure.
Process:
1.1 Check & create directories:
docs/reference/guides/ exists ā create if missingtests/ exists ā create if missingtests/manual/ exists ā create if missingtests/manual/results/ exists ā create if missingtests/manual/results/ to project .gitignore if not present1.2 Check & create documentation files:
Check if docs/reference/guides/testing-strategy.md exists
If exists:
If NOT exists:
ln-140-test-docs-creator/references/templates/testing_strategy_template.md ā docs/reference/guides/testing-strategy.md[CURRENT_DATE] ā current date (YYYY-MM-DD)Check if tests/README.md exists
If exists:
If NOT exists:
ln-140-test-docs-creator/references/templates/tests_readme_template.md ā tests/README.md{{DATE}} ā current date (YYYY-MM-DD)1.3 Output:
docs/reference/guides/
āāā testing-strategy.md # Created or existing
tests/
āāā README.md # Created or existing
āāā manual/
āāā results/ # Created, added to .gitignore
Objective: Ensure test documentation files comply with structural requirements and auto-fix violations.
Process:
2.1 Check SCOPE tags:
<!-- SCOPE: ... --> tag and metadata markers in each<!-- SCOPE: Universal testing philosophy (Risk-Based Testing, test pyramid, isolation patterns) --><!-- SCOPE: Test organization structure (directory layout, Story-Level Test Task Pattern) -->scope_tags_added += 12.2 Check required sections:
references/questions.md## [Section Name] header existsmissing_sections += 12.3 Check Maintenance section:
## Maintenance header## Maintenance
**Last Updated:** [current date]
**Update Triggers:**
- Test framework changes
- Test organization changes
- New test patterns introduced
**Verification:**
- [ ] All test examples follow current framework syntax
- [ ] Directory structure matches actual tests/
- [ ] Test runner commands are current
maintenance_added += 12.4 Check POSIX file endings:
posix_fixed += 12.5 Report validation:
ā
Structure validation complete:
- SCOPE tags: [added N / already present]
- Missing sections: [added N sections]
- Maintenance sections: [added N / already present]
- POSIX endings: [fixed N / compliant]
Objective: Ensure each section answers its questions with meaningful content and populate test-specific sections from auto-discovery.
Process:
3.1 Load validation spec:
references/questions.md3.2 Validate testing-strategy.md sections:
For this file, use standard template content (no auto-discovery needed):
Testing Philosophy section:
Test Levels section:
Note: testing-strategy.md is universal philosophy - no project-specific auto-discovery needed.
3.3 Validate tests/README.md sections with auto-discovery:
Section: Test Organization
Auto-discover test framework:
package.json ā "devDependencies" and "dependencies":
requirements.txt (if Python project):
go.mod (if Go project):
framework_detected = "[framework]"framework_detected = NoneAuto-discover test directory structure:
"tests/automated/e2e/**/*.{js,ts,py,go}""tests/automated/integration/**/*.{js,ts,py,go}""tests/automated/unit/**/*.{js,ts,py,go}"e2e_count = len(e2e_files)integration_count = len(integration_files)unit_count = len(unit_files)tests/
automated/
e2e/ (empty, ready for E2E tests)
integration/ (empty, ready for Integration tests)
unit/ (empty, ready for Unit tests)
Auto-discover naming conventions:
*.test.js ā "*.test.js" convention*.spec.ts ā "*.spec.ts" conventiontest_*.py ā "test_*.py" convention*_test.go ā "*_test.go" conventionCheck Test Organization section content:
tests/automated/e2e, tests/automated/integration, tests/automated/unit)Section: Running Tests
Auto-discover test runner command:
package.json ā "scripts" ā "test""jest" ā Test runner: "npm test" (runs jest)"vitest" ā Test runner: "npm test" (runs vitest)"mocha" ā Test runner: "npm test" (runs mocha)Auto-discover coverage command (optional):
package.json ā "scripts" for:
Check Running Tests section content:
3.4 Report content validation:
ā
Content validation complete:
- testing-strategy.md: [2 sections checked]
- tests/README.md: [2 sections checked]
- Test framework: [detected framework or "Not detected"]
- Test structure: [automated/e2e, automated/integration, automated/unit counts or "Created placeholder"]
- Naming convention: [pattern or "Framework default"]
- Test runner: [command]
- Coverage command: [command]
docs/reference/guides/
āāā testing-strategy.md # Universal testing philosophy (465 lines)
tests/
āāā README.md # Test organization + Story-Level Pattern (112 lines)
Note: Actual test directories (e2e/, integration/, unit/) created during Story test task execution or Phase 3 if missing.
SCOPE, metadata markers, Quick Navigation, Agent Entry, and Maintenancereferences/risk_based_testing_guide.mdTesting Strategy Template:
references/templates/testing_strategy_template.md - Universal testing philosophy with:
tests/automated/e2e, tests/automated/integration, tests/automated/unit definitions)Tests README Template:
references/templates/tests_readme_template.md - Test organization with:
Validation Specification:
references/questions.md (v1.0.0) - Question-driven validation:
Invoked by: ln-100-documents-pipeline orchestrator
Requires:
docs/reference/guides/ directory (created by ln-120-reference-docs-creator or Phase 1 if missing)Creates:
docs/reference/guides/testing-strategy.md (universal testing philosophy)tests/README.md (test organization structure)Return a normalized summary so ln-100 can run one centralized docs-quality gate:
{
"created_files": [
"docs/reference/guides/testing-strategy.md",
"tests/README.md"
],
"skipped_files": [],
"quality_inputs": {
"doc_paths": [
"docs/reference/guides/testing-strategy.md",
"tests/README.md"
],
"owners": {
"docs/reference/guides/testing-strategy.md": "ln-140-test-docs-creator",
"tests/README.md": "ln-140-test-docs-creator"
}
},
"validation_status": "passed|passed_with_fixes|skipped"
}
MANDATORY READ: Load references/docs_generation_summary_contract.md
Accept optional summaryArtifactPath.
Summary kind:
docs-generationRequired payload semantics:
worker = "ln-140"statuscreated_filesskipped_filesquality_inputsvalidation_statuswarningsWrite the summary to the provided artifact path or return the same envelope in structured output.
Before completing work, verify ALL checkpoints:
ā Structure Created (Phase 1):
docs/reference/guides/ directory existstests/ directory existstests/manual/ directory existstests/manual/results/ directory existstests/manual/results/ added to .gitignoretesting-strategy.md exists (created or existing)tests/README.md exists (created or existing)ā Structure Validated (Phase 2):
ā Content Validated (Phase 3):
ā Reporting:
created_files, skipped_files, quality_inputs, and validation_statusStandards:
Language: English only
Auto-Discovery Support:
Version: 7.2.0 Last Updated: 2026-01-15