Skip to content

Commit da3aefb

Browse files
authored
docs: expand flowise and logseq advanced chapters (#58)
1 parent c2f6299 commit da3aefb

9 files changed

Lines changed: 251 additions & 92 deletions

File tree

tutorials/flowise-llm-orchestration/06-security-governance.md

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,50 @@ parent: "Flowise LLM Orchestration"
88

99
# Chapter 6: Security and Governance
1010

11-
Security controls are required when orchestrating models, tools, and external data.
11+
Flowise workflows combine models, tools, connectors, and credentials. Governance must be explicit.
1212

13-
## Core Risk Areas
13+
## Primary Risk Areas
1414

15-
- secret leakage in node configs and logs
16-
- unsafe tool execution with unvalidated model output
17-
- data exfiltration via connectors
15+
- secrets exposed in node configs or logs
16+
- unsafe tool execution from unvalidated model outputs
17+
- data exfiltration through permissive connectors
18+
- tenant boundary violations in shared deployments
1819

19-
## Governance Controls
20+
## Security Control Layers
2021

21-
- scoped credentials per workflow/environment
22-
- allowlisted tools and outbound domains
23-
- policy checks for prompt and response classes
24-
- immutable audit logs for workflow runs
22+
| Layer | Required Control |
23+
|:------|:-----------------|
24+
| Credential handling | scoped secrets per environment/workflow |
25+
| Tool invocation | input validation + allowlists |
26+
| Data access | least privilege for connectors and stores |
27+
| Network egress | outbound domain and protocol restrictions |
28+
| Audit | immutable run-level logs with redaction |
29+
30+
## Governance Process
31+
32+
1. classify workflow risk level (read-only vs mutating)
33+
2. require reviews for prompt/node changes on high-risk flows
34+
3. version workflow definitions and policies together
35+
4. enforce release gates before production promotion
36+
37+
## Runtime Safeguards
38+
39+
- timeout budgets per node
40+
- bounded retry policies
41+
- explicit human approval for destructive actions
42+
- deny-by-default for new external tool integrations
43+
44+
## Incident Readiness
45+
46+
Maintain playbooks for:
47+
48+
- secret leakage response
49+
- unsafe automation rollback
50+
- connector compromise or abuse
51+
- tenant-isolation incidents
2552

2653
## Summary
2754

28-
You now understand baseline security posture for Flowise workflow operations.
55+
You now have a practical security and governance baseline for operating Flowise in production.
2956

3057
Next: [Chapter 7: Observability](07-observability.md)

tutorials/flowise-llm-orchestration/07-observability.md

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,47 @@ parent: "Flowise LLM Orchestration"
88

99
# Chapter 7: Observability
1010

11-
Observability converts workflow execution into actionable operational signals.
11+
Observability turns visual workflow orchestration into measurable production behavior.
1212

1313
## Metrics Baseline
1414

15-
- workflow run latency (p50/p95/p99)
16-
- node-level failure rates and retry counts
17-
- token usage and cost per workflow
18-
- external dependency error rates
15+
Track at least:
16+
17+
- workflow latency (p50/p95/p99)
18+
- node-level error and retry rates
19+
- model token usage and cost per run
20+
- connector dependency latency/failure rates
1921

2022
## Trace Strategy
2123

22-
- assign run IDs to every invocation
23-
- capture node input/output metadata safely
24-
- correlate model/tool calls within one trace
24+
Use a single run ID from entrypoint to final output.
25+
26+
Per node, capture:
27+
28+
- start/end timestamps
29+
- node type and version
30+
- safe metadata for inputs/outputs
31+
- retry and fallback path taken
32+
33+
This allows fast root-cause analysis for partial failures.
34+
35+
## Logging Standards
36+
37+
- redact secrets and sensitive payload fields
38+
- keep structured logs (JSON) for machine querying
39+
- include policy decisions (allowed/blocked/escalated)
40+
41+
## Alerting Rules
42+
43+
| Alert | Trigger |
44+
|:------|:--------|
45+
| latency regression | p95 exceeds SLO threshold |
46+
| failure burst | node error rate spike |
47+
| cost anomaly | run cost deviates from baseline |
48+
| dependency outage | repeated connector timeout/failures |
2549

2650
## Summary
2751

28-
You can now instrument Flowise workflows for debugging and performance management.
52+
You can now instrument Flowise workflows to debug incidents quickly and manage performance/cost predictably.
2953

3054
Next: [Chapter 8: Extension Ecosystem](08-extension-ecosystem.md)

tutorials/flowise-llm-orchestration/08-extension-ecosystem.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,40 @@ parent: "Flowise LLM Orchestration"
88

99
# Chapter 8: Extension Ecosystem
1010

11-
This chapter covers sustainable extension development and ecosystem growth.
11+
A sustainable extension ecosystem determines whether Flowise remains adaptable as requirements evolve.
1212

1313
## Extension Design Principles
1414

15-
- stable input/output contracts for custom nodes
16-
- semantic versioning for extension APIs
17-
- compatibility tests across core Flowise versions
15+
- keep node input/output contracts explicit and versioned
16+
- isolate side effects behind clear interfaces
17+
- ship deterministic error semantics
18+
- document compatibility by Flowise/core dependency versions
19+
20+
## Release and Compatibility Model
21+
22+
1. semantic version extension packages
23+
2. maintain compatibility matrix per Flowise release line
24+
3. run extension conformance tests in CI
25+
4. deprecate old APIs with migration notes and timelines
1826

1927
## Distribution Patterns
2028

21-
- internal extension catalogs for enterprise teams
22-
- open-source packages for community reuse
23-
- review workflows for security and quality gates
29+
- internal extension catalogs for enterprise governance
30+
- open-source packages for reusable community nodes
31+
- signed artifact distribution for high-trust environments
32+
33+
## Quality Gates
34+
35+
| Gate | Purpose |
36+
|:-----|:--------|
37+
| schema tests | prevent contract regressions |
38+
| security review | catch unsafe connector/tool behaviors |
39+
| performance checks | detect high-latency node paths |
40+
| docs completeness | ensure operators can support extension |
2441

2542
## Final Summary
2643

27-
You now have complete Flowise coverage from architecture and execution to secure production and extensibility.
44+
You now have a blueprint for building and maintaining a robust Flowise extension ecosystem.
2845

2946
Related:
3047
- [Flowise Index](index.md)

tutorials/logseq-knowledge-management/02-system-architecture.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,38 @@ parent: "Logseq Knowledge Management"
88

99
# Chapter 2: System Architecture
1010

11-
This chapter maps Logseq's desktop architecture and data flow.
11+
This chapter maps Logseq's architecture from desktop runtime to graph-level services.
1212

13-
## Architecture Layers
13+
## Core Architecture Layers
1414

15-
- Electron shell for desktop runtime and native integrations.
16-
- ClojureScript core for state + domain logic.
17-
- Datascript + filesystem for local-first persistence.
15+
- **Desktop shell**: Electron runtime and native integration boundary
16+
- **Application core**: ClojureScript state, commands, and domain logic
17+
- **Persistence/index**: plain-text files plus in-memory/query index
18+
- **UI layer**: block editor, page views, graph view, search surfaces
1819

19-
## Data Flow
20+
## Data Flow Model
2021

2122
```text
22-
user action -> event handler -> state update -> markdown write/sync
23+
user action -> command/event -> state transition -> file sync/index update -> UI re-render
2324
```
2425

25-
## Core Modules
26+
## Module Responsibilities
2627

27-
- parser and block index
28-
- page/link graph manager
29-
- search and query execution
30-
- plugin runtime bridge
28+
| Module | Responsibility |
29+
|:-------|:---------------|
30+
| parser | convert markdown/org into block structures |
31+
| block graph manager | maintain parent/child and reference edges |
32+
| query engine | execute page/block graph queries |
33+
| plugin bridge | expose extension hooks safely |
34+
35+
## Architectural Tradeoffs
36+
37+
- local-first responsiveness vs cross-device consistency complexity
38+
- plain-text durability vs richer schema constraints
39+
- extensibility power vs plugin isolation/security overhead
3140

3241
## Summary
3342

34-
You can now identify where Logseq responsibilities are split across runtime layers.
43+
You can now reason about where Logseq behavior originates and where to debug architectural issues.
3544

3645
Next: [Chapter 3: Local-First Data](03-local-first-data.md)

tutorials/logseq-knowledge-management/03-local-first-data.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,39 @@ parent: "Logseq Knowledge Management"
88

99
# Chapter 3: Local-First Data
1010

11-
Logseq's local-first model combines plain-text files with indexed graph state.
11+
Logseq's local-first model centers on user-owned files with graph indexing layered on top.
1212

1313
## Storage Principles
1414

15-
- Markdown/Org files remain user-owned source of truth.
16-
- Datascript index accelerates query and traversal.
17-
- Sync is optional, not required for core app behavior.
15+
- markdown/org files are canonical source of truth
16+
- index/cache layers accelerate queries and backlinks
17+
- core workflows remain usable offline
1818

19-
## Integrity Practices
19+
## Consistency Model
2020

21-
- Use deterministic block IDs.
22-
- Rebuild index from files on corruption recovery.
23-
- Keep file writes atomic for crash safety.
21+
In practice, systems must reconcile:
22+
23+
1. file-system truth
24+
2. in-memory graph state
25+
3. rendered UI state
26+
27+
Robust implementations include deterministic reload/index rebuild paths when state diverges.
28+
29+
## Durability and Recovery
30+
31+
- atomic file writes where possible
32+
- deterministic block IDs for stable references
33+
- index rebuild tools for corruption scenarios
34+
- clear conflict resolution strategy for sync setups
35+
36+
## Local-First Benefits
37+
38+
- data portability and longevity
39+
- lower dependence on hosted services
40+
- predictable offline behavior
2441

2542
## Summary
2643

27-
You can now reason about Logseq's local durability and synchronization tradeoffs.
44+
You can now evaluate local-first tradeoffs and design recovery pathways that protect data integrity.
2845

2946
Next: [Chapter 4: Development Setup](04-development-setup.md)

tutorials/logseq-knowledge-management/05-block-data-model.md

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,43 @@ parent: "Logseq Knowledge Management"
88

99
# Chapter 5: Block Data Model
1010

11-
Blocks are Logseq's atomic knowledge units.
11+
Blocks are the atomic units of content and graph connectivity in Logseq.
1212

13-
## Block Fields
13+
## Block Structure
1414

15-
- stable UUID
16-
- text/content payload
17-
- parent-child hierarchy
18-
- page and backlink relationships
19-
- metadata (timestamps, properties, tags)
15+
A robust block model typically includes:
2016

21-
## Model Constraints
17+
- stable UUID/ID
18+
- textual content
19+
- parent-child ordering metadata
20+
- page association
21+
- references/tags/properties
22+
- creation/update metadata
2223

23-
- parent references must remain acyclic
24-
- order indexes must be deterministic
25-
- link refs must survive text edits
24+
## Invariants
25+
26+
- hierarchy must remain acyclic
27+
- sibling order must be deterministic
28+
- references should survive text edits and reformatting
29+
- deleted/moved blocks should not leave dangling graph edges
30+
31+
## Mutation Types
32+
33+
1. content edit
34+
2. reorder/reparent
35+
3. reference/property change
36+
4. delete/restore
37+
38+
Each mutation should update both hierarchy and graph indexes consistently.
39+
40+
## Validation Practices
41+
42+
- schema validation before persisting
43+
- invariant checks in development/test mode
44+
- repair routines for broken references
2645

2746
## Summary
2847

29-
You can now map user edits to the underlying block graph model.
48+
You can now map user operations to block-level graph mutations and identify where consistency bugs emerge.
3049

3150
Next: [Chapter 6: Block Editor](06-block-editor.md)

tutorials/logseq-knowledge-management/06-block-editor.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,39 @@ parent: "Logseq Knowledge Management"
88

99
# Chapter 6: Block Editor
1010

11-
The Logseq editor handles hierarchical editing and reference-centric workflows.
11+
The block editor is where text editing, structural hierarchy, and graph references converge.
1212

13-
## Core Behaviors
13+
## Core Interaction Model
1414

15-
- indentation controls parent-child structure
16-
- slash commands drive structured inserts
17-
- reference syntax creates graph edges inline
18-
- keyboard-first navigation optimizes flow
15+
- indentation/outdent controls hierarchy
16+
- inline references create graph edges
17+
- keyboard-first commands optimize authoring speed
18+
- slash commands trigger structured actions/templates
1919

20-
## Reliability Concerns
20+
## Engineering Challenges
2121

22-
- selection consistency across nested edits
23-
- undo/redo across structure + text changes
24-
- low-latency edits on large page trees
22+
| Challenge | Why It Is Hard |
23+
|:----------|:---------------|
24+
| nested selection behavior | text + structure edits overlap |
25+
| undo/redo correctness | must restore both text and tree shape |
26+
| low-latency updates | large pages can trigger heavy recalculation |
27+
| IME/multilingual editing | composition events complicate key handling |
28+
29+
## Reliability Patterns
30+
31+
- incremental state updates for large documents
32+
- deterministic edit transactions
33+
- robust cursor restoration after structural edits
34+
- regression tests for keyboard workflows
35+
36+
## UX Quality Signals
37+
38+
- predictable tab/shift-tab behavior
39+
- no cursor jumps during auto-formatting
40+
- stable performance in deeply nested pages
2541

2642
## Summary
2743

28-
You can now analyze editor behavior as structured graph mutations.
44+
You can now analyze editor behavior as transaction-safe graph and text mutations.
2945

3046
Next: [Chapter 7: Bi-Directional Links](07-bidirectional-links.md)

0 commit comments

Comments
 (0)