-
Notifications
You must be signed in to change notification settings - Fork 168
Add agentic workflow unbloat-docs #230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| --- | ||
| # Documentation Server Lifecycle Management | ||
| # | ||
| # This shared workflow provides instructions for starting, waiting for readiness, | ||
| # and cleaning up the Astro Starlight documentation preview server. | ||
| # | ||
| # Prerequisites: | ||
| # - Documentation must be built first (npm run build in docs/ directory) | ||
| # - Bash permissions: npm *, curl *, kill *, echo *, sleep * | ||
| # - Working directory should be in repository root | ||
| --- | ||
|
|
||
| ## Starting the Documentation Preview Server | ||
|
|
||
| **Context**: The documentation has been pre-built using `npm run build`. Use the preview server to serve the static build. | ||
|
|
||
| Navigate to the docs directory and start the preview server in the background: | ||
|
|
||
| ```bash | ||
| cd docs | ||
| npm run preview > /tmp/preview.log 2>&1 & | ||
| echo $! > /tmp/server.pid | ||
| ``` | ||
|
|
||
| This will: | ||
| - Start the preview server on port 4321 | ||
| - Redirect output to `/tmp/preview.log` | ||
| - Save the process ID to `/tmp/server.pid` for later cleanup | ||
|
|
||
| ## Waiting for Server Readiness | ||
|
|
||
| Poll the server with curl to ensure it's ready before use: | ||
|
|
||
| ```bash | ||
| for i in {1..30}; do | ||
| curl -s http://localhost:4321 > /dev/null && echo "Server ready!" && break | ||
| echo "Waiting for server... ($i/30)" && sleep 2 | ||
| done | ||
| ``` | ||
|
|
||
| This will: | ||
| - Attempt to connect up to 30 times (60 seconds total) | ||
| - Wait 2 seconds between attempts | ||
| - Exit successfully when server responds | ||
|
|
||
| ## Verifying Server Accessibility (Optional) | ||
|
|
||
| Optionally verify the server is serving content: | ||
|
|
||
| ```bash | ||
| curl -s http://localhost:4321/gh-aw/ | head -20 | ||
| ``` | ||
|
|
||
| ## Stopping the Documentation Server | ||
|
|
||
| After you're done using the server, clean up the process: | ||
|
|
||
| ```bash | ||
| kill $(cat /tmp/server.pid) 2>/dev/null || true | ||
| rm -f /tmp/server.pid /tmp/preview.log | ||
| ``` | ||
|
|
||
| This will: | ||
| - Kill the server process using the saved PID | ||
| - Remove temporary files | ||
| - Ignore errors if the process already stopped | ||
|
|
||
| ## Usage Notes | ||
|
|
||
| - The server runs on `http://localhost:4321` | ||
| - Documentation is accessible at `http://localhost:4321/gh-aw/` | ||
| - Always clean up the server when done to avoid orphan processes | ||
| - If the server fails to start, check `/tmp/preview.log` for errors | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1 @@ | ||||||||||||||||||||||||||
| . | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| . | |
| # AI Agent Mood and Tone | |
| The AI assistant should follow these mood and style guidelines when responding: | |
| - **Tone:** Warm, respectful, and professional. Be friendly but not overly casual. | |
| - **Directness:** Get to the point quickly. Avoid filler text and unnecessary pleasantries. | |
| - **Honesty:** Be transparent about limitations or uncertainty. Do not invent facts. | |
| - **Verbosity:** Default to concise, information-dense answers. Expand with more detail only when explicitly requested. | |
| - **Formatting:** Use plain text or simple Markdown appropriate to the context. Do not use emojis unless explicitly requested. | |
| - **Clarity:** Prefer simple, straightforward language. Explain acronyms or jargon when they may be unfamiliar. | |
| - **Helpfulness:** Focus on practical, actionable information tailored to the user’s question. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| --- | ||
| # Report formatting guidelines | ||
| --- | ||
|
|
||
| ## Report Structure Guidelines | ||
|
|
||
| ### 1. Header Levels | ||
| **Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.** | ||
|
|
||
| When creating GitHub issues or discussions: | ||
| - Use `###` (h3) for main sections (e.g., "### Test Summary") | ||
| - Use `####` (h4) for subsections (e.g., "#### Device-Specific Results") | ||
| - Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles | ||
|
|
||
| ### 2. Progressive Disclosure | ||
| **Wrap detailed test results in `<details><summary><b>Section Name</b></summary>` tags to improve readability and reduce scrolling.** | ||
|
|
||
| Use collapsible sections for: | ||
| - Verbose details (full test logs, raw data) | ||
| - Secondary information (minor warnings, extra context) | ||
| - Per-item breakdowns when there are many items | ||
|
|
||
| Always keep critical information visible (summary, critical issues, key metrics). | ||
|
|
||
| ### 3. Report Structure Pattern | ||
|
|
||
| 1. **Overview**: 1-2 paragraphs summarizing key findings | ||
| 2. **Critical Information**: Show immediately (summary stats, critical issues) | ||
| 3. **Details**: Use `<details><summary><b>Section Name</b></summary>` for expanded content | ||
| 4. **Context**: Add helpful metadata (workflow run, date, trigger) | ||
|
|
||
| ### Design Principles (Airbnb-Inspired) | ||
|
|
||
| Reports should: | ||
| - **Build trust through clarity**: Most important info immediately visible | ||
| - **Exceed expectations**: Add helpful context like trends, comparisons | ||
| - **Create delight**: Use progressive disclosure to reduce overwhelm | ||
| - **Maintain consistency**: Follow patterns across all reports | ||
|
|
||
| ### Example Report Structure | ||
|
|
||
| ```markdown | ||
| ### Summary | ||
| - Key metric 1: value | ||
| - Key metric 2: value | ||
| - Status: ✅/⚠️/❌ | ||
|
|
||
| ### Critical Issues | ||
| [Always visible - these are important] | ||
|
|
||
| <details> | ||
| <summary><b>View Detailed Results</b></summary> | ||
|
|
||
| [Comprehensive details, logs, traces] | ||
|
|
||
| </details> | ||
|
|
||
| <details> | ||
| <summary><b>View All Warnings</b></summary> | ||
|
|
||
| [Minor issues and potential problems] | ||
|
|
||
| </details> | ||
|
|
||
| ### Recommendations | ||
| [Actionable next steps - keep visible] | ||
| ``` | ||
|
|
||
| ## Workflow Run References | ||
|
|
||
| - Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)` | ||
| - Include up to 3 most relevant run URLs at end under `**References:**` | ||
| - Do NOT add footer attribution (system adds automatically) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The shared
docs-server-lifecycle.mdfile instructs the agent to verify the documentation server by accessinghttp://localhost:4321/gh-aw/, which is the URL path specific to thegithub/gh-awproject this workflow was copied from. In this repository, there is no Astro Starlight site and no/gh-aw/path. Thenpm run previewcommand will also fail since there is no npm project indocs/.If screenshot capture is to be retained, the server URL and the file-to-URL mapping logic in step 9 (e.g.,
docs/src/content/docs/guides/getting-started.md→http://localhost:4321/gh-aw/guides/getting-started/) need to be updated to match this repository's actual documentation structure. If there is no web-rendered documentation site, the screenshot step and the entiredocs-server-lifecycle.mdshared file should be reconsidered.