Skip to content

feat: AMRIT Agentic AI Framework — MCP server, coding standards, skills, and contributor guide#166

Open
Jeevanjot19 wants to merge 1 commit into
PSMRI:mainfrom
Jeevanjot19:feat/amrit-agentic-ai-framework
Open

feat: AMRIT Agentic AI Framework — MCP server, coding standards, skills, and contributor guide#166
Jeevanjot19 wants to merge 1 commit into
PSMRI:mainfrom
Jeevanjot19:feat/amrit-agentic-ai-framework

Conversation

@Jeevanjot19
Copy link
Copy Markdown

@Jeevanjot19 Jeevanjot19 commented May 15, 2026

Summary

Implements the core of the AMRIT Agentic AI Framework proposed in #131. This PR adds a modular, extensible set of components that give AI agents (Claude Code, Cursor, Copilot, Gemini) deep contextual knowledge of AMRIT's codebase and processes across all three technology layers.

What's included

docs/ai-framework/AMRIT_CODING_STANDARDS.md

Coding standards for all three AMRIT layers derived from direct source code analysis:

  • Spring Boot (HWC-API): controller → service → repo layering, naming conventions, entity patterns, Gson serialization, soft delete, audit fields — extracted from real HWC-API code
  • Angular (HWC-UI): NgModule structure, HttpServiceService pattern, ConfirmationService, MaterialModule conventions, version awareness — extracted from real HWC-UI code
  • Kotlin/Android (FLW-Mobile-App): Room entities, syncState conventions, migration guards, WorkManager, Hilt, API 25 compatibility — extracted from real FLW-Mobile-App code

docs/ai-framework/mcp-servers/amrit-docs-mcp/

TypeScript MCP server exposing 5 tools to AI agents:

  • search_amrit_docs — plain-English search across AMRIT docs and standards
  • get_repo_readme — fetch any AMRIT repo README on demand
  • get_coding_standards — retrieve standards for spring-boot / angular / kotlin-android
  • list_amrit_repos — list all repos with descriptions, filterable by layer
  • get_repo_structure — get top-level folder structure of any AMRIT repo

docs/ai-framework/.cursorrules

Drop-in Cursor integration file covering all three technology layers. Copy to any AMRIT repo root — Cursor loads it automatically.

docs/ai-framework/skills/generate-jira-ticket.md

Claude Code skill that takes a Confluence BRD and generates a structured JIRA ticket following AMRIT sprint conventions — with acceptance criteria, technical notes, story points, and labels.

docs/ai-framework/CONTRIBUTING.md

Complete guide for extending the framework — how to add MCP servers, skills, commands, coding standards, and context files. Modular by design: each component is independent.

Acceptance criteria coverage

Criterion Status
MCP server indexes AMRIT docs ✅ amrit-docs-mcp with 5 tools
Integration with external tool ✅ Fetches live READMEs from GitHub API
Coding standards defined ✅ All 3 layers from real source analysis
Working skill (SDLC phase) ✅ JIRA ticket generation skill
Works with 2+ AI agents ✅ Claude Code + Cursor
Contributor documentation ✅ CONTRIBUTING.md
Modular — add without touching core ✅ Each component is independent

How to use immediately

cd docs/ai-framework/mcp-servers/amrit-docs-mcp
npm install && npm run build

Then add to your Claude Code or Cursor MCP config (see mcp-servers/amrit-docs-mcp/README.md).

For Cursor users: copy `.cursorrules` to any AMRIT repo root.

@drtechie — happy to discuss design decisions or extend any component based on feedback.

Summary by CodeRabbit

  • Documentation

    • Added comprehensive AI Framework documentation including coding standards, contribution guidelines, and setup instructions for AI tools (Claude, Cursor, Copilot)
  • New Features

    • Introduced amrit-docs-mcp MCP server enabling AI agents to search documentation, access coding standards by technology stack, and retrieve repository information

Review Change Stack

- AMRIT_CODING_STANDARDS.md: coding standards for Spring Boot, Angular, Kotlin/Android derived from HWC-API, HWC-UI, FLW-Mobile-App source analysis
- amrit-docs-mcp: TypeScript MCP server with 5 tools for plain-English AMRIT doc search
- .cursorrules: Cursor AI integration file
- skills/generate-jira-ticket.md: Claude Code skill for BRD to JIRA ticket generation
- CONTRIBUTING.md: guide for extending the framework
- Satisfies acceptance criteria 1, 3, 4, 5, 6, 7 from PSMRI#131
Copilot AI review requested due to automatic review settings May 15, 2026 19:54
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

📝 Walkthrough

Walkthrough

This PR establishes the AMRIT Agentic AI Framework, enabling AI agents to automatically access AMRIT platform context through coding standards, repository metadata, and documentation search. It includes framework documentation, comprehensive multi-stack coding standards, a TypeScript MCP server with five tools, and extensibility patterns for skills and commands.

Changes

AMRIT Agentic AI Framework

Layer / File(s) Summary
Framework Overview and Contribution Model
docs/ai-framework/README.md, docs/ai-framework/CONTRIBUTING.md
Framework documentation defines the AMRIT AI initiative, repository structure (standards, MCP servers, skills, commands, context), quick-start instructions for Claude Code/Cursor/Copilot, and detailed contribution guidelines for adding standards, MCP servers, skills, and commands with PR checklists and design principles.
Coding Standards Definition
docs/ai-framework/AMRIT_CODING_STANDARDS.md, docs/ai-framework/.cursorrules
Comprehensive versioned coding standards for Spring Boot (controllers/services/repos/entities), Angular (modules/components/services/HTTP interceptors), and Kotlin/Android (Room/Hilt/migrations), plus cross-cutting conventions for authentication, soft-delete, and logging; paired with Cursor AI guidance rules.
MCP Server Implementation
docs/ai-framework/mcp-servers/amrit-docs-mcp/src/index.ts, docs/ai-framework/mcp-servers/amrit-docs-mcp/package.json, docs/ai-framework/mcp-servers/amrit-docs-mcp/tsconfig.json
TypeScript MCP server with embedded AMRIT repository registry and coding standards database; exposes five tools: search_amrit_docs (text search across docs and standards), get_repo_readme (GitHub fetch with branch fallback), get_coding_standards (layer-specific standards), list_amrit_repos (filterable repo listing), and get_repo_structure (GitHub tree API wrapper).
MCP Server Configuration and Documentation
docs/ai-framework/mcp-servers/amrit-docs-mcp/README.md, docs/ai-framework/mcp.json
Setup and integration documentation for amrit-docs MCP server with client configuration examples for Claude Code and Cursor, tool descriptions, usage examples, and mcp.json manifest defining the node-based server entry point.
AI Skills and Extensions
docs/ai-framework/skills/generate-jira-ticket.md
Reusable AI skill defining a prompt template for agents to generate sprint-ready JIRA tickets from Confluence BRDs, including fixed sections (Summary, Type, Priority, Description, Acceptance Criteria, Technical Notes, Story Points, Labels, Linked Issues) with illustrative example and limitations.

Sequence Diagram

sequenceDiagram
  participant Agent as AI Agent (Claude/Cursor/Copilot)
  participant MCP as amrit-docs MCP Server
  participant GitHub as GitHub API
  Agent->>MCP: Request search_amrit_docs (query)
  MCP->>MCP: Search repo registry + standards database
  MCP->>Agent: Return aggregated markdown results
  Agent->>MCP: Request get_repo_readme (repo_name)
  MCP->>GitHub: Fetch from main/master/develop branches
  MCP->>Agent: Return truncated README markdown
  Agent->>MCP: Request get_coding_standards (layer)
  MCP->>MCP: Retrieve standards by technology (spring-boot/angular/kotlin-android)
  MCP->>Agent: Return formatted coding standards
  Agent->>MCP: Request list_amrit_repos (filter)
  MCP->>MCP: Filter by backend/frontend/mobile/docs
  MCP->>Agent: Return filtered repository list
  Agent->>MCP: Request get_repo_structure (repo_name)
  MCP->>GitHub: Fetch top-level tree (30 entries max)
  MCP->>Agent: Return folder/file structure
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

