Skip to content

Main#2

Merged
khulnasoft-bot merged 2 commits into
masterfrom
main
Apr 15, 2026
Merged

Main#2
khulnasoft-bot merged 2 commits into
masterfrom
main

Conversation

@khulnasoft-bot

@khulnasoft-bot khulnasoft-bot commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Thinking Path

  • Taskcore orchestrates AI agents for zero-human companies
  • [Which subsystem or capability is involved]
  • [What problem or gap exists]
  • [Why it needs to be addressed]
  • This pull request ...
  • The benefit is ...

What Changed

Verification

Risks

Model Used

Checklist

  • I have included a thinking path that traces from project context to this change
  • I have specified the model used (with version and capability details)
  • I have run tests locally and they pass
  • I have added or updated tests where applicable
  • If this change affects the UI, I have included before/after screenshots
  • I have updated relevant documentation to reflect my changes
  • I have considered and documented any risks above
  • I will address all Greptile and reviewer comments before requesting merge

Summary by Sourcery

Add a suite of internal Paperclip agent skills and reference materials for PR review, releases, company creation, documentation maintenance, and security advisory handling.

New Features:

  • Introduce detailed SKILL definitions for PR reporting, PR check loop automation, release coordination and changelog generation, company creation, documentation maintenance, and security advisory response.
  • Add HTML starter template and style guide assets to generate polished maintainer-facing PR review reports.
  • Provide reference guides and examples for building agent companies from scratch or from existing repositories, and for documentation audit workflows.

Documentation:

  • Document how to build new Paperclip agent adapters via a comprehensive create-agent-adapter technical guide.

Add specialized agent skills including company-creator, release-management,
and doc-maintenance to the repository's internal agent toolkit.
@sourcery-ai

sourcery-ai Bot commented Apr 15, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds a set of new Paperclip AI skills documentation and assets focused on PR review/reporting, release coordination, security advisory handling, doc maintenance, company creation, and changelog generation, including an HTML report starter template and multiple SKILL.md reference guides.

Class diagram for new Paperclip skills added in this PR

classDiagram
  class Skill {
    +string name
    +string description
    +string entrypoint
    +string scope
  }

  class PRReportSkill {
    +name = pr-report
    +entry = SKILL_md
    +scope = PR_review_and_reporting
    +outputs: HTML_report, Markdown_report, chat_summary
    +resources: style-guide, html-report-starter
  }

  class PRCheckloopSkill {
    +name = prcheckloop
    +entry = SKILL_md
    +scope = CI_checks_for_PRs
    +inputs: pr_number, max_iterations
    +actions: detect_PR, poll_checks, fix_failures, push_changes
  }

  class ReleaseSkill {
    +name = release
    +entry = SKILL_md
    +scope = Release_coordination
    +actions: changelog, canary_verify, smoke_test, stable_publish
  }

  class ReleaseChangelogSkill {
    +name = release-changelog
    +entry = SKILL_md
    +scope = Stable_changelog_generation
    +outputs: releases_vYYYY_MDD_P_md
  }

  class SecurityAdvisorySkill {
    +name = deal-with-security-advisory
    +entry = SKILL_md
    +scope = GH_security_advisories
    +actions: private_fork, fix_development, CVE_request, coordinated_release
  }

  class DocMaintenanceSkill {
    +name = doc-maintenance
    +entry = SKILL_md
    +scope = Doc_drift_detection
    +targets: README_md, SPEC_md, PRODUCT_md
    +outputs: maintenance_PR
  }

  class CompanyCreatorSkill {
    +name = company-creator
    +entry = SKILL_md
    +scope = Agent_company_scaffolding
    +modes: from_scratch, from_repo
  }

  class HTMLReportStarterAsset {
    +path = assets_html-report-starter_html
    +type = HTML_template
  }

  class PRReportStyleGuide {
    +path = references_style-guide_md
    +type = Style_guide
  }

  class DocAuditChecklist {
    +path = references_audit-checklist_md
    +type = Checklist
  }

  class DocSectionMap {
    +path = references_section-map_md
    +type = Section_map
  }

  class CompanyExample {
    +path = references_example-company_md
    +type = Example_company
  }

  class CompanyFromRepoGuide {
    +path = references_from-repo-guide_md
    +type = Guide
  }

  Skill <|-- PRReportSkill
  Skill <|-- PRCheckloopSkill
  Skill <|-- ReleaseSkill
  Skill <|-- ReleaseChangelogSkill
  Skill <|-- SecurityAdvisorySkill
  Skill <|-- DocMaintenanceSkill
  Skill <|-- CompanyCreatorSkill

  PRReportSkill --> HTMLReportStarterAsset : uses
  PRReportSkill --> PRReportStyleGuide : uses

  DocMaintenanceSkill --> DocAuditChecklist : uses
  DocMaintenanceSkill --> DocSectionMap : uses

  CompanyCreatorSkill --> CompanyExample : uses
  CompanyCreatorSkill --> CompanyFromRepoGuide : uses

  ReleaseSkill --> ReleaseChangelogSkill : coordinates_with
