Skip to content

feat: external documentation gathering across onboarding commands#138

Open
dustyo-O wants to merge 1 commit into
mainfrom
feat/external-documentation-gathering
Open

feat: external documentation gathering across onboarding commands#138
dustyo-O wants to merge 1 commit into
mainfrom
feat/external-documentation-gathering

Conversation

@dustyo-O

@dustyo-O dustyo-O commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Extends the brownfield onboarding path to gather project knowledge from external documentation sources (wikis, ticket systems, chats, email) using the same accumulate-then-absorb pattern as brownfield.md
  • /awos:product detects sources, helps set up MCP/CLI tools, retrieves product-relevant findings → creates project-documentation.md; /awos:roadmap appends ## Capabilities; /awos:architecture appends ## Technology then deletes the file
  • Adds platform setup guides (commands/sources/) covering 47 platforms: documentation (16), tickets (17), communication (14) — with privacy gate for chat/email and MCP restart-resume flow

Test plan

  • npm run test:lint — all 56+ tests pass including 11 new documentation-gathering contracts
  • npx prettier . --check — formatting clean
  • Verify commands/sources/ files are copied to .awos/commands/sources/ by installer (recursive copy in file-copier.js)
  • Run /awos:product on a brownfield project → verify documentation source detection triggers after brownfield detection
  • Set up one MCP (e.g. Notion), verify retrieval works end-to-end
  • Verify restart-resume flow: partial project-documentation.md with ## Sources Configured is detected on re-run

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • External documentation source detection and integration across product, roadmap, and architecture workflows
    • Setup guides for multiple documentation platforms (Confluence, Notion, Google Docs, SharePoint, and others)
    • Setup guides for ticket systems (Jira, Linear, GitHub Issues, Azure DevOps, and others)
    • Setup guides for communication platforms (Slack, Teams, Discord, Gmail, and others)
    • Privacy and authorization gates for sensitive communication sources
  • Documentation

    • Updated workflow documentation to reflect external documentation integration
    • Added platform-specific setup instructions with MCP, CLI, and manual export options

…rchitecture commands

Extend the brownfield onboarding path to gather project knowledge from
external documentation sources (wikis, ticket systems, chats, email).
Uses the same accumulate-then-absorb pattern as brownfield.md:

- /awos:product detects sources, helps set up MCP/CLI tools, retrieves
  product-relevant findings → creates project-documentation.md
- /awos:roadmap retrieves capability-focused docs → appends ## Capabilities
- /awos:architecture retrieves tech-focused docs → appends ## Technology,
  then deletes the file after absorption

Adds platform setup guides (commands/sources/) covering 47 platforms:
documentation (16), tickets (17), communication (14). Includes privacy
gate for chat/email sources and MCP restart-resume flow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds external documentation source integration to the awos workflow. Three new source reference guides are introduced under commands/sources/. commands/product.md gains a discovery substep that creates context/product/project-documentation.md. commands/roadmap.md and commands/architecture.md are updated to read and extend this file, with architecture cleanup deleting it. CLAUDE.md and lint tests reflect these contracts.

Changes

External Documentation Sources Pipeline

Layer / File(s) Summary
Source reference guides
commands/sources/documentation.md, commands/sources/tickets.md, commands/sources/communication.md
Adds three new platform setup guides covering MCP-first access with CLI and manual-export fallbacks for documentation/wiki, ticket system, and chat/email platforms respectively.
product.md: external source discovery and project-documentation.md creation
commands/product.md
Registers context/product/project-documentation.md as an optional output; inserts an "External documentation sources" substep with resume detection, platform multi-select, privacy gate, MCP restart/continuation, tool verification, agent retrieval/triage, and file write containing ## Sources Configured and ## Product. Updates the template-walk instruction to use both brownfield and documentation findings.
roadmap.md and architecture.md: consume and extend project-documentation.md
commands/roadmap.md, commands/architecture.md
roadmap.md adds project-documentation.md as optional I/O and inserts an External documentation context step appending ## Capabilities. architecture.md adds the same optional input, an External documentation context step appending ## Technology, and expands Step 5 cleanup to delete project-documentation.md.
CLAUDE.md overview and lint test contracts
CLAUDE.md, tests/lint-prompts.test.js
CLAUDE.md extends the brownfield workflow description. Tests replace the old no-<existing_findings> assertion and add a full "External documentation gathering" suite covering creation, restart, consumption, cleanup, source file existence, duplicate-avoidance, and existence guards.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • provectus/awos#137: Directly precedes this PR by establishing the context/product/brownfield.md artifact and the <existing_findings>/triage contracts that this PR extends with project-documentation.md.