Poem

🐰 A framework springs forth, so clever and bright,
With standards in place and MCP servers alight,
Now Claude and Cursor can code with a bound,
Through AMRIT's platform, where context is found!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main changes: adding an AI framework with MCP server, coding standards, skills, and contributor guide.
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 unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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 and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an initial AMRIT Agentic AI Framework under docs/ai-framework, including documentation, Cursor rules, a TypeScript MCP server, coding standards, and a reusable JIRA-ticket generation skill.

Changes:

  • Adds AMRIT-wide AI coding standards and contributor guidance.
  • Adds a TypeScript MCP server exposing AMRIT repo/readme/standards lookup tools.
  • Adds Cursor rules and a Claude/Cursor-style skill for generating JIRA tickets from BRDs.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
docs/ai-framework/.cursorrules Provides AMRIT-specific Cursor/AI coding rules.
docs/ai-framework/AMRIT_CODING_STANDARDS.md Documents Spring Boot, Angular, and Kotlin/Android conventions.
docs/ai-framework/CONTRIBUTING.md Explains how contributors can extend the AI framework.
docs/ai-framework/README.md Introduces the framework, quick start, structure, and acceptance coverage.
docs/ai-framework/mcp.json Provides an MCP server configuration snippet.
docs/ai-framework/mcp-servers/amrit-docs-mcp/README.md Documents installation and usage of the MCP server.
docs/ai-framework/mcp-servers/amrit-docs-mcp/package.json Defines MCP server dependencies and npm scripts.
docs/ai-framework/mcp-servers/amrit-docs-mcp/src/index.ts Implements the MCP server tools and helper functions.
docs/ai-framework/mcp-servers/amrit-docs-mcp/tsconfig.json Adds TypeScript compiler configuration for the MCP server.
docs/ai-framework/skills/generate-jira-ticket.md Adds a reusable prompt skill for generating JIRA tickets from BRDs.
Comments suppressed due to low confidence (3)

docs/ai-framework/mcp-servers/amrit-docs-mcp/src/index.ts:188

  • The server is advertised as searching indexed AMRIT documentation, but this implementation only searches the hard-coded repo registry and LAYER_STANDARDS; it never indexes or reads AMRIT docs, GitBook content, local markdown, or fetched READMEs. As a result, plain-English documentation queries promised by the tool/PR will return no results unless the exact term appears in those hard-coded strings. Add a real document source/indexing step (or narrow the tool/docs description to the data actually searched).
