Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/the-agency/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "the-agency",
"version": "0.1.1",
"version": "0.1.2",
"name": "The Agency",
"description": "A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy injectors to reality checkers. Each agent is a specialized expert with personality, processes, and proven deliverables. Credits: https://github.com/msitarzewski/agency-agents.",
"documentationURL": "https://github.com/wcgomes/devcontainer-features?tab=readme-ov-file#feature-the-agency",
Expand Down
12 changes: 6 additions & 6 deletions src/the-agency/on-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ write_workspace_agents_reference() {
fi

upsert_block "$dst_file" \
"<!-- the-agency-feature:workspace-references:start -->" \
"<!-- the-agency-feature:workspace-references:end -->" \
"<!-- the-agency:workspace-rules:start -->" \
"<!-- the-agency:workspace-rules:end -->" \
"$references_block_file"
}

Expand Down Expand Up @@ -95,20 +95,20 @@ fi

# Build the references block content dynamically based on use-agent-zero flag
{
echo "<!-- the-agency-feature:workspace-references:start -->"
echo "<!-- the-agency:workspace-rules:start -->"

if [ "$use_agent_zero_enabled" = true ]; then
echo "# Canonical Agent Guide (Mandatory)"
echo "## Canonical Agent Guide (Mandatory)"
echo ""
echo "Use ~/.the-agency/AGENTS.md as the global AGENTS baseline before execution."
echo ""
fi

echo "# How to Choose the Right Specialist Agent (Mandatory)"
echo "## How to Choose the Right Specialist Agent (Mandatory)"
echo ""
echo "Before starting any task, read ~/.the-agency/AGENT_ROUTING.md to understand how to classify divisions and choose the ideal specialist agent for the job."
echo ""
echo "<!-- the-agency-feature:workspace-references:end -->"
echo "<!-- the-agency:workspace-rules:end -->"
} > "$references_block_file"

# If use-agent-zero is enabled, download and sync AGENT-ZERO
Expand Down
4 changes: 2 additions & 2 deletions test/the-agency/use_agent_zero_disabled.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ check "on-create updates existing AGENTS.md with routing rules only (when disabl

Keep this user content.

<!-- the-agency-feature:workspace-references:start -->
<!-- the-agency:workspace-rules:start -->
# Old content
Old routing old canonical
<!-- the-agency-feature:workspace-references:end -->
<!-- the-agency:workspace-rules:end -->
EOF
cd "$tmp_ws"

Expand Down
4 changes: 2 additions & 2 deletions test/the-agency/use_agent_zero_enabled.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ check "on-create upserts only feature blocks in existing AGENTS.md" bash -c '

Keep this line untouched.

<!-- the-agency-feature:workspace-references:start -->
<!-- the-agency:workspace-rules:start -->
# Old Canonical Header
old canonical body
# Old Routing Header
old routing body
<!-- the-agency-feature:workspace-references:end -->
<!-- the-agency:workspace-rules:end -->
EOF
cd "$tmp_ws"
/usr/local/share/devcontainer-features/the-agency-on-create.sh
Expand Down
10 changes: 5 additions & 5 deletions test_validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ echo ""

# Check 2: Verify that routing rules are ALWAYS added
echo "Check 2: Routing rules always included"
if grep -q 'echo "# Agent Routing Rules (Mandatory)"' "$on_create_file"; then
if grep -q 'echo "## How to Choose the Right Specialist Agent (Mandatory)"' "$on_create_file"; then
echo "✓ Routing rules section present in block"
else
echo "FAIL: Routing rules not found"
Expand All @@ -41,7 +41,7 @@ echo ""
# Check 3: Verify that canonical guide is conditional (only when enabled)
echo "Check 3: Canonical guide is conditional"
if grep -q 'if \[ "\$use_agent_zero_enabled" = true \]; then' "$on_create_file" && \
grep -q 'echo "# Canonical Agent Guide (Mandatory)"' "$on_create_file"; then
grep -q 'echo "## Canonical Agent Guide (Mandatory)"' "$on_create_file"; then
echo "✓ Canonical guide is only added when flag is true"
else
echo "FAIL: Canonical guide condition not implemented correctly"
Expand All @@ -52,7 +52,7 @@ echo ""
# Check 4: Verify order (Canonical BEFORE Routing)
echo "Check 4: Canonical guide appears BEFORE routing rules in block"
canonical_pos=$(grep -n 'Canonical Agent Guide' "$on_create_file" | head -1 | cut -d: -f1)
routing_pos=$(grep -n 'Agent Routing Rules' "$on_create_file" | grep -v Canonical | head -1 | cut -d: -f1)
routing_pos=$(grep -n 'How to Choose the Right Specialist Agent' "$on_create_file" | head -1 | cut -d: -f1)
if [ "$canonical_pos" -lt "$routing_pos" ]; then
echo "✓ Canonical guide comes before routing rules (line $canonical_pos < $routing_pos)"
else
Expand Down Expand Up @@ -84,8 +84,8 @@ echo ""

# Check 7: Verify single block marker (workspace-references)
echo "Check 7: Single unified block marker"
if grep -q 'the-agency-feature:workspace-references:start' "$on_create_file" && \
grep -q 'the-agency-feature:workspace-references:end' "$on_create_file" && \\
if grep -q 'the-agency:workspace-rules:start' "$on_create_file" && \
grep -q 'the-agency:workspace-rules:end' "$on_create_file" && \
! grep -q 'routing-reference\|agent-zero-reference' "$on_create_file"; then
echo "✓ Using single workspace-references block (no dual markers)"
else
Expand Down
Loading