annotate-source-files

Solid

Add PUT workflow annotations to source files using the correct language-specific comment prefix. Covers annotation syntax, skeleton generation via put_generate(), multiline annotations, .internal variables, and validation. Supports 30+ languages with automatic comment prefix detection. Use after analyzing a codebase and having an annotation plan, when adding workflow documentation to new or existing source files, or when documenting data pipelines, ETL processes, or multi-step computations.

Data & Documents 26 stars 4 forks Updated today MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
48
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Annotate Source Files Add PUT workflow annotations to source files so putior can extract structured workflow data and generate Mermaid diagrams. ## When to Use - After analyzing a codebase with `analyze-codebase-workflow` and having an annotation plan - Adding workflow documentation to new or existing source files - Enriching auto-detected workflows with manual labels and connections - Documenting data pipelines, ETL processes, or multi-step computations ## Inputs - **Required**: Source files to annotate - **Required**: Annotation plan or knowledge of the workflow steps - **Optional**: Style preference: single-line or multiline (default: single-line) - **Optional**: Whether to use `put_generate()` for skeleton generation (default: yes) ## Procedure ### Step 1: Determine Comment Prefix Each language has a specific comment prefix for PUT annotations. Use `get_comment_prefix()` to find the correct one. ```r library(putior) # Common prefixes get_comment_prefix("R") # "#" get_comment_prefix("py") # "#" get_comment_prefix("sql") # "--" get_comment_prefix("js") # "//" get_comment_prefix("ts") # "//" get_comment_prefix("go") # "//" get_comment_prefix("rs") # "//" get_comment_prefix("m") # "%" get_comment_prefix("lua") # "--" ``` **Got:** A string like `"#"`, `"--"`, `"//"`, or `"%"`. > **Line and block comments:** putior detects annotations in both line comments (`//`, `#`, `--`) and C-style block comments (`/* */`, `/** */`). For JS/TS, both `//` and ...

Details

Author
pjt222
Repository
pjt222/agent-almanac
Created
1 years ago
Last Updated
today
Language
R
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category