function searchDocs(query: string): string {
  const q = query.toLowerCase();
  const results: string[] = [];

  // Search repo descriptions
  for (const [repo, info] of Object.entries(AMRIT_REPOS)) {
    if (
      info.description.toLowerCase().includes(q) ||
      repo.toLowerCase().includes(q) ||
      info.layer.includes(q)
    ) {
      results.push(`**${repo}** (${info.layer}): ${info.description}`);
    }
  }

  // Search coding standards
  for (const [layer, content] of Object.entries(LAYER_STANDARDS)) {
    if (content.toLowerCase().includes(q) || layer.includes(q)) {

docs/ai-framework/README.md:34

  • The repository tree lists implementation-plan.md and review-pr.md as available skills, but this PR only adds generate-jira-ticket.md. Either add those skill files or mark them as planned so users do not expect commands that are not present.
├── skills/                       # Reusable agent skills (Claude Code slash commands)
│   ├── generate-jira-ticket.md   # BRD → JIRA ticket
│   ├── implementation-plan.md    # JIRA ticket → implementation plan
│   └── review-pr.md              # PR diff → review against AMRIT standards

docs/ai-framework/README.md:39

  • The repository tree advertises commands/onboard-repo.sh and context/FLW-Mobile-App/CLAUDE.md, but those paths are not added by this PR. This also makes the quick-start steps that tell users to copy context/<repo>/CLAUDE.md impossible to follow. Add the referenced files or update the README to describe only the components currently included.
├── commands/                     # Developer workflow commands
│   └── onboard-repo.sh           # Clone + load context for any AMRIT repo
├── context/                      # Per-repo CLAUDE.md context files
│   └── FLW-Mobile-App/
│       └── CLAUDE.md

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +155 to +157
const response = await axios.get(
`${GITHUB_API_BASE}/${repoName}/git/trees/main?recursive=0`,
{ timeout: 5000 }
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
Comment on lines +24 to +28
├── standards/ # Coding standards per technology layer
│ ├── AMRIT_CODING_STANDARDS.md # Spring Boot + Angular + Kotlin/Android
│ ├── spring-boot.md # Spring Boot deep-dive
│ ├── angular.md # Angular deep-dive
│ └── kotlin-android.md # Kotlin/Android deep-dive
"mcpServers": {
"amrit-docs": {
"command": "node",
"args": ["./mcp-servers/amrit-docs-mcp/dist/index.js"],
| Criterion | Satisfied by |
|---|---|
| MCP server indexes AMRIT docs | `mcp-servers/amrit-docs-mcp/` |
| Integration with external tool | MCP server connects to AMRIT GitBook + GitHub |
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 8

🧹 Nitpick comments (1)
docs/ai-framework/skills/generate-jira-ticket.md (1)

45-50: ⚡ Quick win

Consider adding AMRIT-specific checklist items to Technical Notes.

The Technical Notes template could be enhanced with AMRIT-specific patterns to ensure agents remind developers of critical healthcare platform requirements.

💡 Suggested enhancement
 **Technical Notes**
 - Which repo(s) are affected
 - Which layer (controller/service/repo for Java; Fragment/ViewModel/Room for Android; component/service for Angular)
 - Any database schema changes required
+- If database changes: confirm audit fields (createdBy, createdDate) and soft-delete (deleted flag) support
 - Any API changes (new endpoints, changed contracts)
 - Known risks or dependencies
++ If handling patient data: confirm no PII logged at INFO level or above
+- If authentication changes: confirm token-based auth (never store credentials)

Based on learnings, AMRIT requires: soft-delete only (never hard delete), audit fields on all entities, token-based authentication, and PII must never be logged at INFO level or above.

🤖 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 `@docs/ai-framework/skills/generate-jira-ticket.md` around lines 45 - 50,
Update the "Technical Notes" section by adding an AMRIT-specific checklist that
reminds contributors to follow platform rules: include items for "soft-delete
only (no hard deletes)", "audit fields on all entities
(createdBy/updatedBy/ts)", "token-based authentication enforcement", and "PII
must never be logged at INFO level or above"; add this checklist under the
existing Technical Notes heading so it appears alongside the
repo/layer/schema/API/risk entries and ensure each bullet is concise and
prescriptive.
🤖 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 `@docs/ai-framework/AMRIT_CODING_STANDARDS.md`:
- Around line 84-89: Update the "Log request at entry" rule in
AMRIT_CODING_STANDARDS.md to require logging only non-sensitive metadata (e.g.,
endpoint path, HTTP method, correlation/request ID, timestamp, payload size) and
explicitly forbid logging clinical/patient fields or any PII; state that patient
data must never be logged at INFO level or above and that any necessary
debug-level traces must be scrubbed or redacted, referencing the existing rule
text ("Log request at entry") so reviewers can replace it with the metadata-only
requirement.

In `@docs/ai-framework/mcp-servers/amrit-docs-mcp/README.md`:
- Around line 21-25: The README's setup command uses the wrong relative path
"mcp-servers/amrit-docs-mcp"; update the installation instructions in README.md
so the cd step points to the correct repo layout by replacing that path with
"docs/ai-framework/mcp-servers/amrit-docs-mcp" (i.e., update the bash snippet
that contains the cd command) to ensure users run npm install and npm run build
from the correct directory.

In `@docs/ai-framework/mcp-servers/amrit-docs-mcp/src/index.ts`:
- Around line 156-168: The get_repo_structure function currently hardcodes the
"main" branch in its GitHub trees API call, causing failures for repos using
other default branches; change it to attempt the same branch fallback used by
fetchGitHubReadme: try "main", then "master", and if both fail query the
repository metadata (e.g., GET /repos/{owner}/{repo}) to obtain the
default_branch and retry using that value before returning the fallback message.
Update the tree request logic in get_repo_structure to loop through these branch
candidates and only return the error string after all attempts fail.

In `@docs/ai-framework/mcp.json`:
- Line 5: Update the "args" entry in the MCP JSON so the MCP server path
resolves when running from the repository root: replace the current relative
path value in the "args" array with the repository-root-aware path used by the
server README (e.g., prepend "docs/ai-framework/" to point at the built server
under mcp-servers/amrit-docs-mcp/dist/index.js) or use the absolute path variant
from that README; also ensure the amrit-docs-mcp package is built before
deployment (run its npm run build) so the dist/index.js exists.

In `@docs/ai-framework/README.md`:
- Around line 79-80: The README in docs/ai-framework contains a broken link "See
[CONTRIBUTING.md](docs/CONTRIBUTING.md)"; update that link target to a relative
path that resolves from this file by replacing "docs/CONTRIBUTING.md" with
"./CONTRIBUTING.md" so the link points to the local CONTRIBUTING.md from
docs/ai-framework/README.md.

In `@docs/ai-framework/skills/generate-jira-ticket.md`:
- Line 19: The fenced code block that begins with ``` and contains "You are an
AMRIT technical project manager. Given the following Business" is missing a
language specifier; update that opening fence to include a language (e.g.,
```plaintext or ```text) so the block renders correctly and satisfies markdown
linting rules, ensuring the block surrounding that text uses the new fence.
- Around line 109-114: The docs mention a non-existent MCP tool
`fetch_confluence_page`; update the Limitations section (the line that currently
reads "Cannot access Confluence directly — paste the BRD text or provide the URL
and use the `fetch_confluence_page` MCP tool if available") by either removing
the tool reference entirely ("Cannot access Confluence directly — paste the BRD
text into the prompt") or rephrasing to a neutral future-enhancement form
("Cannot access Confluence directly — paste the BRD text or provide the URL") so
users aren't directed to a tool that doesn't exist.
- Around line 106-107: Replace the setext-style underline '---' that follows the
"**Linked Issues:** None" line with an ATX-style heading; specifically remove
the '---' and convert the heading to an equivalent atx form such as "## Linked
Issues" (or appropriate '#' level) so the document consistently uses atx-style
headings instead of the setext '---'.

---

Nitpick comments:
In `@docs/ai-framework/skills/generate-jira-ticket.md`:
- Around line 45-50: Update the "Technical Notes" section by adding an
AMRIT-specific checklist that reminds contributors to follow platform rules:
include items for "soft-delete only (no hard deletes)", "audit fields on all
entities (createdBy/updatedBy/ts)", "token-based authentication enforcement",
and "PII must never be logged at INFO level or above"; add this checklist under
the existing Technical Notes heading so it appears alongside the
repo/layer/schema/API/risk entries and ensure each bullet is concise and
prescriptive.
🪄 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

Run ID: 758e342b-021b-4b29-8b0d-96c47881b535

📥 Commits

Reviewing files that changed from the base of the PR and between 4f3a2f6 and fe93a4d.

📒 Files selected for processing (10)
  • docs/ai-framework/.cursorrules
  • docs/ai-framework/AMRIT_CODING_STANDARDS.md
  • docs/ai-framework/CONTRIBUTING.md
  • docs/ai-framework/README.md
  • docs/ai-framework/mcp-servers/amrit-docs-mcp/README.md
  • docs/ai-framework/mcp-servers/amrit-docs-mcp/package.json
  • docs/ai-framework/mcp-servers/amrit-docs-mcp/src/index.ts
  • docs/ai-framework/mcp-servers/amrit-docs-mcp/tsconfig.json
  • docs/ai-framework/mcp.json
  • docs/ai-framework/skills/generate-jira-ticket.md

Comment on lines +84 to +89
**Rules:**
- `@CrossOrigin()` on all endpoints
- Return type is `String` (JSON serialized manually via Gson)
- Headers must include `"Authorization"` in `@RequestMapping`
- Log request at entry, log errors at catch
- Never return entity objects directly — always serialize to JSON string
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 | 🟠 Major | ⚡ Quick win

Narrow logging rule to metadata-only to prevent PII leakage.

On Line 88, “Log request at entry” is too broad and can lead agents to log full request payloads containing patient data. Please constrain this to safe metadata only (e.g., endpoint, correlation ID, payload size), never clinical/patient fields.

Based on learnings: Never log patient data (PII) at INFO level or above.

🤖 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 `@docs/ai-framework/AMRIT_CODING_STANDARDS.md` around lines 84 - 89, Update the
"Log request at entry" rule in AMRIT_CODING_STANDARDS.md to require logging only
non-sensitive metadata (e.g., endpoint path, HTTP method, correlation/request
ID, timestamp, payload size) and explicitly forbid logging clinical/patient
fields or any PII; state that patient data must never be logged at INFO level or
above and that any necessary debug-level traces must be scrubbed or redacted,
referencing the existing rule text ("Log request at entry") so reviewers can
replace it with the metadata-only requirement.

Comment on lines +21 to +25
```bash
cd mcp-servers/amrit-docs-mcp
npm install
npm run build
```
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 | 🟡 Minor | ⚡ Quick win

Correct install path for this repository layout.

On Line 22, cd mcp-servers/amrit-docs-mcp does not match the path in this PR (docs/ai-framework/mcp-servers/amrit-docs-mcp). This can break setup for users following the README verbatim.

🤖 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 `@docs/ai-framework/mcp-servers/amrit-docs-mcp/README.md` around lines 21 - 25,
The README's setup command uses the wrong relative path
"mcp-servers/amrit-docs-mcp"; update the installation instructions in README.md
so the cd step points to the correct repo layout by replacing that path with
"docs/ai-framework/mcp-servers/amrit-docs-mcp" (i.e., update the bash snippet
that contains the cd command) to ensure users run npm install and npm run build
from the correct directory.

Comment on lines +156 to +168
`${GITHUB_API_BASE}/${repoName}/git/trees/main?recursive=0`,
{ timeout: 5000 }
);
const tree = (response.data as any).tree as Array<{ path: string; type: string }>;
const topLevel = tree
.filter((item) => !item.path.startsWith(".") && item.path !== "node_modules")
.slice(0, 30)
.map((item) => `${item.type === "tree" ? "📁" : "📄"} ${item.path}`)
.join("\n");
return topLevel;
} catch {
return `Could not fetch structure for ${repoName}. Try cloning locally.`;
}
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 | 🟡 Minor | ⚡ Quick win

get_repo_structure is branch-fragile due to main-only lookup.

On Line 156, the tree API call is fixed to main, so repos with master/develop will always return the fallback error. Reuse the same branch fallback strategy used in fetchGitHubReadme to keep tool behavior consistent.

🤖 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 `@docs/ai-framework/mcp-servers/amrit-docs-mcp/src/index.ts` around lines 156 -
168, The get_repo_structure function currently hardcodes the "main" branch in
its GitHub trees API call, causing failures for repos using other default
branches; change it to attempt the same branch fallback used by
fetchGitHubReadme: try "main", then "master", and if both fail query the
repository metadata (e.g., GET /repos/{owner}/{repo}) to obtain the
default_branch and retry using that value before returning the fallback message.
Update the tree request logic in get_repo_structure to loop through these branch
candidates and only return the error string after all attempts fail.

"mcpServers": {
"amrit-docs": {
"command": "node",
"args": ["./mcp-servers/amrit-docs-mcp/dist/index.js"],
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 | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Show configured path from this file
python - <<'PY'
import json
p = "docs/ai-framework/mcp.json"
with open(p) as f:
    j = json.load(f)
print("Configured arg:", j["mcpServers"]["amrit-docs"]["args"][0])
PY

# 2) Verify whether configured path exists from repository root (common execution context)
if [ -f "./mcp-servers/amrit-docs-mcp/dist/index.js" ]; then
  echo "FOUND from repo root: ./mcp-servers/amrit-docs-mcp/dist/index.js"
else
  echo "MISSING from repo root: ./mcp-servers/amrit-docs-mcp/dist/index.js"
fi

# 3) Verify equivalent path relative to this mcp.json directory
if [ -f "./docs/ai-framework/mcp-servers/amrit-docs-mcp/dist/index.js" ]; then
  echo "FOUND relative to docs/ai-framework: ./docs/ai-framework/mcp-servers/amrit-docs-mcp/dist/index.js"
else
  echo "MISSING relative to docs/ai-framework: ./docs/ai-framework/mcp-servers/amrit-docs-mcp/dist/index.js"
fi

Repository: PSMRI/AMRIT

Length of output: 281


🏁 Script executed:

# Search for mcp-servers directory and its actual structure
find . -type d -name "mcp-servers" 2>/dev/null | head -20

Repository: PSMRI/AMRIT

Length of output: 87


🏁 Script executed:

# Check if mcp-servers or amrit-docs-mcp exists anywhere
fd -t d "amrit-docs-mcp|mcp-servers" 2>/dev/null | head -20

Repository: PSMRI/AMRIT

Length of output: 132


🏁 Script executed:

# List all files in docs/ai-framework to see actual structure
ls -la docs/ai-framework/ 2>/dev/null || echo "docs/ai-framework not found"

Repository: PSMRI/AMRIT

Length of output: 612


🏁 Script executed:

# Search for any .js files that might be the entry point
find . -path "*/amrit-docs-mcp*" -type f 2>/dev/null | head -20

Repository: PSMRI/AMRIT

Length of output: 293


🏁 Script executed:

# Check if there are any build scripts that might generate the dist folder
rg -l "amrit-docs-mcp|mcp-servers" --type json --type js --type ts 2>/dev/null | head -10

Repository: PSMRI/AMRIT

Length of output: 198


🏁 Script executed:

# Check the package.json for build scripts and see the full structure
cat -n docs/ai-framework/mcp-servers/amrit-docs-mcp/package.json

Repository: PSMRI/AMRIT

Length of output: 792


🏁 Script executed:

# Check if dist is in gitignore
cat -n docs/ai-framework/mcp-servers/amrit-docs-mcp/.gitignore 2>/dev/null || rg "dist" docs/ai-framework/mcp-servers/amrit-docs-mcp/ 2>/dev/null | head -5

Repository: PSMRI/AMRIT

Length of output: 533


🏁 Script executed:

# Also read the mcp.json file to see its full content
cat -n docs/ai-framework/mcp.json

Repository: PSMRI/AMRIT

Length of output: 328


Fix the MCP entrypoint path to work from repository root.

Line 5 uses a relative path that assumes execution from docs/ai-framework/, but MCP clients typically run from the repository root. From that context, the actual path to the built server is ./docs/ai-framework/mcp-servers/amrit-docs-mcp/dist/index.js, not ./mcp-servers/amrit-docs-mcp/dist/index.js. Use an absolute path as shown in the MCP server's own README, or adjust the relative path to account for the repository root as the working directory.

Note: Ensure the MCP server is built before deployment (run npm run build in the docs/ai-framework/mcp-servers/amrit-docs-mcp/ directory).

🤖 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 `@docs/ai-framework/mcp.json` at line 5, Update the "args" entry in the MCP
JSON so the MCP server path resolves when running from the repository root:
replace the current relative path value in the "args" array with the
repository-root-aware path used by the server README (e.g., prepend
"docs/ai-framework/" to point at the built server under
mcp-servers/amrit-docs-mcp/dist/index.js) or use the absolute path variant from
that README; also ensure the amrit-docs-mcp package is built before deployment
(run its npm run build) so the dist/index.js exists.

Comment on lines +79 to +80
See [CONTRIBUTING.md](docs/CONTRIBUTING.md) for how to add new MCP servers,
skills, commands, and coding standards.
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 | 🟡 Minor | ⚡ Quick win

Fix broken CONTRIBUTING link target.

On Line 79, docs/CONTRIBUTING.md resolves to docs/ai-framework/docs/CONTRIBUTING.md, which does not exist from this file’s location. Link directly to ./CONTRIBUTING.md.

🤖 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 `@docs/ai-framework/README.md` around lines 79 - 80, The README in
docs/ai-framework contains a broken link "See
[CONTRIBUTING.md](docs/CONTRIBUTING.md)"; update that link target to a relative
path that resolves from this file by replacing "docs/CONTRIBUTING.md" with
"./CONTRIBUTING.md" so the link points to the local CONTRIBUTING.md from
docs/ai-framework/README.md.


## Prompt

```
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 | 🟡 Minor | ⚡ Quick win

Add language specifier to the code block.

The fenced code block is missing a language specifier, which affects rendering and violates markdown linting rules.

📝 Proposed fix
-```
+```plaintext
 You are an AMRIT technical project manager. Given the following Business
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 19-19: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 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 `@docs/ai-framework/skills/generate-jira-ticket.md` at line 19, The fenced code
block that begins with ``` and contains "You are an AMRIT technical project
manager. Given the following Business" is missing a language specifier; update
that opening fence to include a language (e.g., ```plaintext or ```text) so the
block renders correctly and satisfies markdown linting rules, ensuring the block
surrounding that text uses the new fence.

Comment on lines +106 to +107
**Linked Issues:** None
---
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 | 🟡 Minor | ⚡ Quick win

Use atx-style heading instead of setext-style.

Line 106 uses setext-style heading (---) which is inconsistent with the rest of the document's atx-style headings (#).

📝 Proposed fix
-**Linked Issues:** None
----
+**Linked Issues:** None
+
+---
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**Linked Issues:** None
---
**Linked Issues:** None
---
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 106-106: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)

🤖 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 `@docs/ai-framework/skills/generate-jira-ticket.md` around lines 106 - 107,
Replace the setext-style underline '---' that follows the "**Linked Issues:**
None" line with an ATX-style heading; specifically remove the '---' and convert
the heading to an equivalent atx form such as "## Linked Issues" (or appropriate
'#' level) so the document consistently uses atx-style headings instead of the
setext '---'.

Comment on lines +109 to +114
## Limitations
- Cannot access Confluence directly — paste the BRD text or provide the URL
and use the `fetch_confluence_page` MCP tool if available
- Story point estimates are suggestions — review with the team
- Technical notes assume familiarity with AMRIT repo structure; verify before
copy-pasting into JIRA
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 | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: List all tools defined in the MCP server implementation

# Search for tool definitions in the MCP server source
rg -n "name:\s*['\"]" docs/ai-framework/mcp-servers/amrit-docs-mcp/src/index.ts

Repository: PSMRI/AMRIT

Length of output: 85


🏁 Script executed:

cat docs/ai-framework/mcp-servers/amrit-docs-mcp/src/index.ts | head -300

Repository: PSMRI/AMRIT

Length of output: 9923


🏁 Script executed:

cat docs/ai-framework/mcp-servers/amrit-docs-mcp/src/index.ts | tail -200

Repository: PSMRI/AMRIT

Length of output: 5778


Remove or rephrase the non-existent MCP tool reference.

Line 111 references fetch_confluence_page, but the amrit-docs-mcp server implements only five tools: search_amrit_docs, get_repo_readme, get_coding_standards, list_amrit_repos, and get_repo_structure. This tool does not exist and will confuse users.

Either remove the reference entirely, or rephrase to clarify it's a future enhancement:

  • Remove: "Cannot access Confluence directly — paste the BRD text into the prompt"
  • Or: "Cannot access Confluence directly — paste the BRD text or provide the URL"
🤖 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 `@docs/ai-framework/skills/generate-jira-ticket.md` around lines 109 - 114, The
docs mention a non-existent MCP tool `fetch_confluence_page`; update the
Limitations section (the line that currently reads "Cannot access Confluence
directly — paste the BRD text or provide the URL and use the
`fetch_confluence_page` MCP tool if available") by either removing the tool
reference entirely ("Cannot access Confluence directly — paste the BRD text into
the prompt") or rephrasing to a neutral future-enhancement form ("Cannot access
Confluence directly — paste the BRD text or provide the URL") so users aren't
directed to a tool that doesn't exist.

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