Suggested labels

enhancement

Suggested reviewers

  • AlexanderMakarov

Poem

🐇 Hop hop, the rabbit digs through wikis and chats,
Gathering tickets and Slack threads and that —
A project-documentation.md file takes shape,
Each platform configured with no red tape.
From Jira to Notion, from Gmail to Slack,
The roadmap knows all, and the arch has it stacked! 🗂️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the primary feature: adding external documentation gathering across the onboarding commands, which is the main focus of all changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/external-documentation-gathering

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/lint-prompts.test.js`:
- Line 794: The test assertions are failing because the `commands/hire.md` file
is missing two required references that the tests expect. Add a reference to the
path 'context/product/project-documentation.md' in the hire.md file to satisfy
the assertion at line 988, and include the word "delete" in the hire.md file to
satisfy the cleanup language assertion at line 992. Both of these additions need
to be made to the hire.md file content so the test assertions pass.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e6d753d4-07be-4b4b-9c57-1e19a5c330f9

📥 Commits

Reviewing files that changed from the base of the PR and between 7df798b and 9503c91.

📒 Files selected for processing (8)
  • CLAUDE.md
  • commands/architecture.md
  • commands/product.md
  • commands/roadmap.md
  • commands/sources/communication.md
  • commands/sources/documentation.md
  • commands/sources/tickets.md
  • tests/lint-prompts.test.js

assert.ok(
!/<existing_findings>/.test(body),
'commands/product.md must not contain <existing_findings> — it is the first brownfield command'
/<existing_findings>/.test(body),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify external documentation contracts in files not provided in this review cohort

set -e

# Check 1: product.md must contain <existing_findings> in documentation retrieval prompt (test line 794)
echo "=== Checking product.md for <existing_findings> in documentation retrieval ==="
if grep -q '<existing_findings>' commands/product.md; then
  echo "✓ product.md contains <existing_findings> tag"
else
  echo "✗ product.md missing <existing_findings> tag (test line 794 would fail)"
  exit 1
fi

# Check 2: hire.md must reference project-documentation.md and include delete language (test lines 986-993)
echo "=== Checking hire.md for project-documentation.md cleanup contract ==="
if grep -q 'project-documentation\.md' commands/hire.md; then
  echo "✓ hire.md references project-documentation.md"
else
  echo "✗ hire.md missing project-documentation.md reference (test line 988 would fail)"
  exit 1
fi

if grep -iq 'delete' commands/hire.md; then
  echo "✓ hire.md contains delete language"
else
  echo "✗ hire.md missing delete language (test line 992 would fail)"
  exit 1
fi

# Check 3: All three source reference files exist (test line 997-1007)
echo "=== Checking commands/sources/ directory structure ==="
for f in documentation.md tickets.md communication.md; do
  if [ -f "commands/sources/$f" ]; then
    echo "✓ commands/sources/$f exists"
  else
    echo "✗ commands/sources/$f missing (test line 1001-1005 would fail)"
    exit 1
  fi
done

# Check 4: Verify regex patterns in roadmap/architecture match actual prose
echo "=== Verifying test regex patterns match implementation ==="

# roadmap.md should have "under a `## Capabilities` heading"
if grep -q 'under a `## Capabilities` heading' commands/roadmap.md; then
  echo "✓ roadmap.md has correct ## Capabilities pattern (test line 950 check)"
else
  echo "✗ roadmap.md missing expected pattern (test line 950 would fail)"
  exit 1
fi

# architecture.md should have "under a `## Technology` heading"
if grep -q 'under a `## Technology` heading' commands/architecture.md; then
  echo "✓ architecture.md has correct ## Technology pattern (test line 965 check)"
else
  echo "✗ architecture.md missing expected pattern (test line 965 would fail)"
  exit 1
fi

# architecture.md should have the exact conditional delete sentence (test line 976-977)
if grep -qi 'If `context/product/project-documentation\.md` exists, delete it' commands/architecture.md; then
  echo "✓ architecture.md has correct conditional delete pattern (test line 976-977 check)"
