OO Component Documentation

OO Component Documentation

Creates or updates standardized documentation for an object-oriented component from its source code, following a shared template and separate create and update workflows.

Skill files4 files

assets/

references/

SKILL.md75 lines
1
---
2
name: oo-component-documentation
3
description: 'Create or update standardized object-oriented component documentation using a shared template plus mode-specific guidance for new and existing docs.'
4
---
5
6
# OO Component Documentation
7
8
Create new documentation for an object-oriented component or update an existing component documentation file by analyzing the current implementation.
9
10
## Determine the mode first
11
12
Choose the workflow before writing anything:
13
14
1. Use **update mode** when the user provides an existing documentation Markdown file, points to a docs path, or explicitly asks to refresh or revise existing documentation. Follow [references/update-mode.md](references/update-mode.md).
15
2. Use **create mode** when the user provides a source file or folder, points to a component path, or asks to generate documentation from code. Follow [references/create-mode.md](references/create-mode.md).
16
3. If both code and an existing documentation file are provided, treat the existing documentation file as the output target and use the current source code as the source of truth.
17
4. If the request is ambiguous, infer the mode from the path type whenever possible: existing Markdown documentation file means update mode; source/component path means create mode.
18
19
## Documentation standards
20
21
- DOC-001: Follow C4 Model documentation levels (Context, Containers, Components, Code)
22
- DOC-002: Align with Arc42 software architecture documentation template
23
- DOC-003: Comply with IEEE 1016 Software Design Description standard
24
- DOC-004: Use Agile Documentation principles (just enough documentation that adds value)
25
- DOC-005: Target developers and maintainers as the primary audience
26
27
## Shared analysis guidance
28
29
- ANA-001: Determine the primary component boundary and whether the input represents a folder, file, or existing documentation target
30
- ANA-002: Examine source code files for class structures, inheritance, composition, and interfaces
31
- ANA-003: Identify design patterns, architectural decisions, and integration points
32
- ANA-004: Document or refresh public APIs, interfaces, dependencies, and usage patterns
33
- ANA-005: Capture method parameters, return values, asynchronous behavior, exceptions, and lifecycle concerns
34
- ANA-006: Assess performance, security, reliability, maintainability, and extensibility characteristics
35
- ANA-007: Infer data flow, collaboration patterns, and relationships with surrounding components
36
- ANA-008: Keep the documentation grounded in the implementation; avoid inventing behavior that is not supported by the code
37
38
## Shared output requirements
39
40
- Use [assets/documentation-template.md](assets/documentation-template.md) as the canonical section checklist and baseline structure.
41
- Keep the output in Markdown with a clear heading hierarchy, tables where useful, code blocks for examples, and Mermaid diagrams when architecture relationships need to be visualized.
42
- Make examples and interface descriptions match the current implementation instead of generic placeholders.
43
- Include only information that can be supported by the code, project structure, configuration, or clearly stated assumptions.
44
- When source coverage is incomplete, document the limitation explicitly instead of guessing.
45
46
## Language-specific optimizations
47
48
- LNG-001: **C#/.NET** - async/await, dependency injection, configuration, disposal, options patterns
49
- LNG-002: **Java** - Spring framework, annotations, exception handling, packaging, dependency injection
50
- LNG-003: **TypeScript/JavaScript** - modules, async patterns, types, npm dependencies, runtime boundaries
51
- LNG-004: **Python** - packages, virtual environments, type hints, testing, dependency management
52
53
## Error handling
54
55
- ERR-001: If the path does not exist, explain what path was expected and whether the skill needs a source path or an existing documentation file
56
- ERR-002: If no relevant source files are found, document the gap and suggest the likely locations to inspect next
57
- ERR-003: If the documentation target cannot be inferred from the request, state the ambiguity and ask for the missing path only when inference is not possible
58
- ERR-004: If the code uses non-standard architectural patterns, document the custom approach rather than forcing it into a generic pattern
59
- ERR-005: If source access is incomplete, continue with available evidence and clearly call out any unsupported sections
60
61
## Workflow
62
63
1. Determine whether the task is create mode or update mode.
64
2. Inspect the component implementation and any related files needed to understand its public surface area and internal structure.
65
3. Use [assets/documentation-template.md](assets/documentation-template.md) as the shared documentation scaffold.
66
4. Apply the mode-specific rules in [references/create-mode.md](references/create-mode.md) or [references/update-mode.md](references/update-mode.md).
67
5. Produce or revise the documentation so that diagrams, examples, interfaces, dependencies, and quality attributes reflect the current implementation.
68
69
## Completion criteria
70
71
- The documentation clearly identifies the component purpose, architecture, interfaces, implementation details, usage patterns, quality attributes, and references.
72
- Front matter fields are accurate for the selected mode.
73
- Examples and diagrams match the implementation.
74
- Any unknowns, gaps, or assumptions are explicitly called out.
75

© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…