Loading

Flow diagram for PR checkloop skill workflow

flowchart TD
  A_start["Start: Invoke prcheckloop skill"] --> B_detect_pr
  B_detect_pr["Detect target PR (given number or from current branch)"] --> C_validate_host
  C_validate_host{Repo is GitHub and gh authenticated?}
  C_validate_host -- No --> Z_blocker["Exit with blocker: unsupported host or missing auth"]
  C_validate_host -- Yes --> D_fetch_head

  D_fetch_head["Fetch PR metadata and head SHA"] --> E_list_checks
  E_list_checks["List status checks for head SHA (check-runs + status contexts)"] --> F_checks_present

  F_checks_present{Checks present?}
  F_checks_present -- No --> G_wait_for_checks["Poll until checks appear or timeout"] --> H_timeout{Timed out?}
  H_timeout -- Yes --> Z_blocker
  H_timeout -- No --> E_list_checks

  F_checks_present -- Yes --> I_wait_terminal
  I_wait_terminal["Wait until all checks terminal or any fails"] --> J_classify

  J_classify["Classify failing checks (code issue, flake, infra, external)"] --> K_decision

  K_decision{Any actionable code/test failures?}
  K_decision -- No --> L_blocker["Summarize non-actionable blockers and exit"]
  K_decision -- Yes --> M_fix

  M_fix["Reproduce locally, edit code/tests, run verification"] --> N_commit_push
  N_commit_push["Commit fix and push to PR branch"] --> O_refresh

  O_refresh["Refresh PR head SHA after push"] --> P_iterations
  P_iterations{Iterations < max?}
  P_iterations -- No --> L_blocker
  P_iterations -- Yes --> E_list_checks

  J_classify --> Q_all_green{All checks green?}
  Q_all_green -- Yes --> R_success["Exit: PR checks fully green"]
  Q_all_green -- No --> K_decision
Loading

Flow diagram for release coordination skill

flowchart TD
  A_start["Start: Invoke release skill"] --> B_preconditions
  B_preconditions["Verify preconditions (release-changelog skill, clean tree, candidate commits, CI, pnpm-lock, npm auth)"] --> C_pre_ok

  C_pre_ok{All preconditions met?}
  C_pre_ok -- No --> Z_stop["Stop and report blocker"]
  C_pre_ok -- Yes --> D_inputs

  D_inputs["Collect inputs: canary vs stable, source_ref, dry-run vs live, context"] --> E_model
  E_model["Recall release model (calver, canary from master, manual stable promotion)"] --> F_choose_candidate

  F_choose_candidate["Choose candidate SHA (from canary or explicit source_ref)"] --> G_changelog
  G_changelog["Call release-changelog skill to generate/update releases/vYYYY_MDD_P_md"] --> H_verify

  H_verify["Run verification gate (typecheck, tests, build)"] --> I_gate_ok
  I_gate_ok{Gate passed?}
  I_gate_ok -- No --> Z_stop
  I_gate_ok -- Yes --> J_validate_canary

  J_validate_canary["Validate canary: check CI workflow, npm canary publish, canary tag"] --> K_smoke
  K_smoke["Run Docker smoke tests against canary"] --> L_smoke_ok

  L_smoke_ok{Smoke tests OK?}
  L_smoke_ok -- No --> Z_stop
  L_smoke_ok -- Yes --> M_choose_mode

  M_choose_mode{Mode?}
  M_choose_mode -- Canary_check_only --> Y_report_canary["Report verification + smoke status; no stable"]
  M_choose_mode -- Stable_promotion --> N_trigger_stable

  N_trigger_stable["Trigger stable publish (GitHub workflow or scripts/release.sh)"] --> O_publish
  O_publish["Publish npm latest, create vYYYY_MDD_P tag, create GitHub Release"] --> P_followup

  P_followup["Create follow-up tasks: website changelog, announcements, issue updates"] --> Q_done["Summarize release status and outputs"]
