зеркало из
https://github.com/iharh/notes.git
synced 2025-10-29 20:56:06 +02:00
194 строки
7.2 KiB
Plaintext
194 строки
7.2 KiB
Plaintext
https://mermaid.live/
|
|
https://mermaid.js.org/syntax/sequenceDiagram.html
|
|
|
|
https://gist.github.com/martinwoodward/8ad6296118c975510766d80310db71fd
|
|
https://github.com/ravitemer/mcphub.nvim
|
|
|
|
```mermaid
|
|
sequenceDiagram
|
|
participant CLI as CLI (MCP Tools)
|
|
participant KBBuild as KBBuildTool
|
|
participant Orch as KBOrchestrator
|
|
participant Chunk as ChunkPreparation
|
|
participant Analysis as KBAnalysisAgent (AI)
|
|
participant Structure as KBStructureBuilder
|
|
participant Agg as KBAggregationAgent (AI)
|
|
participant Stats as KBStatistics
|
|
participant Config as SourceConfigManager
|
|
|
|
Note over CLI,Config: Knowledge Base Build Pipeline
|
|
|
|
CLI->>KBBuild: kb_build(source, input_file, date_time, output_path)
|
|
KBBuild->>KBBuild: resolveOutputPath()
|
|
KBBuild->>Orch: run(KBOrchestratorParams)
|
|
|
|
Note over Orch: 1. Load Context
|
|
Orch->>Config: loadConfig(outputPath)
|
|
Config-->>Orch: SourceConfig
|
|
Orch->>Orch: loadKBContext()
|
|
Note right of Orch: Load existing people,<br/>topics, max IDs
|
|
|
|
Note over Orch: 2. Prepare Input
|
|
Orch->>Orch: readInputFile()
|
|
Orch->>Chunk: chunkText(content)
|
|
Chunk-->>Orch: List<Chunk>
|
|
|
|
Note over Orch: 3. AI Analysis (Chunked)
|
|
loop For each chunk
|
|
Orch->>Analysis: run(AnalysisParams + chunk)
|
|
Analysis->>Analysis: chat(kb_analysis prompt)
|
|
Note right of Analysis: Extract themes,<br/>questions, answers,<br/>notes via AI
|
|
Analysis->>Analysis: transformAIResponse()
|
|
Analysis-->>Orch: AnalysisResult
|
|
end
|
|
Orch->>Orch: mergeAnalysisResults()
|
|
|
|
Note over Orch: 4. Build Structure (Mechanical)
|
|
Orch->>Structure: buildTopicStructure(analysis)
|
|
Structure->>Structure: Create topics/[id]/[id].md
|
|
Structure->>Structure: Create themes/[id].md
|
|
Structure->>Structure: Create questions/q_XXXX.md
|
|
Structure->>Structure: Create answers/a_XXXX.md
|
|
Structure->>Structure: Create notes/n_XXXX.md
|
|
Structure-->>Orch: Structure built
|
|
|
|
Orch->>Structure: buildPersonProfiles(analysis)
|
|
Structure->>Structure: Aggregate contributions
|
|
Structure->>Structure: Create people/[Name]/[Name].md
|
|
Structure-->>Orch: Profiles built
|
|
|
|
Note over Orch: 5. AI Aggregation (One-by-one)
|
|
loop For each person
|
|
Orch->>Agg: run(AggregationParams person)
|
|
Agg->>Agg: chat(kb_aggregation prompt)
|
|
Note right of Agg: Generate narrative<br/>description
|
|
Agg-->>Orch: Description text
|
|
Orch->>Structure: updatePersonDescription()
|
|
end
|
|
|
|
loop For each topic
|
|
Orch->>Agg: run(AggregationParams topic)
|
|
Agg->>Agg: chat(kb_aggregation prompt)
|
|
Agg-->>Orch: Description text
|
|
Orch->>Structure: updateTopicDescription()
|
|
end
|
|
|
|
loop For each theme
|
|
Orch->>Agg: run(AggregationParams theme)
|
|
Agg->>Agg: chat(kb_aggregation prompt)
|
|
Agg-->>Orch: Description text
|
|
Orch->>Structure: updateThemeDescription()
|
|
end
|
|
|
|
Note over Orch: 6. Generate Statistics (Mechanical)
|
|
Orch->>Stats: generateStatistics(kbPath)
|
|
Stats->>Stats: generateActivityTimeline()
|
|
Stats->>Stats: generateTopicOverview()
|
|
Stats->>Stats: generateIndex()
|
|
Stats-->>Orch: Statistics generated
|
|
|
|
Note over Orch: 7. Update Configuration
|
|
Orch->>Config: updateLastSyncDate(source, dateTime)
|
|
Config->>Config: Save source_config.json
|
|
Config-->>Orch: Config saved
|
|
|
|
Orch-->>KBBuild: KBResult
|
|
KBBuild-->>CLI: Success + stats
|
|
```
|
|
|
|
|
|
https://raw.githubusercontent.com/sparfenyuk/mcp-proxy/refs/heads/main/README.md
|
|
```mermaid
|
|
graph LR
|
|
A["Claude Desktop"] <--> |stdio| B["mcp-proxy"]
|
|
B <--> |SSE| C["External MCP Server"]
|
|
|
|
style A fill:#ffe6f9,stroke:#333,color:black,stroke-width:2px
|
|
style B fill:#e6e6ff,stroke:#333,color:black,stroke-width:2px
|
|
style C fill:#e6ffe6,stroke:#333,color:black,stroke-width:2px
|
|
```
|
|
|
|
https://raw.githubusercontent.com/IstiN/dmtools-ai-teammate/refs/heads/main/README.md
|
|
```mermaid
|
|
sequenceDiagram
|
|
participant User as 👤 User
|
|
participant Jira as 🎫 Jira
|
|
participant JiraAuto as 🤖 Jira Automation
|
|
participant GitHub as 🐙 GitHub Actions
|
|
participant DMTools as 🔧 DMTools CLI
|
|
participant Cursor as 🤖 Cursor Agent
|
|
participant FS as 📁 File System
|
|
|
|
Note over User, FS: AI Teammate Workflow Process
|
|
|
|
User->>Jira: Assigns issue to "AI Teammate"
|
|
Note right of Jira: Issue assigned with specific conditions
|
|
|
|
Jira->>JiraAuto: Triggers automation rule
|
|
Note right of JiraAuto: Condition: Assignee = AI Teammate<br/>+ No "ai_questions_asked" label
|
|
|
|
JiraAuto->>GitHub: POST webhook to workflow dispatch
|
|
Note right of GitHub: Sends config_file + encoded_config<br/>with issue key and initiator
|
|
|
|
GitHub->>DMTools: Executes workflow with parameters
|
|
Note right of DMTools: Installs Cursor CLI + DMTools CLI
|
|
|
|
DMTools->>FS: Creates input/ folder structure
|
|
Note right of FS: Prepares instructions from config
|
|
|
|
DMTools->>DMTools: Reads agent configuration
|
|
Note right of DMTools: Loads story_description.json or<br/>story_questions.json
|
|
|
|
DMTools->>FS: Writes instructions to input/ folder
|
|
Note right of FS: Contains JQL query, user context,<br/>AI role, and formatting rules
|
|
|
|
DMTools->>Cursor: Executes CLI command
|
|
Note right of Cursor: ./cicd/scripts/run-cursor-agent.sh<br/>--model sonnet-4
|
|
|
|
Cursor->>FS: Reads input/ folder
|
|
Note right of Cursor: Processes instructions and context
|
|
|
|
Cursor->>Jira: Queries ticket data via JQL
|
|
Note right of Jira: Gets current description, comments,<br/>attachments, child tickets
|
|
|
|
Cursor->>Cursor: AI Processing
|
|
Note right of Cursor: Analyzes content based on role<br/>and instructions
|
|
|
|
Cursor->>FS: Writes output to outputs/response.md
|
|
Note right of FS: Generated content ready for processing
|
|
|
|
alt Story Description Agent (outputType: "field")
|
|
DMTools->>DMTools: Executes assignForReview.js
|
|
Note right of DMTools: Post-processing script
|
|
|
|
DMTools->>Jira: Updates ticket description
|
|
Note right of Jira: Replaces description field<br/>with enhanced content
|
|
|
|
DMTools->>Jira: Assigns ticket for review
|
|
Note right of Jira: Changes assignee to reviewer
|
|
|
|
DMTools->>Jira: Adds processing labels
|
|
Note right of Jira: Adds "ai_description_updated" label
|
|
|
|
else Story Questions Agent (outputType: "none")
|
|
DMTools->>DMTools: Executes createQuestionsAndAssignForReview.js
|
|
Note right of DMTools: Parses JSON array from response.md
|
|
|
|
loop For each question in JSON array
|
|
DMTools->>Jira: Creates new sub-ticket
|
|
Note right of Jira: Summary, Priority, Description<br/>from JSON object
|
|
|
|
DMTools->>Jira: Links as child to parent
|
|
Note right of Jira: Sets parent-child relationship
|
|
end
|
|
|
|
DMTools->>Jira: Adds "ai_questions_asked" label
|
|
Note right of Jira: Prevents duplicate processing
|
|
|
|
DMTools->>Jira: Assigns parent ticket for review
|
|
Note right of Jira: Changes assignee to reviewer
|
|
end
|
|
|
|
Note over User, FS: Process Complete - Jira Updated
|
|
```
|