docs: add documentation for session persistence and follow-up commands - #34
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new Markdown doc has several formatting and consistency issues (lists/headings/inline-code and one cross-platform wording detail) that should be corrected for accurate rendering and clarity.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a changelog-style documentation entry describing the new session persistence mechanism and the CLI follow-up/resume commands for continuing revisions across runs.
Changes:
- Documented the session model/store approach and follow-up continuation semantics in
ResearchState. - Documented the console app CLI flow for new topics, follow-up requests, and
resume <session-id>. - Summarized key implementation touchpoints (session store types, prompt alignment, configuration).
File summaries
| File | Description |
|---|---|
| docs/changelog-add-followup.md | New documentation/changelog entry describing session persistence and follow-up/resume command behavior. |
Review details
Suppressed comments (4)
docs/changelog-add-followup.md:18
- This section defines continuation semantics but currently renders as plain paragraphs; making it a Markdown list improves readability and scannability.
Define continuation semantics in ResearchState:
Preserve MainTask, ResearchFindings, and Draft.
Clear ReviewNotes.
Reset RevisionNumber to 0 so each user-requested revision receives its own bounded review cycle.
docs/changelog-add-followup.md:20
- Continue the Markdown list formatting here and wrap the approval marker in backticks so it’s clearly a literal contract string.
Record the follow-up instruction explicitly, rather than silently altering the original topic.
Update the Author and Reviewer prompts to recognize a continuation request and revise the prior draft using the stored research, while retaining the existing APPROVED contract and two-pass revision limit.
docs/changelog-add-followup.md:33
- The “Key changes” section should be a Markdown list so it renders correctly; also wrap filenames and symbols in backticks for clarity.
Key changes:
Added BlogSession.cs, IBlogSessionStore.cs, and FileBlogSessionStore.cs.
Added ResearchState.StartFollowUp() to preserve the draft/research and reset the review cycle.
docs/changelog-add-followup.md:36
- Continue the bullet list formatting here for consistent Markdown rendering.
Updated Program.cs for new, follow-up, and resumed sessions.
Passed follow-up instructions to the Author agent and synchronized AgentPrompt.cs.
Documented BLOG_SESSION_STORE_PATH and resume behavior.
- Files reviewed: 1/1 changed files
- Comments generated: 7
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @@ -0,0 +1,36 @@ | |||
| # Session persistence and followup commands | |||
| @@ -0,0 +1,36 @@ | |||
| # Session persistence and followup commands | |||
|
|
|||
| ## Implemented session persistence | |||
| Add a BlogSession model containing a stable session ID, timestamps, and the completed ResearchState. Keep ResearchState as the workflow payload rather than duplicating its draft, research, review, and revision fields. | ||
|
|
||
| Add an IBlogSessionStore abstraction with CreateAsync, GetAsync, and SaveAsync, plus a local file-backed implementation for the console app. Store sessions under a configurable application-data directory; avoid hosted-agent instance memory because deployments can restart or scale. |
| Update Program.cs into a small command loop: | ||
|
|
||
| New topic: create a session and run the workflow. | ||
| Follow-up: accept a session ID and a user request such as “make it shorter” or “add a section on caching.” | ||
| Load the prior state, reset only workflow-control fields needed for a fresh revision cycle, append the follow-up to CurrentSubTask, then rerun the existing workflow. |
|
|
||
| Add tests for session serialization/lookup, missing or expired session IDs, and a follow-up state transition proving the draft and research persist while review-cycle fields reset. Keep the existing workflow tests unchanged except for any deliberate continuation-specific additions. | ||
|
|
||
| Add configuration and documentation for BLOG_SESSION_STORE_PATH, retention behavior, and the CLI interaction. For a production/multi-machine console deployment, replace the file store with a durable shared store such as Azure Blob Storage or Cosmos DB behind the same interface. |
|
|
||
| Add configuration and documentation for BLOG_SESSION_STORE_PATH, retention behavior, and the CLI interaction. For a production/multi-machine console deployment, replace the file store with a durable shared store such as Azure Blob Storage or Cosmos DB behind the same interface. | ||
|
|
||
| ## Implemented persistent follow-up sessions. |
|
|
||
| ## Implemented persistent follow-up sessions. | ||
|
|
||
| The console now saves each workflow result as JSON under %LOCALAPPDATA%\BlogWriter\sessions by default. It prints the session ID after each run, accepts follow-up revision requests immediately, and supports resume <session-id> after restarting the app. |
No description provided.