Skip to content

[FEATURE] Role-specific project knowledge schemas in agent templates and setup-teamwork #185

@JoshLuedeman

Description

@JoshLuedeman

Problem It Solves

Closes gap: #172

Every agent receives identical Project Knowledge after setup-teamwork runs. Irrelevant facts waste context tokens and dilute the signal of genuinely role-relevant knowledge.

Proposed Behavior

1. Role-specific knowledge schema in agent templates

Each .github/agents/*.agent.md file defines its knowledge schema via structured placeholder comments in the Project Knowledge section:

## Project Knowledge

<!-- KNOWLEDGE: test_framework, test_command, coverage_tool, test_dir -->
- Test framework: `[e.g., Jest]` <!-- CUSTOMIZE -->
- Test command: `[e.g., npm test]` <!-- CUSTOMIZE -->
- Coverage tool: `[e.g., Istanbul]` <!-- CUSTOMIZE -->
- Test directory: `[e.g., src/__tests__]` <!-- CUSTOMIZE -->

Each schema key maps to a fact category that setup-teamwork knows how to detect.

2. Schema registry

A new internal config package (internal/config/knowledge.go) defines the canonical mapping from schema key to detection logic and role assignments:

var KnowledgeSchemas = map[string][]string{
  "tester":           {"test_framework", "test_command", "coverage_tool", "test_dir"},
  "coder":            {"languages", "build_command", "lint_command", "package_manager"},
  "security-auditor": {"auth_mechanism", "sensitive_paths", "dependency_audit_command"},
  "architect":        {"orm", "migration_tool", "api_framework", "database_engine"},
  "documenter":       {"docs_dir", "doc_format", "api_spec_path"},
}

3. setup-teamwork skill update

The /setup-teamwork SKILL.md Step 4 is updated to: parse each agent file's KNOWLEDGE schema comment, detect or prompt for only the schema-specified facts, and populate only those placeholders. Facts not in the schema are not written.

4. teamwork init integration

teamwork init passes detected stack facts through the schema registry to produce role-specific knowledge sections during initial installation.

Dependencies

Complexity Estimate

Medium — 5 files: knowledge schema registry, detect.go extensions, setup-teamwork SKILL.md update, agent template updates (all 17 files), init command integration, tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfeature-requestA new capability proposed through forward-looking design or gap analysis

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions