src.integrations.adaptive_documentation module#

Adaptive Documentation Generator for Marcus.

Provides context-aware documentation task generation that adapts to different project sources and work types. Supports evolution from project creation to pre-defined tasks and GitHub issue fixing.

class src.integrations.adaptive_documentation.DocumentationType[source]#

Bases: Enum

Types of documentation that can be generated.

README_DOCUMENTATION = 'readme_documentation'#
BUG_FIX_REPORT = 'bug_fix_report'#
FEATURE_UPDATE = 'feature_update'#
MODIFICATION_SUMMARY = 'modification_summary'#
API_CHANGES = 'api_changes'#
MIGRATION_GUIDE = 'migration_guide'#
class src.integrations.adaptive_documentation.DocumentationContext[source]#

Bases: object

Context for documentation generation decisions.

source_type: str#
work_type: str#
project_name: str#
existing_tasks: List[Task]#
completed_work: List[Task]#
feature_labels: Set[str]#
metadata: Dict[str, Any]#
__init__(source_type, work_type, project_name, existing_tasks, completed_work, feature_labels, metadata)#
Parameters:
Return type:

None

class src.integrations.adaptive_documentation.AdaptiveDocumentationGenerator[source]#

Bases: object

Generates documentation tasks adapted to the context of work performed.

This generator supports multiple documentation strategies: - Project-level documentation for new systems - Feature-specific documentation for additions - Fix reports for bug corrections - Update summaries for modifications

__init__()[source]#

Initialize the adaptive documentation generator.

Return type:

None

create_documentation_tasks(context)[source]#

Create appropriate documentation tasks based on context.

Parameters:

context (DocumentationContext) – Documentation context including source type and work performed

Returns:

List of documentation tasks appropriate for the context

Return type:

List[Task]

should_add_documentation(context)[source]#

Determine if documentation tasks should be added.

Similar to legacy should_add_documentation_task but context-aware.

Return type:

bool

Parameters:

context (DocumentationContext)

src.integrations.adaptive_documentation.create_documentation_context(tasks, project_name, source_type='nlp_project', metadata=None)[source]#

Create DocumentationContext from existing data.

Parameters:
  • tasks (List[Task]) – All project tasks

  • project_name (str) – Name of the project

  • source_type (str) – Source of tasks (nlp_project, github_issue, etc)

  • metadata (Optional[Dict[str, Any]]) – Additional context metadata

Returns:

DocumentationContext configured for the project

Return type:

DocumentationContext