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
22 changes: 22 additions & 0 deletions .agents/skills/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Repo-local AI agent skills

This repository keeps checked-in agent skills under `.agents/skills/`.

Canonical layout:

- `.agents/skills/<skill-name>/SKILL.md`

Current skills:

- `micro-site-authoring`
- Path: `.agents/skills/micro-site-authoring/SKILL.md`
- Purpose: create or maintain small QueryPie micro websites in this monorepo while preserving independent app boundaries, English repository documentation, and Japanese public copy.
- `micro-site-setup`
- Path: `.agents/skills/micro-site-setup/SKILL.md`
- Purpose: add a new independent Next.js app under `apps/*`, wire it to shared packages, and prepare the app for standalone Vercel deployment.

Usage notes:

- Load `micro-site-authoring` for page/content/section work in an existing micro website.
- Load `micro-site-setup` before adding a new app under `apps/*`.
- Keep this index aligned with the actual skill directories.
53 changes: 53 additions & 0 deletions .agents/skills/micro-site-authoring/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: micro-site-authoring
description: Author and maintain small QueryPie micro websites while keeping page copy route-local and shared packages UI-only.
version: 1.0.0
author: Hermes Agent
license: MIT
metadata:
hermes:
tags: [corp-web-micro, microsite, nextjs, tailwind, route-local-authoring]
---

# Micro-site authoring

Use this skill when editing an existing micro website under `apps/<site>/`.

## Core rules

1. Write repository documentation, comments, PR titles, and PR descriptions in English.
2. Write public website content in Japanese by default.
3. Keep the site's visible copy and section order in the relevant `page.tsx` file.
4. Use `packages/microsite-ui` for UI primitives only; do not move campaign-specific story, headings, or long copy into shared packages.
5. Link shared company/contact/legal/resource surfaces to `https://querypie.ai` instead of duplicating those pages.
6. Keep site-specific assets under `apps/<site>/public/`.

## Good page pattern

```tsx
<HeroSection>
<HeroEyebrow>...</HeroEyebrow>
<HeroTitle>...</HeroTitle>
<HeroBody>...</HeroBody>
<HeroActions>...</HeroActions>
</HeroSection>
```

## Avoid

- Generic page renderers such as `<LandingPage content={...} />`.
- Large arrays or JSON-like objects that hide marketing copy from the route.
- Shared package components that include one site's copy.
- Duplicating contact/about/legal pages that already exist on the main QueryPie AI Japan site.

## Verification

Run the smallest command that proves the change:

```bash
npm run lint --workspace @querypie/microsite-<site>
npm run typecheck --workspace @querypie/microsite-<site>
npm run build --workspace @querypie/microsite-<site>
```

Use `npm run test:ci` for baseline PR validation when practical.
59 changes: 59 additions & 0 deletions .agents/skills/micro-site-setup/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: micro-site-setup
description: Add a new independent Next.js micro website app to the corp-web-micro monorepo.
version: 1.0.0
author: Hermes Agent
license: MIT
metadata:
hermes:
tags: [corp-web-micro, microsite, nextjs, setup, vercel]
---

# Micro-site setup

Use this skill before adding a new app under `apps/*`.

## Default architecture

- Add one independent Next.js app under `apps/<site-slug>/`.
- Keep deployment independent by creating one Vercel project per app.
- Use shared packages for reusable UI and main-site links.
- Do not implement host-based rewrites inside a single Next.js app unless explicitly requested.

## Required files for a new app

```text
apps/<site>/package.json
apps/<site>/next.config.ts
apps/<site>/tsconfig.json
apps/<site>/postcss.config.mjs
apps/<site>/src/app/layout.tsx
apps/<site>/src/app/page.tsx
apps/<site>/src/app/robots.ts
apps/<site>/src/app/sitemap.ts
apps/<site>/src/lib/site-config.ts
apps/<site>/public/
```

## Content and docs policy

- Repository docs and PR text: English.
- Public site copy: Japanese by default.
- Main company/contact/legal/resource links: use `@querypie/microsite-links`.

## Vercel setup

Create a Vercel project with:

- Root directory: `apps/<site>`
- Install command: `npm install`
- Build command: `npm run build`
- Output: Next.js default

## Verification

After creating an app, run:

```bash
npm run test:ci
```
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CI

on:
pull_request:
push:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- run: npm install
- run: npm run test:ci
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# dependencies
node_modules/
.pnp
.pnp.*

# Next.js
.next/
out/

# build outputs
dist/
coverage/
*.tsbuildinfo

# env
.env
.env*.local

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# OS/editor
.DS_Store
*.swp

# Hermes/local agent state
.hermes/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
65 changes: 65 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Repository Guidelines

This file is the working guide for AI agents and contributors working in `corp-web-micro`.

## Language policy

- Write repository-internal documentation, guidance, comments, PR titles, and PR descriptions in English.
- Write public website content in Japanese by default until a specific micro website explicitly requires another locale.
- Do not mention internal implementation terms such as MDX in stakeholder-facing website copy unless explicitly requested.

## Project stack

- npm workspaces
- Multiple independent Next.js apps under `apps/*`
- Shared packages under `packages/*`
- Next.js 16, React 19, TypeScript, Tailwind CSS v4

## Repository structure

- `apps/<site>/` — one independent Next.js app per micro website
- `packages/microsite-ui/` — shared UI primitives only
- `packages/microsite-links/` — canonical main-site links and contact URL helpers
- `.agents/skills/` — repo-local AI agent skills
- `tests/` — lightweight structure and convention tests