else
  echo "✗ architecture.md missing expected delete pattern (test line 976-977 would fail)"
  exit 1
fi

# roadmap.md and architecture.md should have existence guards (test line 1029)
for cmd in roadmap.md architecture.md; do
  if grep -q "project-documentation\.md\` exists" commands/$cmd; then
    echo "✓ commands/$cmd has existence guard pattern (test line 1029 check)"
  else
    echo "✗ commands/$cmd missing existence guard (test line 1029 would fail)"
    exit 1
  fi
done

echo ""
echo "All verification checks passed ✓"

Repository: provectus/awos

Length of output: 428


🏁 Script executed:

sed -n '986,993p' tests/lint-prompts.test.js

Repository: provectus/awos

Length of output: 523


🏁 Script executed:

cat commands/hire.md

Repository: provectus/awos

Length of output: 13556


Test assertions at lines 986-989 will fail: hire.md is missing both required references.

The test suite depends on commands/hire.md containing:

  1. A reference to 'context/product/project-documentation.md' (asserted at line 988)
  2. The word "delete" for cleanup language (asserted at line 992)

Currently, hire.md has neither. Add these references to the file so the assertions pass.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/lint-prompts.test.js` at line 794, The test assertions are failing
because the `commands/hire.md` file is missing two required references that the
tests expect. Add a reference to the path
'context/product/project-documentation.md' in the hire.md file to satisfy the
assertion at line 988, and include the word "delete" in the hire.md file to
satisfy the cleanup language assertion at line 992. Both of these additions need
to be made to the hire.md file content so the test assertions pass.

@AlexanderMakarov AlexanderMakarov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

General review point

The direction is right — pulling project knowledge out of external wikis/tickets/chats is genuinely valuable. But I'd like us to rethink where this lives before merging, on three counts:

1. commands/sources/ is reference content, not command-prompt content.
The three files are platform-by-platform setup guides (MCP → CLI → manual export) for ~47 platforms. That's exactly the shape of skill/registry material, and it duplicates what we already maintain in the awos-recruitment repo's registry/ — both registry/skills/*/SKILL.md and registry/mcp/*.yaml (Atlassian, Slack, Google Drive, GitHub, GitLab… are already there as MCP configs). Bundling a parallel, hand-maintained copy of 47 platform integrations inside commands/ means two sources of truth that will drift. I'd rather this content live in the registry (skills + MCP configs) and get installed on demand (the /awos:hire model - probably it makes sense to run it before /awos:product or think about other delivery option), not shipped inline as framework prompts.

2. Setting up MCP/CLI tooling doesn't belong in /awos:product.
/awos:product exists to author the product definition. It was never meant to detect data sources and walk the user through installing/auth'ing MCP servers. Folding tool-provisioning into it is responsibility creep — it bloats the command, couples product authoring to infra setup, and makes the "restart-resume after MCP install" flow leak into a command that shouldn't know about it.

3. Source discovery + access is cross-cutting — make it shared, not per-command.
Knowing what documentation/knowledge sources a project has (and how to query them) is valuable to far more than onboarding: the core commands, /awos:ai-readiness-audit, and likely future plugins all want it. The current PR wires the same accumulate-then-absorb logic into three commands independently; the audit and any plugin would each have to reinvent it.

Proposal: extract this into a single shared capability rather than threading it through individual commands.

  • A new core command — /awos:investigate (alternatives: /awos:sources, /awos:discover, /awos:connect) whose job is exactly: detect available sources → help set up access (MCP/CLI, using the registry guides) → write a persistent catalogue to context/sources.md (what's configured, how to query each, scope/privacy notes). Run once, like the other setup-phase commands.
  • Every consumer — /awos:product, /awos:roadmap, /awos:architecture, /awos:ai-readiness-audit, plugins — then just reads context/sources.md and runs purpose-scoped retrieval. No re-detection, no re-setup, no per-command MCP-restart flow.
  • The 47-platform setup content moves to the awos-recruitment registry as skills/MCP configs and is installed when /awos:investigate needs it.

That keeps /awos:product focused, gives us one place to maintain platform integrations, and makes source-awareness reusable across the whole framework instead of just the onboarding path.

Happy to discuss the command name and the exact context/sources.md shape.

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