Loading

Flow diagram for doc-maintenance skill

flowchart TD
  A_start["Start: Invoke doc-maintenance skill"] --> B_cursor
  B_cursor["Read .doc-review-cursor or choose fallback start SHA"] --> C_log
  C_log["Collect commits since last reviewed SHA"] --> D_classify

  D_classify["Classify commits (feature, breaking, structural, ignore)"] --> E_any_changes
  E_any_changes{Any notable changes?}
  E_any_changes -- No --> F_update_cursor_only["Update cursor to HEAD and exit"]
  E_any_changes -- Yes --> G_summary

  G_summary["Build change summary for audit"] --> H_audit_readme
  H_audit_readme["Audit README.md using audit-checklist and section-map"] --> I_audit_spec
  I_audit_spec["Audit SPEC.md for drift"] --> J_audit_product
  J_audit_product["Audit PRODUCT.md for drift"] --> K_needs_edits

  K_needs_edits{Any factual fixes needed?}
  K_needs_edits -- No --> L_update_cursor["Update cursor to HEAD and exit with summary"]
  K_needs_edits -- Yes --> M_branch

  M_branch["Create docs/maintenance-YYYYMMDD branch"] --> N_apply
  N_apply["Apply minimal factual edits only (no rewrites, no cosmetics)"] --> O_commit
  O_commit["Commit README/SPEC/PRODUCT changes plus cursor"] --> P_pr

  P_pr["Open PR via gh pr create with summary and change notes"] --> Q_done["Report PR URL and audit summary"]
Loading

Flow diagram for PR report skill generating an HTML report

flowchart TD
  A_start["Start: Invoke pr-report skill"] --> B_scope
  B_scope["Gather target: PR number/branch, diff size, subsystems, intent"] --> C_model

  C_model["Build mental model of system and changes"] --> D_review
  D_review["Perform maintainer-style review: strengths, risks, comparisons"] --> E_output_choice

  E_output_choice{Requested artifact type?}
  E_output_choice -- HTML_report --> F_html
  E_output_choice -- Markdown_only --> M_md

  F_html["Read style-guide and html-report-starter assets"] --> G_customize
  G_customize["Customize starter HTML: hero, sections, cards, findings, recommendation"] --> H_write_file
  H_write_file["Write standalone HTML report under tmp/reports or requested path"] --> I_verify

  M_md["Compose Markdown report with same structure"] --> I_verify

  I_verify["Verify artifact path exists and content matches code review"] --> J_summary
  J_summary["Return short maintainer summary in chat plus artifact location"]
Loading

File-Level Changes

Change Details Files
Introduce a detailed skill authoring guide for creating new Paperclip agent adapters.
  • Add SKILL.md for create-agent-adapter describing architecture, required interfaces, and conventions for new adapters.
  • Document server, UI, and CLI module contracts, environment testing, session management, and security considerations for adapters.
  • Provide patterns for skills injection, logging, and error handling in adapter implementations.
.agents/skills/create-agent-adapter/SKILL.md
Add a reusable HTML starter template and style guide for PR review reports.
  • Create a standalone HTML report starter with editorial layout, typography, and sections for PR summaries, findings, and recommendations.
  • Define a style guide reference describing desired report tone, typography, layout, and color for maintainer-facing PR reports.
