Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/shared/docs-server-lifecycle.md
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
Comment on lines +51 to +73
Copy link

Copilot AI Mar 10, 2026

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.md file instructs the agent to verify the documentation server by accessing http://localhost:4321/gh-aw/, which is the URL path specific to the github/gh-aw project this workflow was copied from. In this repository, there is no Astro Starlight site and no /gh-aw/ path. The npm run preview command will also fail since there is no npm project in docs/.

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.mdhttp://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 entire docs-server-lifecycle.md shared file should be reconsidered.

Copilot uses AI. Check for mistakes.
1 change: 1 addition & 0 deletions .github/workflows/shared/mood.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mood.md shared file (imported by this workflow) contains only a single . character and provides no actual instructions or content to the AI agent. This appears to be a placeholder left over from a template. It should either contain meaningful content describing the desired agent tone/mood, or be removed from the imports list to avoid importing an empty/meaningless file.

Suggested change
.
# 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.

Copilot uses AI. Check for mistakes.
73 changes: 73 additions & 0 deletions .github/workflows/shared/reporting.md
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)
Loading