## Micro website rules

- Prefer multiple Next.js apps in this monorepo over one app with host-based rewrites.
- Each app should be deployable as an independent Vercel project.
- Keep each micro website to a small route surface, usually 1-5 `page.tsx` files.
- Keep page-specific marketing copy and section order visible in `page.tsx`.
- Use shared UI primitives for layout/styling; do not create generic page renderers or large JSON content registries for static marketing pages.
- Link shared surfaces such as company overview, contact, privacy policy, terms, and resources to the main QueryPie AI Japan site.
- Keep site-specific assets under that app's `public/` directory.

## Shared package rules

- Shared UI packages must not own campaign-specific copy.
- Promote code to shared packages only when it is genuinely reusable across multiple micro websites.
- Keep props small and structural. Prefer `children` for authored copy.
- Avoid hiding complete page composition behind wrappers like `PageContent` or `GenericLandingPage`.

## Workflow

1. Check the current branch and repository state before editing.
2. Use a fresh branch/worktree for PR work.
3. Keep changes small and reviewable.
4. Run the lightest verification that proves correctness. Use `npm run test:ci` for baseline PR validation.
5. Commit, push, and open a PR when the user asks for repository work.

## Verification

Recommended baseline:

```bash
npm run test:ci
```

For a single app:

```bash
npm run lint --workspace @querypie/microsite-finance
npm run typecheck --workspace @querypie/microsite-finance
npm run build --workspace @querypie/microsite-finance
```
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Corp Web Micro

This repository hosts small QueryPie micro websites in a single npm-workspaces monorepo.

Repository documentation, guidance, comments, PR titles, and PR descriptions should be written in English. Website content is Japanese-first for now unless a future site explicitly requires another locale.

## Current apps

- `apps/finance` — Finance AIP micro website, initially based on the reference deployment at `https://finance-ow7i0ad0t-jane-na-querypies-projects.vercel.app/`.

## Architecture

The repository uses multiple independent Next.js apps rather than one app with host-based rewrites. Each micro website should be deployable as its own Vercel project with its app directory as the project root.

```text
apps/
finance/ # Next.js app for the Finance AIP micro website
packages/
microsite-links/ # Canonical links back to the QueryPie AI Japan main site
microsite-ui/ # Shared UI primitives for small marketing sites
tests/ # Lightweight repository structure tests
.agents/skills/ # Repo-local agent skills
```

## Design and authoring principles

- Keep each micro website small, direct, and easy to review.
- Keep visible marketing copy in the relevant `page.tsx` file by default.
- Use shared packages for UI primitives, not for hiding page-specific story order or large content registries.
- Use Japanese for public website copy until the site explicitly needs another locale.
- Link shared company, contact, legal, and resource surfaces to the main QueryPie AI Japan website instead of duplicating them.
- Keep static assets app-local under each app's `public/` directory when the asset belongs to one micro website.

## Quick start

```bash
npm install
npm run test:ci
```

For app-specific development:

```bash
npm run dev --workspace @querypie/microsite-finance
```

## Deployment model

Create one Vercel project per app. For the finance site, use:

- Root directory: `apps/finance`
- Build command: `npm run build`
- Install command: `npm install`
- Output: Next.js default

Common company links should continue to point to `https://querypie.ai`.
29 changes: 29 additions & 0 deletions apps/finance/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Finance Micro Website

This app hosts the Finance AIP micro website.

## Local commands

Run from the repository root:

```bash
npm run dev --workspace @querypie/microsite-finance
npm run lint --workspace @querypie/microsite-finance
npm run typecheck --workspace @querypie/microsite-finance
npm run build --workspace @querypie/microsite-finance
```

## Deployment

Create a dedicated Vercel project for this app.

- Root directory: `apps/finance`
- Install command: `npm install`
- Build command: `npm run build`
- Runtime: Node.js 24 LTS

The app currently assumes the canonical production URL `https://finance.querypie.ai` in `src/lib/site-config.ts`. Update that value when the final domain is chosen.

## Content policy

Public website copy is Japanese-first. Repository docs and PR text should remain English.
11 changes: 11 additions & 0 deletions apps/finance/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig, globalIgnores } from "eslint/config";
import nextVitals from "eslint-config-next/core-web-vitals";
import nextTs from "eslint-config-next/typescript";

const eslintConfig = defineConfig([
...nextVitals,
...nextTs,
globalIgnores([".next/**", "out/**", "next-env.d.ts"]),
]);

export default eslintConfig;
6 changes: 6 additions & 0 deletions apps/finance/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
7 changes: 7 additions & 0 deletions apps/finance/next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
transpilePackages: ["@querypie/microsite-ui", "@querypie/microsite-links"],
};

export default nextConfig;
29 changes: 29 additions & 0 deletions apps/finance/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "@querypie/microsite-finance",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@querypie/microsite-links": "file:../../packages/microsite-links",
"@querypie/microsite-ui": "file:../../packages/microsite-ui",
"next": "16.2.6",
"react": "19.2.6",
"react-dom": "19.2.6"
},
"devDependencies": {
"@tailwindcss/postcss": "4.3.0",
"@types/node": "^24.10.1",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"eslint": "^9.39.1",
"eslint-config-next": "16.2.6",
"tailwindcss": "4.3.0",
"typescript": "6.0.3"
}
}
Loading
Loading