.agents/skills/pr-report/assets/html-report-starter.html
.agents/skills/pr-report/references/style-guide.md
Add skills for company creation, including spec references and from-repo guidance.
  • Define a company-creator skill for generating Agent Companies packages from scratch or from existing repos, including workflows and interview process.
  • Add reference docs summarizing the Agent Companies spec, an example company package, and a from-repo analysis guide.
.agents/skills/company-creator/SKILL.md
.agents/skills/company-creator/references/example-company.md
.agents/skills/company-creator/references/companies-spec.md
.agents/skills/company-creator/references/from-repo-guide.md
Introduce operational skills for releases, changelogs, and security advisory handling.
  • Add a release coordination skill covering canary verification, smoke tests, manual stable promotion, and GitHub Releases.
  • Add a release-changelog skill defining how to generate stable changelog files from commits, changesets, and PRs under a calver scheme.
  • Add a security advisory response skill that orchestrates private forks, fix development, CVE requests, and synchronized advisory publication.
.agents/skills/release/SKILL.md
.agents/skills/release-changelog/SKILL.md
.agents/skills/deal-with-security-advisory/SKILL.md
Add workflow automation skills for PR check stabilization, PR reporting, and doc maintenance.
  • Create a prcheckloop skill that iteratively fixes failing CI checks for a GitHub PR, classifies failures, and escalates blockers.
  • Define a pr-report skill that performs deep PR analysis and produces polished HTML or Markdown maintainer reports.
  • Add a doc-maintenance skill that audits key docs against recent git history, applies minimal factual fixes, and opens a PR.
  • Provide audit checklist and section map references to drive doc-maintenance behavior.
.agents/skills/prcheckloop/SKILL.md
.agents/skills/pr-report/SKILL.md
.agents/skills/doc-maintenance/SKILL.md
.agents/skills/doc-maintenance/references/audit-checklist.md
.agents/skills/doc-maintenance/references/section-map.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@khulnasoft-bot khulnasoft-bot merged commit 4da9154 into master Apr 15, 2026
4 of 6 checks passed

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 3 issues, and left some high level feedback:

  • Several skills (e.g. company-creator, release-changelog, doc-maintenance) hardcode local paths like docs/companies/companies-spec.md, doc/SPEC.md, and doc/PRODUCT.md; consider routing these through a small shared helper or central reference so a path change in the repo doesn’t silently break multiple skills’ instructions.
  • The new skill instructions include a lot of overlapping release and PR-handling guidance (e.g. release, release-changelog, pr-report, doc-maintenance); it may be worth extracting the shared conventions (versioning model, attribution rules, git/gh command patterns) into a single referenced document to keep future updates consistent and reduce divergence between skills.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Several skills (e.g. `company-creator`, `release-changelog`, `doc-maintenance`) hardcode local paths like `docs/companies/companies-spec.md`, `doc/SPEC.md`, and `doc/PRODUCT.md`; consider routing these through a small shared helper or central reference so a path change in the repo doesn’t silently break multiple skills’ instructions.
- The new skill instructions include a lot of overlapping release and PR-handling guidance (e.g. `release`, `release-changelog`, `pr-report`, `doc-maintenance`); it may be worth extracting the shared conventions (versioning model, attribution rules, git/gh command patterns) into a single referenced document to keep future updates consistent and reduce divergence between skills.

## Individual Comments

### Comment 1
<location path=".agents/skills/pr-report/assets/html-report-starter.html" line_range="333-335" />
<code_context>
+    <div class="shell">
+      <aside class="panel nav">
+        <div class="eyebrow">Maintainer Report</div>
+        <h1>Report Title</h1>
+        <p>Replace this with a concise description of what the report covers.</p>
+        <ul>
+          <li><a href="#summary">Summary</a></li>
+          <li><a href="#tutorial">Tutorial</a></li>
+          <li><a href="#findings">Findings</a></li>
+          <li><a href="#recommendation">Recommendation</a></li>
+        </ul>
+        <div class="meta-block">
+          Replace with project metadata, review date, or scope notes.
+        </div>
+      </aside>
+
+      <main>
+        <section class="panel hero" id="summary">
+          <div class="eyebrow">Executive Summary</div>
+          <h1>Use the hero for the clearest one-line judgment.</h1>
+          <p class="lede">
+            Replace this with the short explanation of what the contribution does, why it matters,
</code_context>
<issue_to_address>
**suggestion:** Using two top-level <h1> elements can hurt accessibility and document structure.

