con un clic
sharing-pr-agent-artifacts
// Uploads agent-generated artifacts (specs, plans, learnings) to the streamlit.wiki for sharing via PR comments. Use when you have agent artifacts to share with reviewers.
// Uploads agent-generated artifacts (specs, plans, learnings) to the streamlit.wiki for sharing via PR comments. Use when you have agent artifacts to share with reviewers.
**[REQUIRED]** Use for ALL Streamlit tasks: creating, editing, debugging, beautifying, styling, theming, or optimizing Streamlit applications. Also required for building custom components (inline or packaged), using st.components.v2, or any HTML/JS/CSS component work. Triggers: streamlit, st., dashboard, app.py, beautify, style, CSS, color, background, theme, button, widget styling, custom component, st.components, packaged component, pyproject.toml, asset_dir, CCv2, HTML/JS component.
Explains Streamlit's internal architecture including backend runtime, frontend rendering, and WebSocket communication. Use when debugging cross-layer issues, understanding how features work end-to-end, planning architectural changes, or onboarding to the codebase. Covers ForwardMsg/BackMsg protocol, script rerun model, element tree, widget state management, and more.
Review internal documentation (*.md files) against the current codebase state and propose updates for outdated or incorrect information.
Diagnose and fix flaky Playwright e2e tests. Use when tests fail intermittently, show timeout errors, have snapshot mismatches, or exhibit browser-specific failures.
Generates polished website release notes between two git tags for docs.streamlit.io. Use when preparing a new Streamlit release or reviewing changes between versions.
Implement a feature from a product/tech spec, URL, or GitHub issue. Reads the spec, implements the feature following Streamlit patterns, and creates a merge-ready PR. Use when given a spec folder path, document URL, or issue link to implement.
| name | sharing-pr-agent-artifacts |
| description | Uploads agent-generated artifacts (specs, plans, learnings) to the streamlit.wiki for sharing via PR comments. Use when you have agent artifacts to share with reviewers. |
Uploads intermediate files (implementation plans, specs, learnings, explorations, architecture diagrams) to streamlit.wiki so they can be linked in PR descriptions and comments. Use this for agent-generated artifacts that are useful for reviewers but don't belong in the main repo.
Important: The wiki repo uses master as its default branch. Always push to master, never create other branches.
Follow the wiki guidelines: After cloning/updating the wiki repo, read and follow agent-wiki/AGENTS.md for the authoritative rules on what to upload and how to organize files.
Public URL pattern:
https://issues.streamlit.app/agent_wiki_explorer?file=<relative-path>
Example: https://issues.streamlit.app/agent_wiki_explorer?file=pull-requests/12345/implementation-plan.md
gh pr view --json number --jq '.number'
If no PR exists, stop and inform the user.
Check if the wiki is already cloned:
if [ -d "agent-wiki/.git" ]; then
# Use subshell to avoid directory navigation issues if pull fails
(cd agent-wiki && git checkout master && git pull origin master)
else
git clone https://github.com/streamlit/streamlit.wiki.git agent-wiki
fi
mkdir -p agent-wiki/pull-requests/<pr-number>
Common locations (check these first):
work-tmp/ — temporary working files, drafts, exploration notesspecs/ — untracked product/tech specs created for this PRWhat to include:
.md).png, .svg)Always exclude:
Warning: The wiki is a public repo. Never upload confidential information, internal sensitive discussions, or anything that shouldn't be publicly visible. Since Streamlit is open-source, almost all tech and product related planning documents are fine to share publicly.
git ls-files to check).env, *credentials*, *secret*, *token*, *api_key*)Copy selected files:
cp <file> agent-wiki/pull-requests/<pr-number>/
# Use subshell to avoid directory navigation issues
(
cd agent-wiki
git checkout master
git add pull-requests/
git commit -m "Add artifacts for PR #<pr-number>"
git pull --rebase origin master
git push origin master
)
If push fails due to conflicts:
git pull --rebase origin mastergit rebase --continueNever use --force.
If new files were added, post a summary comment to the PR:
gh pr comment <pr-number> --body "$(cat <<'EOF'
### Added Agent Docs
- [implementation-plan.md](https://issues.streamlit.app/agent_wiki_explorer?file=pull-requests/<pr-number>/implementation-plan.md): Main technical implementation plan
- [exploration.md](https://issues.streamlit.app/agent_wiki_explorer?file=pull-requests/<pr-number>/exploration.md): Initial research and design exploration
EOF
)"
Include only top-level documents relevant to reviewers. Assets embedded in those documents (e.g., images) don't need separate entries.
For documents useful beyond a single PR (deep dives, architecture explorations, research findings), use the references/ directory instead of pull-requests/.
# Create file with date prefix
mkdir -p agent-wiki/references
cp <file> agent-wiki/references/YYYY-MM-DD-<description>.md
Example: 2024-03-15-widget-state-deep-dive.md
Use the same commit/push workflow as PR artifacts (step 5), substituting references/ for pull-requests/ in both the git add command and the commit message (e.g., "Add reference: YYYY-MM-DD-<description>").
Public URL: https://issues.streamlit.app/agent_wiki_explorer?file=references/YYYY-MM-DD-<description>.md
agent-wiki/ directory is gitignored and persists across sessionsmaster — never create feature branches or use --force