The sidebar currently uses an <h1> and the hero also uses an <h1>. Many assistive tools and SEO analyzers still expect a single primary heading or a clear hierarchy. Please demote one of these to <h2> (or use a styled <div>) so there is only one true <h1> on the page.

```suggestion
      <aside class="panel nav">
        <div class="eyebrow">Maintainer Report</div>
        <h2>Report Title</h2>
```
</issue_to_address>

### Comment 2
<location path=".agents/skills/pr-report/assets/html-report-starter.html" line_range="34-36" />
<code_context>
+        box-sizing: border-box;
+      }
+
+      html {
+        scroll-behavior: smooth;
+      }
+
</code_context>
<issue_to_address>
**suggestion:** Smooth scrolling should respect reduced motion preferences for accessibility.

Unconditional `scroll-behavior: smooth;` can be problematic for users with reduced motion preferences. Consider wrapping it in a media query so it only applies when motion is acceptable:

```css
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
```

```suggestion
      @media (prefers-reduced-motion: no-preference) {
        html {
          scroll-behavior: smooth;
        }
      }
```
</issue_to_address>

### Comment 3
<location path=".agents/skills/deal-with-security-advisory/SKILL.md" line_range="44" />
<code_context>
+
+> Thanks for the report, @{{reporterHandle}}. We've confirmed the issue and are working on a fix. We're targeting a patch release within {{timeframe}}. We'll keep you updated here.
+
+Give your human this template, but still continue
+
+Below we use `gh` tools - you do have access and credentials outside of your sandbox, so use them.
</code_context>
<issue_to_address>
**nitpick (typo):** Clarify the phrasing of this instruction for smoother grammar.

The phrase "Give your human this template, but still continue" reads a bit awkwardly. Please reword slightly (for example, "Give your human this template, and then continue") to make the instruction clearer and more natural.

```suggestion
Give your human this template, and then continue.
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +333 to +335
<aside class="panel nav">
<div class="eyebrow">Maintainer Report</div>
<h1>Report Title</h1>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion: Using two top-level

elements can hurt accessibility and document structure.

The sidebar currently uses an

and the hero also uses an

. Many assistive tools and SEO analyzers still expect a single primary heading or a clear hierarchy. Please demote one of these to

(or use a styled
) so there is only one true

on the page.

Suggested change
<aside class="panel nav">
<div class="eyebrow">Maintainer Report</div>
<h1>Report Title</h1>
<aside class="panel nav">
<div class="eyebrow">Maintainer Report</div>
<h2>Report Title</h2>

Comment on lines +34 to +36
html {
scroll-behavior: smooth;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion: Smooth scrolling should respect reduced motion preferences for accessibility.

Unconditional scroll-behavior: smooth; can be problematic for users with reduced motion preferences. Consider wrapping it in a media query so it only applies when motion is acceptable:

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
Suggested change
html {
scroll-behavior: smooth;
}
@media (prefers-reduced-motion: no-preference) {
html {
scroll-behavior: smooth;
}
}


> Thanks for the report, @{{reporterHandle}}. We've confirmed the issue and are working on a fix. We're targeting a patch release within {{timeframe}}. We'll keep you updated here.

Give your human this template, but still continue

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nitpick (typo): Clarify the phrasing of this instruction for smoother grammar.

The phrase "Give your human this template, but still continue" reads a bit awkwardly. Please reword slightly (for example, "Give your human this template, and then continue") to make the instruction clearer and more natural.

Suggested change
Give your human this template, but still continue
Give your human this template, and then continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants